The Outbounds API allows you to create and manage B2B (wholesale) outbound orders. Orders ship from a Flexport warehouse, either a Reserve Storage facility (bulk pallet/case-pack inventory) or a DTC fulfilment center (individual unit inventory), resolved automatically from your account configuration. The APIs also let you track order status, upload shipment documents, and cancel orders.
Creates a B2B (wholesale) outbound order. The origin warehouse (a Flexport Reserve Storage or DTC fulfilment center) is resolved automatically from your account configuration. You do not specify a warehouse type in the request.
Limitations
Ok
| orderId required | string Id generated after successfully creating the order | ||||||||||||||||||||||||||||
| externalId | string External id submitted by the external system when creating the order | ||||||||||||||||||||||||||||
| externalChannelId | string External channel's order id | ||||||||||||||||||||||||||||
| locationId | string Warehouse id from which the order will be sent | ||||||||||||||||||||||||||||
| type required | string (Type) Type of the order, e.g. B2B, EDI, DROP_SHIP. Currently, only B2B is supported | ||||||||||||||||||||||||||||
| orderStatus required | string (OrderStatus) Current status of the order | ||||||||||||||||||||||||||||
required | Array of objects (ReplenishmentOrderItemV2) Items in the order | ||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||
required | Array of objects (ReplenishmentShipmentV2) Shipments created related to the order | ||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||
| shipBy | string <date-time> Ship by date provided by the external system in the request | ||||||||||||||||||||||||||||
| notes | string Additional notes to be provided along with the order | ||||||||||||||||||||||||||||
object (RetailerData) Additional Data required for EDI and DROP_SHIP orders | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ingestionChannel | string (IngestionChannel) Ingestion channel of the order | ||||||||||||||||||||||||||||
Unauthorized
{- "type": "B2B",
- "orderItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0,
- "productData": {
- "upc": "string",
- "buyerPartNumber": "string",
- "sku": "string",
- "gtin": 0
}
}
], - "shipToAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "transportationDetails": {
- "shippingPartner": "FLEXPORT",
- "shippingType": "LTL",
- "carrierAccountDetails": {
- "carrierName": "string",
- "carrierAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "duties": {
- "dutyPaymentAccountDetails": {
- "carrierName": "string",
- "dutyPaymentAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "incoterm": "DAP",
- "eelPfc": "string"
}, - "shippingMethod": "string",
- "shippingSpeed": "ONE_DAY"
}, - "currencyCode": "LTL",
- "externalId": "string",
- "shipBy": "2019-08-24T14:15:22Z",
- "notes": "string",
- "locationId": "string",
- "retailerData": {
- "retailer": "string",
- "purchaseOrderNumber": "string",
- "tradingPartnerId": "string",
- "customerPoNumber": "string",
- "invoiceNumber": "string",
- "markForStore": "string",
- "department": "string",
- "address": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "discounts": [
- {
- "type": "string",
- "value": 0
}
], - "charges": [
- {
- "type": "string",
- "value": 0
}
], - "paymentTerms": {
- "term": "string",
- "dueDate": "2019-08-24T14:15:22Z"
}, - "deliveryDate": "2019-08-24T14:15:22Z",
- "shipByDate": "2019-08-24T14:15:22Z",
- "shipAfterDate": "2019-08-24T14:15:22Z"
}, - "ingestionChannel": "SPS",
- "vasData": {
- "code": "string"
}
}{- "orderId": "string",
- "externalId": "string",
- "externalChannelId": "string",
- "locationId": "string",
- "type": "B2B",
- "orderStatus": "BOOKED",
- "orderItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0,
- "productData": {
- "upc": "string",
- "buyerPartNumber": "string",
- "sku": "string",
- "gtin": 0
}
}
], - "shipments": [
- {
- "status": "CANCELLED",
- "externalChannelShipmentId": "string",
- "externalChannelReferenceNumber": "string",
- "shipmentId": "string",
- "shipmentChargedWeight": 0,
- "shipmentChargedWeightUnit": "oz",
- "shipFromAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "shipToAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "transportationDetails": {
- "shippingPartner": "FLEXPORT",
- "shippingType": "LTL",
- "carrierAccountDetails": {
- "carrierName": "string",
- "carrierAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "duties": {
- "dutyPaymentAccountDetails": {
- "carrierName": "string",
- "dutyPaymentAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "incoterm": "DAP",
- "eelPfc": "string"
}, - "shippingMethod": "string",
- "shippingSpeed": "ONE_DAY"
}, - "packDetails": [
- {
- "packItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH"
}
], - "carrierName": "string",
- "carrierSCAC": "string",
- "trackingNumber": "string",
- "packageStatus": "PRE_TRANSIT",
- "sscc": "string",
- "packDims": {
- "length": 0,
- "width": 0,
- "height": 0,
- "lengthUnit": "in",
- "weight": 0,
- "weightUnit": "oz"
}, - "boxId": "string"
}
], - "freightDetails": [
- {
- "bolId": "string",
- "proNumber": "string",
- "carrierName": "string",
- "carrierSCAC": "string"
}
], - "shipmentItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "shippedQuantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0
}
]
}
], - "shipBy": "2019-08-24T14:15:22Z",
- "notes": "string",
- "retailerData": {
- "retailer": "string",
- "purchaseOrderNumber": "string",
- "tradingPartnerId": "string",
- "customerPoNumber": "string",
- "invoiceNumber": "string",
- "markForStore": "string",
- "department": "string",
- "address": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "discounts": [
- {
- "type": "string",
- "value": 0
}
], - "charges": [
- {
- "type": "string",
- "value": 0
}
], - "paymentTerms": {
- "term": "string",
- "dueDate": "2019-08-24T14:15:22Z"
}, - "deliveryDate": "2019-08-24T14:15:22Z",
- "shipByDate": "2019-08-24T14:15:22Z",
- "shipAfterDate": "2019-08-24T14:15:22Z"
}, - "ingestionChannel": "SPS"
}Get order information for a B2B outbound order by orderId.
OK
| orderId required | string Id generated after successfully creating the order | ||||||||||||||||||||||||||||
| externalId | string External id submitted by the external system when creating the order | ||||||||||||||||||||||||||||
| externalChannelId | string External channel's order id | ||||||||||||||||||||||||||||
| locationId | string Warehouse id from which the order will be sent | ||||||||||||||||||||||||||||
| type required | string (Type) Type of the order, e.g. B2B, EDI, DROP_SHIP. Currently, only B2B is supported | ||||||||||||||||||||||||||||
| orderStatus required | string (OrderStatus) Current status of the order | ||||||||||||||||||||||||||||
required | Array of objects (ReplenishmentOrderItemV2) Items in the order | ||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||
required | Array of objects (ReplenishmentShipmentV2) Shipments created related to the order | ||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||
| shipBy | string <date-time> Ship by date provided by the external system in the request | ||||||||||||||||||||||||||||
| notes | string Additional notes to be provided along with the order | ||||||||||||||||||||||||||||
object (RetailerData) Additional Data required for EDI and DROP_SHIP orders | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ingestionChannel | string (IngestionChannel) Ingestion channel of the order | ||||||||||||||||||||||||||||
Unauthorized
Not Found
{- "orderId": "string",
- "externalId": "string",
- "externalChannelId": "string",
- "locationId": "string",
- "type": "B2B",
- "orderStatus": "BOOKED",
- "orderItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0,
- "productData": {
- "upc": "string",
- "buyerPartNumber": "string",
- "sku": "string",
- "gtin": 0
}
}
], - "shipments": [
- {
- "status": "CANCELLED",
- "externalChannelShipmentId": "string",
- "externalChannelReferenceNumber": "string",
- "shipmentId": "string",
- "shipmentChargedWeight": 0,
- "shipmentChargedWeightUnit": "oz",
- "shipFromAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "shipToAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "transportationDetails": {
- "shippingPartner": "FLEXPORT",
- "shippingType": "LTL",
- "carrierAccountDetails": {
- "carrierName": "string",
- "carrierAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "duties": {
- "dutyPaymentAccountDetails": {
- "carrierName": "string",
- "dutyPaymentAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "incoterm": "DAP",
- "eelPfc": "string"
}, - "shippingMethod": "string",
- "shippingSpeed": "ONE_DAY"
}, - "packDetails": [
- {
- "packItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH"
}
], - "carrierName": "string",
- "carrierSCAC": "string",
- "trackingNumber": "string",
- "packageStatus": "PRE_TRANSIT",
- "sscc": "string",
- "packDims": {
- "length": 0,
- "width": 0,
- "height": 0,
- "lengthUnit": "in",
- "weight": 0,
- "weightUnit": "oz"
}, - "boxId": "string"
}
], - "freightDetails": [
- {
- "bolId": "string",
- "proNumber": "string",
- "carrierName": "string",
- "carrierSCAC": "string"
}
], - "shipmentItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "shippedQuantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0
}
]
}
], - "shipBy": "2019-08-24T14:15:22Z",
- "notes": "string",
- "retailerData": {
- "retailer": "string",
- "purchaseOrderNumber": "string",
- "tradingPartnerId": "string",
- "customerPoNumber": "string",
- "invoiceNumber": "string",
- "markForStore": "string",
- "department": "string",
- "address": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "discounts": [
- {
- "type": "string",
- "value": 0
}
], - "charges": [
- {
- "type": "string",
- "value": 0
}
], - "paymentTerms": {
- "term": "string",
- "dueDate": "2019-08-24T14:15:22Z"
}, - "deliveryDate": "2019-08-24T14:15:22Z",
- "shipByDate": "2019-08-24T14:15:22Z",
- "shipAfterDate": "2019-08-24T14:15:22Z"
}, - "ingestionChannel": "SPS"
}Get order information for an order created via the "Create order" endpoint, using the external ID given during order creation.
OK
| orderId required | string Id generated after successfully creating the order | ||||||||||||||||||||||||||||
| externalId | string External id submitted by the external system when creating the order | ||||||||||||||||||||||||||||
| externalChannelId | string External channel's order id | ||||||||||||||||||||||||||||
| locationId | string Warehouse id from which the order will be sent | ||||||||||||||||||||||||||||
| type required | string (Type) Type of the order, e.g. B2B, EDI, DROP_SHIP. Currently, only B2B is supported | ||||||||||||||||||||||||||||
| orderStatus required | string (OrderStatus) Current status of the order | ||||||||||||||||||||||||||||
required | Array of objects (ReplenishmentOrderItemV2) Items in the order | ||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||
required | Array of objects (ReplenishmentShipmentV2) Shipments created related to the order | ||||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||||
| shipBy | string <date-time> Ship by date provided by the external system in the request | ||||||||||||||||||||||||||||
| notes | string Additional notes to be provided along with the order | ||||||||||||||||||||||||||||
object (RetailerData) Additional Data required for EDI and DROP_SHIP orders | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ingestionChannel | string (IngestionChannel) Ingestion channel of the order | ||||||||||||||||||||||||||||
Unauthorized
Not Found
{- "orderId": "string",
- "externalId": "string",
- "externalChannelId": "string",
- "locationId": "string",
- "type": "B2B",
- "orderStatus": "BOOKED",
- "orderItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0,
- "productData": {
- "upc": "string",
- "buyerPartNumber": "string",
- "sku": "string",
- "gtin": 0
}
}
], - "shipments": [
- {
- "status": "CANCELLED",
- "externalChannelShipmentId": "string",
- "externalChannelReferenceNumber": "string",
- "shipmentId": "string",
- "shipmentChargedWeight": 0,
- "shipmentChargedWeightUnit": "oz",
- "shipFromAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "shipToAddress": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "transportationDetails": {
- "shippingPartner": "FLEXPORT",
- "shippingType": "LTL",
- "carrierAccountDetails": {
- "carrierName": "string",
- "carrierAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "duties": {
- "dutyPaymentAccountDetails": {
- "carrierName": "string",
- "dutyPaymentAccountId": "string",
- "country": "string",
- "postalCode": "string"
}, - "incoterm": "DAP",
- "eelPfc": "string"
}, - "shippingMethod": "string",
- "shippingSpeed": "ONE_DAY"
}, - "packDetails": [
- {
- "packItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "quantityUOM": "EACH"
}
], - "carrierName": "string",
- "carrierSCAC": "string",
- "trackingNumber": "string",
- "packageStatus": "PRE_TRANSIT",
- "sscc": "string",
- "packDims": {
- "length": 0,
- "width": 0,
- "height": 0,
- "lengthUnit": "in",
- "weight": 0,
- "weightUnit": "oz"
}, - "boxId": "string"
}
], - "freightDetails": [
- {
- "bolId": "string",
- "proNumber": "string",
- "carrierName": "string",
- "carrierSCAC": "string"
}
], - "shipmentItems": [
- {
- "logisticsSku": "string",
- "quantity": 0,
- "shippedQuantity": 0,
- "quantityUOM": "EACH",
- "quantityPerPack": 0,
- "lineItemId": "string",
- "lotNumber": "string",
- "unitPrice": 0,
- "totalPrice": 0,
- "discount": 0
}
]
}
], - "shipBy": "2019-08-24T14:15:22Z",
- "notes": "string",
- "retailerData": {
- "retailer": "string",
- "purchaseOrderNumber": "string",
- "tradingPartnerId": "string",
- "customerPoNumber": "string",
- "invoiceNumber": "string",
- "markForStore": "string",
- "department": "string",
- "address": {
- "name": "string",
- "company": "string",
- "street1": "string",
- "street2": "string",
- "city": "string",
- "zip": "string",
- "state": "string",
- "country": "string",
- "phone": "string",
- "email": "string",
- "isResidential": true
}, - "discounts": [
- {
- "type": "string",
- "value": 0
}
], - "charges": [
- {
- "type": "string",
- "value": 0
}
], - "paymentTerms": {
- "term": "string",
- "dueDate": "2019-08-24T14:15:22Z"
}, - "deliveryDate": "2019-08-24T14:15:22Z",
- "shipByDate": "2019-08-24T14:15:22Z",
- "shipAfterDate": "2019-08-24T14:15:22Z"
}, - "ingestionChannel": "SPS"
}Get shipment attachment url for uploading shipment attachment document.
The request object for getting upload url for uploading shipment attachment document.
| attachmentType required | string (AttachmentType) Type of the attachment, e.g. "SHIPPING_LABELS", "COMMERCIAL_INVOICE", etc. |
| contentType required | string Content type of the attachment. Only "application/pdf" is supported for now. |
Ok
| uploadUrl required | string Upload url for uploading shipment attachment document. |
| attachmentType required | string (AttachmentType) Type of the attachment, e.g. "SHIPPING_LABELS", "COMMERCIAL_INVOICE", etc. |
| expirationTime required | string <date-time> The ISO 8601 timestamp string indicating when the upload URL will expire. The URL is valid for one hour after generation. Example: "2025-05-10T10:00:00Z" |
Unauthorized
{- "attachmentType": "CASE_LABELS",
- "contentType": "string"
}{- "uploadUrl": "string",
- "attachmentType": "CASE_LABELS",
- "expirationTime": "2019-08-24T14:15:22Z"
}Cancel a B2B outbound order using order id. Only orders in PLANNED or BOOKED status can be cancelled; once the warehouse begins processing (IN_PROGRESS or later) the order can no longer be cancelled.
OK
Unauthorized
Not Found
{- "status": 401,
- "type": "string",
- "title": "string",
- "detail": "string",
- "instance": "string",
- "code": 401,
- "message": "string"
}