Skip to main content

Orders - field definitions

These are all the fields in the Orders model that you will post to the /orders API endpoint.

Standard fields

Note

These fields should be posted via the API. Fields marked with * are mandatory.

DB/API-name

Field type

Description

*contact.matchKey

string

A value to match against the specified customerKeyType and contactType

*contact.matchKeyType

string

Valid options are: contactId, memberNumber, socialSecurityNumber, mobilePhone, externalId, email

*orderNumber

string

The unique order number

*createdDate

datetime

Datetime when order was first created formatted according to ISO 8601. Example: 2017-09-06T15:55:54Z

*orderStatus

string

To be decided in project

*paymentStatus

string

To be decided in project

*language

string

Given as language and country (so more like a locale). Example: sv-SE, en-GB, nb-NO

*storeId

string

The external id for the store

*currency

currency

The currency code, according to ISO 4217, for the currency the customer paid in (local currency)

*totalGrossPrice

decimal

The total price paid by the customer including VAT in the local currency. A decimal point (.) is always used as the decimal separator

*items

[rows]

One row per line item on the order

shippingDate

datetime

ISO 8601. EX: 2017-09-06T15:55:54Z

statusChangedDate

datetime

ISO 8601. EX: 2017-09-06T15:55:54Z

freightFee

value/tax object

Object describing the value and tax for the freight fee for the complete order. If freightFee is included this value will be added when validating the totalGrossPrice. Tax is optional but will be added when calculating the totalTax

handlingFee

value/tax object

Object describing the value and tax for the handling fees for the complete order. If handlingFee is included the value will be added when validating the totalGrossPrice. Tax is optional but will be added when calculating the totalTax

totalRoundOff

value/tax object

Object describing the value and tax for the order round-off.  If totalRoundOff is included the value will be added when validating the totalGrossPrice. Tax is optional but will be added when calculating the totalTax

extraData

[dictionary]

Extra data stored for the receipt as a key/value pair. {“key”:”value”}

These additional fields are calculated internally

B/API-name

Field type

Description

totalTax

decimal

The total VAT paid. A decimal point (.) is used as decimal separator. If not posted this is calculated as long as tax is specified per item.

taxDetails

[rows]

Calculated taxPercent. One row per taxPercent. {"description":25%, "value":"500.00", "percent":"25.00", "totalIncludingTax":"2000.00"}

totalOriginalPrice

decimal

Calculated total price including VAT of all products before discounts are applied

totalDiscounts

decimal

Calculated total sum of all discounts

totalItemsPrice

decimal

Calculated total sum of all items including VAT and discounts but excluding shippingFee, handlingFee and totalRoundOff

anyReturnItems

boolean

Set to True if the order contains one or more rows of type "return".

Items [row]

Note

These fields should be posted via API. Fields marked with * are mandatory.

DB/API-name

Field type

Description

*type

string

A line item can be either "purchase" or "return"

*sku

string

Store keeping unit

*description

string

Description of the line item

*quantity

decimal

Number of units sold in this line item. Must be negative for a return

*grossPaidPrice

decimal

Total price for the line item (unit price x quantity)

imageUrl

imageUrl

http://image.store.com/2424_s.png

targetUrl

linkUrl

http://store.com/products/2424

taxAmount

decimal

The paid VAT for this line item

taxPercent

decimal

The VAT as a percentage

extraData

dictionary

key/value pairs for additional data regarding the line item. EX: {“articleName”:”Blue jacket”, “category”:”Jacket”, “brand”:”Crocker”}

discounts

[rows]

One row per discount type. Exclude this when there are no discounts on the line item

items[row].discounts[row]

Note

These fields should be posted via API. Fields marked with * are mandatory.

DB/API-name

Field type

Description

*value

decimal

Discount value in local currency. Total discount for line item. Should always be negative

*description

string

A description

type

string

Type of discount (if available)

extraData

dictionary

key/value pairs for additional data regarding the discount. EX: {“webCode”:”sommar 2018″}

These additional fields are calculated internally

DB/API-name

Field type

Description

grossPaidPricePerUnit

decimal

Calculated paid price including VAT per article

originalPrice

decimal

Calculated price before discounts including VAT

totalDiscount

decimal

Calculated sum of all discounts

discounted

boolean

Set to True if the item has any discount rows