# Order detail This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Order 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. | Order images | Transport details | Position in the stock | Item surcharge parameters | Item product flags Returns the detail for one order. In the 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. item contains GUID of purchased product. If this is changed or deleted, the order is not affected. You have to take into account that does not have to refer to an existing product. The same goes for the item, containing the identification of a purchased variant or product. You have to take into account that when deleting the product or changing the of the product, the reference from the order is lost. In other words, you have to take into account the fact that the or do not have to refer to one of the currently existing products (variant). They may also be . 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 , which contains the presentation (printout) version of each item. If you state the 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 section, there is an information about shipping the order. is used for the identification of the carrier's branch and next fields are used for the detail of the branch (name, address, etc.). is used for the numeral identification of the carrier. Nowadays this field is used for Zasilkovna only and the value can be for Czech Zasilkovna or integer for Zasilkovna in the other countries. Endpoint: GET /api/orders/{code} Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Path parameters: - `code` (string, required) Example: "2018000012" ## Query parameters: - `include` (string) optional parts of response Example: "notes,images,shippingDetails,stockLocation,productFlags" ## Header parameters: - `Content-Type` (string, required) ## Response 200 fields (application/json): - `data` (object, required) - `data.order` (object, required) - `data.order.code` (string, required) order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc. - `data.order.guid` (string, required) global unique permanent order identifier (can be for old orders) - `data.order.externalCode` (string,null, required) Identification of the order in external system (or ). - `data.order.creationTime` (string,null, required) date and time, when the order was created. ISO 8601 format. - `data.order.changeTime` (string,null, required) date and time of the order's last change. ISO 8601 format. - `data.order.email` (string,null, required) purchaser e-mail (can be ) - `data.order.phone` (string,null, required) purchaser phone number (can be ) - `data.order.birthDate` (string,null) customer's date of birth stated in the order - `data.order.clientIPAddress` (string,null, required) IP address of the client who made the order - `data.order.customerGuid` (any, required) customer identifier, if the customer is registered in the e-shop (can be ) - `data.order.cashDeskOrder` (boolean, required) flag, whether the order is from the cash desk (as opposed to the e-shop) - `data.order.stockId` (number, required) identifier of the stock, from which the order was taken - `data.order.addressesEqual` (boolean, required) flag, whether the delivery address is the same as the invoicing address - `data.order.vatPayer` (boolean, required) Is the tradesman a VAT payer, when purchasing? (can be , if this is unknown) - `data.order.vatMode` (string,null) VAT mode, for possible values see [VAT modes](#section/code-lists/vat-modes) code list - `data.order.billingMethod` (any, required) - `data.order.paymentMethod` (any, required) - `data.order.shipping` (object,null, required) - `data.order.shipping.guid` (string, required) transport type identifier - `data.order.shipping.name` (string, required) description of transport method (Czech post, PPL, in person..) - `data.order.shippingDetails` (object,null) - `data.order.shippingDetails.branchId` (string,null, required) branch identifier - `data.order.shippingDetails.shippingCompanyCode` (string,null, required) identification of the carrier - `data.order.shippingDetails.shippingServiceCode` (string,null) identification of the carrier's service - `data.order.shippingDetails.name` (string,null, required) name of the branch - `data.order.shippingDetails.note` (string,null, required) branch location note, can contain HTML - `data.order.shippingDetails.place` (string,null, required) location (specify location within address). - `data.order.shippingDetails.street` (string,null, required) street - `data.order.shippingDetails.city` (string,null, required) city/town - `data.order.shippingDetails.zipCode` (string,null, required) ZIP or postal code - `data.order.shippingDetails.countryCode` (string,null, required) country code - `data.order.shippingDetails.link` (string,null, required) link to the branch's website - `data.order.shippingDetails.latitude` (string,null, required) GPS coordinates - north latitude - `data.order.shippingDetails.longitude` (string,null, required) GPS coordinates - east longitude - `data.order.shippingDetails.carrierId` (integer,null, required) identification of the carrier - now it's used for Zasilkovna only. The value is for Czech Zasilkovna or carrier ID for Zasilkovna in the other countries. - `data.order.adminUrl` (string, required) URL to administration leading to order detail. URL keeps the administration language settings. - `data.order.status` (object,null, required) - `data.order.status.name` (string,null, required) status name - `data.order.status.id` (number, required) status identifier - `data.order.source` (object,null) source of the order - `data.order.source.name` (string,null, required) source name - `data.order.source.id` (number, required) source identifier - `data.order.price` (object, required) price of the order - `data.order.price.vat` (string,null, required) VAT value, two decimal places - `data.order.price.toPay` (string,null, required) total price to pay - `data.order.price.currencyCode` (string, required) currency code. List of available currencies within the e-shop can be found in endpoint . - `data.order.price.withoutVat` (string,null, required) price excluding tax - `data.order.price.withVat` (string,null, required) price including tax - `data.order.price.exchangeRate` (string, required) currency rate of the receipt for the default currency of the shop. This value is saved together with the price and reflects the historical value valid in the instant of the order creation. If the shop changes the default currency, the value still refers to the original currency! - `data.order.price.invoicingExchangeRate` (string) currency rate of the receipt for the default currency of the shop. This value is saved together with the price and reflects the historical value valid in the instant of the order creation. If the shop changes the default currency, the value still refers to the original currency! - `data.order.price.partialPaymentAmount` (string,null) can be value expressed in percents or as exact money value expression (with up to two decimal places) - depends on partialPaymentType value - `data.order.price.partialPaymentType` (string) 'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money - `data.order.paid` (boolean,null, required) flag, whether the order was paid. In addition to a , can also be , if the payment status is unknown. - `data.order.billingAddress` (object, required) - `data.order.billingAddress.company` (string,null, required) name of purchaser''s company (or ) - `data.order.billingAddress.fullName` (string,null, required) name of purchaser (or ) - `data.order.billingAddress.street` (string,null, required) street of purchaser (or ) - `data.order.billingAddress.houseNumber` (string,null, required) street number (or ) - `data.order.billingAddress.city` (string,null, required) city/town (village) (or ) - `data.order.billingAddress.district` (string,null, required) county (or ) - `data.order.billingAddress.additional` (string,null, required) additional address information (or ) - `data.order.billingAddress.zip` (string,null, required) ZIP or postal code (or ) - `data.order.billingAddress.countryCode` (string,null, required) tree-character ISO country code (ISO 4217) - `data.order.billingAddress.regionName` (string,null, required) region name (or ) - `data.order.billingAddress.regionShortcut` (string,null, required) region abbreviation (or ) - `data.order.billingAddress.companyId` (string,null, required) Company registration number. (can be ) - `data.order.billingAddress.vatId` (string,null, required) VAT identification number. (can be ) - `data.order.billingAddress.vatIdValidationStatus` (any) Info, whether VAT ID has been verified, enum [, , ] Enum: "unverified", "verified", "waiting", null - `data.order.billingAddress.taxId` (string,null, required) TAX identification number. For Czech address, taxId is same as vatId. (can be ) - `data.order.deliveryAddress` (object,null, required) - `data.order.onlinePaymentLink` (string,null) URL to online payment - `data.order.language` (string) language code of the order - `data.order.referer` (string,null) which page (url) has the user come from - `data.order.paymentMethods` (array) all order payment methods - `data.order.paymentMethods.itemId` (number, required) payment method identifier within order - `data.order.shippings` (array) all order shippings - `data.order.shippings.shipping` (object, required) transport method - `data.order.shippings.shipping.guid` (string,null, required) transport method identifier - `data.order.shippings.shipping.name` (string, required) description of transport method - `data.order.shippings.itemId` (number, required) transport method identifier within order - `data.order.items` (array, required) all order items - `data.order.items.productGuid` (any, required) product identifier of the item. At the time the order is created, it will be entered in this field, but when the product is deleted, the link will be lost (can be ) - `data.order.items.code` (string,null, required) identifier of the item code (product or variant). At the time the order is created, it will be entered in this field, but when the product is deleted, the link will be lost. - `data.order.items.ean` (string,null, required) EAN of the product variant (can be ) - `data.order.items.itemType` (string, required) Order item type (product, service...). See also [Types of order items](#section/code-lists/types-of-order-items) code list. - `data.order.items.productType` (string,null) Product type at the time of the order (product, product-set..). See also [Product types](#section/code-lists/product-types) code list (can be ). - `data.order.items.name` (string, required) Product name, with possible addition () - `data.order.items.variantName` (string,null, required) variant name (can be ) - `data.order.items.brand` (string,null, required) product brand (or manufacturer, possibly) - `data.order.items.remark` (string,null, required) remark - `data.order.items.weight` (string, required) weight in kg, unpacked (can be ). 3 decimal places. Maximum value 999999. - `data.order.items.additionalField` (string,null, required) additional field for remarks - `data.order.items.amount` (string,null, required) product quantity - `data.order.items.amountUnit` (string,null, required) product unit of quantity - `data.order.items.priceRatio` (string, required) price coefficient. This also represents a discount (discount means ) - `data.order.items.itemPrice` (object, required) the price of the item including the discount () and quantity (). - `data.order.items.itemPrice.vatRate` (string, required) VAT rate - `data.order.items.displayPrices` (array) - `data.order.items.purchasePrice` (any, required) purchase price of item, can be . - `data.order.items.recyclingFee` (object,null, required) recycling fee including category and price (or possibly ). - `data.order.items.recyclingFee.category` (string, required) Recycling fee category name. - `data.order.items.recyclingFee.fee` (string,null, required) Recycling fee. - `data.order.items.recyclingFee.unit` (any) Recycling fee unit. Enum: "pcs", "kg" - `data.order.items.mainImage` (object,null) - `data.order.items.mainImage.name` (string, required) image file name, also serves as an identifier for the image of the product. To assemble complete URL, it is added to the obtained from the endpoint e-shop info . - `data.order.items.mainImage.seoName` (string, required) file name modified for SEO - a short label is attached. - `data.order.items.mainImage.cdnName` (string, required) same as with attached hashed last image change time. , and can be entered in the URL - redirect will deliver the same image. - `data.order.items.mainImage.priority` (number, required) the key for the sequence of images matching the sequence in administration - it's not necessarily from the first, and the series may contain gaps. (can be ). - `data.order.items.mainImage.description` (string,null, required) description of the image (can be ). - `data.order.items.mainImage.changeTime` (string,null, required) last image change time If you are saving images together, you can use this timestamp to indicate if you need to reload the image. (can be ). - `data.order.items.stockLocation` (string,null) position in stock (can be ) - `data.order.items.supplierName` (string,null) product supplier (can be ) - `data.order.items.itemId` (number, required) order item identifier - `data.order.items.warrantyDescription` (string,null, required) textual description of warranty length (can be ) - `data.order.items.surchargeParameters` (array) items surcharge parameters, filled in order creation. Cannot be edited. - `data.order.items.surchargeParameters.parameterName` (object) surcharge parameter name's information - `data.order.items.surchargeParameters.parameterName.code` (string,null) parameters name code, can be null if already deleted - `data.order.items.surchargeParameters.parameterName.name` (string) parameters name - `data.order.items.surchargeParameters.parameterValue` (object) surcharge parameter value's information - `data.order.items.surchargeParameters.parameterValue.valueIndex` (string,null) parameters value code, can be null if already deleted - `data.order.items.surchargeParameters.parameterValue.description` (string) parameters value name - `data.order.items.surchargeParameters.parameterValue.price` (string,null) parameters value additional price - `data.order.items.specificSurchargeParameters` (array) list of specific surcharge parameters for order item detail, created from , but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint. - `data.order.items.specificSurchargeParameters.relationId` (string, required) id which identifies relation between item and surcharge. Can be used to delete surcharge parameter related to item. - `data.order.items.specificSurchargeParameters.name` (string, required) full name of surcharge parameter. - `data.order.items.specificSurchargeParameters.price` (string,null, required) price of surcharge parameter - `data.order.items.productFlags` (array) list of product flags - `data.order.items.productFlags.code` (string, required) flag identifier - `data.order.items.productFlags.title` (string, required) flag title - `data.order.items.productFlags.system` (boolean, required) is it a system flag common for all e-shops? - `data.order.items.consumptionTax` (object,null) consumption tax of order item - `data.order.items.consumptionTax.currency` (string, required) currency code. List of available currencies within the e-shop can be found in endpoint . - `data.order.items.consumptionTax.price` (string,null, required) consumption tax value - `data.order.items.buyPrice` (any) purchase price of the item including the discount () and quantity (). (or possibly ) - `data.order.items.amountCompleted` (string,null, required) quantity of completed product. Deprecated - use section instead. - `data.order.items.surchargeParametersTexts` (array) List of custom surcharge parameters names - `data.order.notes` (object) order notes (only filled in on request if is listed) - `data.order.notes.customerRemark` (string,null, required) customer note - `data.order.notes.eshopRemark` (string,null, required) e-shop order remark. - `data.order.notes.trackingNumber` (string,null, required) shipment number - `data.order.notes.trackingUrl` (string,null, required) package trace link (can be ) - `data.order.notes.additionalFields` (array, required) can contain up to six additional fields, which can be freely used by e-shop for its individual needs. - `data.order.notes.additionalFields.index` (integer, required) sequence number - `data.order.notes.additionalFields.label` (string, required) item name. The name of the field can be edited in the e-shop administration. - `data.order.notes.additionalFields.text` (string,null, required) item value (can be ) - `data.order.preAuthorization` (object) - `data.order.preAuthorization.hasPendingPreAuthorization` (boolean, required) - `data.order.preAuthorization.preAuthorizationAmount` (string, required) pre-authorization amount of the order. If null, the order is not pre-authorized. If not present, pre-authorization is not supported. - `data.order.completion` (array) All order items completion status. Contains completion info even for product set items. - `data.order.completion.productGuid` (any, required) - `data.order.completion.name` (string, required) Product name - `data.order.completion.itemId` (number,null, required) Order item identifier. This field is null for product set items. - `data.order.completion.amountCompleted` (string,null, required) quantity of completed product - `data.order.completion.parentProductSetItemId` (number) identifier of the parent product set item, if the item is a product set item. If the item is not a product set item, this field is not present. - `errors` (array,null, required) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced