Update Trade Delivery Details
PATCH /api/v1/trades/{tradeId}/delivery-details
Description
Updates the delivery details for a specific trade, including information about ports, warehouses, shipping dates, and tracking. This endpoint facilitates the management of logistics and ensures that all modifications are recorded and transparent, improving the efficiency of supply chain operations.
URL Parameters:
tradeId(required): The unique identifier of the trade for which delivery details are being updated. This must be included in the URL path.
Headers:
tenantId(required): The tenant ID under which the trade is registered. This header identifies the specific tenant environment and should be included.userId(required): The user ID of the individual responsible for updating the delivery details. This header is used for authentication and authorization.
Request Body (application/json): Required. The body should include updated information about the delivery aspects of the trade:
{
"portInfo": "string",
"originAddress": "string",
"destinationAddress": "string",
"sateliteWarehouse": "string",
"centralWarehouse": "string",
"shippingDate": "string",
"shippingTerms": "string",
"trackingProvider": "string",
"trackingNumber": "string",
"trackingUrl": "string",
"dispatchDate": "string",
"docLinks": [
{
"name": "string",
"link": "string"
}
],
"userId": "string",
"tenantId": "string"
}
Description: Updates the delivery details for a specific trade, including information about ports, warehouses, shipping dates, and tracking. This endpoint facilitates the management of logistics and ensures that all modifications are recorded and transparent, improving the efficiency of supply chain operations.
Example Request:
curl -X PATCH "http://[base_url]/api/v1/trades/{tradeId}/delivery-details" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-d '{
"portInfo": "Updated Port Info",
"originAddress": "123 Origin St, City, Country",
"destinationAddress": "456 Destination St, City, Country",
"sateliteWarehouse": "Satellite Warehouse A",
"centralWarehouse": "Central Warehouse B",
"shippingDate": "2024-01-15",
"shippingTerms": "FOB Destination",
"trackingProvider": "Global Shipping Co",
"trackingNumber": "TRACK123456",
"trackingUrl": "http://example.com/track",
"dispatchDate": "2024-01-10",
"docLinks": [
{
"name": "Shipping Manifest",
"link": "http://example.com/manifest.pdf"
}
],
"userId": "USR456",
"tenantId": "TEN123"
}'
Responses:
- 200 OK: Successfully updated the trade's delivery details. The response typically includes a confirmation of the changes made.
Example Response:
{
"message": "Delivery details updated successfully."
}
Error Responses:
- 400 Bad Request: Incorrect or incomplete data provided for the update.
- 404 Not Found: No trade found with the provided
tradeId. - 403 Forbidden: The user does not have permission to update the delivery details.
LANGUAGE
CURL REQUEST
curl --request PATCH \
--url /api/v1/trades/{tradeId}/delivery-details \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!