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 | ||||||||||||||||||||||||||||
object (OutboundChannelAttributes) Outbound channel configuration. Present when the order was routed to a distribution channel such as Amazon FBA. | |||||||||||||||||||||||||||||
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"
}, - "outboundChannelAttributes": {
- "fba": {
- "fbaShipmentId": "string",
- "amazonReferenceId": "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",
- "outboundChannelAttributes": {
- "fba": {
- "fbaShipmentId": "string",
- "amazonReferenceId": "string"
}
}
}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 | ||||||||||||||||||||||||||||
object (OutboundChannelAttributes) Outbound channel configuration. Present when the order was routed to a distribution channel such as Amazon FBA. | |||||||||||||||||||||||||||||
Unauthorized
Not Found
curl --request GET \ --url 'https://logistics-api.flexport.com/logistics/api/2024-07/orders/rs/{orderId}' \ --header 'Authorization: Bearer <token>'
{- "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",
- "outboundChannelAttributes": {
- "fba": {
- "fbaShipmentId": "string",
- "amazonReferenceId": "string"
}
}
}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
curl --request POST \ --url 'https://logistics-api.flexport.com/logistics/api/2024-07/orders/rs/{orderId}/cancel' \ --header 'Authorization: Bearer <token>'
{- "status": 401,
- "type": "string",
- "title": "string",
- "detail": "string",
- "instance": "string",
- "code": 401,
- "message": "string"
}