Order Update Ep
POST/v1/order/update
Update Order
Updates an existing order in Crossroads and sends changes to the destination system.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
| X-Tenant-Name | str | No | Name of the origin tenant making the request. Optional if you are authenticated by API key. |
| X-Origin-Instance-Name | str | None | No | Name of the instance creating the request. Optional if you are authenticated by API key. |
| X-Dest-Tenant-Name | str | Yes | Name of the destination tenant that will receive the request |
Request
order: OrderRequest
Identifies the order. Provide either field - the system resolves direction automatically.
Show OrderRequest Attributes
order_id: str | None = None
The Crossroads order ID (if known).
order_number: str | None = None
Your order number. Crossroads will look for orders created by you and created by others and sent to you.
delivery_window: DeliveryWindow | None = None
Updated time window for delivery. Omit if unchanged.
Show DeliveryWindow Attributes
start: datetime
Start of delivery window.
end: datetime
End of delivery window. End date must be after start date.
timezone: str = "UTC"
Timezone name.
note: str | None = None
Updated order notes (max 300 characters).
drops: list[Drop] = []
Updated list of delivery drops.
Show Child Attributes
site: SiteTankMappingKey
Delivery site reference. Either tank_id on the site or product on the drop must be provided for tank resolution.
Show SiteTankMappingKey Attributes
To choose site, at least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id. To choose tank, at least one of tank_id or product_source_id must be provided. Crossroads recommends that you provide tank_id. If you provide product_source_id, only tanks that have a product ID can be chosen. If two tanks have the same product ID, the one with the lowest ID will be chosen.
source_id: str | None = None
Unique identifier of the site in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the site in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the site mapping record. Use when you have previously looked up or cached the mapping.
tank_id: str | None = None
Tank ID of the tank to be selected. Matched against the tanks at the site.
product_source_id: str | None = None
Product ID for a product contained in a tank at the site.
product: ProductMappingKey | None = None
Product being delivered. Required if tank_id is not provided on the site.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
volume: int
Volume to deliver in gallons.
extra_data: dict = {}
Additional custom data for this drop.
loads: list[Load] = []
Supply source instructions for this drop. Each load specifies where and how product will be sourced. A load is considered fully qualified when terminal, product, supplier, and price_type are all provided.
Show Child Attributes
terminal: TerminalMappingKey | None = None
Loading terminal for pickup.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
product: ProductMappingKey | None = None
Product to load.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
supplier: CounterpartyMappingKey | None = None
Supplier providing the product.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
price_type: PriceType | None = None
Pricing methodology for the supply option.
rack - Spot rack price at the terminal.
contract - Negotiated contract price.
index - Index-based pricing (e.g., OPIS).
inventory - Priced from existing inventory.
spot - Spot market price.
contract: str | None = None
Contract identifier when price_type is "contract". Max 100 characters.
extra_data: dict = {}
Additional metadata for the order.
reason_code: str | None = None
Optional reason code for the order update (max 30 characters).
Response
status: str
Crossroads integration status. Each status represents a step in the integration pipeline.
Integration Stages
pending
The request has been accepted and is being processed asynchronously.
requested
The order has been created and is awaiting manual acceptance by the destination tenant.
origin_mapped
The order has been received by crossroads and needs mapping to crossroads master data.
master_mapped
The order has been mapped to crossroads master data and needs mapping to the destination system.
destination_mapped
The order has been mapped to the destination system and is ready to be sent.
synced
The order has been successfully sent to the destination system.
canceled
The order has been canceled.
error
An error occurred during processing. Check the message and log for details.
rejected
The order was rejected by the destination system. Check the message and log for details.
message: str | None = None
Status message or error details.
log: CrossroadsLogV2 | None = None
Processing log entry.
order_change: OrderChange
The order change record.
Show Child Attributes
delivery_window: DeliveryWindow | None = None
Updated time window for delivery. Omit if unchanged.
Show DeliveryWindow Attributes
start: datetime
Start of delivery window.
end: datetime
End of delivery window. End date must be after start date.
timezone: str = "UTC"
Timezone name.
note: str | None = None
Order notes (max 300 characters).
drops: list[Drop]
List of delivery drops on the order change.
Show Child Attributes
site: SiteTankMappingKey
Delivery site reference. Either tank_id on the site or product on the drop must be provided for tank resolution.
Show SiteTankMappingKey Attributes
To choose site, at least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id. To choose tank, at least one of tank_id or product_source_id must be provided. Crossroads recommends that you provide tank_id. If you provide product_source_id, only tanks that have a product ID can be chosen. If two tanks have the same product ID, the one with the lowest ID will be chosen.
source_id: str | None = None
Unique identifier of the site in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the site in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the site mapping record. Use when you have previously looked up or cached the mapping.
tank_id: str | None = None
Tank ID of the tank to be selected. Matched against the tanks at the site.
product_source_id: str | None = None
Product ID for a product contained in a tank at the site.
product: ProductMappingKey | None = None
Product being delivered. Required if tank_id is not provided on the site.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
volume: int
Volume to deliver in gallons.
extra_data: dict = {}
Additional custom data for this drop.
loads: list[Load] = []
Supply source instructions for this drop. Each load specifies where and how product will be sourced. A load is considered fully qualified when terminal, product, supplier, and price_type are all provided.
Show Child Attributes
terminal: TerminalMappingKey | None = None
Loading terminal for pickup.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
product: ProductMappingKey | None = None
Product to load.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
supplier: CounterpartyMappingKey | None = None
Supplier providing the product.
Show MappingKey Attributes
At least one of source_id, source_name, or mapping_id must be provided. Crossroads recommends that you provide source_id.
source_id: str | None = None
Unique identifier of the counterparty in the source system. Matched against the mapping's source_id field.
source_name: str | None = None
Display name of the entity in the source system. Matched against the mapping's display_name field.
mapping_id: str | None = None
Database ID of the mapping record. Use when you have previously looked up or cached the mapping.
price_type: PriceType | None = None
Pricing methodology for the supply option.
rack - Spot rack price at the terminal.
contract - Negotiated contract price.
index - Index-based pricing (e.g., OPIS).
inventory - Priced from existing inventory.
spot - Spot market price.
contract: str | None = None
Contract identifier when price_type is "contract". Max 100 characters.
extra_data: dict = {}
Additional custom data.
Responses
- 200
- 422
Successful Response
Validation Error
- application/json
- Example (from schema)
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}