InternalGetOrderResponse
Response for Get Order API containing the Order schema
Properties
-
data(['object', 'null'])Cannot contain additional properties.-
All of
-
Either a defaultBillToKey must be provided, or the billTos array must be populated.
-
One of
-
defaultBillToKey(string, required)
-
billTos(array, required)Length must be at least 1.
-
-
-
Either a defaultShipToKey must be provided, or the shipTos array must be populated.
-
One of
-
defaultShipToKey(string, required)
-
shipTos(array, required)Length must be at least 1.
-
-
-
If a defaultBillToKey is not provided at the root, each line item must specify a billToKey.
-
One of
-
defaultBillToKey(string, required)
-
-
lineItems(['array', 'null'])-
Items (object)
billToKey(string, required)
-
-
-
-
-
If a defaultShipToKey is not provided at the root, each line item must specify a shipToKey.
-
One of
-
defaultShipToKey(string, required)
-
-
lineItems(['array', 'null'])-
Items
shipToKey(string, required)
-
-
-
-
-
If a defaultOrderedByKey is not provided at the root, each line item must specify an orderedByKey.
-
One of
-
defaultOrderedByKey(string, required)
-
-
lineItems(['array', 'null'])-
Items
orderedByKey(string, required)
-
-
-
defaultOrderedByKey(null, required)-
orderedBys-
One of
- null
- arrayLength must be at most 0.
-
-
-
-
-
lineItems(['array', 'null'])-
Items (object)
offerLineNumber(string, required)
-
-
-
-
omsCustomerId(['string', 'null'])Unique customer ID in the order management system (system where order lifecycle will be managed). omsId(['string', 'null'])Order management system ID.omsOrderId(['string', 'null'])Unique order ID in the order management system (system where order lifecycle will be managed).orderId(string, required)Unique ID for order within order management system (system where order lifecycle will be managed). Required, must not be null or empty.referenceId(['string', 'null'])sourceSystemCustomerId(string)This is an automatically generated field added by middleware. It is considered read-only.sourceSystemId(['integer', 'null'], format: int32)This is an automatically generated field added by middleware. It is considered read-only.sourceSystemOrderId(['string', 'null'])Unique order ID in the source system (system where order was originally placed).-
accessGroups(['array', 'null'])- Items (string)
-
affiliateIdentifier(['string', 'null'])Unique ID for affiliate within source system (system where order was originally placed). affiliateName(['string', 'null'])Name for affiliate within source system (system where order was originally placed).-
billTosBill to addresses array for Order. Required, must not be empty. Each item must have required address fields and a non-null key.-
One of
- null
-
arrayLength must be at least 1.
-
Items (object)Cannot contain additional properties.
address1(string, required)Address line 1 for address.address2(['string', 'null'])Address line 2 for address.address3(['string', 'null'])Address line 3 for address.addressCode(['string', 'null'])Address code for address.city(string, required)City name for address.company(['string', 'null'])Company name for address.country(string, required)Country name for address.emailAddress(['string', 'null'])Contact email address for address.faxNumber(['string', 'null'])Fax number for address.isDeleted(['boolean', 'null'])Flag indicating if this bill to address has been deleted.key(string, required)Unique ID for individual contact.name(string, required)Contact name for this address.phoneNumber(['string', 'null'])Phone number for address.postalCode(string, required)Postal code for address.stateProvince(string, required)State or province name for address.
-
-
-
costCenter(['string', 'null']) createDateTime(['string', 'null'], required)Datetime of when order was created.creditCardFee(['number', 'null'], format: double)Credit card transaction fee applied to Order. Minimum:0.defaultBillToKey(['string', 'null'])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.).defaultOrderedByKey(['string', 'null'])Unique ID for default ordered by contact details pulled from Order.OrderedBy.Key property (Only if applicable. Otherwise DefaultOrderedByKey will be null/empty value).defaultShipToKey(['string', 'null'])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.).dueDate(['string', 'null'])Datetime of expected due date for Order. If present, must be a valid date and not in the past (enforced in backend).-
lineItems(['array'], required)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. Length must be at least 1.-
Items (object)Order level line item details. Cannot contain additional properties.
offerId(string, required)Unique ID for offer within Integration Broker.productManagementSystemCustomerId(['string', 'null'])Unique customer ID in the product management system (system where ordered line item products will be managed).productManagementSystemId(['string', 'null'])Product management system ID.referenceId(['string', 'null'])variableTemplatePrintId(['string', 'null'])Unique ID for variable template file associated to offer on individual line item.-
additionalProperties(['array', 'null'])Additional properties details for Order LineItems.-
Items (object)Order.LineItems level additional properties details. Cannot contain additional properties.
key(['string', 'null'], required)value(['string', 'null'], required)
-
-
billToKey(['string', 'null'])Unique ID for Order.BillTos.Key property associated to individual line item (NOTE: If top-level DefaultBillToKey is not set, this must be.). comment(['string', 'null'])Manually entered comment for individual line item.costCenter(['string', 'null'])dueDate(['string', 'null'])Datetime of expected due date for individual line item.isDeleted(['boolean', 'null'])Flag indicating if this line item has been deleted.lineItemFee(number, format: double)Fee applied to individual line item.offerDescription(['string', 'null'])Description for offer within product management system (system where ordered line item products will be managed).offerLineNumber(['string', 'null'])Unique ID for individual line item.offerNumber(['string', 'null'])Name for offer within product management system (system where ordered line item products will be managed).orderedByKey(['string', 'null'])Unique ID for Order.OrderedBy.Key property associated to individual line item.poNumber(['string', 'null'])Purchase order number for individual line item.price(number, format: double)Total offer price of individual line item.-
products(['array', 'null'])-
Items (object)Cannot contain additional properties.
fulfillmentSystemCustomerId(['string', 'null'])Unique customer ID in the fulfillment system (system where products will be fulfilled).fulfillmentSystemId(['string', 'null'])Fulfillment system ID.productId(string, required)associatedFileName(['string', 'null'])color(['string', 'null'])comment(['string', 'null'])-
components(['array', 'null'])-
Items (object)Product component details. Cannot contain additional properties.
productId(['string', 'null'], required)Unique ID for component product within Integration Broker.associatedFileName(['string', 'null'])Name of file associated to component product (if applicable).color(['string', 'null'])Color of component product.comment(['string', 'null'])Manually entered comment for component product.componentLineNumber(['string', 'null'])Unique ID for component product within parent product.productDescription(['string', 'null'])Description for component product within product management system (system where ordered line item products will be managed).productNumber(['string', 'null'])Name for component product within product management system (system where ordered line item products will be managed).productOwner(['string', 'null'])Owner of component product.quantityBackordered(['integer', 'null'], format: int32)Amount of component product back-ordered within parent product.quantityOrdered(['integer', 'null'], format: int32)Amount of component product ordered within parent product.size(['string', 'null'])Size of component product.
-
-
isDeleted(['boolean', 'null'])Flag indicating if this product has been deleted. offerLineNumber(['string', 'null'])Line number reference to the parent offer line item.pageCount(['integer', 'null'], format: int32)productDescription(['string', 'null'])productLineNumber(['string', 'null'])Line number reference to the parent offer line item.productNumber(['string', 'null'])productOwner(['string', 'null'])quantityBackordered(['integer', 'null'], format: int32)quantityOrdered(['integer', 'null'], format: int32)size(['string', 'null'])
-
-
quantityCanceled(['integer', 'null'], format: int32)Amount of offer canceled for individual line item. Minimum:0. quantityOrdered(['integer', 'null'], format: int32)Amount of offer ordered for individual line item.rushOrder(['boolean', 'null'])True/false indicator if individual line item is expedited.shipToKey(['string', 'null'])Unique ID for Order.ShipTos.Key property associated to individual line item (NOTE: If top-level DefaultShipToKey is not set, this must be.).status(['string', 'null'])Current status of the line item.taxAmount(['number', 'null'], format: double)Total tax amount applied to individual line item.
-
-
modifiedDateTime(['string', 'null'])Datetime of when order was last modified. omsCustomerName(['string', 'null'])Customer name in the order management system (system where order lifecycle will be managed).orderFee(['number', 'null'], format: double)Fee applied to Order. Minimum:0.-
orderVariablesManually entered variables for order within order management system (system where order lifecycle will be managed in).-
One of
- null
- object
-
-
orderedBysOrder level ordered by contact and address details. Not required, but if present, each item must have required address fields and a non-null key.-
One of
- null
-
arrayLength must be at least 1.
-
Items (object)Bill to address object for Order. Cannot contain additional properties.
address1(string, required)Address line 1 for address.address2(['string', 'null'])Address line 2 for address.address3(['string', 'null'])Address line 3 for address.addressCode(['string', 'null'])Address code for address.city(string, required)City name for address.company(['string', 'null'])Company name for address.country(string, required)Country name for address.emailAddress(['string', 'null'])Contact email address for address.faxNumber(['string', 'null'])Fax number for address.key(string)Unique ID for individual contact.name(string, required)phoneNumber(['string', 'null'])Phone number for address.postalCode(string, required)Postal code for address.stateProvince(string, required)State or province name for address.
-
-
-
paymentMethods(['array', 'null'])Order.ShipTos level payment method details.-
Items (object)Cannot contain additional properties.
amount(number, format: double, required)Total Amount. Required if MethodName specified.methodName(string, required)Name of payment method. Required if Payment Amount specified.
-
-
pickPackHandlingFee(['number', 'null'], format: double)Sum of pick & pack handling fees for all Order.ShipTos. Minimum:0. poNumber(['string', 'null'])Purchase order number for Order. Maximum length 20 characters.rushOrder(['boolean', 'null'])True/false indicator if Order is expedited.-
shipTos(['array', 'null'], required)Order level ship to details. Required, must not be empty. Each item must have required address fields and a non-null key. Length must be at least 1.-
Items (object)Cannot contain additional properties.
affiliateId(['string', 'null'])omsShippingMethodId(['string', 'null'])Shipping method ID in the order management system.referenceId(['string', 'null'])sourceSystemShippingMethodId(['string', 'null'])affiliateName(['string', 'null'])comment(['string', 'null'])costCenter(['string', 'null'])creditCardFee(['number', 'null'], format: double)dueDate(['string', 'null'])key(string, required)Unique ID for individual ship to address.orderFee(['number', 'null'], format: double)-
paymentMethods(['array', 'null'])-
Items (object)Cannot contain additional properties.
amount(number, format: double, required)Total Amount. Required if MethodName specified.methodName(string, required)Name of payment method. Required if Payment Amount specified.
-
-
pickPackHandlingFee(['number', 'null'], format: double) poNumber(['string', 'null'])rushFee(['number', 'null'], format: double)Rush fee applied to this ship to location. Minimum:0.rushOrder(['boolean', 'null'])-
shipToAddress(object)Ship to addresses array for Order. Cannot contain additional properties.address1(string, required)Address line 1 for address.address2(['string', 'null'])Address line 2 for address.address3(['string', 'null'])Address line 3 for address.addressCode(['string', 'null'])Address code for address.city(string, required)City name for address.company(['string', 'null'])Company name for address.country(string, required)Country name for address.emailAddress(['string', 'null'])Contact email address for address.faxNumber(['string', 'null'])Fax number for address.name(string, required)phoneNumber(['string', 'null'])Phone number for address.postalCode(string, required)Postal code for address.stateProvince(string, required)State or province name for address.
-
shippingCarrier(['string', 'null'])Shipping carrier name. shippingCost(['number', 'null'], format: double)shippingHandlingTax(['number', 'null'], format: double)shippingService(['string', 'null'])Shipping service level.status(['string', 'null'])Current status of the ship to location.totalOrderFee(['number', 'null'], format: double)
-
-
shippingHandlingTax(number, format: double)Sum of shipping & handling taxes for all Order.ShipTos. Required, must not be null. Minimum:0. -
statuses(['array', 'null'])Array of status values for the order.- Items (string)
-
totalOrderFee(['number', 'null'], format: double)Sum of OrderFee. Minimum:0. totalShippingCost(['number', 'null'], format: double)Sum of shipping cost for all Order.ShipTos.Shipments. Minimum:0.
-
-
failureMessages(array)- Items (string)
-
informationalMessages(array)- Items (string)
-
operationWasSuccessful(boolean)
Examples
{
"data": {
"orderId": "7-mkkutsde-3-K-5649-4005-64",
"referenceId": "OWMR WSKFA - LNSSZT XBUUJ & MS XXQ QCHX",
"sourceSystemCustomerId": "Big Chicken",
"sourceSystemId": 2,
"accessGroups": [
"TS-Retail",
"CDM Tuff Shed",
"Tuff shed Act on behalf and see all orders"
],
"affiliateIdentifier": "QJ-987",
"affiliateName": "UJ-143-ABWJINHFVL, QD",
"billTos": [
{
"address1": "16013 Valenzuela Turnpike",
"address2": null,
"address3": null,
"city": "Rosaleshaven",
"company": "Rosales-Shea",
"country": "USA",
"emailAddress": "chelseamiller@example.org",
"faxNumber": "",
"key": "0",
"name": "Gail Stewart",
"phoneNumber": "411-770-8380",
"postalCode": "12507",
"stateProvince": "Washington"
}
],
"costCenter": "020 - Denver",
"createDateTime": "2025-02-28T20:37:42.018+00:00",
"creditCardFee": 0.0,
"defaultBillToKey": null,
"defaultOrderedByKey": null,
"defaultShipToKey": null,
"dueDate": null,
"lineItems": [
{
"offerId": "t87grb75-e9pe-5405-y8yv-25n5q70bu93i",
"referenceId": "BEHZ QUJNS - TPGJXT MMGVN & UX ZDN HHQS",
"variableTemplatePrintId": null,
"additionalProperties": [],
"billToKey": "0",
"comment": null,
"costCenter": "020 - Denver",
"dueDate": null,
"lineItemFee": 0.75,
"offerDescription": "<p>$17.00 Each \u2013 S - XL<br>\n$20.00 Each \u2013 2XL - XLarge/Tall Sizes<br>\n$21.50 Each \u2013 3XL - 2XLarge/Tall sizes<br>$25.00 Each - 4XL Sizes - 3XL tall <br>$35.00 Each - 5XL Sizes<br><br></p>",
"offerLineNumber": "0",
"offerNumber": "TS_A-A0050",
"orderedByKey": "0",
"poNumber": null,
"price": 17.0,
"products": [
{
"productId": "3j8hu98q-s0t6-409v-029r-321r0uo02k30",
"associatedFileName": "",
"color": null,
"comment": null,
"components": [],
"productDescription": "8\"x8\" square paint swatch.",
"productLineNumber": "1",
"productNumber": "R_962_24008_TSO",
"productOwner": null,
"quantityOrdered": null,
"size": null
},
{
"productId": "7jv34sz5-m4q8-8q8f-187d-jt7791j02958",
"associatedFileName": "",
"color": null,
"comment": null,
"components": [],
"productDescription": "Tuff Shed Men's Polo",
"productLineNumber": "2",
"productNumber": "TS_A-A0050",
"productOwner": null,
"quantityOrdered": null,
"size": null
}
],
"quantityOrdered": 1,
"rushOrder": false,
"shipToKey": "0",
"taxAmount": 0.0
}
],
"orderFee": 4.0,
"orderVariables": {},
"orderedBys": [
{
"address1": "42801 Pamela Run",
"address2": null,
"address3": null,
"city": "Port Rickside",
"company": "Trujillo-Sims",
"country": "USA",
"emailAddress": "jonesjeff@example.net",
"faxNumber": "",
"key": "0",
"name": "Benjamin Smith",
"phoneNumber": "+1-310-761-3615x7115",
"postalCode": "10330",
"stateProvince": "California"
}
],
"paymentMethods": [
{
"amount": 35.8,
"methodName": "invoice"
}
],
"pickPackHandlingFee": 0.75,
"poNumber": null,
"rushOrder": false,
"shipTos": [
{
"affiliateId": "EK-023",
"referenceId": "QGSN VNSAH - PWJRVG OCYIA & PG GAE RZTN",
"sourceSystemShippingMethodId": "qnigy_cxdcmo",
"affiliateName": "JK-467-WLTQIEOCCZ, PA",
"comment": null,
"costCenter": "020 - Denver",
"creditCardFee": 0.0,
"dueDate": null,
"key": "0",
"orderFee": 4.0,
"paymentMethods": [],
"pickPackHandlingFee": 0.75,
"poNumber": null,
"rushOrder": false,
"shipToAddress": {
"address1": "130 Owen Gateway",
"address2": null,
"address3": null,
"city": "Arthurborough",
"company": "Bryant-Compton",
"country": "USA",
"emailAddress": "yduran@example.com",
"faxNumber": "",
"name": "Patricia Parker",
"phoneNumber": "317.410.1217",
"postalCode": "96718",
"stateProvince": "Georgia"
},
"shippingCost": 13.66,
"shippingHandlingTax": 0.39,
"totalOrderFee": 4.0
}
],
"shippingHandlingTax": 0.39,
"totalOrderFee": 4.0,
"totalShippingCost": 13.66
},
"failureMessages": [],
"informationalMessages": [],
"operationWasSuccessful": true
}
Quicktype Command
quicktype \
--framework SystemTextJson \
--lang cs \
--number-type double \
--src-lang schema \
--no-check-required \
--density dense \
--features complete \
--namespace OtpSchema.Api.OrderBroker.InternalGetOrderResponse \
--src .working/build/internal/json-schema-for-cs/InternalGetOrderResponse.json -o .working/build/internal/csharp/OtpSchema/Api/OrderBroker/InternalGetOrderResponse.cs
// <auto-generated />
//
// To parse this JSON data, add NuGet 'System.Text.Json' then do:
//
// using OtpSchema.Api.OrderBroker.InternalGetOrderResponse;
//
// var internalGetOrderResponse = InternalGetOrderResponse.FromJson(jsonString);
#nullable enable
#pragma warning disable CS8618
#pragma warning disable CS8601
#pragma warning disable CS8603
namespace OtpSchema.Api.OrderBroker.InternalGetOrderResponse
{
using System;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Globalization;
using J = System.Text.Json.Serialization.JsonPropertyNameAttribute;
using N = System.Text.Json.Serialization.JsonIgnoreCondition;
/// <summary>Response for Get Order API containing the Order schema</summary>
public partial class InternalGetOrderResponse
{
[J("data")] public Data Data { get; set; }
[J("failureMessages")] public string[] FailureMessages { get; set; }
[J("informationalMessages")] public string[] InformationalMessages { get; set; }
[J("operationWasSuccessful")] public bool OperationWasSuccessful { get; set; }
}
public partial class Data
{
[J("accessGroups")] public string[] AccessGroups { get; set; }
[J("affiliateIdentifier")][JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))] public string AffiliateIdentifier { get; set; } // Unique ID for affiliate within source system (system where order was originally placed)
[J("affiliateName")][JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))] public string AffiliateName { get; set; } // Name for affiliate within source system (system where order was originally placed)
[J("billTos")] public object[] BillTos { get; set; } // Bill to addresses array for Order. Required, must not be empty. Each item must have; required address fields and a non-null key.
[J("costCenter")][JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))] public string CostCenter { get; set; }
[J("createDateTime")] public string CreateDateTime { get; set; } // Datetime of when order was created
[J("creditCardFee")][JsonConverter(typeof(MinMaxValueCheckConverter))] public double? CreditCardFee { get; set; } // Credit card transaction fee applied to Order
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("defaultBillToKey")] public string DefaultBillToKey { get; set; } // 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.)
[J("defaultOrderedByKey")] public string DefaultOrderedByKey { get; set; } // Unique ID for default ordered by contact details pulled from Order.OrderedBy.Key property; (Only if applicable. Otherwise DefaultOrderedByKey will be null/empty value)
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("defaultShipToKey")] public string DefaultShipToKey { get; set; } // 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.)
[J("dueDate")] public string DueDate { get; set; } // Datetime of expected due date for Order. If present, must be a valid date and not in the; past (enforced in backend).
[J("lineItems")] public DefaultOrderedByKey[] LineItems { get; set; } // 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.
[J("modifiedDateTime")] public string ModifiedDateTime { get; set; } // Datetime of when order was last modified
[J("omsCustomerId")][JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))] public string OmsCustomerId { get; set; } // Unique customer ID in the order management system (system where order lifecycle will be; managed)
[J("omsCustomerName")][JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))] public string OmsCustomerName { get; set; } // Customer name in the order management system (system where order lifecycle will be; managed)
[J("omsId")][JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))] public string OmsId { get; set; } // Order management system ID
[J("omsOrderId")][JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))] public string OmsOrderId { get; set; } // Unique order ID in the order management system (system where order lifecycle will be; managed)
[J("orderedBys")] public object[] OrderedBys { get; set; } // 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.
[J("orderFee")][JsonConverter(typeof(MinMaxValueCheckConverter))] public double? OrderFee { get; set; } // Fee applied to Order
[J("orderId")][JsonConverter(typeof(StickyMinMaxLengthCheckConverter))] public string OrderId { get; set; } // Unique ID for order within order management system (system where order lifecycle will be; managed). Required, must not be null or empty.
[J("orderVariables")] public Dictionary<string, object> OrderVariables { get; set; } // Manually entered variables for order within order management system (system where order; lifecycle will be managed in)
[J("paymentMethods")] public PaymentMethod[] PaymentMethods { get; set; } // Order.ShipTos level payment method details
[J("pickPackHandlingFee")][JsonConverter(typeof(MinMaxValueCheckConverter))] public double? PickPackHandlingFee { get; set; } // Sum of pick & pack handling fees for all Order.ShipTos
[J("poNumber")][JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))] public string PoNumber { get; set; } // Purchase order number for Order. Maximum length 20 characters.
[J("referenceId")][JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))] public string ReferenceId { get; set; }
[J("rushOrder")] public bool? RushOrder { get; set; } // True/false indicator if Order is expedited
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("shippingHandlingTax")][JsonConverter(typeof(MinMaxValueCheckConverter))] public double? ShippingHandlingTax { get; set; } // Sum of shipping & handling taxes for all Order.ShipTos. Required, must not be null.
[J("shipTos")] public object[] ShipTos { get; set; } // Order level ship to details. Required, must not be empty. Each item must have required; address fields and a non-null key.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)][J("sourceSystemCustomerId")][JsonConverter(typeof(StickyMinMaxLengthCheckConverter))] public string SourceSystemCustomerId { get; set; } // This is an automatically generated field added by middleware. It is considered read-only
[J("sourceSystemId")] public long? SourceSystemId { get; set; } // This is an automatically generated field added by middleware. It is considered read-only
[J("sourceSystemOrderId")][JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))] public string SourceSystemOrderId { get; set; } // Unique order ID in the source system (system where order was originally placed)
[J("statuses")] public string[] Statuses { get; set; } // Array of status values for the order
[J("totalOrderFee")][JsonConverter(typeof(MinMaxValueCheckConverter))] public double? TotalOrderFee { get; set; } // Sum of OrderFee
[J("totalShippingCost")][JsonConverter(typeof(MinMaxValueCheckConverter))] public double? TotalShippingCost { get; set; } // Sum of shipping cost for all Order.ShipTos.Shipments
}
public partial class DefaultOrderedByKey
{
[J("billToKey")] public string BillToKey { get; set; }
[J("shipToKey")] public string ShipToKey { get; set; }
[J("orderedByKey")] public string OrderedByKey { get; set; }
[J("offerLineNumber")][JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))] public string OfferLineNumber { get; set; }
}
public partial class PaymentMethod
{
[J("amount")] public double Amount { get; set; } // Total Amount. Required if MethodName specified
[J("methodName")] public string MethodName { get; set; } // Name of payment method. Required if Payment Amount specified
}
public partial class InternalGetOrderResponse
{
public static InternalGetOrderResponse FromJson(string json) => JsonSerializer.Deserialize<InternalGetOrderResponse>(json, OtpSchema.Api.OrderBroker.InternalGetOrderResponse.Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this InternalGetOrderResponse self) => JsonSerializer.Serialize(self, OtpSchema.Api.OrderBroker.InternalGetOrderResponse.Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
{
Converters =
{
new DateOnlyConverter(),
new TimeOnlyConverter(),
IsoDateTimeOffsetConverter.Singleton
},
};
}
internal class PurpleMinMaxLengthCheckConverter : JsonConverter<string>
{
public override bool CanConvert(Type t) => t == typeof(string);
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
if (value != null && value.Length <= 100)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
if (value != null && value.Length <= 100)
{
JsonSerializer.Serialize(writer, value, options);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
}
internal class FluffyMinMaxLengthCheckConverter : JsonConverter<string>
{
public override bool CanConvert(Type t) => t == typeof(string);
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
if (value != null && value.Length <= 255)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
if (value != null && value.Length <= 255)
{
JsonSerializer.Serialize(writer, value, options);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
}
internal class MinMaxValueCheckConverter : JsonConverter<double>
{
public override bool CanConvert(Type t) => t == typeof(double);
public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetDouble();
if (value >= 0)
{
return value;
}
throw new Exception("Cannot unmarshal type double");
}
public override void Write(Utf8JsonWriter writer, double value, JsonSerializerOptions options)
{
if (value >= 0)
{
JsonSerializer.Serialize(writer, value, options);
return;
}
throw new Exception("Cannot marshal type double");
}
public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
}
internal class TentacledMinMaxLengthCheckConverter : JsonConverter<string>
{
public override bool CanConvert(Type t) => t == typeof(string);
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
if (value != null && value.Length >= 1)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
if (value != null && value.Length >= 1)
{
JsonSerializer.Serialize(writer, value, options);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
}
internal class StickyMinMaxLengthCheckConverter : JsonConverter<string>
{
public override bool CanConvert(Type t) => t == typeof(string);
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
if (value != null && value.Length >= 1 && value.Length <= 100)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
if (value != null && value.Length >= 1 && value.Length <= 100)
{
JsonSerializer.Serialize(writer, value, options);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
}
internal class IndigoMinMaxLengthCheckConverter : JsonConverter<string>
{
public override bool CanConvert(Type t) => t == typeof(string);
public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
if (value != null && value.Length <= 20)
{
return value;
}
throw new Exception("Cannot unmarshal type string");
}
public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
{
if (value != null && value.Length <= 20)
{
JsonSerializer.Serialize(writer, value, options);
return;
}
throw new Exception("Cannot marshal type string");
}
public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
}
public class DateOnlyConverter : JsonConverter<DateOnly>
{
private readonly string serializationFormat;
public DateOnlyConverter() : this(null) { }
public DateOnlyConverter(string? serializationFormat)
{
this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
}
public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
return DateOnly.Parse(value!);
}
public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.ToString(serializationFormat));
}
public class TimeOnlyConverter : JsonConverter<TimeOnly>
{
private readonly string serializationFormat;
public TimeOnlyConverter() : this(null) { }
public TimeOnlyConverter(string? serializationFormat)
{
this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
}
public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
var value = reader.GetString();
return TimeOnly.Parse(value!);
}
public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
=> writer.WriteStringValue(value.ToString(serializationFormat));
}
internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
{
public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
private string? _dateTimeFormat;
private CultureInfo? _culture;
public DateTimeStyles DateTimeStyles
{
get => _dateTimeStyles;
set => _dateTimeStyles = value;
}
public string? DateTimeFormat
{
get => _dateTimeFormat ?? string.Empty;
set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
}
public CultureInfo Culture
{
get => _culture ?? CultureInfo.CurrentCulture;
set => _culture = value;
}
public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
{
string text;
if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
|| (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
{
value = value.ToUniversalTime();
}
text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
writer.WriteStringValue(text);
}
public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
string? dateText = reader.GetString();
if (string.IsNullOrEmpty(dateText) == false)
{
if (!string.IsNullOrEmpty(_dateTimeFormat))
{
return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
}
else
{
return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
}
}
else
{
return default(DateTimeOffset);
}
}
public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
}
}
#pragma warning restore CS8618
#pragma warning restore CS8601
#pragma warning restore CS8603
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "InternalGetOrderResponse.json",
"description": "Response for Get Order API containing the Order schema",
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"type": ["object", "null"],
"additionalProperties": false,
"properties": {
"omsCustomerId": {
"description": "Unique customer ID in the order management system (system where order lifecycle will be managed)",
"type": ["string", "null"],
"maxLength": 100
},
"omsId": {
"description": "Order management system ID",
"type": ["string", "null"],
"maxLength": 100
},
"omsOrderId": {
"description": "Unique order ID in the order management system (system where order lifecycle will be managed)",
"type": ["string", "null"],
"maxLength": 100
},
"orderId": {
"description": "Unique ID for order within order management system (system where order lifecycle will be managed). Required, must not be null or empty.",
"type": "string",
"maxLength": 100,
"minLength": 1
},
"referenceId": { "type": ["string", "null"], "maxLength": 255 },
"sourceSystemCustomerId": {
"description": "This is an automatically generated field added by middleware. It is considered read-only",
"type": "string",
"maxLength": 100,
"minLength": 1,
"readonly": true
},
"sourceSystemId": {
"description": "This is an automatically generated field added by middleware. It is considered read-only",
"type": ["integer", "null"],
"format": "int32",
"readonly": true
},
"sourceSystemOrderId": {
"description": "Unique order ID in the source system (system where order was originally placed)",
"type": ["string", "null"],
"maxLength": 100
},
"accessGroups": { "type": ["array", "null"], "items": {"type": "string"} },
"affiliateIdentifier": {
"description": "Unique ID for affiliate within source system (system where order was originally placed)",
"type": ["string", "null"],
"maxLength": 100
},
"affiliateName": {
"description": "Name for affiliate within source system (system where order was originally placed)",
"type": ["string", "null"],
"maxLength": 255
},
"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": "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"] },
"addressCode": { "description": "Address code 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"] },
"isDeleted": {
"description": "Flag indicating if this bill to address has been deleted",
"type": ["boolean", "null"]
},
"key": {
"description": "Unique ID for individual contact",
"type": "string",
"pattern": "^[0-9]+$"
},
"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"]
},
"minItems": 1
}
]
},
"costCenter": { "type": ["string", "null"], "maxLength": 255 },
"createDateTime": {
"description": "Datetime of when order was created",
"type": ["string", "null"]
},
"creditCardFee": {
"description": "Credit card transaction fee applied to Order",
"type": ["number", "null"],
"format": "double",
"minimum": 0
},
"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": ["string", "null"],
"pattern": "^[0-9]+$"
},
"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": ["string", "null"],
"pattern": "^[0-9]+$"
},
"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": ["string", "null"],
"pattern": "^[0-9]+$"
},
"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"],
"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})?)$"
},
"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"],
"items": {
"description": "Order level line item details",
"type": "object",
"additionalProperties": false,
"properties": {
"offerId": {
"description": "Unique ID for offer within Integration Broker",
"type": "string"
},
"productManagementSystemCustomerId": {
"description": "Unique customer ID in the product management system (system where ordered line item products will be managed)",
"type": ["string", "null"],
"maxLength": 100
},
"productManagementSystemId": {
"description": "Product management system ID",
"type": ["string", "null"],
"maxLength": 100
},
"referenceId": { "type": ["string", "null"] },
"variableTemplatePrintId": {
"description": "Unique ID for variable template file associated to offer on individual line item",
"type": ["string", "null"]
},
"additionalProperties": {
"description": "Additional properties details for Order LineItems",
"type": ["array", "null"],
"items": {
"description": "Order.LineItems level additional properties details",
"type": "object",
"additionalProperties": false,
"properties": {
"key" : { "type": ["string", "null"] },
"value": { "type": ["string", "null"] }
},
"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": ["string", "null"],
"pattern": "^[0-9]+$"
},
"comment": {
"description": "Manually entered comment for individual line item",
"type": ["string", "null"]
},
"costCenter": { "type": ["string", "null"] },
"dueDate": {
"description": "Datetime of expected due date for individual line item",
"type": ["string", "null"]
},
"isDeleted": {
"description": "Flag indicating if this line item has been deleted",
"type": ["boolean", "null"]
},
"lineItemFee": {
"description": "Fee applied to individual line item",
"type": "number",
"format": "double"
},
"offerDescription": {
"description": "Description for offer within product management system (system where ordered line item products will be managed)",
"type": ["string", "null"]
},
"offerLineNumber": {
"description": "Unique ID for individual line item",
"type": ["string", "null"]
},
"offerNumber": {
"description": "Name for offer within product management system (system where ordered line item products will be managed)",
"type": ["string", "null"]
},
"orderedByKey": {
"description": "Unique ID for Order.OrderedBy.Key property associated to individual line item",
"type": ["string", "null"],
"pattern": "^[0-9]+$"
},
"poNumber": {
"description": "Purchase order number for individual line item",
"type": ["string", "null"]
},
"price": {
"description": "Total offer price of individual line item",
"type": "number",
"format": "double"
},
"products": {
"type": ["array", "null"],
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"fulfillmentSystemCustomerId": {
"description": "Unique customer ID in the fulfillment system (system where products will be fulfilled)",
"type": ["string", "null"],
"maxLength": 100
},
"fulfillmentSystemId": {
"description": "Fulfillment system ID",
"type": ["string", "null"],
"maxLength": 100
},
"productId": {"type": "string"},
"associatedFileName": { "type": ["string", "null"] },
"color": { "type": ["string", "null"] },
"comment": { "type": ["string", "null"] },
"components": {
"type": ["array", "null"],
"items": {
"description": "Product component details",
"type": "object",
"additionalProperties": false,
"properties": {
"productId": {
"description": "Unique ID for component product within Integration Broker",
"type": ["string", "null"]
},
"associatedFileName": {
"description": "Name of file associated to component product (if applicable)",
"type": ["string", "null"]
},
"color": { "description": "Color of component product", "type": ["string", "null"] },
"comment": {
"description": "Manually entered comment for component product",
"type": ["string", "null"]
},
"componentLineNumber": {
"description": "Unique ID for component product within parent product",
"type": ["string", "null"],
"pattern": "^[0-9]+$"
},
"productDescription": {
"description": "Description for component product within product management system (system where ordered line item products will be managed)",
"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"] },
"quantityBackordered": {
"description": "Amount of component product back-ordered within parent product",
"type": ["integer", "null"],
"format": "int32"
},
"quantityOrdered": {
"description": "Amount of component product ordered within parent product",
"type": ["integer", "null"],
"format": "int32"
},
"size": { "description": "Size of component product", "type": ["string", "null"] }
},
"required": ["productId"]
}
},
"isDeleted": {
"description": "Flag indicating if this product has been deleted",
"type": ["boolean", "null"]
},
"offerLineNumber": {
"description": "Line number reference to the parent offer line item",
"type": ["string", "null"]
},
"pageCount": { "type": ["integer", "null"], "format": "int32" },
"productDescription": { "type": ["string", "null"] },
"productLineNumber": {
"description": "Line number reference to the parent offer line item",
"type": ["string", "null"],
"pattern": "^[0-9]+$"
},
"productNumber": { "type": ["string", "null"] },
"productOwner": { "type": ["string", "null"] },
"quantityBackordered": { "type": ["integer", "null"], "format": "int32" },
"quantityOrdered": { "type": ["integer", "null"], "format": "int32" },
"size": { "type": ["string", "null"] }
},
"required": ["productId"]
}
},
"quantityCanceled": {
"description": "Amount of offer canceled for individual line item",
"type": ["integer", "null"],
"format": "int32",
"minimum": 0
},
"quantityOrdered": {
"description": "Amount of offer ordered for individual line item",
"type": ["integer", "null"],
"format": "int32"
},
"rushOrder": {
"description": "True/false indicator if individual line item is expedited",
"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": ["string", "null"],
"pattern": "^[0-9]+$"
},
"status": { "description": "Current status of the line item", "type": ["string", "null"] },
"taxAmount": {
"description": "Total tax amount applied to individual line item",
"type": ["number", "null"],
"format": "double"
}
},
"required": ["offerId"]
},
"minItems": 1,
"uniqueItems": false
},
"modifiedDateTime": {
"description": "Datetime of when order was last modified",
"type": ["string", "null"]
},
"omsCustomerName": {
"description": "Customer name in the order management system (system where order lifecycle will be managed)",
"type": ["string", "null"],
"maxLength": 255
},
"orderFee": {
"description": "Fee applied to Order",
"type": ["number", "null"],
"format": "double",
"minimum": 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"} ]
},
"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.",
"oneOf": [
{"type": "null"},
{
"type": "array",
"items": {
"description": "Bill to address object 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"] },
"addressCode": { "description": "Address code 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": {
"description": "Unique ID for individual contact",
"type": "string",
"pattern": "^[0-9]+$"
},
"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"]
},
"minItems": 1
}
]
},
"paymentMethods": {
"description": "Order.ShipTos level payment method details",
"type": ["array", "null"],
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"amount": {
"description": "Total Amount. Required if MethodName specified",
"type": "number",
"format": "double"
},
"methodName": {
"description": "Name of payment method. Required if Payment Amount specified",
"type": "string"
}
},
"required": ["amount", "methodName"]
}
},
"pickPackHandlingFee": {
"description": "Sum of pick & pack handling fees for all Order.ShipTos",
"type": ["number", "null"],
"format": "double",
"minimum": 0
},
"poNumber": {
"description": "Purchase order number for Order. Maximum length 20 characters.",
"type": ["string", "null"],
"maxLength": 20
},
"rushOrder": {
"description": "True/false indicator if Order is expedited",
"type": ["boolean", "null"]
},
"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", "null"],
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"affiliateId": { "type": ["string", "null"] },
"omsShippingMethodId": {
"description": "Shipping method ID in the order management system",
"type": ["string", "null"],
"maxLength": 100
},
"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": {
"description": "Unique ID for individual ship to address",
"type": "string",
"pattern": "^[0-9]+$"
},
"orderFee": { "type": ["number", "null"], "format": "double" },
"paymentMethods": {
"type": ["array", "null"],
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"amount": {
"description": "Total Amount. Required if MethodName specified",
"type": "number",
"format": "double"
},
"methodName": {
"description": "Name of payment method. Required if Payment Amount specified",
"type": "string"
}
},
"required": ["amount", "methodName"]
}
},
"pickPackHandlingFee": { "type": ["number", "null"], "format": "double" },
"poNumber": { "type": ["string", "null"] },
"rushFee": {
"description": "Rush fee applied to this ship to location",
"type": ["number", "null"],
"format": "double",
"minimum": 0
},
"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"] },
"addressCode": { "description": "Address code 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"] },
"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"]
},
"shippingCarrier": { "description": "Shipping carrier name", "type": ["string", "null"] },
"shippingCost": { "type": ["number", "null"], "format": "double" },
"shippingHandlingTax": { "type": ["number", "null"], "format": "double" },
"shippingService": { "description": "Shipping service level", "type": ["string", "null"] },
"status": {
"description": "Current status of the ship to location",
"type": ["string", "null"]
},
"totalOrderFee": { "type": ["number", "null"], "format": "double" }
},
"required": ["key"]
},
"minItems": 1,
"uniqueItems": false
},
"shippingHandlingTax": {
"description": "Sum of shipping & handling taxes for all Order.ShipTos. Required, must not be null.",
"type": "number",
"format": "double",
"minimum": 0
},
"statuses": {
"description": "Array of status values for the order",
"type": ["array", "null"],
"items": {"type": "string"}
},
"totalOrderFee": {
"description": "Sum of OrderFee",
"type": ["number", "null"],
"format": "double",
"minimum": 0
},
"totalShippingCost": {
"description": "Sum of shipping cost for all Order.ShipTos.Shipments",
"type": ["number", "null"],
"format": "double",
"minimum": 0
}
},
"required": ["orderId", "createDateTime", "lineItems", "billTos", "shipTos"],
"allOf": [
{
"description": "Either a defaultBillToKey must be provided, or the billTos array must be populated.",
"oneOf": [
{
"properties": { "defaultBillToKey": {"type": "string"} },
"required": ["defaultBillToKey"]
},
{
"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": "string"} },
"required": ["defaultShipToKey"]
},
{
"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": "string"} },
"required": ["defaultBillToKey"]
},
{
"properties": {
"lineItems": {
"type": ["array", "null"],
"items": {
"type": "object",
"properties": { "billToKey": {"type": "string"} },
"required": ["billToKey"]
}
}
}
}
]
},
{
"description": "If a defaultShipToKey is not provided at the root, each line item must specify a shipToKey.",
"oneOf": [
{
"properties": { "defaultShipToKey": {"type": "string"} },
"required": ["defaultShipToKey"]
},
{
"properties": {
"lineItems": {
"type": ["array", "null"],
"items": { "properties": { "shipToKey": {"type": "string"} }, "required": ["shipToKey"] }
}
}
}
]
},
{
"description": "If a defaultOrderedByKey is not provided at the root, each line item must specify an orderedByKey.",
"oneOf": [
{
"properties": { "defaultOrderedByKey": {"type": "string"} },
"required": ["defaultOrderedByKey"]
},
{
"properties": {
"lineItems": {
"type": ["array", "null"],
"items": {
"properties": { "orderedByKey": {"type": "string"} },
"required": ["orderedByKey"]
}
}
}
},
{
"properties": {
"defaultOrderedByKey": {"type": "null"},
"orderedBys": { "oneOf": [ {"type": "null"}, {"type": "array", "maxItems": 0} ] }
},
"required": ["defaultOrderedByKey", "orderedBys"]
}
]
},
{
"properties": {
"lineItems": {
"type": ["array", "null"],
"items": {
"type": "object",
"properties": { "offerLineNumber": {"type": "string", "minLength": 1} },
"required": ["offerLineNumber"]
}
}
}
}
]
},
"failureMessages": { "type": "array", "items": {"type": "string"} },
"informationalMessages": { "type": "array", "items": {"type": "string"} },
"operationWasSuccessful": {"type": "boolean"}
},
"required": ["failureMessages", "informationalMessages", "operationWasSuccessful", "data"],
"examples": [
{
"data": {
"orderId": "7-mkkutsde-3-K-5649-4005-64",
"referenceId": "OWMR WSKFA - LNSSZT XBUUJ & MS XXQ QCHX",
"sourceSystemCustomerId": "Big Chicken",
"sourceSystemId": 2,
"accessGroups": ["TS-Retail", "CDM Tuff Shed", "Tuff shed Act on behalf and see all orders"],
"affiliateIdentifier": "QJ-987",
"affiliateName": "UJ-143-ABWJINHFVL, QD",
"billTos": [
{
"address1": "16013 Valenzuela Turnpike",
"address2": null,
"address3": null,
"city": "Rosaleshaven",
"company": "Rosales-Shea",
"country": "USA",
"emailAddress": "chelseamiller@example.org",
"faxNumber": "",
"key": "0",
"name": "Gail Stewart",
"phoneNumber": "411-770-8380",
"postalCode": "12507",
"stateProvince": "Washington"
}
],
"costCenter": "020 - Denver",
"createDateTime": "2025-02-28T20:37:42.018+00:00",
"creditCardFee": 0.0,
"defaultBillToKey": null,
"defaultOrderedByKey": null,
"defaultShipToKey": null,
"dueDate": null,
"lineItems": [
{
"offerId": "t87grb75-e9pe-5405-y8yv-25n5q70bu93i",
"referenceId": "BEHZ QUJNS - TPGJXT MMGVN & UX ZDN HHQS",
"variableTemplatePrintId": null,
"additionalProperties": [],
"billToKey": "0",
"comment": null,
"costCenter": "020 - Denver",
"dueDate": null,
"lineItemFee": 0.75,
"offerDescription": "<p>$17.00 Each \u2013 S - XL<br>\n$20.00 Each \u2013 2XL - XLarge/Tall Sizes<br>\n$21.50 Each \u2013 3XL - 2XLarge/Tall sizes<br>$25.00 Each - 4XL Sizes - 3XL tall <br>$35.00 Each - 5XL Sizes<br><br></p>",
"offerLineNumber": "0",
"offerNumber": "TS_A-A0050",
"orderedByKey": "0",
"poNumber": null,
"price": 17.0,
"products": [
{
"productId": "3j8hu98q-s0t6-409v-029r-321r0uo02k30",
"associatedFileName": "",
"color": null,
"comment": null,
"components": [],
"productDescription": "8\"x8\" square paint swatch.",
"productLineNumber": "1",
"productNumber": "R_962_24008_TSO",
"productOwner": null,
"quantityOrdered": null,
"size": null
},
{
"productId": "7jv34sz5-m4q8-8q8f-187d-jt7791j02958",
"associatedFileName": "",
"color": null,
"comment": null,
"components": [],
"productDescription": "Tuff Shed Men's Polo",
"productLineNumber": "2",
"productNumber": "TS_A-A0050",
"productOwner": null,
"quantityOrdered": null,
"size": null
}
],
"quantityOrdered": 1,
"rushOrder": false,
"shipToKey": "0",
"taxAmount": 0.0
}
],
"orderFee": 4.0,
"orderVariables": {},
"orderedBys": [
{
"address1": "42801 Pamela Run",
"address2": null,
"address3": null,
"city": "Port Rickside",
"company": "Trujillo-Sims",
"country": "USA",
"emailAddress": "jonesjeff@example.net",
"faxNumber": "",
"key": "0",
"name": "Benjamin Smith",
"phoneNumber": "+1-310-761-3615x7115",
"postalCode": "10330",
"stateProvince": "California"
}
],
"paymentMethods": [ {"amount": 35.8, "methodName": "invoice"} ],
"pickPackHandlingFee": 0.75,
"poNumber": null,
"rushOrder": false,
"shipTos": [
{
"affiliateId": "EK-023",
"referenceId": "QGSN VNSAH - PWJRVG OCYIA & PG GAE RZTN",
"sourceSystemShippingMethodId": "qnigy_cxdcmo",
"affiliateName": "JK-467-WLTQIEOCCZ, PA",
"comment": null,
"costCenter": "020 - Denver",
"creditCardFee": 0.0,
"dueDate": null,
"key": "0",
"orderFee": 4.0,
"paymentMethods": [],
"pickPackHandlingFee": 0.75,
"poNumber": null,
"rushOrder": false,
"shipToAddress": {
"address1": "130 Owen Gateway",
"address2": null,
"address3": null,
"city": "Arthurborough",
"company": "Bryant-Compton",
"country": "USA",
"emailAddress": "yduran@example.com",
"faxNumber": "",
"name": "Patricia Parker",
"phoneNumber": "317.410.1217",
"postalCode": "96718",
"stateProvince": "Georgia"
},
"shippingCost": 13.66,
"shippingHandlingTax": 0.39,
"totalOrderFee": 4.0
}
],
"shippingHandlingTax": 0.39,
"totalOrderFee": 4.0,
"totalShippingCost": 13.66
},
"failureMessages": [],
"informationalMessages": [],
"operationWasSuccessful": true
}
]
}