Accept Trade
GET /api/v1/trades/{tradeId}/tenant/{tenantId}/buyer/{buyerId}/public/accept
Description
This endpoint is used for public acceptance of a trade by the buyer. It facilitates a quick response mechanism for buyers to confirm their agreement to proceed with a trade under specified terms without traditional login credentials. This might be used in scenarios where trade confirmations are handled through simplified or automated processes.
URL Parameters:
tradeId(required): The unique identifier of the trade to be accepted. This must be included in the URL path.tenantId(required): The tenant ID under which the trade is registered. This must be included in the URL path.buyerId(required): The unique identifier of the buyer accepting the trade. This must be included in the URL path.
Example Request:
curl -G "http://[base_url]/api/v1/trades/{tradeId}/tenant/{tenantId}/buyer/{buyerId}/public/accept"
Responses:
- 200 OK: Successfully accepted the trade. The response typically includes details of the trade and a confirmation message that the buyer has accepted the terms.
Example Response:
{
"message": "Trade accepted successfully.",
"tradeId": "12345",
"tenantId": "67890",
"buyerId": "54321",
"status": "Accepted"
}
Error Responses:
- 400 Bad Request: Incorrect parameters provided, such as a missing or invalid
tradeId,tenantId, orbuyerId. - 404 Not Found: No trade found with the provided identifiers or the identifiers do not match an existing configuration.
- 403 Forbidden: The request was unauthorized, possibly due to attempting to accept a trade that does not involve the specified buyer or tenant.
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/trades/{tradeId}/tenant/{tenantId}/buyer/{buyerId}/public/accept \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!