Skip to content

Fulfillment

Version 1

Schema

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "title": "Barrett Distribution Centers, Inc. Fulfillment Schema",
    "description": "Version 1",
    "additionalProperties": false,
    "properties": {
        "fulfillmentId": {
            "type": "string"
        },
        "orderId": {
            "type": "string"
        },
        "purchaseOrder": {
            "type": "string"
        },
        "shipDate": {
            "type": "string",
            "format": "date"
        },
        "carrier": {
            "type": "string"
        },
        "scac" : {
            "type": "string"
        },
        "service": {
            "type": "string"
        },
        "terms": {
            "type": "string"
        },
        "loadId": {
            "type": "string"
        },
        "billOfLading": {
            "type": "string"
        },
        "masterBillOfLading": {
            "type": "string"
        },
        "proNumber": {
            "type": "string"
        },
        "returnTracking": {
            "type": "array",
            "minItems": 1,
            "items": {
                "$ref": "#/definitions/returnTracking"
            }
        },
        "custom": {
            "$ref": "#/definitions/custom"
        },
        "containers": {
            "type": "array",
            "minItems": 1,
            "items": {
                "$ref": "#/definitions/container"
            }
        }
    },
    "required": [
        "fulfillmentId",
        "orderId",
        "shipDate",
        "carrier",
        "service",
        "terms",
        "containers"
    ],
    "definitions": {
        "container": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "containerId": {
                    "type": "string"
                },
                "trackingNumber": {
                    "type": "string"
                },
                "ucc128": {
                    "type": "string"
                },
                "dimensions": {
                    "$ref": "#/definitions/dimensions"
                },
                "items": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "$ref": "#/definitions/item"
                    }
                }
            },
            "required": [
                "containerId",
                "trackingNumber",
                "items"
            ]
        },
        "dimensions": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "length": {
                    "type": "number"
                },
                "lengthUom": {
                    "type": "string"
                },
                "width": {
                    "type": "number"
                },
                "widthUom": {
                    "type": "string"
                },
                "height": {
                    "type": "number"
                },
                "heightUom": {
                    "type": "string"
                },
                "weight": {
                    "type": "number"
                },
                "weightUom": {
                    "type": "string"
                }
            },
            "required": [
                "length",
                "lengthUom",
                "width",
                "widthUom",
                "height",
                "heightUom",
                "weight",
                "weightUom"
            ]
        },
        "returnTracking": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "carrier": {
                    "type": "string"
                },
                "service": {
                    "type": "string"
                },
                "trackingNumber": {
                    "type": "string"
                },
                "shippingCost": {
                    "type": "number"
                }
            },
            "required": [
                "carrier",
                "trackingNumber"
            ]
        },
        "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"
                },
                "upc": {
                    "type": "string"
                },
                "shippedQuantity": {
                    "type": "integer"
                },
                "shippedQuantityUom": {
                    "type": "string"
                },
                "lotNumber": {
                    "type": "string"
                },
                "serialNumber": {
                    "type": "string"
                },
                "expirationDate": {
                    "type": "string",
                    "format": "date"
                },
                "manufactureDate": {
                    "type": "string",
                    "format": "date"
                },
                "custom": {
                    "$ref": "#/definitions/custom"
                }
            },
            "required": [
                "itemId",
                "shippedQuantity",
                "shippedQuantityUom"
            ]
        }
    }
}

Sample

{
    "fulfillmentId": "15239288-1",
    "orderId": "2832891",
    "purchaseOrder": "7765648101",
    "shipDate": "2021-03-21",
    "carrier": "UPS",
    "scac": "UPSC",
    "service": "GRES",
    "terms": "PPD",
    "loadId": "F75G443G44",
    "billOfLading": "12598473-1",
    "masterBillOfLading": "1259873",
    "proNumber": "9114901075742452019146",
    "returnTracking": [
        {
           "carrier": "UPS",
            "service": "GRES",
            "trackingNumber": "1ZY999999999999998",
            "shippingCost": 123.45
        }
    ],
    "containers": [
        {
            "containerId": "89898915239288000001",
            "trackingNumber": "1ZY999999999999999",
            "ucc128": "00008108190318744622",
            "dimensions": {
                "length": 22,
                "lengthUom": "IN",
                "width": 15,
                "widthUom": "IN",
                "height": 7,
                "heightUom": "IN",
                "weight": 6.75,
                "weightUom": "LB"
            },
            "items": [
                {
                    "itemId": "WX5786",
                    "shippedQuantity": 1,
                    "shippedQuantityUom": "EA",
                    "upc": "03600029145334",
                    "serialNumber": "B10312020ARCHW"
                },
                {
                    "itemId": "WX9536",
                    "shippedQuantity": 10,
                    "shippedQuantityUom": "EA",
                    "lotNumber": "A234893",
                    "expirationDate": "2024-07-22",
                    "manufactureDate": "2023-07-22"
                }
            ]
        }
    ]
}

Railroad Diagrams

Note

Items in green represent the properties that are always present. Items in blue represent additional properties that may or may not be present.

Fulfillment

Return Tracking

Container

Item

Custom

Custom String

Custom Number

Custom Date