Update Order Status

POST {{url}}/api/teknocore/update-status/8ed3deed-a5ac-480d-b680-c1eaf04a0670

Update Status API

Overview

This API allows you to update the status of an existing order. The order is identified by its id, which is provided as a path parameter, and the new status is specified as an integer in the request body. The id will be provided in the Teknocore API as customerIncidentNo. When updating the ticket, you should send this id along with the new order status.

Endpoint

PUT /api/teknocore/update-status

Path Parameters

ParameterTypeDescription
idstringThe unique identifier of the order

Request Body

The request body must be in JSON format and include the following field:

FieldTypeDescription
statusintegerThe new status of the order. Valid values are:
4 for Accepted
5 for Rejected

Example Request Body

{
    "status": 4
}

Response

The response will include the updated order details.

Example Response

Success Response With Status Code 200

{
    "success": true,
    "code": null,
    "locale": "en",
    "message": null,
    "data": {
        "order": true
    }
}

Fail Response With Status Code 400

{
    "success": false,
    "code": null,
    "locale": "en",
    "message": "Order is already updated",
    "data": null
}HTTP Status Codes

Example cURL Command

curl -X PUT "https://api.example.com/orders/12345/status" \
-H "Content-Type: application/json" \
-d '{"status": 4}'

Notes

  • Ensure that the id provided in the path parameter exists in the database.

  • The status field should be a valid integer and one of the following values:

    • 4 for Archived
    • 5 for Rejected

Request Body

{"status"=>5}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring