Our API allows you to update shipment statuses for better tracking and management. The updateOrderStatus endpoint supports updating the status of an order to specific allowed statuses, including:
- Picked Up
- Delivered
- Returned
This guide explains how to use the updateOrderStatus endpoint to change shipment statuses.
Instructions
Step 1: API Endpoint
- The endpoint to update shipment status is:
POSThttps://api.tryoto.com/rest/v2/updateOrderStatus
Step 2: Authorization
- Include a valid Bearer Token in the request headers for authentication.
Step 3: Example Request
- Here is an example of a request to update a shipment’s status to "delivered":
Using cURL:
curl --location 'https://api.tryoto.com/rest/v2/updateOrderStatus' \ --data-raw '{ "orderIds": [ 30846946 ], "status": "delivered", "date": "2024-08-06T21:00:00.000Z", "description": "Delivered to customer" }'
Step 4: Example Response
- A successful response will look like this:
{ "result": [ { "success": true, "orderIds": ["30846946"] } ] }
This endpoint works only for the mentioned statuses, for updating shipments to other statuses ; kindly contact support.