Skip to content

Inbound

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
            ]
        },
        "toFacility": {
            "type": "string"
        },
        "tradingPartnerId": {
            "type": "string"
        },
        "purchaseOrder": {
            "type": "string"
        },
        "dates": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "poDate": {
                    "type": "string",
                    "format": "date"
                }
            }
        },
        "billTo": {
            "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",
        "toFacility",
        "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"
            ]
        },
        "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"
                },
                "custom": {
                    "$ref": "#/definitions/custom"
                }
            },
            "required": [
                "itemId",
                "orderedQuantity",
                "orderedQuantityUom"
            ]
        }
    }
}

Sample

{
    "orderId": "OST235775322",
    "orderType": "incoming",
    "customerId": "7782",
    "purchaseOrder": "PO-123456",
    "toFacility": "OXF",
    "tradingPartnerId": "DX1276",
    "shipFrom": {
        "contactName": "Robert Boucher",
        "streetOne": "1834 Main St",
        "city": "Houma",
        "state": "LA",
        "postalCode": "70364",
        "country": "US"
    },
    "billTo": {
        "addressId": "TY721"
    },
    "items": [
        {
            "itemId": "101",
            "orderedQuantity": 1,
            "orderedQuantityUom": "EA"
        }
    ]
}

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.

Order

Dates

Address

Item

Custom

Custom String

Custom Number

Custom Date