Update Trade Terms and Conditions
PATCH /api/v1/trades/{tradeId}/terms-conditions
Description
Updates the terms and conditions for a specific trade, ensuring that all legal and contractual modifications are accurately reflected in the trade agreements. This endpoint is crucial for managing legal compliance and clarity between trading parties.
URL Parameters:
tradeId(required): The unique identifier of the trade for which terms and conditions 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 terms and conditions. This header is used for authentication and authorization.
Request Body (application/json): Required. The body should include updated terms and conditions for the trade:
{
"termsAndConditions": "string"
}
Example Request:
curl -X PATCH "http://[base_url]/api/v1/trades/{tradeId}/terms-conditions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-d '{
"termsAndConditions": "Updated terms and conditions related to the trade of agricultural products, including payment terms, delivery obligations, and penalties for non-compliance."
}'
Responses:
- 200 OK: Successfully updated the trade's terms and conditions. The response typically includes a confirmation of the changes made.
Example Response:
{
"message": "Terms and conditions 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 terms and conditions.
LANGUAGE
CURL REQUEST
curl --request PATCH \
--url /api/v1/trades/{tradeId}/terms-conditions \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!