Submit Deal Slip for Trade
POST /api/v1/trades/{tradeId}/deal-slip
Description
Submits a deal slip document associated with a trade, formalizing the terms, conditions, or any specific agreements into a documented format. This endpoint is crucial for the verification and archival of trade agreements.
URL Parameters:
tradeId(required): The unique identifier of the trade for which the deal slip is being submitted. 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 submitting the deal slip. This header is used for authentication and authorization.countryCode(required): The country code where the trade is being processed. This should be included as a header.
Request Body (application/json): Required. The body should include the document link for the deal slip and the identifiers of the user and tenant submitting it:
{
"docLink": "string",
"userId": "string",
"tenantId": "string",
"countryCode": "string"
}
Example Request:
curl -X POST "http://[base_url]/api/v1/trades/{tradeId}/deal-slip" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456" \
-H "countryCode: US" \
-d '{
"docLink": "http://example.com/path/to/deal-slip.pdf",
"userId": "USR456",
"tenantId": "TEN123",
"countryCode": "US"
}'
Responses:
- 201 Created: Successfully submitted the deal slip for the trade. The response typically includes a confirmation that the document has been recorded.
Example Response:
{
"message": "Deal slip submitted successfully.",
"docId": "123456"
}
Error Responses:
- 400 Bad Request: Incorrect or incomplete data provided for the submission.
- 404 Not Found: No trade found with the provided
tradeId. - 403 Forbidden: The user does not have permission to submit a deal slip for the trade.
LANGUAGE
CURL REQUEST
curl --request POST \
--url /api/v1/trades/{tradeId}/deal-slip \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!