Build
Version 1
Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Barrett Distribution Centers, Inc. Build Schema",
"description": "Version 1",
"additionalProperties": false,
"properties": {
"orderId": {
"type": "string"
},
"buildId": {
"type": "string",
"description": "{barrettOrderId}-{shipmentSequence}"
},
"builtItemId": {
"type": "string"
},
"builtQuantity": {
"type": "number"
},
"dateBuilt": {
"type": "string",
"format": "date"
},
"lotNumber": {
"type": "string"
},
"expirationDate": {
"type": "string",
"format": "date-time"
},
"custom": {
"$ref": "#/definitions/custom"
},
"components": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/component"
}
}
},
"required": [
"orderId",
"buildId",
"builtItemId",
"builtQuantity",
"dateBuilt",
"components"
],
"definitions": {
"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": [
{
"properties": {
"customStrings": true
},
"required": [
"customStrings"
]
},
{
"properties": {
"customNumbers": true
},
"required": [
"customNumbers"
]
},
{
"properties": {
"customDates": true
},
"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"
]
},
"component": {
"type": "object",
"additionalProperties": false,
"properties": {
"itemId": {
"type": "string"
},
"quantity": {
"type": "number"
},
"quantityUom": {
"type": "string"
},
"lotNumber": {
"type": [
"string",
"null"
]
},
"serialNumber": {
"type": [
"string",
"null"
]
},
"manufactureDate": {
"type": "string",
"format": "date-time"
},
"expirationDate": {
"type": "string",
"format": "date-time"
}
},
"required": [
"itemId",
"quantity",
"quantityUom"
]
}
}
}
Sample
{
"orderId": "WORK123",
"buildId": "15465782-1",
"builtItemId": "WX9536",
"builtQuantity": 10,
"dateBuilt": "2024-07-29",
"lotNumber": "JULY2024",
"expirationDate": "2025-01-01T05:00:00.000Z",
"components": [
{
"itemId": "PK-OU-BO-EN-1",
"quantity": 10,
"quantityUom": "EA"
},
{
"itemId": "MD12-BO-A-2",
"quantity": 60,
"expirationDate": "2025-01-01T05:00:00.000Z",
"lotNumber": "12345",
"quantityUom": "EA"
}
]
}
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.