Work
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
]
},
"facility": {
"type": "string"
},
"tradingPartnerId": {
"type": "string"
},
"purchaseOrder": {
"type": "string"
},
"billTo": {
"oneOf": [
{
"$ref": "#/definitions/address"
},
{
"$ref": "#/definitions/addressId"
}
]
},
"custom": {
"$ref": "#/definitions/custom"
},
"item": {
"$ref": "#/definitions/item"
}
},
"required": [
"orderId",
"orderType",
"customerId",
"item"
],
"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
{
"customerId": "12345",
"orderType": "work",
"orderId": "WORK123",
"purchaseOrder": "WORK123",
"facility": "MEM",
"item": {
"itemId": "WX9536",
"orderedQuantity": 5,
"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.