Order

Different ERP systems have differences in requirements and maximum values for certain fields. The OIS does not validate fields for the ERP system, and as such it is required that the API user applies validation before posting an order to the OIS. All known ERP-specific field limits are found at the bottom.

OrderLines

When posting an order with multiple articles, an OrderLine must be posted for every variant, even if the same variant is ordered multiple times. The reason for this is that discounts can differ per OrderLine.

Different fields have to be used depending on the type of OrderLine, in addition to already required fields.

  • Article

    • LineType = "1" OR "Article"

  • Shipping cost

    • LineType = "2" OR "ShippingCost"

  • Payment fee

    • LineType = "3" OR "PaymentFee"

  • Coupon

    • LineType = "4" OR "Voucher"

    • More information about Coupons can be found here: OIS Loyalty

Price Validation

When posting OrderLines, ensure that for every individual OrderLine, the OriginalPrice is equal to the Price + OrderDiscount(s). Keep in mind that any amount of rounding up or down is accounted for.

The Value fields should be filled with the amount paid, including VAT. The "VATPercentage" field should be filled with the VAT percentage relevant for the article. OIS will export the actual VAT amounts to ERP.

All amounts concerning prices must be positive values.

DeliveryMethods

Different fields have to be used depending on which DeliveryMethod is chosen, in addition to already required fields.

  • Home delivery

    • DeliveryMethod = "1"

  • Pickup from store

    • DeliveryMethod = "2"

    • PickupBranchIdentifier = (Branch)Identifier from the OIS /Branches/ endpoint.

  • Pickup from service point

    • DeliveryMethod = "3"

    • PickupLocationCode = Service point code. Note that this cannot be retrieved from OIS.

    • PickupLocationName = Service point name. Note that this cannot be retrieved from OIS.

ShippingAgents

For regular orders, the ShippingAgentId field is required. The available ShippingAgents are decided by the client and can be retrieved from the v1/ShippingAgents GET endpoint.

Note that the ShippingAgentServiceCode field and ShippingTerms array should not be included unless specific ShippingTerms are used for the order.

ShippingAgentServices and ShippingTerms

The ShippingAgentServiceCode field and ShippingTerms array can be included if specific ShippingTerms are applicable to an order. Note that the relevant ShippingAgentServiceCode and ShippingTerms must first be configured in OIS.

PaymentOptions

For regular orders, the PaymentOptionId field is required. The available PaymentOptions are decided by the client and can be retrieved from the v1/PaymentOptions GET and accompanying v1/PaymentProviders GET endpoints.

PaymentReference

The PaymentReference field is also required and must contain the PaymentReference that is given by the Payment Service Provider.

OrderCouponPayment

When an order is fully or partially paid for with a coupon, the OrderCouponPayments array must be added when posting the order. The PaymentOption used within this array is decided by the client.

XPRT-specific fields

To ensure orders can be imported into XPRT, validation must be applied to specific fields before posting the order to OIS so that the maximum amount of characters is not exceeded. Note that the limits listed below are always updated to the latest possible version of XPRT.

Specific fields

  • FirstName - Maximum 30 *

  • LastName - Maximum 30 *

  • Street - Maximum 100 **

  • ZipCode - Maximum 20

  • HouseNo - Maximum 20 **

  • HouseNoExt - Maximum 20 **

  • City - Maximum 30

  • CountryCode - Maximum 10

  • PhoneNumber - Maximum 30

  • Email - Maximum 80

  • PickupLocationName - Maximum 30

Combined fields

Some of the fields listed above are also combined to form a different field when importing orders in XPRT. For the fields listed below, validate such that both the individual limit and combined limit do not exceed the maximum amount of characters.

  • Firstname + LastName - Combination maximum 100 *

  • Street + HouseNo + HouseNoExt - Combination maximum 100 **