Skip to main content

Get Supply Plans

POST 

/v1/supply_plan/get_all

Get Supply Plans

Gets supply plans on flows your tenant is part of, whether you sent them or received them.

Headers​

These headers are optional if you are authenticated via API key. Your API key supplies the necessary data
HeaderTypeRequiredDescription
X-Tenant-NamestrNoName of the origin tenant making the request

Request​

limit: int
How many supply plans to return. Must be between 1 and 100.


skip: int
How many supply plans to skip before returning. Use this in addition to limit to paginate.

SkipLimitSupply plans returned
01001-100
100100101-200
1000101001-1010

A page shorter than limit means you have reached the end of the results.


body: V1SupplyPlanRequest
Optional filters to narrow the returned supply plans. All filters are optional — omit the body or pass an empty object to fetch all supply plans.

Show V1SupplyPlanRequest Attributes

All fields are optional. Omit the body, or send an empty object, to fetch every supply plan visible to your tenant. Filters combine with AND.


integration_status: IntegrationStatus | None = None
Filter by integration pipeline status.

Supply Plan Status Values

origin_mapped
The supply plan has been received by Crossroads and needs mapping to Crossroads master data.

master_mapped
The supply plan has been mapped to Crossroads master data and needs mapping to the destination system.

destination_mapped
The supply plan has been mapped to the destination system and is ready to be sent.

synced
The supply plan has been successfully sent to the destination system.

error
An error occurred during processing. Check the log for details.


partner_tenant: str | None = None
Name of the counterparty tenant. Returns only plans on a flow between you and them, in either direction. Returns 404 if no tenant has that name.


created_before: datetime | None = None
Return only supply plans created before this timestamp.


created_after: datetime | None = None
Return only supply plans created after this timestamp.


updated_before: datetime | None = None
Return only supply plans updated before this timestamp. A plan is "updated" when a later upsert revises it, so plans that have only ever been created are outside this window.


updated_after: datetime | None = None
Return only supply plans updated after this timestamp. Same caveat as updated_before.


effective_as_of: datetime | None = None
Return only supply plans in effect at this timestamp, i.e. whose effective_from is at or before it and whose effective_to is at or after it. Pass the current time to fetch the plans in force right now.


batch_id: str | None = None
Crossroads ID of the upsert batch. Returns the plans that batch created or updated. A batch can hold more than one page of plans -- paginate with limit and skip.


supply_plan_id: str | None = None
Crossroads ID of a single supply plan.


site_name: str | None = None
Site name to match, compared against your copy of the plan. See the note on the response about which copy is yours.


product_name: str | None = None
Product name to match, compared against your copy of the plan.


load_number: str | None = None
Return supply plans with a component carrying this load number.

Response​

supply_plans: list[CrossroadsSupplyPlan]
A list of fetched supply plans.

Each supply plan contains an origin_supply_plan and a destination_supply_plan. These represent the same plan from each side of the transaction, mapped to the respective tenant's data.

Determining Your Copy of the Supply Plan

To identify which copy of the supply plan data belongs to your tenant, check the routing object on the plan:

  • If your tenant matches routing.origin_tenant_name, use origin_supply_plan as your copy and destination_supply_plan as the counterparty's copy.
  • If your tenant matches routing.destination_tenant_name, use destination_supply_plan as your copy and origin_supply_plan as the counterparty's copy.

destination_supply_plan is None until the plan has been mapped to the destination system, so a plan that failed mapping only ever has an origin_supply_plan. This endpoint can return supply plans that are not yet successfully mapped to your system. If you wish to only see supply plans that have successfully mapped, use the integration_status parameter to search for plans in the "synced" state.

Show CrossroadsSupplyPlan Attributes

id: str
Crossroads ID of the supply plan.


status: IntegrationStatus
Where the plan is in the integration pipeline.

Supply Plan Status Values

origin_mapped
The supply plan has been received by Crossroads and needs mapping to Crossroads master data.

master_mapped
The supply plan has been mapped to Crossroads master data and needs mapping to the destination system.

destination_mapped
The supply plan has been mapped to the destination system and is ready to be sent.

synced
The supply plan has been successfully sent to the destination system.

error
An error occurred during processing. Check the log for details.


routing: CrossroadsRoutingInfo
The tenants and systems on either side of this flow. Use this to work out which copy of the plan is yours.


batch_id: str
ID of the upsert batch this plan was last created or updated by.


origin_supply_plan: SupplyPlan
The plan as the origin tenant sees it, in the origin system's own identifiers.

Show SupplyPlan Attributes

rank: int
Preference order for this plan at the site/product. Lower ranks are preferred.


site: SiteMappingKey
Site the supply is delivered to.

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
Product being supplied to 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.


components: list[SupplyPlanComponent]
The sources of supply for this plan.

Show SupplyPlanComponent Attributes

A component is one source of supply for the plan: where the product is lifted, who supplies it, and how it is priced.


terminal: TerminalMappingKey
Terminal the product is lifted from.

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
Product lifted at the terminal. May differ from the plan's own product when the terminal carries it under a different code.

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
Company supplying 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
How the product is priced. One of rack, contract, index, inventory, spot.


contract: str | None = None
Contract identifier, when the price type is contract-based.


curve_id: str | None = None
Pricing curve identifier. Only meaningful on your own copy of the plan -- it is cleared when the plan is mapped to the other side.


load_number: str | None = None
Your identifier for this component. Copied unchanged onto every copy of the plan, so it is the same value on both sides of the flow.


supply_plan_id: str
Crossroads ID of the supply plan this copy belongs to. The same on all copies.


sd_psp_id: str | None = None
Identifier of the plan in the supply and demand system it originated from, if any.


destination_supply_plan: SupplyPlan | None = None
The same plan translated into the destination system's identifiers. None until the plan reaches destination_mapped.


effective_from: datetime
When this plan takes effect.


effective_to: datetime
When this plan stops being in effect.


locked: bool
Whether the plan is locked against changes by the destination.


created_on: datetime
When the plan was first received by Crossroads.


updated_on: datetime | None = None
When a later upsert last revised the plan. None if it has only ever been created.

Responses​

Successful Response

[
{
"_id": "5eb7cf5a86d9755df3a6c593",
"status": "origin_mapped",
"routing": {
"origin_tenant_id": "string",
"origin_tenant_name": "string",
"origin_source_system": "string",
"origin_source_system_id": "string",
"origin_instance_id": "string",
"origin_instance_name": "string",
"destination_tenant_id": "string",
"destination_tenant_name": "string",
"destination_source_system": "string",
"destination_source_system_id": "string",
"destination_instance_id": "string",
"destination_instance_name": "string"
},
"batch_id": "5eb7cf5a86d9755df3a6c593",
"origin_supply_plan": {
"rank": 0,
"site": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"product": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"components": [
{
"product": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"terminal": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"supplier": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"price_type": "rack",
"contract": "string",
"curve_id": "string",
"load_number": "string"
}
],
"supply_plan_id": "5eb7cf5a86d9755df3a6c593",
"sd_psp_id": "string"
},
"master_supply_plan": {
"rank": 0,
"site": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"product": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"components": [
{
"product": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"terminal": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"supplier": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"price_type": "rack",
"contract": "string",
"curve_id": "string",
"load_number": "string"
}
],
"supply_plan_id": "5eb7cf5a86d9755df3a6c593",
"sd_psp_id": "string"
},
"destination_supply_plan": {
"rank": 0,
"site": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"product": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"components": [
{
"product": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"terminal": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"supplier": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"price_type": "rack",
"contract": "string",
"curve_id": "string",
"load_number": "string"
}
],
"supply_plan_id": "5eb7cf5a86d9755df3a6c593",
"sd_psp_id": "string"
},
"origin_key": "string",
"effective_from": "2026-09-25T19:33:17.215Z",
"effective_to": "2026-09-25T19:33:17.215Z",
"locked": true,
"created_on": "2026-09-25T19:33:17.215Z",
"updated_on": "2026-09-25T19:33:17.215Z",
"log": {
"_id": "5eb7cf5a86d9755df3a6c593",
"title": "string",
"date": "2026-09-25T19:33:17.236Z",
"status": "unknown",
"severity": "low",
"routing": {
"origin_tenant_id": "string",
"origin_tenant_name": "string",
"origin_source_system": "string",
"origin_source_system_id": "string",
"origin_instance_id": "string",
"origin_instance_name": "string",
"destination_tenant_id": "string",
"destination_tenant_name": "string",
"destination_source_system": "string",
"destination_source_system_id": "string",
"destination_instance_id": "string",
"destination_instance_name": "string"
},
"detail": {
"category": "success",
"message": "string",
"message_short": "string",
"extra_data": {},
"warning_details": [
{
"type": "allocation",
"period": "daily",
"contract": "string",
"allocation": 0,
"total": 0,
"origin_order_number": "string",
"origin_tenant_name": "origin",
"destination_tenant_name": "destination",
"verb": "created",
"message": "string",
"subheader": "string"
},
{
"type": "best_supply_chosen",
"message": "string",
"subheader": "string"
},
{
"type": "delivery_window_change_forbidden",
"current_state": "string",
"allowed_until": "string",
"message": "string",
"subheader": "string"
},
{
"type": "reverse_update_failed",
"mapping_error": {
"category": "mapping_v3",
"message": "string",
"message_short": "string",
"subheader": "string",
"error": "unknown",
"solutions": [
{
"type": "add_product_id_to_tank",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"site_name": "string",
"site_source_id": "string",
"product_name": "string",
"product_source_id": "string",
"message": "string",
"extra_info_message": "string"
},
{
"type": "sync_sites",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"message": "string",
"extra_info_message": "string"
},
{
"type": "create_mapping",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"mapping_key": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"mapping_type": "product",
"message": "string",
"extra_info_message": "string"
},
{
"type": "link_to_master",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"mapping_type": "product",
"mapping_key": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"goid": "string",
"goid_name": "string",
"message": "string",
"extra_info_message": "string"
},
{
"type": "link_tank_to_master",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"mapping_type": "product",
"mapping_key": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"goid": "string",
"goid_name": "string",
"tank_id": "string",
"message": "string",
"extra_info_message": "string"
},
{
"type": "unlink_goids",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"mapping_key": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"mapping_type": "product",
"tank_id": "string",
"message": "string",
"extra_info_message": "string"
},
{
"type": "unlink_mappings",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"mapping_keys": [
{
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
}
],
"mapping_type": "product",
"message": "string",
"extra_info_message": "string"
},
{
"type": "enable_load_fanout",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"partner_tenant": "string",
"partner_tenant_id": "string",
"message": "string",
"extra_info_message": "string"
},
{
"type": "confirm_correct_delivery",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"message": "string",
"extra_info_message": "string"
},
{
"type": "set_tenant_on_counterparty",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"tenant_goid": "string",
"tenant_name": "string",
"counterparty": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"message": "string",
"extra_info_message": "string"
},
{
"type": "set_product_on_tank",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"site_mapping": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"product_mapping": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"possible_tank_ids": [
"string"
],
"message": "string",
"extra_info_message": "string"
},
{
"type": "use_tank_ids",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"message": "string",
"extra_info_message": "string"
},
{
"type": "set_default_price_type",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"counterparty_mapping": {
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
},
"message": "string",
"extra_info_message": "string"
},
{
"type": "collaborate_on_supply",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"tenant_name": "string",
"message": "string",
"extra_info_message": "string"
},
{
"type": "set_supplier_filters",
"tenant_ids": [
"string"
],
"extra_info_code": "supply_owner_rule",
"mapping_keys": [
{
"mapping_id": "5eb7cf5a86d9755df3a6c593",
"source_name": "string",
"source_id": "string",
"goid": "string",
"goid_name": "string"
}
],
"mapping_type": "counterparty",
"message": "string",
"extra_info_message": "string"
}
]
},
"origin_tenant_name": "string",
"dest_tenant_name": "string",
"message": "string",
"subheader": "string"
},
{
"type": "unknown",
"source": "string",
"message": "string",
"subheader": "string"
}
]
},
"metadata": {
"type": "order",
"group_id": "string",
"origin_order_number": "string",
"crossroads_order_id": "string"
},
"correlation_id": "string",
"retried": false,
"overridden": false,
"saga_id": "string",
"saga_type": "string",
"send_notification": true,
"outbound_request": {},
"inbound_request": {},
"issue_owners": [
"string"
]
},
"price_upsert_attempted": false,
"price_upsert_succeeded": false,
"supply_upsert_succeeded": false,
"supply_upsert_skipped": false,
"audit": {
"_id": "5eb7cf5a86d9755df3a6c593",
"saga_id": "string",
"routing": {
"origin_tenant_id": "string",
"origin_tenant_name": "string",
"origin_source_system": "string",
"origin_source_system_id": "string",
"origin_instance_id": "string",
"origin_instance_name": "string",
"destination_tenant_id": "string",
"destination_tenant_name": "string",
"destination_source_system": "string",
"destination_source_system_id": "string",
"destination_instance_id": "string",
"destination_instance_name": "string"
},
"created_on": "2026-09-25T19:33:17.240Z"
}
}
]
Loading...