Skip to main content
GET
/
api
/
v1
/
contracts
/
{id}
/
legs
curl -X GET "https://commodityai.app/api/v1/contracts/123e4567-e89b-12d3-a456-426614174000/legs" \
  -H "Authorization: Bearer cai_live_your_api_key_here"
[
  {
    "id": "423e4567-e89b-12d3-a456-426614174003",
    "contract_id": "123e4567-e89b-12d3-a456-426614174000",
    "label": "A",
    "quantity": "25000",
    "shipment_start": "2026-06-01",
    "shipment_end": "2026-06-15"
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.commodityai.io/llms.txt

Use this file to discover all available pages before exploring further.

Returns the legs for a contract. Legs define the allocatable quantities used by allocations, shipments, and reconciliation workflows.

Path Parameters

id
string
required
Contract UUID.

Request Example

curl -X GET "https://commodityai.app/api/v1/contracts/123e4567-e89b-12d3-a456-426614174000/legs" \
  -H "Authorization: Bearer cai_live_your_api_key_here"

Response

[
  {
    "id": "423e4567-e89b-12d3-a456-426614174003",
    "contract_id": "123e4567-e89b-12d3-a456-426614174000",
    "label": "A",
    "quantity": "25000",
    "shipment_start": "2026-06-01",
    "shipment_end": "2026-06-15"
  }
]