Skip to content

Order detail

Request

This endpoint has several sections, which are only sent when requested in the include parameter (see Section on demand).

ValueSection
notesOrder remarks, including up to six additional fields, which can be freely used by e-shop for its individual needs. The field names can be defined in administration and this section returns their names.
imagesOrder images
shippingDetailsTransport details
stockLocationPosition in the stock
surchargeParametersItem surcharge parameters
paymentTransactionsPayment transactions within the order
productFlagsItem product flags

Returns the detail for one order. In the items field, the individual items of the order, including transport and payment methods.

The product name and variants, weight, manufacturer and similar items are copied into the order items when the order is made. Even though the products are changed later in the shop, the orders are not affected. productGuid item contains GUID of purchased product. If this is changed or deleted, the order is not affected. You have to take into account that

productGuid does not have to refer to an existing product. The same goes for the code item, containing the identification of a purchased

variant or product. You have to take into account that when deleting the product or changing the code of the product, the reference from the order

is lost. In other words, you have to take into account the fact that the code or productGuid do not have to refer to one of the currently existing

products (variant). They may also be null.

In most cases the items in the response are the same as you can see in the administration of PDF printout of an order.

There are however some advanced cases (in case of coupon discount with absolute value or in case of

a volume discount and products with multiple VAT rates in the order), in which case they are different:

  • Administration and PDF will show multiple rows for the discount – for each VAT rate one row and the price field split evenly.

  • The API response will return only one row indicating the total price of the discount.

The difference is based on how data is internally stored and presented. The API is bases more on internal storage principle,

there is however also an array displayPrices, which contains the presentation (printout) version of each item.

If you state the include=images parameter within the URL, the information about the main image for all products in the order will also be part of the response. For more information about access to images go to Product images.

In the shippingDetails section, there is an information about shipping the order. branchId is used for the identification of the carrier's branch and

next fields are used for the detail of the branch (name, address, etc.). carrierId is used for the numeral identification of the carrier. Nowadays this field

is used for Zasilkovna only and the value can be null for Czech Zasilkovna or integer for Zasilkovna in the other countries.

Security
shoptetAccessToken or shoptetPrivateApiToken
Path
codestringrequired
Example:2018000012
Query
includestring

optional parts of response

Example:include=notes,images,shippingDetails,stockLocation,productFlags
Headers
Content-Typestringrequired
Default:"application/json"
curl -i -X GET \
  'https://api.docs.shoptet.com/_mock/shoptet-api/openapi/api/orders/2018000012?include=notes%2Cimages%2CshippingDetails%2CstockLocation%2CproductFlags' \
  -H 'Content-Type: application/json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
dataobjectrequired
errorsArray of objects or null(Errors)required
metadataobject(Metadata)required
Response
{ "data": { "order": {} }, "errors": [ {} ], "metadata": { "requestId": "019c8c34-64f3-7328-af43-bf1e34fa39d7" } }