Skip to main content

Retrieve Trade Details

GET /api/v1/trades/{tradeId}

Description

Retrieves detailed information about a specific trade, including product details, quantities, prices, trade status, and other relevant details. This endpoint is crucial for managing trade operations, providing customer support, and conducting sales analysis.

URL Parameters:

  • tradeId (required): The unique identifier of the trade whose details are to be retrieved. 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 querying the trade details. This header is used for authentication and authorization.

Example Request:

curl -G "http://[base_url]/api/v1/trades/{tradeId}" \
-H "Authorization: Bearer [access_token]" \
-H "tenantId: TEN123" \
-H "userId: USR456"

Responses:

  • 200 OK: Successfully retrieved the details of the trade. The response includes comprehensive information such as the trade's product ID, description, quantity, unit price, total amount, and other specifics.

Example Response:

{
"tradeId": "12345",
"productId": "98765",
"description": "High-quality organic apples",
"quantity": 1000,
"indicativeUnitPrice": 2.00,
"totalAmount": 2000.00,
"productUnitType": "Boxes",
"status": "ACTIVE",
"buyerId": "B123",
"sellerId": "S123",
"tradeDate": "2023-04-01",
"docLinks": [
{
"name": "Purchase Agreement",
"link": "http://example.com/document.pdf"
}
],
"labellingRequirement": "Eco-friendly package",
"packagingRequirement": "Recyclable material",
"businessId": "BIZ789",
"countryCode": "US"
}

Error Responses:

  • 400 Bad Request: Incorrect parameters provided.
  • 404 Not Found: No trade found with the provided tradeId.
  • 403 Forbidden: The user does not have permission to view the trade details.

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request GET \ 
--url /api/v1/trades/{tradeId} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!