Skip to main content

Order Update Ep

POST 

/v1/order/update

Update Order

Updates an existing order in Crossroads and sends changes to the destination system.

Required Scopes (order:update)

Headers

HeaderTypeRequiredDescription
X-Tenant-NamestrYesName of the origin tenant making the request
X-Dest-Tenant-NamestrYesName of the destination tenant that will receive the update
X-Origin-System-Namestr | NoneNoName of the origin system. If not provided, uses the tenant's primary system

Request

Show Child Attributes

order: OrderKey
Identifies the order to update. At least one field is required.

Show Child Attributes

origin_order_number: str | None = None
Order number from the origin system.


destination_order_number: int | None = None
Order number in the destination system.


order_id: str | None = None
ID of the order.


delivery_window: DeliveryWindow
Updated time window for delivery.

Show Child Attributes

start: datetime
Start of delivery window.


end: datetime
End of delivery window.


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: SiteMappingKey
Delivery site reference. At least one of mapping_id, source_name, source_id, or goid must be provided. If using mapping_id, source_name, or source_id, tank_id is required. If using goid, tank_goid is required.

Show Child Attributes

mapping_id: str | None = None
ID of the mapping record. Use when you have previously looked up or cached the mapping. Requires tank_id to be set.


source_name: str | None = None
Display name of the site in the source system. Matched against the mapping's display_name field. Requires tank_id to be set.


source_id: str | None = None
Unique identifier of the site in the source system. Matched against the mapping's source_id field. Requires tank_id to be set.


goid: str | None = None
Gravitate Object ID - direct reference to master data. When set, no other fields can be provided except tank_goid. Format: site_XXXXXX.


tank_id: str | None = None
Tank identifier at the site in the source system. Required when using mapping_id, source_name, or source_id. Max 10 characters.


tank_goid: str | None = None
Tank Gravitate Object ID. Required when using goid. Format: tank_XXXXXX. Max 50 characters.


product: ProductMappingKey | None = None
Product to deliver. At least one of mapping_id, source_name, source_id, or goid must be provided.

Show Child Attributes

mapping_id: str | None = None
ID of the mapping record. Use when you have previously looked up or cached the mapping.


source_name: str | None = None
Display name of the product in the source system. Matched against the mapping's display_name field.


source_id: str | None = None
Unique identifier of the product in the source system. Matched against the mapping's source_id field.


goid: str | None = None
Gravitate Object ID - direct reference to master data. When set, no other fields can be provided. Format: product_XXXXXX.


volume: int
Volume to deliver in gallons.


loads: list[Load] = []
Supply source instructions for this drop. Each load specifies where and how product will be sourced.

Show Child Attributes

terminal: TerminalMappingKey | None = None
Loading terminal for pickup. At least one of mapping_id, source_name, source_id, or goid must be provided.

Show Child Attributes

mapping_id: str | None = None
ID of the mapping record. Use when you have previously looked up or cached the mapping.


source_name: str | None = None
Display name of the terminal in the source system. Matched against the mapping's display_name field.


source_id: str | None = None
Unique identifier of the terminal in the source system. Matched against the mapping's source_id field.


goid: str | None = None
Gravitate Object ID - direct reference to master data. When set, no other fields can be provided. Format: terminal_XXXXXX.


product: ProductMappingKey | None = None
Product to load. Only set when creating blends - otherwise inherited from drop.

Show Child Attributes

mapping_id: str | None = None
ID of the mapping record. Use when you have previously looked up or cached the mapping.


source_name: str | None = None
Display name of the product in the source system. Matched against the mapping's display_name field.


source_id: str | None = None
Unique identifier of the product in the source system. Matched against the mapping's source_id field.


goid: str | None = None
Gravitate Object ID - direct reference to master data. When set, no other fields can be provided. Format: product_XXXXXX.


supplier: CounterpartyMappingKey | None = None
Supplier providing the product. At least one of mapping_id, source_name, source_id, or goid must be provided.

Show Child Attributes

mapping_id: str | None = None
ID of the mapping record. Use when you have previously looked up or cached the mapping.


source_name: str | None = None
Display name of the supplier in the source system. Matched against the mapping's display_name field.


source_id: str | None = None
Unique identifier of the supplier in the source system. Matched against the mapping's source_id field.


goid: str | None = None
Gravitate Object ID - direct reference to master data. When set, no other fields can be provided. Format: company_XXXXXX.


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.


Response

status: str
Crossroads integration status. Each status represents a step in the integration pipeline.

Integration Stages

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.

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.


order_change: OrderChange
The order change record.

Show Child Attributes

delivery_window: DeliveryWindow
Updated time window for delivery.

Show Child Attributes

start: datetime
Start of delivery window.


end: datetime
End of delivery window.


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.


extra_data: dict = {}
Additional custom data.


message: str | None = None
Status message or error details.


log: CrossroadsLogV2 | None = None
Processing log entry.

Responses

Successful Response

Loading...