API Reference
Orders
Retrieve, create, and update order records.
List Orders
Retrieves a list of orders.
HTTP Request
GET https://api.cdr.fyi/v1/orders
Query Parameters
Parameter | Type | Description |
---|---|---|
entityFilterType | String | Filter by entity (Supplier, Marketplace, Purchaser) |
entityFilterId | String | Filter by entity ID |
Custom Headers
x-page
: The page number (default is 1)x-limit
: Number of items per page (max 100, default is 10)
Example Request
Create or Update an Order
This endpoint creates a new order or updates an existing one by upserting based on the order_id
.
HTTP Request
POST https://api.cdr.fyi/v1/orders
Request Headers
- Authorization: Bearer YOUR_ACCESS_TOKEN
- Content-Type: application/json
Request Body Parameters
Parameter | Type | Description | Required |
---|---|---|---|
order_id | String | Unique identifier for the order | No |
purchaser_id | String | Identifier for the purchaser | Yes |
supplier_id | String | Identifier for the supplier | Yes |
marketplace_id | String | Identifier for the marketplace | No |
status | String | Current status of the order (MOU/LOI, Undelivered, Partial, Delivered) | Yes |
delivery_status_source | String | Source of the delivery status | No |
delivery_verified | Boolean | Whether the delivery is verified | No |
delivery_forecast | String | Forecast of the delivery | No |
delivery_verification_source | String | Source for verifying the delivery | No |
method | String | Method through which the order was placed | No |
tons_purchased | Decimal | Tons purchased in the order | No |
price_usd | Decimal | Price of the order in USD | No |
latest_delivery_date | DateTime | Latest date by which the delivery should be completed | No |
durability_years | Integer | Durability of the product in years | No |
announcement_date | DateTime | Date of the announcement | No |
announcement_link | String | Link to the announcement | No |
source_type | String | Type of source for the order | No |
notes | String | Additional notes, max 500 characters | No |
parent_id | String | Reference to a previous order, either as a decomposition of a previously deleted order or as lineage for a resale | No |
is_resale | Boolean | Indicates that the order was a resale | No |
link | String | Link to more information | No |
marketplace_purchaser_id | String | Identifier for the marketplace purchaser | No |
tons_delivered | Decimal | Tons delivered in the order | No |
type_of_agreement | Decimal | The type of agreement, either ‘Credit Sale’, ‘MOU/LOI’ or ‘Delivery Agreement’ | No |
Example Request
Example Response
Error Responses
If the request is not successful, you will receive a 400 Bad Request or 401 Unauthorized response along with an error message indicating the issue.