The Order JSON object defines an order in the Dsco system.

Note that shipping data has changed as of January 2018 so be certain to read the shipping data document that explains it.

- Make sure you're familiar with JSON before continuing.
- The JSON objects are defined using Orderly.  Optional attrs end with a "?" all others are required.

- isodate fields use one of these ISO 8601 format: 2014-01-01T10:30:00.000+01:00, 2014-01-01T10:30:00.000+0100, 2014-01-01T10:30:00.000Z
- Dsco reserves the right to add new attributes at any time so Partners should ensure their validators won't break should this happen

Definition

Object
{
    string poNumber;                    # Order's PO Number
    isodate retailerCreateDate?;        # Retailers order create date
    string channel?;                    # Order's channel
    array{ref OrderLineItem} lineItems; # Order's line items
    ref Shipping shipping;              # Order's shipping data
    boolean signatureRequiredFlag?;     # Whether signature required
    string shipInstructions?;           # Order ship instructions
    boolean giftWrapFlag?;              # Whether to gift wrap order
    boolean giftWrapMessage?;           # Gift wrap message
    string supplierOrderNumber?;        # Supplier's order number
    int dscoOrderId?;                   # Dsco's order ID

    string dscoStatus[created, shipment_pending, shipped, cancelled]?; # Order's status

    int dscoRetailerId?;                # Dsco's retailer ID
    int dscoSupplierId?;                # Dsco's supplier ID
    string dscoTradingPartnerId?;       # Dsco's trading partner ID
    string dscoTradingPartnerName?;     # Dsco's trading partner name
    isodate dscoCreateDate?;            # Dsco's order creation date
    isodate dscoLastUpdate?;            # Dsco's last update to order
   
    boolean testFlag?;                  # Added in V2 - if true this is a test order
    string currencyCode?;               # Added in V2 - currency code
    isodate cancelAfterDate?;           # Added in V2 - date after which to cancel the order
    string consumerOrderNumber?;        # Added in V2 - the order's consumer order number
    isodate shipByDate?;                # Added in V2 - when the order should ship
    isodate acknowledgeByDate?;         # Added in V2 - when the order should be acknowledged
    isodate invoiceByDate?;             # Added in V2 - when the order should be invoiced by
    isodate dscoShipLateDate?;          # Added in V2 - dsco's when the order should ship    
    isodate dscoAcknowledgeByDate?;     # Added in V2 - dsco's when the order should be acknowledged
    isodate dscoCancelLateDate?;        # Added in V2 - dsco's date after which to cancel the order
    isodate dscoInvoiceLateDate?;       # Added in V2 - dsco's when the order should be invoiced by
    isodate expectedDeliveryDate?;      # Added in V2 - date expect delivery
    isodate requiredDeliveryDate?;      # Added in V2 - precise date order must arrive on
    string marketingMessage?;           # Added in V2 - marketing message
    string message?;                    # Added in V2 - general purpose message
    string packingInstructions?;        # Added in V2 - packing instructions for order
    string shipToStoreNumber?;          # Added in V2 - the ship to store number
    int numberOfLineItems?;             # Added in V2 - the # of line items
    string dscoShipCarrier?;            # Added in V2
    string dscoShipMethod?;             # Added in V2
    string dscoShippingServiceLevelCode?; # Added in V2
    string retailerShipCarrier?;        # Added in V2
    string retailerShipMethod?;         # Added in V2
    string retailerShippingServiceLevelCode?; # Added in V2
    boolean giftFlag?;                  # Added in V2
    string giftMessage?;                # Added in V2
    string giftToName?;                 # Added in V2
    string giftFromName?;               # Added in V2
    string receiptId?;                  # Added in V2
    string giftReceiptId?;              # Added in V2
    double shippingSurcharge?;          # Added in V2
    array {ref OrderTax} taxes?;        # Added in V2
    array {ref OrderCoupon} coupons;    # Added in V2
    array {ref OrderPayment} payments;  # Added in V2
    ref OrderBillTo billTo?;            # Added in V2
    array {ref OrderTax} taxes?
     
    # Note that shipping data has changed, see shipping data
    # doc (link at top of page) and note that as of January 2018
    # retailers should use retailerShippingServiceLevelCode and not
    # shippingServiceLevelCode when creating orders.  Dsco will 
    # continue to accept this value and translate it to the
    # correct attribute to ensure backward compatibility but this
    # will end at some point in the future.
    
    string shipCarrier;                         # Added in V2
    string shipMethod?;                         # Added in V2
    string shippingServiceLevelCode?;           # Added in V2 
    string retailerShipCarrier;                 # Added in V2
    string retailerShipMethod?;                 # Added in V2
    string retailerShippingServiceLevelCode?;   # Added in V2 
    string dscoShipCarrier;                     # Added in V2
    string dscoShipMethod?;                     # Added in V2
    string dscoShippingServiceLevelCode?;       # Added in V2   
    
    array{ref Package} packages?;    #Added in V2 - currently, this 
                                     # will only be present on Order 
                                     # objects sent as webhooks and
                                     # not on Order objects retrieved
                                     # from an API call
};

Example

{
    "poNumber": "asfs92342klsdfsf",
    "retailerCreateDate": "2014-01-01T10:30:00+01:00",
    "channel": "Back office 2",
    "lineItems":
    [
        <OrderLineItem>,
        <OrderLineItem>
    ],
    "shipping": <Shipping>,
    "signatureRequiredFlag": false,
    "shipInstructions": "Don't break it",
    "giftWrapFlag": true,
    "giftWrapMessage": "You rock!",
    "supplierOrderNumber": "s8s3j2",
    "dscoOrderId": 2822,
    "dscoStatus": "shipped",
    "dscoRetailerId": 8222,
    "dscoSupplierId": 28292,
    "dscoCreateDate": "2014-01-01T10:30:00+01:00",
    "dscoLastUpdate": "2014-01-01T10:30:00+01:00",
    "testFlag": false,
    "currencyCode": "USD"
    }
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.