Update Trade Tracking Status
PATCH /api/v1/trade-trackings/{trackingId}/status
Description
Updates the status of a specific trade tracking entry, modifying its current state such as moving it to 'SELLER_WAREHOUSE', 'IN_TRANSIT', or 'DELIVERED', depending on the stage of the trade process. This action helps to maintain accurate and timely updates of the trade's logistics progress.
URL Parameters:
trackingId(required): The unique identifier of the trade tracking entry whose status is being updated. This must be included in the URL path.
Headers:
tenantId(optional): The tenant ID under which the trade tracking is registered. This identifies the specific tenant environment and should be included as a header if provided.userId(optional): The user ID of the individual making the update. This header is used for authentication and authorization.countryCode(optional): The country code indicating where the trade operations are based or registered.
Request Body (application/json):
Required. The body should include the new status and associated details:
{
"status": "SELLER_WAREHOUSE",
"tradeId": "string",
"userId": "string",
"tenantId": "string",
"countryCode": "string"
}
Example Request:
curl -X PATCH "http://[base_url]/api/v1/trade-trackings/{trackingId}/status" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-H "countryCode: US" \
-d '{
"status": "SELLER_WAREHOUSE",
"tradeId": "TRADE123",
"userId": "USER321",
"tenantId": "TEN456",
"countryCode": "US"
}'
Responses:
- 200 OK: Successfully updated the trade tracking status. The response typically includes a confirmation of the update.
Example Response:
{
"message": "Trade tracking status updated successfully."
}
Error Responses:
- 400 Bad Request: Incorrect or incomplete data provided for the update.
- 404 Not Found: No tracking found with the provided
trackingId. - 403 Forbidden: The user does not have permission to update the tracking status.
LANGUAGE
CURL REQUEST
curl --request PATCH \
--url /api/v1/trade-trackings/{trackingId}/status \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!