Delete Trade Document
DELETE /api/v1/trades/{tradeId}/docs/{docLinkId}
Description
Deletes a specific document link associated with a trade, such as contracts, agreements, or other relevant documentation. This endpoint is used to manage and maintain the accuracy of document records attached to trades, ensuring that only current and relevant documents are associated.
URL Parameters:
tradeId(required): The unique identifier of the trade from which the document is to be deleted. This must be included in the URL path.docLinkId(required): The unique identifier of the document link to be deleted. 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 deleting the document. This header is used for authentication and authorization.
Example Request:
curl -X DELETE "http://[base_url]/api/v1/trades/{tradeId}/docs/{docLinkId}" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456"
Responses:
- 200 OK: Successfully deleted the document from the trade. The response typically includes a confirmation message stating that the document has been removed.
Example Response:
{
"message": "Document deleted successfully."
}
Error Responses:
- 400 Bad Request: Incorrect parameters provided.
- 404 Not Found: No document found with the provided
docLinkIdor no trade found with the providedtradeId. - 403 Forbidden: The user does not have permission to delete the document.
LANGUAGE
CURL REQUEST
curl --request DELETE \
--url /api/v1/trades/{tradeId}/docs/{docLinkId} \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!