Skip to main content

Create order

Create a new order.

Request Body REQUIRED

The order object.

Id int32

The id of the order.

ExternalId string

The external id of the order.

PersonalId string

The personal id or organisation number of the customer.

CustomerId int32

The id of the customer that placed the order.

CustomerTypeId int32

Customer type. Usually 1 for private customers and 2 for companies.

CustomerGroupId int32

The id of the customer group that the customer belongs to, if any.

CustomerGroupName string

The name of the customer group that the customer belongs to, if any.

CreatedAt date-time

Date and time when the order was created.

UpdatedAt date-time

Date and time when the order was last updated.

CompletedAt date-time

The date nd time when the order was completed (eg delivered and paid).

Status string

The order status.
Possbile values:
cancelled
on-hold
inactive
refunded
partial
pending-payment
backorder
completed
pending

Currency string

ISO currency code.

CurrencyRate double

The currency rate to SEK.

MarketId int32

The id of the market that this order originates from.

MarketName string

The market name. This is usually equal to the site or channel name.

Language string

Two-letter language code.

OrderTotal double

Order total.

ExpectedSum double

Expected total sum to be paid after discount and balance.
The value is usually taken directly from the payment provider and represents the actual reserved amount. If this differs from OrderTotal, actions should be taken to ensure they match. This usually happens due to rounding.

VATTotal double

Order VAT total.

OrderValueIncVat double

Order value inc vat after discount but before balance.

OrderValueExVat double

Order value ex vat after discount but before balance.

ItemValueIncVat double

Item value inc vat excluding fees and discount.

ItemValueExVat double

Item value ex vat excluding fees and discount.

Discount double

Total discount inc vat.

DiscountExVat double

Total discount ex vat.

FromBalance double

The amount which was withdrawn from the customers balance inc vat.

ShippingFee double

Shipping fee inc vat.

ShippingFeeExVat double

Shipping fee ex vat.

PaymentFee double

Payment fee inc vat.

PaymentFeeExVat double

Payment fee ex vat.

Message string

Order message. Can contain instructions from customer or added details about the order.

OrderMessages string[]

Internal order messages. Can contain internal details about the order.

PaymentDetails object[]

List of payment details.

Id int32

Unique identifier for this payment detail.
Exception: For some payment options this field can be 0. These orders only have one payment detail.

PaymentId int32

Payment method id.

Name string

The name of the payment method.

DisplayName string

The display name of the payment method.

TransactionId string

The transaction id (external reference).

SecondaryTransactionId string

The secondary transaction id, if any (external reference).

ReservationNumber string

The reservation number. This field is not available for all payment methods.

ReservationDate date-time

Reservation date.

PaymentDate date-time

The date all captures have been processed.

Total double

Total.

Payed boolean

True if all captures have been processed.

PaymentFee double

The payment fee.

ShippingFee double

The shipping fee.

PaymentOption string

The name of the payment option, if any.
This doesn't have to be the same as the payment name. Eg "Direct bank payment", "Card", "Invoice" etc.

ShippingDetails object[]

List of shipping details.

Id int32

The id of the shipping detail.

ShippingId int32

Id of the shipping method.

Name string

Name of the shipping method.

ParcelNumber string

Parcel number (tracking number).

ShippingDate date-time

Shipping date.

TrackingUrl string

Tracking URL.

ExternalDeliveryOptionId string

Delivery option id of the external shipping provider.

ExternalServiceId string

Service id of the external shipping provider.

ExternalCarrierId string

Carrier id of the external shipping provider.

PickupPoint string

Pickup point.

ShippingAddress object

An address.

Company string

Company name.

CareOf string

Care of. C/O.

State string

ISO code or name of the state, province or district.

Country string

ISO code of the country.

FirstName string

The first part(s) of the customer name.

LastName string

The last part(s), or family name of the customer.

Email string

The email of the customer.

AddressLine1 string

The first line of the address, usually street and house number.

AddressLine2 string

The second line of the address.

AddressLine3 string

The third line of the address.

Zip string

The postal / zip code.

City string

The city.

Phone string

The (land-line) phone number of the customer.

Mobile string

The SMS-capable number of the customer.

EntryCode string

The delivery address entry code, if needed for successful delivery.

BillingAddress object

An address.

Company string

Company name.

CareOf string

Care of. C/O.

State string

ISO code or name of the state, province or district.

Country string

ISO code of the country.

FirstName string

The first part(s) of the customer name.

LastName string

The last part(s), or family name of the customer.

Email string

The email of the customer.

AddressLine1 string

The first line of the address, usually street and house number.

AddressLine2 string

The second line of the address.

AddressLine3 string

The third line of the address.

Zip string

The postal / zip code.

City string

The city.

Phone string

The (land-line) phone number of the customer.

Mobile string

The SMS-capable number of the customer.

EntryCode string

The delivery address entry code, if needed for successful delivery.

Rows object[]

List of order rows.

Id int32

The id of this order row.

ProductId int32

Product id.

Name string

Order row name.

ProductName string

Product name.

ItemId int32

Item id (SKU).

ItemName string

Item name.

ArticleNumber string

Article number.

Total double

Order row total (affected by quantity).

ExpectedTotalPriceIncVat double

Expected total price inc vat, inc row discount.
The value is usually taken directly from the payment provider and represents the actual paid amount.

DiscountRate double

Order row discount rate. E.g. 10% = 10.0

Discount double

Order row discount sum inc VAT.

ExpectedTotalDiscountIncVat double

Expected total discount inc vat.
The value is usually taken directly from the payment provider and represents the actual applied discount amount.

VATTotal double

Order row total VAT (affected by quantity).

VATRate double

VAT rate. E.g. 25% = 0.25.

Quantity int32

Quantity.

PurchasePrice double

Purchase price of the product.

PaymentDetailId int32

A reference to the payment detail that this row belongs to.

ShippingDetailId int32

A reference to the shipping detail that this row belongs to.

Market string

The market that the order row belongs to.

UnitPrice double

Order row unit price inc vat, inc row discount.

ProductContainerBuildId int32

A reference to the product container build the row belongs to.

Message string

A system message for this row.

CartRowId int32

The unique identifier for the cart row from which this order row originates.

ExternalId string

The identifier for the external row from which this order row originates.

ProductContainerSelectionId int32

The identifier for a Product container selection id that is part of the product configurator module

ProductContainerName string

The name of the product container.

ExternalProductId string

External Id of the product.

ExternalProductItemId string

External Id of the product item.

ParcelGroupId int32

Parcel group id for a shipped order row.

BrandName string

Brand name of the product.

Gtin string

The GTIN number for the product item. Also known as EAN, UCC or UPS number.

Weight int32

The weight of the product item in grams (g).

Length int32

The length of the product item in millimeters (mm).

Width int32

The width of the product item in millimeters (mm).

Height int32

The height of the product item in millimeters (mm).

Color string

Product color. E.g. Black.

Variant string

Product variant. E.g. Black XL.

CampaignIds string[]

The ids for the campaigns applied to this row.

CampaignGroupData string

Contains json data describing the different campaign groups belonging to this row.
Fields:
i -> Campaign Number (int), n -> Number of items belonging to this group.

CampaignGroupId int32

Contains the the ID of the campaign group this row belongs to.

CampaignNames string[]

The names for the campaigns applied to this row.

CategoryId int32

The product category for the product on this order row.

RelatedProductsBuildId string

GUID that connects orderrows that are part of a build.

PackingLocationId int32

The packing location of this order row.

ProductPriceCampaignId int32

The id of the applied product price campaign.

ProductPriceListId int32

The id of the applied product price list.

ProductPackageId int32

Id of the product package used for this row.

ProductPackageName string

Name of the product package used for this row.

ProductPackageGroupId uuid

The unique group id for the product package used for this row.
This separates purchases of multiple packages with the same id.

Refunds object[]

List of order refunds.

Id int32

The id of this refund.

OrderRowId int32

Reference to the order row that has been refunded.

PaymentDetailId int32

Reference to the payment detail that has been refunded.

ReturnId int32

Id number of the return. Can be used to group refunds.

ArticleNumber string

Article number. If the refund is not bound to an order row this field contains an optional refund article number.

CreatedAt date-time

Datetime when the refund was created.

Total double

Total amount refunded.

ReasonCode int32

Reason code for the refund.

Reason string

Reason for refund.

ToBalance boolean

Shows if the refund was deposited to the customers balance.

Vat double

Vat percent in decimals for the refunded amount.

ItemId int32

Item id (SKU).

RefundType string

Refund type.

Ip string

Customer IP-number.

UserAgent string

Customer User Agent.

ServiceLocation string

Chosen service location.

CampaignCode string

Campaign code applied to the order.

CampaignCodeId int32

The internal id of the applied campaign code.

Percent int32

General percent discount applied to the order.

DesiredDeliveryDate date-time

The desired delivery date of the order.

Gender boolean

The gender of the customer.
True = male, False = female, null = unknown.

CartId int32

The id of the cart from which this order originates.

SessionId string

The session id for the from which this order originates.

ExternalOrderStatus int32

Possible values: [0, 10, 20, 30, 40]

0 = None
10 = New
20 = Processing
30 = Failed
40 = Done

CampaignIds string[]

The ids for the campaigns applied to this order (not rows).

CampaignNames string[]

The names of the campaigns applied to this order (not rows).

MetaData object

The order meta data to store additional information about the order.

PublicId uuid

The public id of this order.

Responses
200

The id of the created order.

Schema OPTIONAL
Resource int32 OPTIONAL

The resource on which the action was taken.

Message string OPTIONAL

A status message for the action taken.

Details string[] OPTIONAL

Any validation messages for the data on the current action.