Skip to main content

Update Itinerary Details in Trade Tracking

PATCH /api/v1/trade-trackings/{trackingId}/reference/{referenceId}/itenary

Description

This endpoint allows for updates to a specific trade tracking entry, modifying details such as the delivered quantity, itinerary changes, documentation, and other relevant tracking information.

URL Parameters:

  • trackingId (required): The unique identifier of the trade tracking entry to be updated. This must be included in the URL path.
  • referenceId (required): The unique identifier of the specific itinerary reference within the tracking entry. This must also be included in the URL path.

Headers:

  • tenantId (required): The tenant ID under which the trade tracking is registered. This identifies the specific tenant environment and should be included as a header.
  • userId (required): The user ID of the individual making the update. This header is used for authentication and authorization.
  • countryCode (required): The country code indicating where the trade operations are based or registered.

Request Body (application/json):

Required. The body should include updated information for the itinerary:

{
"trackingId": "string",
"origin": "string",
"destination": "string",
"shippingDate": "string",
"trackingProvider": "string",
"deliveryDate": "string",
"deliveryMode": "string",
"finalDestination": false,
"qualityChecked": true,
"labellingDetails": "string",
"docLinks": [
{
"name": "string",
"link": "string"
}
],
"tradeId": "string",
"userId": "string",
"tenantId": "string",
"countryCode": "string"
}

Example Request:

curl -X PATCH "http://[base_url]/api/v1/trade-trackings/{trackingId}/reference/{referenceId}/itenary" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-H "countryCode: US" \
-d '{
"trackingId": "TRACK456",
"origin": "Tokyo, Japan",
"destination": "San Francisco, USA",
"shippingDate": "2023-05-01",
"trackingProvider": "Global Express",
"deliveryDate": "2023-05-10",
"deliveryMode": "Sea",
"finalDestination": true,
"qualityChecked": true,
"labellingDetails": "Handle with care",
"docLinks": [
{
"name": "Shipping Document",
"link": "http://example.com/shipping-doc.pdf"
}
],
"tradeId": "TRADE789",
"userId": "USR789",
"tenantId": "TEN234",
"countryCode": "JP"
}'

Responses:

  • 200 OK: Successfully updated the itinerary details. The response typically includes a confirmation of the update.

Example Response:

{
"message": "Itinerary details 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 or referenceId.
  • 403 Forbidden: The user does not have permission to update the itinerary details.

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /api/v1/trade-trackings/{trackingId}/reference/{referenceId}/itenary \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!