Schema Changes - 2025-07-25
This document contains the changes to the schema files compared to the main branch.
Changes
diff --git a/schema/Api/OrderBroker/InternalNewOrderRequest.json b/schema/Api/OrderBroker/InternalNewOrderRequest.json
index f2a6672..4618100 100644
--- a/schema/Api/OrderBroker/InternalNewOrderRequest.json
+++ b/schema/Api/OrderBroker/InternalNewOrderRequest.json
@@ -10,30 +10,15 @@
"type": "string",
"maxLength": 100,
"minLength": 1,
- "examples": [
- "123456789"
- ]
- },
- "referenceId": {
- "type": [
- "string",
- "null"
- ],
- "maxLength": 255,
- "examples": [
- "REF123456"
- ]
+ "examples": ["123456789"]
},
+ "referenceId": { "type": ["string", "null"], "maxLength": 255, "examples": ["REF123456"] },
"sourceSystemCustomerId": {
"description": "Unique customer ID in the source system. Required, must not be null or empty.",
- "type": [
- "string"
- ],
+ "type": ["string"],
"maxLength": 100,
"minLength": 1,
- "examples": [
- "CUST123456"
- ]
+ "examples": ["CUST123456"]
},
"sourceSystemId": {
"description": "Source system ID. Required, must not be null.",
@@ -41,134 +26,50 @@
"format": "int32"
},
"accessGroups": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "type": "string"
- },
- "examples": [
- [
- "Group1",
- "Group2"
- ]
- ]
+ "type": ["array", "null"],
+ "items": {"type": "string"},
+ "examples": [ ["Group1", "Group2"] ]
},
"affiliateIdentifier": {
"description": "Unique ID for affiliate within source system (system where order was originally placed)",
- "type": [
- "string",
- "null"
- ],
+ "type": ["string", "null"],
"maxLength": 100,
- "examples": [
- "AFF123456"
- ]
+ "examples": ["AFF123456"]
},
"affiliateName": {
"description": "Name for affiliate within source system (system where order was originally placed)",
- "type": [
- "string",
- "null"
- ],
+ "type": ["string", "null"],
"maxLength": 255,
- "examples": [
- "Affiliate Name"
- ]
+ "examples": ["Affiliate Name"]
},
"billTos": {
"description": "Bill to addresses array for Order. Required, must not be empty. Each item must have required address fields and a non-null key.",
"oneOf": [
- {
- "type": "null"
- },
+ {"type": "null"},
{
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
- "address1": {
- "description": "Address line 1 for address",
- "type": "string"
- },
- "address2": {
- "description": "Address line 2 for address",
- "type": [
- "string",
- "null"
- ]
- },
- "address3": {
- "description": "Address line 3 for address",
- "type": [
- "string",
- "null"
- ]
- },
- "city": {
- "description": "City name for address",
- "type": "string"
- },
- "company": {
- "description": "Company name for address",
- "type": [
- "string",
- "null"
- ]
- },
- "country": {
- "description": "Country name for address",
- "type": "string"
- },
+ "address1": {"description": "Address line 1 for address", "type": "string"},
+ "address2": { "description": "Address line 2 for address", "type": ["string", "null"] },
+ "address3": { "description": "Address line 3 for address", "type": ["string", "null"] },
+ "city": {"description": "City name for address", "type": "string"},
+ "company": { "description": "Company name for address", "type": ["string", "null"] },
+ "country": {"description": "Country name for address", "type": "string"},
"emailAddress": {
"description": "Contact email address for address",
- "type": [
- "string",
- "null"
- ]
- },
- "faxNumber": {
- "description": "Fax number for address",
- "type": [
- "string",
- "null"
- ]
- },
- "key": {
- "type": "integer",
- "format": "int32"
- },
- "name": {
- "description": "Contact name for this address",
- "type": "string"
- },
- "phoneNumber": {
- "description": "Phone number for address",
- "type": [
- "string",
- "null"
- ]
- },
- "postalCode": {
- "description": "Postal code for address",
- "type": "string"
- },
- "stateProvince": {
- "description": "State or province name for address",
- "type": "string"
- }
+ "type": ["string", "null"]
+ },
+ "faxNumber": { "description": "Fax number for address", "type": ["string", "null"] },
+ "key": {"type": "integer", "format": "int32"},
+ "name": {"description": "Contact name for this address", "type": "string"},
+ "phoneNumber": { "description": "Phone number for address", "type": ["string", "null"] },
+ "postalCode": {"description": "Postal code for address", "type": "string"},
+ "stateProvince": {"description": "State or province name for address", "type": "string"}
},
- "required": [
- "address1",
- "city",
- "country",
- "key",
- "name",
- "postalCode",
- "stateProvince"
- ]
+ "required": ["address1", "city", "country", "key", "name", "postalCode", "stateProvince"]
},
"minItems": 1
}
@@ -191,92 +92,49 @@
}
]
},
- "costCenter": {
- "type": [
- "string",
- "null"
- ],
- "maxLength": 255,
- "examples": [
- "CC123456"
- ]
- },
+ "costCenter": { "type": ["string", "null"], "maxLength": 255, "examples": ["CC123456"] },
"createDateTime": {
"description": "Datetime of when order was created",
- "type": [
- "string",
- "null"
- ],
- "examples": [
- "2024-03-20T10:30:00Z"
- ]
+ "type": ["string", "null"],
+ "examples": ["2024-03-20T10:30:00Z"]
},
"creditCardFee": {
"description": "Credit card transaction fee applied to Order",
- "type": [
- "number",
- "null"
- ],
+ "type": ["number", "null"],
"format": "double",
"minimum": 0,
- "examples": [
- 2.5
- ]
+ "examples": [2.5]
},
"defaultBillToKey": {
"description": "Unique ID for default billing contact details pulled from Order.BillTos.Key property (Only if applicable. Otherwise DefaultBillToKey will be null/empty value) (NOTE: If this value is not set, BillToKey must be set on all line items.)",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32",
"minimum": 0,
- "examples": [
- 1
- ]
+ "examples": [1]
},
"defaultOrderedByKey": {
"description": "Unique ID for default ordered by contact details pulled from Order.OrderedBy.Key property (Only if applicable. Otherwise DefaultOrderedByKey will be null/empty value)",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32",
"minimum": 0,
- "examples": [
- 1
- ]
+ "examples": [1]
},
"defaultShipToKey": {
"description": "Unique ID for default ship to contact pulled from Order.ShipTos.Key property (Only if applicable. Otherwise DefaultShipToKey will be null/empty value) (NOTE: If this value is not set, ShipToKey must be set on all line items.)",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32",
"minimum": 0,
- "examples": [
- 1
- ]
+ "examples": [1]
},
"dueDate": {
"description": "Datetime of expected due date for Order. If present, must be a valid date and not in the past (enforced in backend).",
- "type": [
- "string",
- "null"
- ],
+ "type": ["string", "null"],
"pattern": "^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}|\\d{8}|\\d{2}[-/]\\d{2}[-/]\\d{4}(\\s\\d{2}:\\d{2}:\\d{2})?)$",
- "examples": [
- "2024-04-20T10:30:00",
- "20240420",
- "04/20/2024 10:30:00"
- ]
+ "examples": ["2024-04-20T10:30:00", "20240420", "04/20/2024 10:30:00"]
},
"lineItems": {
"description": "Order level line item details. Required, must not be empty. Each item must have offerId, quantityOrdered > 0, price >= 0, taxAmount >= 0, lineItemFee >= 0. If defaultBillToKey, defaultOrderedByKey, or defaultShipToKey are null, corresponding keys must be set on each line item.",
- "type": [
- "array"
- ],
+ "type": ["array"],
"items": {
"description": "Order level line item details",
"type": "object",
@@ -286,76 +144,38 @@
"description": "Unique ID for offer within Integration Broker",
"type": "string"
},
- "referenceId": {
- "type": [
- "string",
- "null"
- ]
- },
+ "referenceId": { "type": ["string", "null"] },
"variableTemplatePrintId": {
"description": "Unique ID for variable template file associated to offer on individual line item",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"additionalProperties": {
"description": "Additional properties details for Order LineItems",
- "type": [
- "array",
- "null"
- ],
+ "type": ["array", "null"],
"items": {
"description": "Order.LineItems level additional properties details",
"type": "object",
"additionalProperties": false,
"properties": {
- "key": {
- "type": [
- "string",
- "null"
- ]
- },
- "value": {
- "type": [
- "string",
- "null"
- ]
- }
+ "key" : { "type": ["string", "null"] },
+ "value": { "type": ["string", "null"] }
},
- "required": [
- "key",
- "value"
- ]
+ "required": ["key", "value"]
}
},
"billToKey": {
"description": "Unique ID for Order.BillTos.Key property associated to individual line item (NOTE: If top-level DefaultBillToKey is not set, this must be.)",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32"
},
"comment": {
"description": "Manually entered comment for individual line item",
- "type": [
- "string",
- "null"
- ]
- },
- "costCenter": {
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
+ "costCenter": { "type": ["string", "null"] },
"dueDate": {
"description": "Datetime of expected due date for individual line item",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"lineItemFee": {
"description": "Fee applied to individual line item",
@@ -364,39 +184,24 @@
},
"offerDescription": {
"description": "Description for offer within product management system (system where ordered line item products will be managed)",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"offerLineNumber": {
"description": "Unique ID for individual line item",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"offerNumber": {
"description": "Name for offer within product management system (system where ordered line item products will be managed)",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"orderedByKey": {
"description": "Unique ID for Order.OrderedBy.Key property associated to individual line item",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32"
},
"poNumber": {
"description": "Purchase order number for individual line item",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"price": {
"description": "Total offer price of individual line item",
@@ -404,40 +209,17 @@
"format": "double"
},
"products": {
- "type": [
- "array",
- "null"
- ],
+ "type": ["array", "null"],
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
- "productId": {
- "type": "string"
- },
- "associatedFileName": {
- "type": [
- "string",
- "null"
- ]
- },
- "color": {
- "type": [
- "string",
- "null"
- ]
- },
- "comment": {
- "type": [
- "string",
- "null"
- ]
- },
+ "productId": {"type": "string"},
+ "associatedFileName": { "type": ["string", "null"] },
+ "color": { "type": ["string", "null"] },
+ "comment": { "type": ["string", "null"] },
"components": {
- "type": [
- "array",
- "null"
- ],
+ "type": ["array", "null"],
"items": {
"description": "Order.LineItems.Products level component details",
"type": "object",
@@ -449,130 +231,50 @@
},
"associatedFileName": {
"description": "Name of file associated to component product (if applicable)",
- "type": [
- "string",
- "null"
- ]
- },
- "color": {
- "description": "Color of component product",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
+ "color": { "description": "Color of component product", "type": ["string", "null"] },
"comment": {
"description": "Manually entered comment for component product",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"componentLineNumber": {
"description": "Unique ID for component product within parent product",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"productDescription": {
"description": "Description for component product within product management system (system where ordered line item products will be managed)",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
"productNumber": {
"description": "Name for component product within product management system (system where ordered line item products will be managed)",
- "type": [
- "string",
- "null"
- ]
- },
- "productOwner": {
- "description": "Owner of component product",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
+ "productOwner": { "description": "Owner of component product", "type": ["string", "null"] },
"quantityBackordered": {
"description": "Amount of component product back-ordered within parent product",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32"
},
"quantityOrdered": {
"description": "Amount of component product ordered within parent product",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32"
},
- "size": {
- "description": "Size of component product",
- "type": [
- "string",
- "null"
- ]
- }
+ "size": { "description": "Size of component product", "type": ["string", "null"] }
},
- "required": [
- "productId"
- ]
+ "required": ["productId"]
}
},
- "pageCount": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int32"
- },
- "productDescription": {
- "type": [
- "string",
- "null"
- ]
- },
- "productLineNumber": {
- "type": [
- "string",
- "null"
- ]
- },
- "productNumber": {
- "type": [
- "string",
- "null"
- ]
- },
- "productOwner": {
- "type": [
- "string",
- "null"
- ]
- },
- "quantityOrdered": {
- "type": [
- "integer",
- "null"
- ],
- "format": "int32"
- },
- "size": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "required": [
- "productId"
- ]
+ "pageCount": { "type": ["integer", "null"], "format": "int32" },
+ "productDescription": { "type": ["string", "null"] },
+ "productLineNumber": { "type": ["string", "null"] },
+ "productNumber": { "type": ["string", "null"] },
+ "productOwner": { "type": ["string", "null"] },
+ "quantityOrdered": { "type": ["integer", "null"], "format": "int32" },
+ "size": { "type": ["string", "null"] }
+ },
+ "required": ["productId"]
}
},
"quantityOrdered": {
@@ -582,34 +284,20 @@
},
"rushOrder": {
"description": "True/false indicator if individual line item is expedited",
- "type": [
- "boolean",
- "null"
- ]
+ "type": ["boolean", "null"]
},
"shipToKey": {
"description": "Unique ID for Order.ShipTos.Key property associated to individual line item (NOTE: If top-level DefaultShipToKey is not set, this must be.)",
- "type": [
- "integer",
- "null"
- ],
+ "type": ["integer", "null"],
"format": "int32"
},
"taxAmount": {
"description": "Total tax amount applied to individual line item",
- "type": [
- "number",
- "null"
- ],
+ "type": ["number", "null"],
"format": "double"
}
},
- "required": [
- "offerId",
- "lineItemFee",
- "price",
- "quantityOrdered"
- ]
+ "required": ["offerId", "lineItemFee", "price", "quantityOrdered"]
},
"minItems": 1,
"uniqueItems": false,
@@ -628,38 +316,20 @@
},
"orderFee": {
"description": "Fee applied to Order",
- "type": [
- "number",
- "null"
- ],
+ "type": ["number", "null"],
"format": "double",
"minimum": 0,
- "examples": [
- 5.0
- ]
+ "examples": [5.0]
},
"orderVariables": {
"description": "Manually entered variables for order within order management system (system where order lifecycle will be managed in)",
- "oneOf": [
- {
- "type": "null"
- },
- {
- "type": "object",
- "maxProperties": 0
- }
- ]
+ "oneOf": [ {"type": "null"}, {"type": "object", "minProperties": 0} ]
},
"orderedBys": {
"description": "Order level ordered by contact and address details. Not required, but if present, each item must have required address fields and a non-null key.",
- "type": [
- "array",
- "null"
- ],
+ "type": ["array", "null"],
"oneOf": [
- {
- "type": "null"
- },
+ {"type": "null"},
{
"type": "array",
"items": {
@@ -667,85 +337,28 @@
"type": "object",
"additionalProperties": false,
"properties": {
- "address1": {
- "description": "Address line 1 for address",
- "type": "string"
- },
- "address2": {
- "description": "Address line 2 for address",
- "type": [
- "string",
- "null"
- ]
- },
- "address3": {
- "description": "Address line 3 for address",
- "type": [
- "string",
- "null"
- ]
- },
- "city": {
- "description": "City name for address",
- "type": "string"
- },
- "company": {
- "description": "Company name for address",
- "type": [
- "string",
- "null"
- ]
- },
- "country": {
- "description": "Country name for address",
- "type": "string"
- },
+ "address1": {"description": "Address line 1 for address", "type": "string"},
+ "address2": { "description": "Address line 2 for address", "type": ["string", "null"] },
+ "address3": { "description": "Address line 3 for address", "type": ["string", "null"] },
+ "city": {"description": "City name for address", "type": "string"},
+ "company": { "description": "Company name for address", "type": ["string", "null"] },
+ "country": {"description": "Country name for address", "type": "string"},
"emailAddress": {
"description": "Contact email address for address",
- "type": [
- "string",
- "null"
- ]
- },
- "faxNumber": {
- "description": "Fax number for address",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
+ "faxNumber": { "description": "Fax number for address", "type": ["string", "null"] },
"key": {
"description": "Unique ID for individual contact",
"type": "integer",
"format": "int32"
},
- "name": {
- "type": "string"
- },
- "phoneNumber": {
- "description": "Phone number for address",
- "type": [
- "string",
- "null"
- ]
- },
- "postalCode": {
- "description": "Postal code for address",
- "type": "string"
- },
- "stateProvince": {
- "description": "State or province name for address",
- "type": "string"
- }
+ "name": {"type": "string"},
+ "phoneNumber": { "description": "Phone number for address", "type": ["string", "null"] },
+ "postalCode": {"description": "Postal code for address", "type": "string"},
+ "stateProvince": {"description": "State or province name for address", "type": "string"}
},
- "required": [
- "address1",
- "city",
- "country",
- "name",
- "postalCode",
- "stateProvince"
- ]
+ "required": ["address1", "city", "country", "name", "postalCode", "stateProvince"]
},
"minItems": 1
}
@@ -769,10 +382,7 @@
},
"paymentMethods": {
"description": "Order.ShipTos level payment method details",
- "type": [
- "array",
- "null"
- ],
+ "type": ["array", "null"],
"items": {
"type": "object",
"additionalProperties": false,
@@ -787,10 +397,7 @@
"type": "string"
}
},
- "required": [
- "amount",
- "methodName"
- ]
+ "required": ["amount", "methodName"]
},
"examples": [
[
@@ -806,108 +413,41 @@
},
"pickPackHandlingFee": {
"description": "Sum of pick & pack handling fees for all Order.ShipTos",
- "type": [
- "number",
- "null"
- ],
+ "type": ["number", "null"],
"format": "double",
"minimum": 0,
- "examples": [
- 3.5
- ]
+ "examples": [3.5]
},
"poNumber": {
"description": "Purchase order number for Order. Maximum length 20 characters.",
- "type": [
- "string",
- "null"
- ],
+ "type": ["string", "null"],
"maxLength": 20,
- "examples": [
- "PO123456"
- ]
+ "examples": ["PO123456"]
},
"rushOrder": {
"description": "True/false indicator if Order is expedited",
"type": "boolean",
- "examples": [
- true
- ]
+ "examples": [true]
},
"shipTos": {
"description": "Order level ship to details. Required, must not be empty. Each item must have required address fields and a non-null key.",
- "type": [
- "array"
- ],
+ "type": ["array"],
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
- "affiliateId": {
- "type": [
- "string",
- "null"
- ]
- },
- "referenceId": {
- "type": [
- "string",
- "null"
- ]
- },
- "sourceSystemShippingMethodId": {
- "type": [
- "string",
- "null"
- ]
- },
- "affiliateName": {
- "type": [
- "string",
- "null"
- ]
- },
- "comment": {
- "type": [
- "string",
- "null"
- ]
- },
- "costCenter": {
- "type": [
- "string",
- "null"
- ]
- },
- "creditCardFee": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "dueDate": {
- "type": [
- "string",
- "null"
- ]
- },
- "key": {
- "type": "integer",
- "format": "int32"
- },
- "orderFee": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
+ "affiliateId": { "type": ["string", "null"] },
+ "referenceId": { "type": ["string", "null"] },
+ "sourceSystemShippingMethodId": { "type": ["string", "null"] },
+ "affiliateName": { "type": ["string", "null"] },
+ "comment": { "type": ["string", "null"] },
+ "costCenter": { "type": ["string", "null"] },
+ "creditCardFee": { "type": ["number", "null"], "format": "double" },
+ "dueDate": { "type": ["string", "null"] },
+ "key": {"type": "integer", "format": "int32"},
+ "orderFee": { "type": ["number", "null"], "format": "double" },
"paymentMethods": {
- "type": [
- "array",
- "null"
- ],
+ "type": ["array", "null"],
"items": {
"type": "object",
"additionalProperties": false,
@@ -922,136 +462,40 @@
"type": "string"
}
},
- "required": [
- "amount",
- "methodName"
- ]
+ "required": ["amount", "methodName"]
}
},
- "pickPackHandlingFee": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "poNumber": {
- "type": [
- "string",
- "null"
- ]
- },
- "rushOrder": {
- "type": [
- "boolean",
- "null"
- ]
- },
+ "pickPackHandlingFee": { "type": ["number", "null"], "format": "double" },
+ "poNumber": { "type": ["string", "null"] },
+ "rushOrder": { "type": ["boolean", "null"] },
"shipToAddress": {
"description": "Ship to addresses array for Order",
"type": "object",
"additionalProperties": false,
"properties": {
- "address1": {
- "description": "Address line 1 for address",
- "type": "string"
- },
- "address2": {
- "description": "Address line 2 for address",
- "type": [
- "string",
- "null"
- ]
- },
- "address3": {
- "description": "Address line 3 for address",
- "type": [
- "string",
- "null"
- ]
- },
- "city": {
- "description": "City name for address",
- "type": "string"
- },
- "company": {
- "description": "Company name for address",
- "type": [
- "string",
- "null"
- ]
- },
- "country": {
- "description": "Country name for address",
- "type": "string"
- },
+ "address1": {"description": "Address line 1 for address", "type": "string"},
+ "address2": { "description": "Address line 2 for address", "type": ["string", "null"] },
+ "address3": { "description": "Address line 3 for address", "type": ["string", "null"] },
+ "city": {"description": "City name for address", "type": "string"},
+ "company": { "description": "Company name for address", "type": ["string", "null"] },
+ "country": {"description": "Country name for address", "type": "string"},
"emailAddress": {
"description": "Contact email address for address",
- "type": [
- "string",
- "null"
- ]
- },
- "faxNumber": {
- "description": "Fax number for address",
- "type": [
- "string",
- "null"
- ]
- },
- "name": {
- "type": "string"
- },
- "phoneNumber": {
- "description": "Phone number for address",
- "type": [
- "string",
- "null"
- ]
+ "type": ["string", "null"]
},
- "postalCode": {
- "description": "Postal code for address",
- "type": "string"
- },
- "stateProvince": {
- "description": "State or province name for address",
- "type": "string"
- }
+ "faxNumber": { "description": "Fax number for address", "type": ["string", "null"] },
+ "name": {"type": "string"},
+ "phoneNumber": { "description": "Phone number for address", "type": ["string", "null"] },
+ "postalCode": {"description": "Postal code for address", "type": "string"},
+ "stateProvince": {"description": "State or province name for address", "type": "string"}
},
- "required": [
- "address1",
- "city",
- "country",
- "name",
- "postalCode",
- "stateProvince"
- ]
- },
- "shippingCost": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
+ "required": ["address1", "city", "country", "name", "postalCode", "stateProvince"]
},
- "shippingHandlingTax": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- },
- "totalOrderFee": {
- "type": [
- "number",
- "null"
- ],
- "format": "double"
- }
+ "shippingCost": { "type": ["number", "null"], "format": "double" },
+ "shippingHandlingTax": { "type": ["number", "null"], "format": "double" },
+ "totalOrderFee": { "type": ["number", "null"], "format": "double" }
},
- "required": [
- "key"
- ]
+ "required": ["key"]
},
"minItems": 1,
"uniqueItems": false,
@@ -1078,125 +522,57 @@
"type": "number",
"format": "double",
"minimum": 0,
- "examples": [
- 8.5
- ]
+ "examples": [8.5]
},
"totalOrderFee": {
"description": "Sum of OrderFee",
- "type": [
- "number",
- "null"
- ],
+ "type": ["number", "null"],
"format": "double",
"minimum": 0,
- "examples": [
- 5.0
- ]
+ "examples": [5.0]
},
"totalShippingCost": {
"description": "Sum of shipping cost for all Order.ShipTos.Shipments",
- "type": [
- "number",
- "null"
- ],
+ "type": ["number", "null"],
"format": "double",
"minimum": 0,
- "examples": [
- 10.0
- ]
+ "examples": [10.0]
}
},
- "required": [
- "orderId",
- "lineItems",
- "shippingHandlingTax",
- "billTos"
- ],
+ "required": ["orderId", "lineItems", "shippingHandlingTax"],
"allOf": [
{
+ "description": "Either a defaultBillToKey must be provided, or the billTos array must be populated.",
"oneOf": [
{
- "properties": {
- "defaultBillToKey": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": [
- "defaultBillToKey"
- ]
- },
- {
- "properties": {
- "defaultBillToKey": {
- "type": [
- "null",
- "integer"
- ]
- }
- }
- }
- ]
- },
- {
- "oneOf": [
- {
- "properties": {
- "defaultShipToKey": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": [
- "defaultShipToKey"
- ]
+ "properties": { "defaultBillToKey": {"type": "integer"} },
+ "required": ["defaultBillToKey"]
},
{
- "properties": {
- "defaultShipToKey": {
- "type": [
- "null",
- "integer"
- ]
- }
- }
+ "properties": { "billTos": {"type": "array", "minItems": 1} },
+ "required": ["billTos"]
}
]
},
{
+ "description": "Either a defaultShipToKey must be provided, or the shipTos array must be populated.",
"oneOf": [
{
- "properties": {
- "defaultOrderedByKey": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": [
- "defaultOrderedByKey"
- ]
+ "properties": { "defaultShipToKey": {"type": "integer"} },
+ "required": ["defaultShipToKey"]
},
{
- "properties": {
- "defaultOrderedByKey": {
- "type": [
- "null",
- "integer"
- ]
- }
- }
+ "properties": { "shipTos": {"type": "array", "minItems": 1} },
+ "required": ["shipTos"]
}
]
},
{
+ "description": "If a defaultBillToKey is not provided at the root, each line item must specify a billToKey.",
"oneOf": [
{
- "properties": {
- "defaultBillToKey": {
- "type": "integer"
- }
- }
+ "properties": { "defaultBillToKey": {"type": "integer"} },
+ "required": ["defaultBillToKey"]
},
{
"properties": {
@@ -1204,15 +580,8 @@
"type": "array",
"items": {
"type": "object",
- "properties": {
- "billToKey": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": [
- "billToKey"
- ]
+ "properties": { "billToKey": {"type": "integer", "minimum": 0} },
+ "required": ["billToKey"]
}
}
}
@@ -1220,29 +589,19 @@
]
},
{
+ "description": "If a defaultShipToKey is not provided at the root, each line item must specify a shipToKey.",
"oneOf": [
{
- "properties": {
- "defaultShipToKey": {
- "type": "integer"
- }
- }
+ "properties": { "defaultShipToKey": {"type": "integer"} },
+ "required": ["defaultShipToKey"]
},
{
"properties": {
"lineItems": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "shipToKey": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": [
- "shipToKey"
- ]
+ "properties": { "shipToKey": {"type": "integer", "minimum": 0} },
+ "required": ["shipToKey"]
}
}
}
@@ -1250,37 +609,19 @@
]
},
{
+ "description": "If a defaultOrderedByKey is not provided at the root, each line item must specify an orderedByKey.",
"oneOf": [
{
- "properties": {
- "defaultOrderedByKey": {
- "type": "integer"
- }
- }
- },
- {
- "properties": {
- "orderedBys": {
- "type": "array",
- "minItems": 0
- }
- }
+ "properties": { "defaultOrderedByKey": {"type": "integer"} },
+ "required": ["defaultOrderedByKey"]
},
{
"properties": {
"lineItems": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "orderedByKey": {
- "type": "integer",
- "minimum": 0
- }
- },
- "required": [
- "orderedByKey"
- ]
+ "properties": { "orderedByKey": {"type": "integer", "minimum": 0} },
+ "required": ["orderedByKey"]
}
}
}
@@ -1293,15 +634,8 @@
"type": "array",
"items": {
"type": "object",
- "properties": {
- "offerLineNumber": {
- "type": "string",
- "minLength": 1
- }
- },
- "required": [
- "offerLineNumber"
- ]
+ "properties": { "offerLineNumber": {"type": "string", "minLength": 1} },
+ "required": ["offerLineNumber"]
}
}
}
@@ -1311,11 +645,7 @@
{
"orderId": "7-mkkutsde-3-K-5649-4005-64",
"referenceId": "OWMR WSKFA - LNSSZT XBUUJ & MS XXQ QCHX",
- "accessGroups": [
- "TS-Retail",
- "CDM Tuff Shed",
- "Tuff shed Act on behalf and see all orders"
- ],
+ "accessGroups": ["TS-Retail", "CDM Tuff Shed", "Tuff shed Act on behalf and see all orders"],
"affiliateIdentifier": "QJ-987",
"affiliateName": "UJ-143-ABWJINHFVL, QD",
"billTos": [
@@ -1412,12 +742,7 @@
"stateProvince": "California"
}
],
- "paymentMethods": [
- {
- "amount": 35.8,
- "methodName": "invoice"
- }
- ],
+ "paymentMethods": [ {"amount": 35.8, "methodName": "invoice"} ],
"pickPackHandlingFee": 0.75,
"poNumber": null,
"rushOrder": false,
@@ -1463,11 +788,7 @@
{
"orderId": "1-qrhjtpek-8-Q-0286-8859-25",
"referenceId": "WUQD HWKPE - XIWHAC BTVOM & BH WAK DXRI",
- "accessGroups": [
- "TS-Retail",
- "CDM Tuff Shed",
- "Tuff shed Act on behalf and see all orders"
- ],
+ "accessGroups": ["TS-Retail", "CDM Tuff Shed", "Tuff shed Act on behalf and see all orders"],
"affiliateIdentifier": "VJ-268",
"affiliateName": "GZ-589-WUOFETGVLG, RM",
"billTos": [
@@ -1564,12 +885,7 @@
"stateProvince": "Alaska"
}
],
- "paymentMethods": [
- {
- "amount": 35.8,
- "methodName": "invoice"
- }
- ],
+ "paymentMethods": [ {"amount": 35.8, "methodName": "invoice"} ],
"pickPackHandlingFee": 0.75,
"poNumber": null,
"rushOrder": false,
@@ -1613,4 +929,4 @@
"totalShippingCost": 13.66
}
]
-}
\ No newline at end of file
+}
diff --git a/schema/Api/OrderBroker/NewOrderRequest.json b/schema/Api/OrderBroker/NewOrderRequest.json
index 5cd4231..4618100 100644
--- a/schema/Api/OrderBroker/NewOrderRequest.json
+++ b/schema/Api/OrderBroker/NewOrderRequest.json
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
- "$id": "NewOrderRequest.json",
+ "$id": "InternalNewOrderRequest.json",
"description": "Details for Order JSON schema. Conditional constraints (enforced in backend): If defaultBillToKey, defaultOrderedByKey, or defaultShipToKey are null, corresponding keys must be set on each line item. If defaultBillToKey, defaultOrderedByKey, or defaultShipToKey are not null, they must match a key in billTos, orderedBys, or shipTos respectively. OfferLineNumber, productLineNumber, and componentLineNumber values must be unique within their collections if provided.",
"type": "object",
"additionalProperties": false,
@@ -323,7 +323,7 @@
},
"orderVariables": {
"description": "Manually entered variables for order within order management system (system where order lifecycle will be managed in)",
- "oneOf": [ {"type": "null"}, {"type": "object", "maxProperties": 0} ]
+ "oneOf": [ {"type": "null"}, {"type": "object", "minProperties": 0} ]
},
"orderedBys": {
"description": "Order level ordered by contact and address details. Not required, but if present, each item must have required address fields and a non-null key.",
@@ -539,38 +539,41 @@
"examples": [10.0]
}
},
- "required": ["orderId", "lineItems", "shippingHandlingTax", "billTos"],
+ "required": ["orderId", "lineItems", "shippingHandlingTax"],
"allOf": [
{
+ "description": "Either a defaultBillToKey must be provided, or the billTos array must be populated.",
"oneOf": [
{
- "properties": { "defaultBillToKey": {"type": "integer", "minimum": 0} },
+ "properties": { "defaultBillToKey": {"type": "integer"} },
"required": ["defaultBillToKey"]
},
- { "properties": { "defaultBillToKey": { "type": ["null", "integer"] } } }
+ {
+ "properties": { "billTos": {"type": "array", "minItems": 1} },
+ "required": ["billTos"]
+ }
]
},
{
+ "description": "Either a defaultShipToKey must be provided, or the shipTos array must be populated.",
"oneOf": [
{
- "properties": { "defaultShipToKey": {"type": "integer", "minimum": 0} },
+ "properties": { "defaultShipToKey": {"type": "integer"} },
"required": ["defaultShipToKey"]
},
- { "properties": { "defaultShipToKey": { "type": ["null", "integer"] } } }
+ {
+ "properties": { "shipTos": {"type": "array", "minItems": 1} },
+ "required": ["shipTos"]
+ }
]
},
{
+ "description": "If a defaultBillToKey is not provided at the root, each line item must specify a billToKey.",
"oneOf": [
{
- "properties": { "defaultOrderedByKey": {"type": "integer", "minimum": 0} },
- "required": ["defaultOrderedByKey"]
+ "properties": { "defaultBillToKey": {"type": "integer"} },
+ "required": ["defaultBillToKey"]
},
- { "properties": { "defaultOrderedByKey": { "type": ["null", "integer"] } } }
- ]
- },
- {
- "oneOf": [
- { "properties": { "defaultBillToKey": {"type": "integer"} } },
{
"properties": {
"lineItems": {
@@ -586,14 +589,17 @@
]
},
{
+ "description": "If a defaultShipToKey is not provided at the root, each line item must specify a shipToKey.",
"oneOf": [
- { "properties": { "defaultShipToKey": {"type": "integer"} } },
+ {
+ "properties": { "defaultShipToKey": {"type": "integer"} },
+ "required": ["defaultShipToKey"]
+ },
{
"properties": {
"lineItems": {
"type": "array",
"items": {
- "type": "object",
"properties": { "shipToKey": {"type": "integer", "minimum": 0} },
"required": ["shipToKey"]
}
@@ -603,15 +609,17 @@
]
},
{
+ "description": "If a defaultOrderedByKey is not provided at the root, each line item must specify an orderedByKey.",
"oneOf": [
- { "properties": { "defaultOrderedByKey": {"type": "integer"} } },
- { "properties": { "orderedBys": {"type": "array", "minItems": 0} } },
+ {
+ "properties": { "defaultOrderedByKey": {"type": "integer"} },
+ "required": ["defaultOrderedByKey"]
+ },
{
"properties": {
"lineItems": {
"type": "array",
"items": {
- "type": "object",
"properties": { "orderedByKey": {"type": "integer", "minimum": 0} },
"required": ["orderedByKey"]
}