Outbound
Version 1
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Barrett Distribution Centers, Inc. Order Schema",
"description": "Version 1",
"additionalProperties": false,
"properties": {
"customerId": {
"type": "string"
},
"orderId": {
"type": "string"
},
"orderType": {
"type": "string"
},
"orderStatus": {
"type": "string"
},
"orderDirective": {
"enum": [
"hot",
"shipShort",
"normal",
"backOrder",
"scheduled",
"dropShip",
"exception",
"repickSuggest",
"hold",
"noNotify",
"discount",
"routed",
"sameDayShip",
"edi",
null
]
},
"fromFacility": {
"type": "string"
},
"tradingPartnerId": {
"type": "string"
},
"purchaseOrder": {
"type": "string"
},
"dates": {
"$ref": "#/definitions/dates"
},
"transport": {
"$ref": "#/definitions/transport"
},
"billTo": {
"oneOf": [
{
"$ref": "#/definitions/address"
},
{
"$ref": "#/definitions/addressId"
}
]
},
"shipTo": {
"oneOf": [
{
"$ref": "#/definitions/address"
},
{
"$ref": "#/definitions/addressId"
}
]
},
"shipFrom": {
"oneOf": [
{
"$ref": "#/definitions/address"
},
{
"$ref": "#/definitions/addressId"
}
]
},
"custom": {
"$ref": "#/definitions/custom"
},
"items": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/item"
}
}
},
"required": [
"orderId",
"orderType",
"customerId",
"dates",
"transport",
"shipTo",
"items"
],
"definitions": {
"address": {
"type": "object",
"additionalProperties": false,
"properties": {
"contactName": {
"type": "string"
},
"companyName": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"streetOne": {
"type": "string"
},
"streetTwo": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"country": {
"type": "string"
},
"phone": {
"type": "string"
}
}
},
"addressId":{
"type": "object",
"additionalProperties": false,
"properties": {
"addressId": {
"type": "string"
}
}
},
"custom": {
"type": "object",
"additionalProperties": false,
"properties": {
"customStrings": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/customString"
}
},
"customNumbers": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/customNumber"
}
},
"customDates": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/customDate"
}
}
},
"anyOf": [
{
"required": [
"customStrings"
]
},
{
"required": [
"customNumbers"
]
},
{
"required": [
"customDates"
]
}
]
},
"customString": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
},
"customNumber": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": [
"name",
"value"
]
},
"customDate": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string",
"format": "date"
}
},
"required": [
"name",
"value"
]
},
"dates": {
"type": "object",
"additionalProperties": false,
"properties": {
"shipDateStart": {
"type": "string",
"format": "date"
},
"shipDateStop": {
"type": "string",
"format": "date"
},
"shipDateCancelBy": {
"type": "string",
"format": "date"
},
"poDate": {
"type": "string",
"format": "date"
},
"deliveryDate": {
"type": "string",
"format": "date"
},
"appointmentDate": {
"type": "string",
"format": "date"
}
},
"required": [
"shipDateStart"
]
},
"item": {
"type": "object",
"additionalProperties": false,
"properties": {
"itemId": {
"type": "string"
},
"itemDescription": {
"type": "string"
},
"tradingPartnerItemId": {
"type": "string"
},
"upc": {
"type": "string"
},
"orderedQuantity": {
"type": "integer"
},
"orderedQuantityUom": {
"type": "string"
},
"lotNumber": {
"type": "string"
},
"inventoryClass": {
"type": "string"
},
"itemStatus": {
"type": "string"
},
"custom": {
"$ref": "#/definitions/custom"
}
},
"required": [
"itemId",
"orderedQuantity",
"orderedQuantityUom"
]
},
"transport": {
"type": "object",
"additionalProperties": false,
"properties": {
"carrier": {
"type": "string",
"enum": [
"BW01",
"CHR",
"DHL",
"FDEG",
"FEDX",
"UPS",
"USP2",
"USPS"
]
},
"service": {
"type": "string"
},
"terms": {
"type": "string",
"enum": [
"PPD",
"COL",
"3RD",
"PCK",
"UCB",
"DDP",
"CSL",
"DT3"
]
},
"type": {
"type": "string",
"enum": [
"A",
"B",
"C",
"L",
"P",
"R",
"S",
"T"
]
},
"shipperAccount": {
"type": "string"
},
"specialService1": {
"type": "string",
"maxLength": 4
},
"specialService2": {
"type": "string",
"maxLength": 4
},
"specialService3": {
"type": "string",
"maxLength": 4
},
"specialService4": {
"type": "string",
"maxLength": 4
}
},
"allOf": [
{
"if": {
"properties": { "carrier": { "const": "BW01" }},
"required": [ "carrier"]
},
"then": {
"properties": { "service": {
"type": "string",
"enum": [
"C001",
"C002",
"C003",
"C004",
"C005",
"C008"
]
}}
}
},
{
"if": {
"properties": { "carrier": { "const": "DHL" }},
"required": [ "carrier"]
},
"then": {
"properties": { "service": {
"type": "string",
"enum": [
"INT",
"NXDY",
"AIR",
"GND",
"2ND"
]
}}
}
},
{
"if": {
"properties": { "carrier": { "const": "FDEG" }},
"required": [ "carrier"]
},
"then": {
"properties": { "service": {
"type": "string",
"enum": [
"3FTF",
"2AM",
"1FTF",
"2FTF",
"INF2",
"INF1",
"INT0",
"SPST",
"STOV",
"PROV",
"INT2",
"INT1",
"HOME",
"GRND",
"EXSA",
"2DAY",
"1STO"
]
}}
}
},
{
"if": {
"properties": { "carrier": { "const": "FEDX" }},
"required": [ "carrier"]
},
"then": {
"properties": { "service": {
"type": "string",
"enum": [
"1STO",
"2DAY",
"GRND",
"HOME",
"INT1",
"INT2",
"INT0",
"PROV",
"STOV",
"SPST",
"EXSA"
]
}}
}
},
{
"if": {
"properties": { "carrier": { "const": "USP2" }},
"required": [ "carrier"]
},
"then": {
"properties": { "service": {
"type": "string",
"enum": [
"FCP",
"PRI",
"ITPR",
"ITEX",
"PP",
"EX"
]
}}
}
},
{
"if": {
"properties": { "carrier": { "const": "USPS" }},
"required": [ "carrier"]
},
"then": {
"properties": { "service": {
"type": "string",
"enum": [
"ITFC",
"ITGX",
"ITPR",
"ITEX",
"PRI",
"AIR",
"REG"
]
}}
}
}
],
"required": [
"carrier",
"service",
"terms",
"type"
]
}
}
}
Sample
{
"orderId": "OST23577532",
"orderType": "outgoing",
"customerId": "7782",
"purchaseOrder": "PO-123456",
"fromFacility": "OXF",
"tradingPartnerId": "DX1276",
"dates": {
"shipDateStart": "2015-06-17",
"shipDateCancelBy": "2018-04-20",
"poDate": "1946-06-14",
"shipDateStop": "1990-03-27",
"deliveryDate": "2020-01-12",
"appointmentDate": "2020-01-06"
},
"transport": {
"carrier": "FDEG",
"service": "HOME",
"terms": "PPD",
"type": "S",
"shipperAccount": "155555555"
},
"shipTo": {
"contactName": "Jane Doe",
"companyName": "Home Enterprises LLC",
"email": "email@email.com",
"streetOne": "123 West Way",
"streetTwo": "APT 21",
"city": "Maple Grove",
"state": "VA",
"postalCode": "88476",
"country": "US",
"phone": "800-555-1234"
},
"billTo": {
"addressId": "TY721"
},
"shipFrom": {
"contactName": "John Fonda",
"streetOne": "55969 Haversham Road",
"city": "Vista Butte",
"state": "SD",
"postalCode": "11547",
"country": "US"
},
"items": [
{
"itemId": "WX5786",
"orderedQuantity": 1,
"orderedQuantityUom": "EA",
"upc": "03600029145334",
"itemDescription": "SHOE AXL BLCK",
"lotNumber": "20210801",
"inventoryClass": "RG",
"tradingPartnerItemId": "DX12783384002"
},
{
"itemId": "WX9536",
"orderedQuantity": 10,
"orderedQuantityUom": "EA",
"itemDescription": "SHOE AXL WT",
"tradingPartnerItemId": "DX12783384001",
"upc": "036000291459972",
"lotNumber": "20210801",
"inventoryClass": "RG"
}
]
}
Transport Codes
The following captures the allowed values for the transport properties found in Barrett's REST APIs.
Terms
Code | Description |
---|---|
PPD | Prepaid |
COL | Collect |
3RD | 3rd Party to Collect |
PCK | Consignee to Pick up |
UCB | Contract Consignee Billing |
DDP | Free Domicile |
CSL | Customer Supplied Labels |
DT3 | Bill Freight & Duties/Taxes 3rd |
DAP | Delivered at Place |
FCA | Free Carrier |
Type
Code | Description |
---|---|
R | Rail |
P | Customer Pick up |
T | Truckload |
L | Less Than Truckload |
S | Small Package |
A | Airborne |
C | Sea |
B | Barrett |
Carriers and Carrier Services
Carrier Code BW01 (Best Way)
Service | Description |
---|---|
C001 | Customer Specific Routing |
C002 | 1 Day Customer Specific Routing |
C003 | 2 Day Customer Specific Routing |
C004 | 3 Day Customer Specific Routing |
C005 | Amazon Small Package Customer Specific Routing |
C008 | International Customer Specific Routing |
Carrier Code BWTQ (Warehouse and Transport)
The transport.service property is not supported when using the BWTQ transport.carrier. BWTQ has no service codes.
Carrier Code CHR
The CHR carrier code will also accept an empty service code (null or undefined) for general freight service on CHR.
Service | Description |
---|---|
AIRF | Air Freight |
Carrier Code CPU (Customer Pick Up)
The transport.service property is not supported when using the CPU transport.carrier. CPU has no service codes.
Carrier Code DHL
Service | Description |
---|---|
INTL | DHL International Express |
Carrier Code FCI
Service | Description |
---|---|
ECOM | eCommerce |
Carrier Code FDEG (FedEx)
Service | Description |
---|---|
1STO | Next Day Air Early AM |
1STR | Next Day Air Early AM Residential |
PROV | Next Day Air |
PROR | Next Day Air Early AM Residential |
STOV | Next Day Air Saver |
STOR | Next Day Air Saver Residential |
2DAY | 2nd Day Air |
2DAR | 2nd Day Air Residential |
2AM | 2nd Day Air AM |
2AMR | 2nd Day Air AM Residential |
EXSA | 3-Day Select |
EXSR | 3-Day Select Residential |
GRND | Ground, Canadian Std Ground Residential, Canada Standard Ground |
HOME | Ground Residential |
SPST | Surepost |
INT1 | Worldwide Express Plus, Worldwide Express Plus Residential, Worldwide Express, Worldwide Express Residential, Worldwide Saver |
INT2 | Worldwide Expedited, Worldwide Expedited Residential |
Carrier Code FXFE (FedEx Priority Freight)
The transport.service property is not supported when using the FXFE transport.carrier. FXFE has no service codes.
Carrier Code GBLE
Service | Description |
---|---|
GEEC | Global-E Carrier |
Carrier Code ROUT
Service | Description |
---|---|
ROUT | LTL Carrier |
Carrier Code UPS
Service | Description |
---|---|
RED | Next-day Air |
REDE | Next-day Air Early AM |
GRES | Ground Residential |
CNST | Canada Standard Ground |
2DAM | 2nd-day Air AM |
WWXP | Worldwide Express Plus |
WWX | Worldwide Express |
WWE | Worldwide Expedited |
SRPT | SurePost |
REDS | Next-day Air Saver |
ORNG | 3-day Select |
GRND | Ground |
WWXS | Worldwide Express Saver |
BLUE | 2nd-day Air |
GFP | Ground Freight Pricing |
CNSR | Canadian Std Ground Residential |
WXPR | Worldwide Express Plus Residential |
WWXR | Worldwide Express Residential |
REDR | Next-day Air Residential |
RDER | Next-day Air Early AM Residential |
RDSR | Next-day Air Saver Residential |
BLUR | 2nd-day Air Residential |
2AMR | 2nd-day Air AM Residential |
ORNR | 3-day Select Residential |
WWER | Worldwide Expedited Residential |
MIPS | Mail Innovations Parcel Select |
Carrier Code USP2
Service | Description |
---|---|
FCP | First-class Package (US & International) |
PRI | Priority Mail |
ITPR | Priority Mail International |
ITEX | International Express |
PP | Parcel Post |
EX | Express Mail |
Railroad Diagrams
Note
Items in green represent the properties that Barrett requires. Items in blue represent optional properties that may be additionally sent by the customer.