Shoptet API (1.0.0)

Created in cooperation with the Ministry of Industry and Trade of the Czech Republic within the "The Country for the Future" programme.

This documentation provides information about the interface for developers who would like to gain access to Shoptet

e-shops. For more information about Shoptet, see https://www.shoptet.cz/.

The API is available in two access modes:

  • for "Shoptet partner” developers who create the interconnection with the services and extend the Shoptet system's functions for public usage. For more information about API and conditions, under which it can be used, see https://developers.shoptet.com/addons/.

  • direct private access to eshop data for eshop owner - available only for Premium Members. See https://developers.shoptet.com/premium for more information about API access.

Basic principles

How to call API

API supports communication in JSON format. The URL for calling API requests is https://api.myshoptet.com. The API calls

(endpoints and message formats) are common for private as well as addons access, it however uses different authentication

and authorization principles.

For Addons

API is made to create the supplements for the Shoptet system and uses OAuth2 authorization principles.

To access the API it is necessary to implement a web service at your side, which will communicate with our OAuth server.

In your e-shop administration, which you are using to work with our API, you must search in the API Partner section for the Access to API tab.

Here, you will find your clientID and addresses, from where you can call our OAuth server.

The work with API begins with e-shop addon installation. (The installation process can be tested in the addon detail in the Users section, where you can cause the installation for your e-shop.)

In your addon detail, in the Settings section, enter URL to gain a OAuth code. The URL must be linked to your server, where the script is prepared, which is able to gain an OAuth access token.

At this address, you will receive the HTTP request with a GET parameter code, when installing the addon, with unique value (a 255 character long string).

The code provided only has short-term validity and can be used only once. With this code, request our OAuth server to provide an OAuth access token.

Such a request shall follow within the same script that received the code.

Do not put off gaining the OAuth access token for a later time, and do not reply to our request with a 200 OK status, until you gain the OAuth access token.

The address for you to call, and an example of implementation, can be found in e-shop administration in the Access to API section.

As a response you will obtain a JSON with your OAuth access token. Save this token securely. Never send this token to the client computer, and use it only

for communication between the servers and for gaining the temporary token for access to API.

If you have successfully received an OAuth access token, your script must end with the HTTP status code “200”.

Now you have your OAuth access token, which links your addon with a specific e-shop, perhaps you would like to communicate with the e-shop via API.

From your server, call https://<eshop-address.tld>/action/ApiOAuthServer/getAccessToken address with HTTP header Authorization: Bearer <OAuth access token>.

As the reply, you will receive a JSON containing an API access token value and the token expiration time value. An example of calling can be found in e-shop administration in the Access to API section.

It is possible to request a maximum of 5 valid tokens.

The API access token will enable you to call an individual URL of our API, for example https://api.myshoptet.com/api/eshop. Send the API access token in each request in the HTTP headerShoptet-Access-Token.

You can have several valid API access tokens available at any one time. Should the validity of the API access token expire, you will receive a HTTP status code 401 and message about token expiration.


{
    "data": 'null',
    "errors": [
        {
            "errorCode": "expired-token",
            "message": "Token is expired. Please ask for new one.",
            "instance": "unknown"
        }
    ]
}

If your token does not have the access right for a specific endpoint, you will obtain a reply with HTTP status code 403 Forbidden.


{
    "data": 'null',
    "errors": [
        {
            "errorCode": "invalid-token-no-rights",
            "message": "Your access token \"afd..123\" has no defined rights for this resource.",
            "instance": "access-token"
        }
    ]
}

For private API access (Premium)

You can create API access tokens simply in the eshop administration. Send them in the request header Shoptet-Private-API-Token.

You can automatically access all API endpoints.

Rate limiting

Rate limiting is only at the level of server overload protection (DDoS), whereas the quantity of queries or total volume of data are unlimited.

These are therefore the limits of the maximum number of coincident active connections. A maximum of 50 from a single IP address, and a maximum of

3 connections for a single token. If the limit is exceeded, the HTTP code 429 is returned. See also Nginx configuration:

    limit_conn per_ip 50;
    limit_conn per_token 3;
    limit_conn_status 429;

Some URLs, for example for bulk operations, can have their own specific limits, which are mentioned in this documentation.

Locks

Write endpoints (DELETE, PATCH, POST, PUT methods) can take longer and may be prone to two concurrent matching requests.

To avoid problems with retrying identical write requests, we have added the locking function of these requests to the application.

If you execute the same request two times in quick succession, the second request receives error response with a 423 code.

The lock is only valid for a specific called URL, for the duration of the request processing, but no longer than 5 seconds.

API versioning

Current version of API: v1.0

The client must send a Content-Type header with value of application/vnd.shoptet.v1.0,

where v1.0 is the API version supported by the client. If there is any change in the API, then we are trying to make it

reverse compatible, therefore it is not necessary to regularly update your connection after each change in our interface.

The version is the same for all endpoints described here.

Server response format

All JSON responses from the server have the same format, as a base.

If any of the sections is not present in the response, a null value is then received.

Example of call for addons:


curl --include \
    -H 'Shoptet-Access-Token: 123456-a-123-XXXXXXXXXXXXXXXXXXXXXXXXX' \
    -H 'Content-Type: application/vnd.shoptet.v1.0' \
   'https://api.myshoptet.com/api/eshop'

Example of call for private API access:


curl --include \
    -H 'Shoptet-Private-API-Token: 123456-a-123-XXXXXXXXXXXXXXXXXXXXXXXXX' \
    -H 'Content-Type: application/vnd.shoptet.v1.0' \
   'https://api.myshoptet.com/api/eshop'

Example of response:


HTTP/2 200

date: Fri, 13 Jul 2018 15:57:29 GMT

content-type: application/vnd.shoptet.v1.0+json; charset=utf-8


{
    "data": {
        "contactInformation": {
            "eshopName": "www.domena-eshopu.cz",
            "url": "https:\/\/www.domena-eshopu.cz\/",
            "companyId": "28935675",
           ...
        }
        ...
    },
    "errors": 'null'
}

The basic structure of the response in the event of an error is as follows:


{
    "data": 'null',
    "errors": [
        {
            "errorCode": "missing-access-token",
            "message": "Missing access token. Please add `Shoptet-Access-Token` header to your request.",
            "instance": "unknown"
        }
    ]
}

Most of the endpoints are synchronous, i.e. your answer is provided immediately and contains the data requested. There

are however some endpoints, where either the request or the response processing takes longer time. These are implemented as

Asynchronous requests. Your request will be queued and you

receive only job identification in the response. You will be notified using a

webhook when the job is completed and your results

downloadable. Be aware, that registration of webhook job:finished is required to be able to run asynchronous requests.

If webhook is not registered, you will receive an error response with HTTP status code 403 and job won't be queued.

Webhook job:finished is also emitted when the job is failed so there is need to check the Detail of job to get the result of the job. If an error occurs during an asynchronous request, the job is automatically marked as failed 3 hours after its creation, and in this case, the job:finished webhook is not emitted.

Some attributes may be added to the new API version, or the sequence of attributes can be changed.

Your software, therefore, shall not rely on either of these.

If some attributes are renamed or removed, you will be informed in an additional

Deprecated header + Sunset

If you are calling some endpoint in a version that will not be supported in the future, you will receive a response with the header

X-Shoptet-Deprecated. If you detect this header within the response and its presence is logged,

you should be aware of the support termination for a specific endpoint in advance and thus have enough time for correction.

Furthermore, you shall also receive the response with aSunset header with the date when the support for this endpoint is to be terminated.

Status codes

When processing the response, the client shall first detect, what response status code was received.

For GET requests for responses with 200 code, it is not necessary to explore the errors part of the response.

For PATCH/PUT requests, which can process more records at the same time and some records

are not processed successfully, these end with a 200 response code and the errors key contains info on skipped rows.

The unknown record is returned with a 404 code, etc. These responses have the error field filled in, where you can

find detailed info about the error.

The following errors might be expected:

  • 400 - Some of the validations on item level have failed. There is no reason to retry, it will fail always.

  • 401 - Invalid token or the token has expired (for addons access tokens). You have to ask for another one.

  • 403 - Forbidden. The token has no rights to the endpoint called. The endpoints must be allowed for an addon and the eshop must have approved them. Valid for addons access tokens, private tokens can always access all endpoints. Can be also returned when required module for request is missing.

  • 404 - Either the endpoint is wrong; or most commonly, an entity identifier, which is part of the URL, does not exist.

  • 409 - Conflict - the action could not be completed for some consistency rules, such as duplicate data or relation, which would be broken.

  • 413 - Payload too large - update requests can sometimes contain multiple entities to be amended. There is however a limit (varying for each request), how many can be specified within one request. If you breach the limit, you will get this error and nothing will be updated.

  • 422 - Unprocessable entity - we were not able to parse the request - it does not match the expected format. Something is wrong with the request as whole, it might not be a correct JSON or it does not match the expected JSON schema. There is no reason to retry, it will always fail.

  • 423 - Locked - for update and some read request we apply locks, usually on an URL level, which should avoid consistency problems possibly occuring from parallel updates. See chapter about locks. Retry later, try to avoid parallel update requests.

  • 500 - General server error. Yes, this might happen to our software, too. Most commonly this is a temporary database issue and it might (but might not), work a few minutes later. We monitor all such errors and we try to analyze and fix them.

  • 503 - System maintenance. Most commonly we move a database to another database cluster or a database migration is pending and it will be available in a few minutes. Please try later.

Paging

Some endpoints can return larger quantity of records. Such endpoints do not return the entire result, but support pagination of results.

You can page using page (int) and itemsPerPage (int) parameters. The first page has number 1. If you require a different

quantity of items per page, use the itemsPerPage parameter. CAUTION: the number of items per page can be decreased only, the default

value is maximum. The default value can be different for each endpoint.

When paging, check the total number of items, if not altered (totalCount), then the

items on pages could be shifted and some of them could be missed or processed twice.

Section on demand

Some endpoints return the data sections as optional, on demand. The request is done by giving the section name in the

include parameter. Part of the data is returned each time, the other section only on demand. This makes the responses smaller for those, who do not need the data

, thus saving the volume of data transmitted and shortening the time to process the request.

For example, for "Eshop Info" endpoint, you will gain basic info when simply calling [GET] /api/eshop, but payment

methods and transport options only when using [GET] /api/eshop?include=paymentMethods,shippingMethods.

More values are separated by a comma, no sequencing, no upper/lower case differentiation. Other blocks are available on demand

and each endpoint informs you which identifier to request.

Translations

For proper functionality in translations you will have to get module Foreign languages (Cizí jazyky) activated on customer e-shop. Multi-language support in API is handled by query parameter language, which can be used in whole API. If parameter is not set, default shop language is used.

Read endpoints (HTTP verb GET) will return corresponding language version of texts where applicable.

For write endpoints, first use POST endpoint to create entity and then use PATCH endpoint with corresponding language query parameter to set language fields.

Please note that in some endpoints (typically surcharge/filtering/variant parameters) you must use the identifier's currently selected language variant (which is filtered in list).

Files

For files upload, there are Files endpoints.

The file is uploaded to a temporary storage which is not accessible publicly. The file is kept there for 7 days and then deleted.

After you upload a file, you may copy it to some API entities in their endpoints - you specify filename returned in response of upload job.

Please note that currently only images (png, jpg, gif) are allowed filetypes for file upload.

Product images

Shoptet saves the product images in their original size and then prepares several sizes for standardized usage (called

image cuts). These cuts are created in advance and saved on the disk, so they are readily available. The list of cuts is

the same for each e-shop, and each e-shop can theoretically have different cut sizes. In practice, their size is given

by the template and most templates use the same sizes. The list of provided cuts is given by

the Image cuts code list.

The /api/eshop?include=imageCuts endpoint returns the imageCuts field in the response, where each cut has the actual

size defined, and the URL base path. There are two base URLs (example for classic.shoptet.cz, cut detail):

  • urlPath: "https://classic.shoptet.cz/user/shop/detail/"

  • cdnPath: "https://cdn-api.myshoptet.com/usr/classic.shoptet.cz/user/shop/detail/"

Use the urlPath in case you need an up-to-date image right now. Use the url for your backend processing and you

will retrieve the images only once. Images retrieved via urlPath are not cached. You can use image name or SEO version

of the image name - see below.

Use the cdnPath in case you want to use the image url on the frontend and users of your application will display it,

e.g. if you provide an alternative frontend, mobile application etc. The images are cached and provided with lower

latency. Use cdnName retrieved from the product detail endpoint (or similar) - see below.

Once you determine the URL based on the purpose and image cut size (for example detail for product detail, or related

for product preview), just append the filename you need. The filename can be retrieved from Product detail endpoint.

Although the e-shop is behind the content delivery network (Cloudflare CDN), API still returns the same domain. Whether

the e-shop is behind the Cloudflare CDN, you can find out from response headers (CDN-Loop: cloudflare header).

The product detail endpoint /api/products/{guid}?include=images returns the image field data.images[] in the same

sequence, as these are entered in administration. The file name name (for example 100.jpg) needs to be connected

to the URL cut and then you have complete path to the image of a given cut (size), for example

https://classic.shoptet.cz/user/shop/detail/100.jpg. You can also use seoName, which also contains a description

of the image - you will be redirected to the same image. The cdnName is intended for use with the cdnUrl only.

The fields look like: (excerpt)

    "name": "106.png",
    "description": "shamrock 2115611 640",
    "seoName": "106_shamrock-2115611-640.png",
    "cdnName": "106_shamrock-2115611-640.png?5b2a41f5"

One of the images mentioned for the product can be selected as the default image for the product variant. The selected

image is in data.variants[].image item and contains the name of the image – this can be searched for in the image

list, in the name item. Should the variant have no preselected default image, the parameter image is null.

If data.variants[].isProductDefaultImage is true, then the default product image is given. If it is false, then it is the default variant image.

The item data.items[].mainImage contains the main image in order detail - this is either a default variant image,

or, if not set (or product does not have variants), the default product image is given. The structure is the same as

in product details, but not all images are given here, only the default one – representative image. The full path can

be gained by assembling the urlPath from the e-shop info and the name or seoName items, given for the order item.

Similarly, the product list gives data.products[].mainImage, which mentions the initial image for each product.

Code lists

Image cuts

ValueDescription
origoriginal image (in the original resolution)
bigbig image (typically 1024x768 px)
detailimage detail (typically 360x270 px)
categorysize for listing in category (typically 216x105 px)

Product visibility

ValueDescription
hiddenHide product
visibleShow product
blockedCannot be ordered
show-registeredShow only to logged-in users
block-unregisteredDo not allow order to logged-out users
cash-desk-onlyShow only in cash desk
detail-onlyDo not show e-shop navigation

Product types

ValueDescription
productProduct
bazarSecond-hand product
serviceService
gift-certificateGift (deprecated)
product-setProduct set

Types of order items

ValueDescription
productProduct
bazarSecond-hand product
serviceService
shippingTransportation
billingPayment method
discount-couponDiscount coupon
volume-discountVolume discount
giftGift
gift-certificateGift certificate
generic-itemNon-specific item
product-setProduct set
product-set-itemProduct set item
depositDeposit

Sorting of products in category

ValueDescription
defaultDefault
most-sellingMost selling first
cheapestCheapest first
most-expensiveMost expensive first
oldestOldest first
newestNewest first
alphabeticallyAlphabetically
alphabetically-descAlphabetically, descending
product-codePer product code
product-code-descPer product code, descending
category-priorityCategory priority
category-priority-descCategory priority, descending

Webhook event types

ValueDescriptionIdentifier meaning
brand:createBrand creation eventString (code) - brand unique code
brand:updateBrand change eventString (code) - brand unique code
brand:deleteBrand deleting eventString (code) - brand unique code
creditNote:createCredit note creation eventNumber (code) of credit note
creditNote:deleteCredit note deleting eventNumber (code) of credit note
creditNote:updateCredit note change eventNumber (code) of credit note
customer:createNew customer was createdCustomer GUID
customer:updateCustomer was updated. Throws 409 Conflict when try to register simultaneously with customer:disableOrders or customer:enableOrdersCustomer GUID
customer:disableOrdersAn event disabled the customer, and his future orders will be automatically cancelled. Throws 409 Conflict when try to register simultaneously with customer:updateCustomer GUID
customer:enableOrdersAn event enabled the customer's future orders. Throws 409 Conflict when try to register simultaneously with customer:updateCustomer GUID
customer:importImport of 1 and more customers was executedFixed string "customers"
customer:deleteCustomer was deletedCustomer GUID
deliveryNote:createDelivery note creation eventNumber (code) of delivery note
deliveryNote:deleteDelivery note deleting eventNumber (code) of delivery note
deliveryNote:updateDelivery note change eventNumber (code) of delivery note
eshop:currenciesCurrencies settings change eventID of eshop
eshop:billingInformationBilling information (i.e. eshop billing address) change eventID of eshop
eshop:designDesign settings (template, colors, fonts, layout)ID of eshop
eshop:mandatoryFieldsMandatory fields of customer were updatedID of eshop
eshop:projectDomainDomain of eshop was changedID of eshop
invoice:createInvoice creation eventNumber (code) of invoice
invoice:deleteInvoice deleting eventNumber (code) of invoice
invoice:updateInvoice change eventNumber (code) of invoice
job:finishedThe asynchronous request was finishedJob id
mailingListEmail:createE-mail addition event into the e-mail distribution listName (code) of e-mail distribution list
mailingListEmail:deleteE-mail deleting event from the e-mail distribution listName (code) of e-mail distribution
order:cancelOrder cancel event. Webhook is emitted when order status is set to canceled. Throws 409 Conflict when try to register simultaneously with order:updateNumber (code) of order
order:createOrder creation eventNumber (code) of order
order:deleteOrder deleting eventNumber (code) of order
order:updateOrder change event. Throws 409 Conflict when try to register simultaneously with order:cancelNumber (code) of order
orderStatusesList:changeOrder status list change event. Emitted when order status is created, updated or deletedOrder status ID
paymentMethod:changePayment method change eventPayment method GUID
proformaInvoice:createProforma invoice creation eventNumber (code) of proforma invoice
proformaInvoice:deleteProforma invoice deleting eventNumber (code) of proforma invoice
proformaInvoice:updateProforma invoice change eventNumber (code) of proforma invoice
proofPayment:createProof of payment creation eventNumber (code) of proof payment
proofPayment:deleteProof of payment deleting eventNumber (code) of proof payment
proofPayment:updateProof of payment change eventNumber (code) of proof payment
shippingMethod:changeShipping method change eventShipping method GUID
shippingRequest:cancelledShipping request was not chosen for order deliveryshippingRequestCode associated with the cart
shippingRequest:confirmedShipping request was chosen for order deliveryshippingRequestCode associated with the cart
stock:movementStock change eventStock ID
stock:inStock (*)Stock change event - sum across all of the stocks raised above 0 (beta, see below)Number (code) of product
stock:soldOut (*)Stock change event - sum across all of the stocks reached 0 (beta, see below)Number (code) of product
stock:minStockSupplyReached (*)Stock change event - sum across all of the stocks reached minimum stock supply value, if this limit is set for product (beta, see below)Number (code) of product

(*) These webhooks are considered beta/experimental, for more information, please visit the X-url

Mass Webhooks

These webhooks are sent when a mass change of entities is performed. The payload contains a json serialized list of IDs of changed entities.

Purpose of these webhooks is to downgrade number of requests, while i.e. administrator performs mass change of orders status at once etc.

So instead of emitting one event for every order, we emit one event for all of them.

For now, if some mass event is performed, we also sent "single" webhook event for every updated entity as usual, but it will be changed in future, so please watch release changes for more info

ValueDescriptionIdentifier meaning
invoice:massUpdateMass change of invoices eventJson serialized list of number (code) of invoices
order:massUpdateMass change of orders eventJson serialized list of number (code) of orders

System Webhooks

These webhooks cannot be registered via API, they are setup in Partners' Addon administration section instead.

ValueDescription
addon:suspendThe addon was suspended by the eshop or by Shoptet operations staff
addon:approveThe addon was approved (resumed) after it was suspended
addon:terminateThe addon was terminated by the eshop or by Shoptet operations staff
addon:uninstallThe addon was uninstalled by the eshop admin or the eshop was terminated

URL address from endpoint Eshop info

See endpoint Eshop info

IdentDescription
admin-orders-listListing of orders in administration
admin-customers-listList of customers in administration
oauthOAuth server address, used for e-shop user verification

List of product catalogues

Provider (identification)Description
glamiGlami
googleGoogle
heurekaHeuréka
zboziZboží.cz

Invoice Billing Methods

idDescription
1COD (cz: Dobírka)
2Wire transfer (cz: Převodem)
3Cash (cz: Hotově)
4Card (cz: Kartou)

VAT modes

Value
Normal
One Stop Shop
Mini One Stop Shop
Reverse charge
Outside the EU

Postman collection

If you use Postman as an API platform for building and using APIs, we provide you a complex collection of Shoptet API.

You have 2 options how to import our postman collection (created from openApi schema - openapi.yaml ) into your postman client

Fork Shoptet API Collection from Shoptet Public API Workspace (recommended)

Also check postman documentation for more details: Fork a collection.

Step 1: Navigate to Shoptet Public API Workspace

  • Launch Postman on your desktop or in the browser.

  • In the search bar in the top header of app, type Shoptet Public API and select collection from Shoptet public API Workspace.

Step 2: Locate the Shoptet API Collection

  • Once inside the Shoptet Public API Workspace, go to the Collections tab.

  • Find the Shoptet API collection.

Step 3: Fork the Collection

  • Click on the Shoptet API collection to open it.

  • In the collection view, click the Fork button in the top-right corner.

  • In the fork dialog, choose a name for your forked collection.

  • Select the workspace where you want to save the forked collection.

  • It’s recommended to check watch original collection to get notified about changes in the original collection.

  • Click Fork Collection.

Step 4: Access Your Forked Collection

  • Navigate to the workspace where you saved the forked collection.

  • You’ll now find the forked Shoptet API collection under the Collections tab, ready for you to use and modify.

Now you have your own copy of the Shoptet API collection! If you want to add changes from the original collection, you can do so by click on pull changes in collection settings.

Import openapi.yaml into Postman as a Collection

Step 1: Upload the openapi.yaml File

  • Download the openapi.yaml file from our developers repository.

  • Launch Postman on your desktop or in the browser.

  • In the top-left corner of Postman, click the Import button.

  • A pop-up window will appear.

  • Drag and drop your openapi.yaml file into the window, or click Upload Files and browse to the file's location.

Step 2: Verify OpenAPI Import

  • Postman will automatically recognize the OpenAPI schema.

  • It will display a preview of the API schema.

Step 3: Import as Collection

  • Once the file is recognized, click Import.

  • Postman will convert the OpenAPI schema into a collection of requests, based on the defined endpoints in the openapi.yaml file.

Step 4: Access the Imported Collection

  • After the import is successful, go to the Collections tab.

  • You’ll find your new collection, named after the OpenAPI schema, containing all the API requests generated from the file.

Now you can explore the API endpoints and use them directly within Postman!

Collection settings

  1. Click the Shoptet API collection name.

  2. Go to Authorization tab.

  3. Set your access token into the value of Shoptet-Access-Token key.

  4. Go to Variables tab.

  5. You can set baseUrl variable here.

Last changes

Last API changes are published on the [API news] page (https://developers.shoptet.com/category/api/).

Download OpenAPI description
Languages
Servers
https://api.myshoptet.com/

Eshop

This endpoint is used for general information about the e-shop settings.

Operations

Products

Product endpoints are used for managing products in the e-shop and also for its related modules.

Operations

Price lists

Price lists are used for setting up different prices for products for different customer groups.

Operations

Orders

Order endpoints are used for managing orders in the e-shop.

Operations

List of orders

Request

List of orders in e-shop and cash desks. Endpoint supports pagination. For default calls, it returns 20 orders,

using the parameter ?itemsPerPage=100, you can request up to 100 orders at a time. Temporarily disabled, only 20 orders per page is supported. We apologize for the inconvenience.

The list can be filtered according to status, transport, payment, date of creation, order number and customer number.

The code (code) is the order identifier. Although this is usually a number, it is necessary to take into account that this might also include

letters, dash, etc.

Query
statusIdstring

Purchase order filtering, according to order status id.

shippingGuidstring

Purchase order filtering, according to forwarder GUID.

shippingCompanyCodestring

Purchase order filtering, according to forwarder company code.

paymentMethodGuidstring

Purchase order filtering, according to payment method.

creationTimeFromstring

Purchase order filtering, according to date of creation. ISO 8601 format ("2017-12-12T22:08:01+0100").

creationTimeTostring

Purchase order filtering, according to date of creation. ISO 8601 format ("2017-12-12T22:08:01+0100").

codeFromstring

Purchase order filtering, according to order code.

codeTostring

Purchase order filtering, according to order code.

customerGuidstring

Purchase order filtering, according to customer number.

emailstring

Purchase order filtering, according to customer e-mail. The accurate match is searched for, regardless of capitalization.

phonestring

Purchase order filtering, according to customer phone. International format only (+420123456789)

productCodestring

Order filter by product's code that is in order.

changeTimeFromstring

Purchase order filtering, according to date of last update. ISO 8601 format ("2017-12-12T22:08:01+0100").

changeTimeTostring

Purchase order filtering, according to date of last update. ISO 8601 format ("2017-12-12T22:08:01+0100").

sourceIdstring

Order source filtering according to source id. For more information, see List of order sources endpoint.

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  'https://api.myshoptet.com/api/orders?changeTimeFrom=string&changeTimeTo=string&codeFrom=string&codeTo=string&creationTimeFrom=string&creationTimeTo=string&customerGuid=string&email=string&paymentMethodGuid=string&phone=string&productCode=string&shippingCompanyCode=string&shippingGuid=string&sourceId=string&statusId=string' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​ordersArray of objectsrequired
data.​orders[].​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​orders[].​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​orders[].​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​orders[].​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​orders[].​fullNamestring or nullrequired

customer full name (can be null)

data.​orders[].​companystring or nullrequired

company name (can be null)

data.​orders[].​emailstring or nullrequired

purchaser e-mail (can be null)

data.​orders[].​phonestring or null

purchaser phone number (can be null)

data.​orders[].​remarkstring or nullrequired

customer remark (can be null).

data.​orders[].​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​orders[].​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​orders[].​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​orders[].​statusobject or nullrequired
data.​orders[].​status.​namestring or nullrequired

status name

data.​orders[].​status.​idnumberrequired

status identifier

data.​orders[].​sourceobject or null
data.​orders[].​shippingobject(shipping)required
data.​orders[].​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​orders[].​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​orders[].​paymentMethodobject(paymentMethod)required
data.​orders[].​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​orders[].​paymentMethod.​namestringrequired

description of payment method

data.​orders[].​priceobject(price)required

price of the order

data.​orders[].​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​orders[].​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​orders[].​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​orders[].​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​orders[].​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​orders[].​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​orders[].​price.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

can be value expressed in percents or as exact money value expression (with up to two decimal places) - depends on partialPaymentType value

data.​orders[].​price.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​orders[].​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​paginatorobject(paginator)required
data.​paginator.​totalCountintegerrequired

total number of available records

data.​paginator.​pageintegerrequired

current page

data.​paginator.​pageCountintegerrequired

total available of pages

data.​paginator.​itemsOnPageintegerrequired

number of currently returned records

data.​paginator.​itemsPerPageintegerrequired

required number of records per page

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "orders": [], "paginator": {} }, "errors": [ {} ] }

Order insertion

Request

This endpoint enables insert the order into Shoptet, which was created in other system. You can use it for an import

from an older e-shop solution, or to transfer orders from external sales channels.

A large amount of info can be set, but for regular usage only a few attributes are needed. Values of other

attributes are added as per their default values. The detailed information can be found in the right pane, after

clicking on title "Order insertion" above (search for "Request" and "Attributes” sections).

Request is sent in JSON format in its body. Simple example (detailed example can be found in call example in right pane):


{
    "data": {
        "email": "foo@bar.cz",
        "externalCode": "123",
        "paymentMethodGuid": "6f2c8e36-3faf-11e2-a723-705ab6a2ba75",
        "shippingGuid": "8921cdc1-051b-11e5-a8d3-ac162d8a2454",
        "billingAddress": {
            "fullName": "Jan Novák",
            "street": "Rovná",
            "city": "Rovina",
            "zip": "12300"
        },
        "currency": {
            "code": "CZK"
        },
        "items": [
            {
                "itemType": "product",
                "code": "32/ZEL",
                "vatRate": "21.00",
                "itemPriceWithVat": "121.00"
            },
            {
                "itemType": "billing",
                "name": "Platba převodem",
                "vatRate": "21.00",
                "itemPriceWithVat": "0"
            },
            {
                "itemType": "shipping",
                "name": "PPL",
                "vatRate": "21.00",
                "itemPriceWithVat": "59.00"
            }
        ]
    }
}

Whether the field is mandatory, apart from the basic definition, also depends on whether the order was created via the cash desk

(cashDeskOrder: true) or via e-shop. Some fields from invoicing, delivery and contact data

are mandatory or optional, as per e-shop settings (see also e-shop administration Settings > Customers > Mandatory fields).

When the order is created, it is checked, whether the e-shop includes products with the respective code (can be suppressed with

GET parameter suppressProductChecking=true),

the products from the order are deducted from the stock (can be suppressed with the GET parameter suppressStockMovements=true), documentation is created for the order (can be suppressed with the GET parameter suppressDocumentGeneration=true), a confirmation e-mail is sent (can be suppressed with the GET parameter suppressEmailSending=true) and a webhook is executed for the new order.

**Parameters suppressProductChecking=true and suppressStockMovements=true are to be used only for orders that will not be changed or deleted in the future.

Editing or deleting such an order can damage the consistency of warehousing.**

Parameter suppressHistoricalMandatoryFields=true can be used to disable mandatory fields checks, but only for "historical"

orders (creationTime is older than 24 hours). Keep in mind even historical orders should be kept consistent and complete

as much as possible to allow their processing for statistics, volume calculations etc.

Setting the mandatory items for invoicing and the delivery address can be different between individual e-shops. The mandatory items corresponds to the settings

for ordering from the basket.

Parameters suppressHistoricalPaymentChecking and suppressHistoricalShippingChecking allow corresponding field (paymentMethodGuid and/or shippingGuid)

to be null. In that case, if an billing/shipping item is provided in items list, name field must be filled in that item.

To remove products from the stock, the shop (or product) setting as to whether the inventory can be negative or not is respected.

If a negative value is not permitted for shopping and the order cannot be covered from the current inventory, the order is not created and the API

returns an error message in the errors field.

The order's minimum size or maximum number of items as per the settings of e-shop are not checked.

The endpoint only checks the same parameters as the order detail.

The order can be inserted while using currencies setup in the eshop (see /api/eshop). The exchange rate related to the

eshop default currency is optional. If not provided, the current eshop exchange rate will be used.

For historical orders the exchange rate should be provided using the historical value of the order's creation date.

Shoptet eshops do not store historical exchange rates.

Warning: for SK and CZ different exchange rate format is used. You should use the same form as you get from the endpoint

/api/eshop. We will internally convert it to the correct format to be compatible with eshop statistics calculations.

Because of the conversion, the value of exchangeRate in the response will be different (inverse) to the one you had sent.

When entering the order, the initial welcome e-mail is always sent. Even though the order status is set differently to the initial value,

the e-mail associated with a status change is not sent, but the system welcome e-mail is (to e-shop operator and customer).

When creating the receipt (invoice, proforma invoice, delivery note) the receipt is created with the current date and the 14 days due date, even though

creationTime is given from the past.

Examples of how to work with the order and items statuses, and how to ensure the correct insertion of a discount, can be found in a

separate article at developers.shoptet.com

After the order is successfully created, you will receive a response with a 201 code and a response structure matching the order detail,

which is returned by /api/orders/<code> endpoint.

Please note following rules

  • code .. maxLength 10 characters

  • email .. maxLength 100 characters

  • phone .. maxLength 32 characters

  • externalCode .. maxLength 255 characters

  • billingAddress.company .. maxLength 100 characters

  • billingAddress.fullName .. maxLength 100 characters

  • billingAddress.street .. maxLength 100 characters

  • billingAddress.houseNumber .. maxLength 16 characters

  • billingAddress.city .. maxLength 100 characters

  • billingAddress.district .. maxLength 64 characters

  • billingAddress.additional .. maxLength 64 characters

  • billingAddress.zip .. maxLength 100 characters

  • billingAddress.regionName .. maxLength 128 characters

  • billingAddress.regionShortcut .. maxLength 16 characters

  • billingAddress.companyId .. maxLength 18 characters

  • billingAddress.vatId .. maxLength 16 characters

  • billingAddress.taxId .. maxLength 16 characters

  • deliveryAddress.company .. maxLength 255 characters

  • deliveryAddress.fullName .. maxLength 64 characters

  • deliveryAddress.street .. maxLength 100 characters

  • deliveryAddress.houseNumber .. maxLength 16 characters

  • deliveryAddress.city .. maxLength 100 characters

  • deliveryAddress.district .. maxLength 64 characters

  • deliveryAddress.additional .. maxLength 64 characters

  • deliveryAddress.zip .. maxLength 100 characters

  • deliveryAddress.regionName .. maxLength 128 characters

  • deliveryAddress.regionShortcut .. maxLength 16 characters

  • notes.trackingNumber .. maxLength 32 characters

  • items.name .. maxLength 250 characters

  • items.variantName .. maxLength 128 characters

  • items.brand .. maxLength 64 characters

  • items.supplierName .. maxLength 255 characters

  • items.code .. maxLength 64 characters

  • items.additionalField .. maxLength 255 characters

  • items.amountUnit .. maxLength 16 characters

Query
suppressDocumentGenerationstring

suppress the generation of linked documents.

Default "false"
Example: suppressDocumentGeneration=true
suppressEmailSendingstring

suppress sending the linked information e-mails.

Default "false"
Example: suppressEmailSending=true
suppressProductCheckingstring

suppress the product existence check as per code and GUID

Default "false"
Example: suppressProductChecking=true
suppressStockMovementsstring

suppress deduction of the products from stock

Default "false"
Example: suppressStockMovements=true
suppressHistoricalMandatoryFieldsstring

set the flag that disables mandatory fields checking

Default "false"
Example: suppressHistoricalMandatoryFields=true
suppressHistoricalPaymentCheckingstring

set the flag that paymentMethodGuid can be null

Default "false"
Example: suppressHistoricalPaymentChecking=true
suppressHistoricalShippingCheckingstring

set the flag that shippingGuid can be null

Default "false"
Example: suppressHistoricalShippingChecking=true
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectrequired
data.​creationTimestring

time of order creation. Optional, current time is the default value.

data.​codestring[ 1 .. 10 ] characters

Item code. For transportation, payment and discounts the (discount-coupon and volume-discount) must remain null, for the other types of items, this is mandatory.

data.​languagestringnon-empty

Language of order. Default: default eshop language. (optional)

data.​externalCodestring[ 1 .. 255 ] charactersrequired

order identification within the external system (mandatory, must be unique).

data.​cashDeskOrderboolean

flag, if the order was created via the cash desk. Optional. false is the default value.

data.​statusIdnumber

Order status. Optional. If not indicated, the default status of the order is used, as per e-shop settings. If the status definition sets the payment flag, the parameter paid is set to true. if the request also mentions paid, the paid variant has priority. If the status definition has selected the setting of item statuses, the status is also set for items. Otherwise, the initial status is the set based on e-shop defaults. If the item has status set explicitly (see below items[].statusId), the value from the item shall be used.

data.​sourceIdnumber or null

Order source id. Optional. If not indicated, no source will be used (null). If sourceId is positive, cashDeskOnly must also be set to true, otherwise if sourceId is negative, cashDeskOnly must be set to false, otherwise error will be returned. Current possible values of sourceId can be determined by calling the list of order sources endpoint.

data.​emailstring[ 1 .. 100 ] characters

customer e-mail (can be omitted only when ordering via cash desk).

data.​phonestring or null[ 1 .. 32 ] characters

phone number of the customer. Optional, if not set as mandatory item in shop settings.

data.​birthDatestring or null

customer birth date (optional, if not made mandatory by the e-shop settings).

data.​vatPayerboolean

Flag, whether the invoice was issued in VAT payer mode, or VAT non-payer mode. Optional, if not indicated, it is used as per current settings of the e-shop (only makes sense for historical orders, if e-shop changed its status form VAT payer to different or vice versa)

data.​paymentMethodGuidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Payment method. Optional, for an order via cash desk or eshop order. Does not automatically generate payment item in the list of items, and does not check the consistency with payment item. Billing item type is mandatory if paymentMethodGuid is filled.

data.​shippingGuidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Transport method. Optional, for an order via cash desk or eshop order. Does not automatically generate transport item in the list of items, and does not check the consistency with the transport item. Shipping item type is mandatory if shippingGuid is filled.

data.​shippingDetailsnull or object

additional information for transport, if any. typically ID of Zásilkovna branches, postal offices, etc. (optional)

One of:

additional information for transport, if any. typically ID of Zásilkovna branches, postal offices, etc. (optional)

null

additional information for transport, if any. typically ID of Zásilkovna branches, postal offices, etc. (optional)

data.​paidboolean or null

flag, whether the order was paid

data.​billingMethodCodenumber[ 1 .. 4 ]
data.​clientIPAddressstring or null<= 255 characters

IP address of the customer, from where the order was made

data.​customerGuidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Customer GUID, if not done under known registered customer (optional).

data.​billingAddressobject

invoicing address

data.​addressesEqualboolean or null

flag, whether the billing and delivery addresses are the same

data.​deliveryAddressnull or object
One of:
null
data.​notesnull or object

additional notes for the order

One of:

additional notes for the order

null

additional notes for the order

data.​stockIdnumber

stock number. Optional, the default value is the default stock, taken from e-shop settings. In Shoptet, the only alternative to the default stock is to collect in person at the shop, otherwise the default stock is used.

data.​currencyobjectrequired
data.​currency.​codestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency abbreviation. Mandatory.

data.​currency.​exchangeRatestring or null^[0-9]+\.[0-9]{2,8}$

exchange rate for main e-shop currency.

data.​vatModestring

VAT mode, Normal is used by default, possible values: Normal, One Stop Shop*, Reverse charge, Outside the EU. Please note, that One Stop Shop value requires eshop OSS setting to be true.

data.​itemsArray of objectsnon-empty

order items. The order must have at least one product item

curl -i -X POST \
  'https://api.myshoptet.com/api/orders?suppressDocumentGeneration=false&suppressEmailSending=false&suppressHistoricalMandatoryFields=false&suppressHistoricalPaymentChecking=false&suppressHistoricalShippingChecking=false&suppressProductChecking=false&suppressStockMovements=false' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "creationTime": "2018-01-21T14:15:47+0100",
      "code": "179/B",
      "language": "cs",
      "externalCode": "X123",
      "cashDeskOrder": true,
      "statusId": -1,
      "sourceId": -1,
      "email": "foo@bar.cz",
      "phone": "+420123456789",
      "birthDate": "1990-01-01",
      "vatPayer": true,
      "paymentMethodGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "shippingGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "shippingDetails": {},
      "paid": true,
      "billingMethodCode": 2,
      "clientIPAddress": "62.128.123.12",
      "customerGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "billingAddress": {
        "company": "Smith & Smith",
        "fullName": "John Doe",
        "street": "Main Street",
        "streetWithNr": "Main Street 123",
        "houseNumber": "123",
        "city": "Flat Country",
        "district": "Bohemia",
        "additional": "3rd floor",
        "zip": "123 00",
        "countryCode": "CZ",
        "regionName": "Central Bohemia",
        "regionShortcut": "SC",
        "companyId": "123456",
        "vatId": "CZ123456",
        "taxId": "CZ123456"
      },
      "addressesEqual": true,
      "deliveryAddress": {},
      "notes": {},
      "stockId": 1,
      "currency": {
        "code": "CZK",
        "exchangeRate": "string"
      },
      "vatMode": "Normal",
      "items": [
        {
          "itemType": "product",
          "name": "Large chocolate",
          "variantName": "Dark chocolate",
          "brand": "Willy Wonka",
          "supplierName": "Dodavatel s.r.o.",
          "productGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
          "code": "string",
          "remark": "With cubicles",
          "warrantyDescription": "2 years",
          "amountCompleted": "1.000",
          "additionalField": "TO BALÍKOVNA, Karlínské náměstí 145/1, Karlín, 18600, Prague",
          "amount": "1.000",
          "amountUnit": "ks",
          "weight": "100",
          "priceRatio": "0.7",
          "vatRate": "string",
          "itemPriceWithVat": "121.00",
          "itemPriceWithoutVat": "100.00",
          "buyPriceWithVat": "string",
          "buyPriceWithoutVat": "string",
          "buyPriceVatRate": "string",
          "statusId": -1,
          "recyclingFeeId": 2,
          "surchargeParameters": [
            {
              "parameterCode": "string",
              "valueIndex": "string",
              "price": "21.00"
            }
          ]
        }
      ]
    }
  }'

Responses

Created

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

List of all orders

Request

Using this endpoint, you can get list of all orders with detailed info of each order (like in Order Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal.

The list may be filtered by date of creation and order code. The code is the order identifier. Although this is usually a number, it is necessary to take into account that this might also include letters, dash, etc.

Response will be in jsonlines format with each order taking one line of output file. One order in response has the same format as order detail response (in data attribute)

This endpoint has several sections, which are exported only when requested in the include parameter (see Requested sections).

Include parameterMeaning
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
productFlagsItem product flags

Result file is compressed using GZIP.

Query
includestring

Optional parts of response. Available values are notes,images,shippingDetails,stockLocation,surchargeParameters.

statusIdstring

Purchase order filtering, according to order status id.

shippingGuidstring

Purchase order filtering, according to forwarder GUID.

shippingCompanyCodestring

Purchase order filtering, according to forwarder company code.

paymentMethodGuidstring

Purchase order filtering, according to payment method.

creationTimeFromstring

Purchase order filtering, according to date of creation. ISO 8601 format ("2017-12-12T22:08:01+0100").

creationTimeTostring

Purchase order filtering, according to date of creation. ISO 8601 format ("2017-12-12T22:08:01+0100").

codeFromstring

Purchase order filtering, according to order code.

codeTostring

Purchase order filtering, according to order code.

customerGuidstring

Purchase order filtering, according to customer number.

emailstring

Purchase order filtering, according to customer e-mail. The accurate match is searched for, regardless of capitalization.

phonestring

Purchase order filtering, according to customer phone. International format only (+420123456789)

productCodestring

Order filter by product's code that is in order.

changeTimeFromstring

Purchase order filtering, according to date of last update. ISO 8601 format ("2017-12-12T22:08:01+0100").

changeTimeTostring

Purchase order filtering, according to date of last update. ISO 8601 format ("2017-12-12T22:08:01+0100").

sourceIdstring

Order source filtering according to source id. For more information, see List of order sources endpoint.

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  'https://api.myshoptet.com/api/orders/snapshot?changeTimeFrom=string&changeTimeTo=string&codeFrom=string&codeTo=string&creationTimeFrom=string&creationTimeTo=string&customerGuid=string&email=string&include=string&paymentMethodGuid=string&phone=string&productCode=string&shippingCompanyCode=string&shippingGuid=string&sourceId=string&statusId=string' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobject
errorsArray of objects or null(Errors)
Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "jobId": "ad24xod" }, "errors": [ {} ] }

Order detail

Request

This endpoint has several sections, which are only sent when requested in the include parameter (see

Requested sections).

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
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.

Path
codestringrequired
Example: 2018000012
Query
includestring

optional parts of response

Example: include=notes,images,shippingDetails,stockLocation,productFlags
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  'https://api.myshoptet.com/api/orders/{code}?include=string' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

Order deletion

Request

Path
codestringrequired
Example: 0000000001
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X DELETE \
  'https://api.myshoptet.com/api/orders/{code}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
datanullrequired
errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": null, "errors": [ {} ] }

Order head change

Request

You can change basic info (head) of order with this method.

Please note following rules

  • email .. maxLength 100 characters

  • phone .. maxLength 32 characters

  • billingAddress.company .. maxLength 100 characters

  • billingAddress.fullName .. maxLength 100 characters

  • billingAddress.street .. maxLength 100 characters

  • billingAddress.houseNumber .. maxLength 16 characters

  • billingAddress.city .. maxLength 100 characters

  • billingAddress.district .. maxLength 64 characters

  • billingAddress.additional .. maxLength 64 characters

  • billingAddress.zip .. maxLength 100 characters

  • billingAddress.regionName .. maxLength 128 characters

  • billingAddress.regionShortcut .. maxLength 16 characters

  • billingAddress.companyId .. maxLength 18 characters

  • billingAddress.vatId .. maxLength 16 characters

  • billingAddress.taxId .. maxLength 16 characters

  • deliveryAddress.company .. maxLength 255 characters

  • deliveryAddress.fullName .. maxLength 64 characters

  • deliveryAddress.street .. maxLength 100 characters

  • deliveryAddress.houseNumber .. maxLength 16 characters

  • deliveryAddress.city .. maxLength 100 characters

  • deliveryAddress.district .. maxLength 64 characters

  • deliveryAddress.additional .. maxLength 64 characters

  • deliveryAddress.zip .. maxLength 100 characters

  • deliveryAddress.regionName .. maxLength 128 characters

  • deliveryAddress.regionShortcut .. maxLength 16 characters

Path
codestringrequired

order code (number)

Example: 2018000012
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectnon-emptyrequired
data.​creationTimestring

time of order creation. Optional, current time is the default value.

data.​emailstring or null[ 1 .. 100 ] characters

customer e-mail (can be omitted only when ordering via cash desk).

data.​phonestring or null[ 1 .. 32 ] characters

phone number of the customer. Optional, if not set as mandatory item in shop settings.

data.​birthDatestring or null

customer birth date (optional, if not made mandatory by the e-shop settings).

data.​customerGuidstring(typeGuidUnlimited)[ 1 .. 36 ] characters

Customer GUID, if not done under known registered customer (optional).

data.​addressesEqualboolean or null

flag, whether the billing and delivery addresses are the same

data.​billingAddressobject
data.​deliveryAddressobject or null
curl -i -X PATCH \
  'https://api.myshoptet.com/api/orders/{code}/head' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "creationTime": "2018-01-21T14:15:47+0100",
      "email": "foo@bar.cz",
      "phone": "+420123456789",
      "birthDate": "1990-01-01",
      "customerGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "addressesEqual": true,
      "billingAddress": {
        "company": "Smith & Smith",
        "fullName": "John Doe",
        "street": "Main Street",
        "houseNumber": "123",
        "city": "Flat Country",
        "district": "Bohemia",
        "additional": "3rd floor",
        "zip": "123 00",
        "countryCode": "CZ",
        "regionName": "Central Bohemia",
        "regionShortcut": "SC",
        "companyId": "123456",
        "vatId": "CZ123456",
        "taxId": "CZ123456"
      },
      "deliveryAddress": {
        "company": "Smith & Smith",
        "fullName": "John Doe",
        "street": "Main Street",
        "houseNumber": "123",
        "city": "Flat Country",
        "district": "Bohemia",
        "additional": "3rd floor",
        "zip": "123 00",
        "countryCode": "CZ",
        "regionName": "Central Bohemia",
        "regionShortcut": "SC"
      }
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

Order item add

Request

Path
codestringrequired

order code

Example: 2018000012
Query
suppressProductCheckingstring

suppress the product existence check as per code and GUID

Default "false"
Example: suppressProductChecking=true
suppressStockMovementsstring

suppress deduction of the products from stock

Default "false"
Example: suppressStockMovements=true
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectnon-emptyrequired
data.​itemTypestringnon-emptyrequired

item type. Mandatory field. See also code list order item types. Only product, product-set, service or discount-coupon item type is allowed.

data.​codestring[ 1 .. 64 ] characters

Item code. For transportation, payment and discounts the (discount-coupon and volume-discount) must remain null, for the other types of items, this is mandatory.

data.​vatRatestring

VAT rate (0.00 for VAT non-payers). Mandatory.

data.​itemPriceWithVatstring

Item price, including VAT. Optional. Price including tax and price excluding tax cannot be combined.

data.​itemPriceWithoutVatstring

Item price, excluding VAT. Optional. Price including tax and price excluding tax cannot be combined.

data.​buyPriceWithVatstring

Purchase price, including VAT. Optional. Price including tax and price excluding tax cannot be combined. This is used for profit margin calculation and statistics.

data.​buyPriceWithoutVatstring

Purchase price, excluding VAT. Optional. Price including tax and price excluding tax cannot be combined. This is used for profit margin calculation and statistics.

data.​buyPriceVatRatestring

VAT rate for purchase price. Optional.

data.​namestring[ 1 .. 250 ] characters

Product name (optional, but usually filled in). Mandatory only for discount-coupon, transport and payment, for other items, it is loaded according to code.

data.​variantNamestring or null[ 1 .. 128 ] characters

Variant name. Optional.

data.​brandstring or null[ 1 .. 64 ] characters

brand (manufacturer). Optional.

data.​supplierNamestring or null[ 1 .. 255 ] characters

supplier. Optional.

data.​productGuidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Product GUID in item. When used with the ?suppressProductChecking=true parameter, this field has no influence.

data.​remarkstring or nullnon-empty

With cubicles

data.​warrantyDescriptionstring or null[ 1 .. 255 ] characters

textual description of warranty length (can be null)

data.​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$

quantity of completed product

data.​additionalFieldstring or null[ 1 .. 255 ] characters

additional information. Used for transport to specify the branch.

data.​amountstring^[0-9]+\.?[0-9]{0,3}$

amount, 3 decimal places accuracy, optional, default value 1.000.

data.​amountUnitstring[ 1 .. 16 ] characters

unit of quantity (optional)

data.​weightstring

product weight in kilograms. Maximum 3 decimal places, and maximum value of 99999.

data.​priceRatiostring

discount in the form of coefficient (0.7 = 70 % of the original price, i.e. 30 % discount). Optional, default value is 1.0000

data.​recyclingFeeIdinteger or null

Product recycling fee id, replacement for recyclingFee

data.​statusIdnumber

Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the Change status of items in the order flag set, then the item will have this status. Otherwise the default status of the e-shop is used.

data.​surchargeParametersArray of objects
curl -i -X POST \
  'https://api.myshoptet.com/api/orders/{code}/item?suppressProductChecking=false&suppressStockMovements=false' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "itemType": "product",
      "code": "179/B",
      "vatRate": "21.00",
      "itemPriceWithVat": "121.00",
      "itemPriceWithoutVat": "100.00",
      "buyPriceWithVat": "121.00",
      "buyPriceWithoutVat": "100.00",
      "buyPriceVatRate": "21.00",
      "name": "Large chocolate",
      "variantName": "Type: walnut",
      "brand": "Willy Wonka",
      "supplierName": "Dodavatel s.r.o.",
      "productGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "remark": "This is a gift for my friend.",
      "warrantyDescription": "2 years",
      "amountCompleted": "1.000",
      "additionalField": "TO BALÍKOVNA, Karlínské náměstí 145/1, Karlín, 18600, Prague",
      "amount": "1.000",
      "amountUnit": "ks",
      "weight": "100",
      "priceRatio": "0.7000",
      "recyclingFeeId": 1,
      "statusId": -1,
      "surchargeParameters": [
        {
          "parameterCode": "pp-1",
          "valueIndex": "hodnota-01",
          "price": "21.00"
        }
      ]
    }
  }'

Responses

Created

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

Order item change

Request

Path
codestringrequired

order code (number)

Example: 2018000012
idstringrequired

order item id. Can be found in field data.order.items.itemId in Order detail. (number)

Example: 198
Query
suppressProductGuidCheckstring

suppress the product existence check per GUID

Default false
Example: suppressProductGuidCheck=true
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectnon-emptyrequired
data.​itemTypestringnon-emptyrequired

item type. Mandatory field. See also code list order item types. Only product, product-set, service or discount-coupon item type is allowed.

data.​codestring[ 1 .. 64 ] characters

Item code. For transportation, payment and discounts the (discount-coupon and volume-discount) must remain null, for the other types of items, this is mandatory.

data.​vatRatestring

VAT rate (0.00 for VAT non-payers). Mandatory.

data.​itemPriceWithVatstring

Item price, including VAT. Optional. Price including tax and price excluding tax cannot be combined.

data.​itemPriceWithoutVatstring

Item price, excluding VAT. Optional. Price including tax and price excluding tax cannot be combined.

data.​buyPriceWithVatstring

Purchase price, including VAT. Optional. Price including tax and price excluding tax cannot be combined. This is used for profit margin calculation and statistics.

data.​buyPriceWithoutVatstring

Purchase price, excluding VAT. Optional. Price including tax and price excluding tax cannot be combined. This is used for profit margin calculation and statistics.

data.​buyPriceVatRatestring

VAT rate for purchase price. Optional.

data.​namestring[ 1 .. 250 ] characters

Product name (optional, but usually filled in). Mandatory only for transport and payment, for other items, it is loaded according to code.

data.​variantNamestring or null[ 1 .. 128 ] characters

Variant name. Optional.

data.​brandstring or null[ 1 .. 64 ] characters

brand (manufacturer). Optional.

data.​supplierNamestring or null[ 1 .. 255 ] characters

supplier. Optional.

data.​productGuidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Product GUID in item. When used with the ?suppressProductChecking=true parameter, this field has no influence.

data.​remarkstring or nullnon-empty

With cubicles

data.​warrantyDescriptionstring or null[ 1 .. 255 ] characters

textual description of warranty length (can be null)

data.​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$

quantity of completed product

data.​additionalFieldstring or null[ 1 .. 255 ] characters

additional information. Used for transport to specify the branch.

data.​amountstring^[0-9]+\.?[0-9]{0,3}$

amount, 3 decimal places accuracy, optional, default value 1.000.

data.​amountUnitstring[ 1 .. 16 ] characters

unit of quantity (optional)

data.​weightstring

product weight in kilograms. Maximum 3 decimal places, and maximum value of 99999.

data.​priceRatiostring

discount in the form of coefficient (0.7 = 70 % of the original price, i.e. 30 % discount). Optional, default value is 1.0000

data.​recyclingFeeIdinteger or null

Product recycling fee id, replacement for recyclingFee

data.​statusIdnumber

Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the Change status of items in the order flag set, then the item will have this status. Otherwise the default status of the e-shop is used.

curl -i -X PATCH \
  'https://api.myshoptet.com/api/orders/{code}/item/{id}?suppressProductGuidCheck=false' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "itemType": "product",
      "code": "179/B",
      "vatRate": "21.00",
      "itemPriceWithVat": "121.00",
      "itemPriceWithoutVat": "100.00",
      "buyPriceWithVat": "121.00",
      "buyPriceWithoutVat": "100.00",
      "buyPriceVatRate": "21.00",
      "name": "Large chocolate",
      "variantName": "Type: walnut",
      "brand": "Willy Wonka",
      "supplierName": "Dodavatel s.r.o.",
      "productGuid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "remark": "This is a gift for my friend.",
      "warrantyDescription": "2 years",
      "amountCompleted": "1.000",
      "additionalField": "TO BALÍKOVNA, Karlínské náměstí 145/1, Karlín, 18600, Prague",
      "amount": "1.000",
      "amountUnit": "ks",
      "weight": "100",
      "priceRatio": "0.7000",
      "recyclingFeeId": 1,
      "statusId": -1
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderItemobject(orderItem)required
data.​orderItem.​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​orderItem.​codestring or nullrequired

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.​orderItem.​eanstring or nullrequired

EAN of the product variant (can be null)

data.​orderItem.​itemTypestringrequired
data.​orderItem.​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​orderItem.​namestringrequired

Product name, with possible addition (Free Gift)

data.​orderItem.​variantNamestring or nullrequired

variant name (can be null)

data.​orderItem.​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​orderItem.​remarkstring or nullrequired

remark

data.​orderItem.​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​orderItem.​additionalFieldstring or nullrequired

additional field for remarks

data.​orderItem.​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​orderItem.​amountUnitstring or nullrequired

product unit of quantity

data.​orderItem.​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​orderItem.​statusobjectrequired
data.​orderItem.​status.​namestring or nullrequired

order item status description (can be null)

data.​orderItem.​status.​idnumberrequired

identifier of order item status

data.​orderItem.​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​orderItem.​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​orderItem.​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​orderItem.​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​orderItem.​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​orderItem.​displayPricesArray of objects(itemPrice)
data.​orderItem.​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​orderItem.​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​orderItem.​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​orderItem.​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​orderItem.​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​orderItem.​mainImageobject or null
data.​orderItem.​stockLocationstring or null

position in stock (can be null)

data.​orderItem.​supplierNamestring or null

product supplier (can be null)

data.​orderItem.​itemIdnumberrequired

order item identifier

data.​orderItem.​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​orderItem.​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​orderItem.​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​orderItem.​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​orderItem.​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​orderItem.​productFlagsArray of objects(productFlags)

list of product flags

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "orderItem": {} }, "errors": [ {} ] }

Order item delete

Request

Path
codestringrequired

order code (number)

Example: 2018000012
idstringrequired

order item id. Can be found in field data.order.items.itemId in Order detail. (number)

Example: 198
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X DELETE \
  'https://api.myshoptet.com/api/orders/{code}/item/{id}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
datanullrequired
errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": null, "errors": [ {} ] }

Order item surcharge parameters insertion

Request

There is possibility to edit surcharge parameters related to order item. For that purpose, there is in get order item detail endpoint attribute specificSurchargeParameters which returned adjusted surcharge parameters data (see order item detail endpoint)

This mean that surchargeParameters attribute in order detail is persistent and any adjustment in surcharge parameters appears in specificSurchargeParameters

This endpoint purpose is to add surcharge parameter in relation within order item.

You have to send one of attributes parameterCode with valueIndex or name. Cant send this attributes together.

If you post parameterCode and valueIndex, there will be validation, if surcharge parameter exits and if can be related

to order item's product and price (if not send) will be added from surcharge parameter itself.

Otherwise you can send attribute name instead, which could have any form, but has to be unique. If price is not send,

than it will be set to 0.00.

Path
codestringrequired

order code

Example: 2018000012
idnumberrequired

order item id

Example: 3120
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobject or objectrequired
One of:
data.​parameterCodestringrequired

Code of the parameter

data.​valueIndexstringrequired

Index of the value

data.​pricestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

custom price for surcharge parameter, price is in currency of order. Optional. If attribute price is not present, then price from surcharge parameter itself is used.

curl -i -X POST \
  'https://api.myshoptet.com/api/orders/{code}/item/{id}/surcharge-parameters' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "parameterCode": "pp-1",
      "valueIndex": "hodnota-01",
      "price": "21.00"
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

Order item surcharge parameters deletion

Request

You have to provide dynamically generated relationId which identify which surcharge parameter related to order item you want to delete.

Path
codestringrequired

order code

Example: 2018000012
idnumberrequired

order item id

Example: 3120
relationIdstringrequired

key to identify, which surcharge parameter in relation to order item, should be delete

Example: 04e876
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X DELETE \
  'https://api.myshoptet.com/api/orders/{code}/item/{id}/surcharge-parameters/{relationId}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
datanullrequired
errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": null, "errors": [ {} ] }

Order payment add

Request

Path
codestringrequired

order code

Example: 2018000079
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectrequired
data.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

Guid of payment method.

data.​vatRatestringrequired

VAT rate (0.00 for VAT non-payers).

data.​itemPriceWithVatstring

Item price, including VAT. Optional. Price including tax and price excluding tax cannot be combined.

data.​itemPriceWithoutVatstring

Item price, excluding VAT. Price including tax and price excluding tax cannot be combined.

data.​additionalFieldstring or null[ 1 .. 255 ] characters

additional information.

data.​statusIdnumber

Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the Change status of items in the order flag set, then the item will have this status. Otherwise the default status of the e-shop is used.

curl -i -X POST \
  'https://api.myshoptet.com/api/orders/{code}/payment' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "vatRate": "string",
      "itemPriceWithVat": "121.00",
      "itemPriceWithoutVat": "100.00",
      "additionalField": "Payment information",
      "statusId": -1
    }
  }'

Responses

Created

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

Order payment update

Request

Path
codestringrequired

order code

Example: 2018000079
idnumberrequired

id of order item

Example: 1
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectnon-emptyrequired
data.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Guid of payment method.

data.​vatRatestring

VAT rate (0.00 for VAT non-payers).

data.​itemPriceWithVatstring

Item price, including VAT. Optional. Price including tax and price excluding tax cannot be combined.

data.​itemPriceWithoutVatstring

Item price, excluding VAT. Price including tax and price excluding tax cannot be combined.

data.​additionalFieldstring or null[ 1 .. 255 ] characters

additional information.

data.​statusIdnumber

Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the Change status of items in the order flag set, then the item will have this status. Otherwise the default status of the e-shop is used.

curl -i -X PATCH \
  'https://api.myshoptet.com/api/orders/{code}/payment/{id}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "vatRate": "string",
      "itemPriceWithVat": "121.00",
      "itemPriceWithoutVat": "100.00",
      "additionalField": "Payment information",
      "statusId": -1
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderItemobject(orderItem)required
data.​orderItem.​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​orderItem.​codestring or nullrequired

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.​orderItem.​eanstring or nullrequired

EAN of the product variant (can be null)

data.​orderItem.​itemTypestringrequired
data.​orderItem.​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​orderItem.​namestringrequired

Product name, with possible addition (Free Gift)

data.​orderItem.​variantNamestring or nullrequired

variant name (can be null)

data.​orderItem.​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​orderItem.​remarkstring or nullrequired

remark

data.​orderItem.​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​orderItem.​additionalFieldstring or nullrequired

additional field for remarks

data.​orderItem.​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​orderItem.​amountUnitstring or nullrequired

product unit of quantity

data.​orderItem.​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​orderItem.​statusobjectrequired
data.​orderItem.​status.​namestring or nullrequired

order item status description (can be null)

data.​orderItem.​status.​idnumberrequired

identifier of order item status

data.​orderItem.​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​orderItem.​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​orderItem.​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​orderItem.​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​orderItem.​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​orderItem.​displayPricesArray of objects(itemPrice)
data.​orderItem.​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​orderItem.​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​orderItem.​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​orderItem.​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​orderItem.​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​orderItem.​mainImageobject or null
data.​orderItem.​stockLocationstring or null

position in stock (can be null)

data.​orderItem.​supplierNamestring or null

product supplier (can be null)

data.​orderItem.​itemIdnumberrequired

order item identifier

data.​orderItem.​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​orderItem.​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​orderItem.​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​orderItem.​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​orderItem.​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​orderItem.​productFlagsArray of objects(productFlags)

list of product flags

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "orderItem": {} }, "errors": [ {} ] }

Order shipping add

Request

Path
codestringrequired

order code

Example: 2018000079
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectrequired
data.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

Guid of shipping method.

data.​vatRatestringrequired

VAT rate (0.00 for VAT non-payers).

data.​itemPriceWithVatstring

Item price, including VAT. Price including tax and price excluding tax cannot be combined.

data.​itemPriceWithoutVatstring

Item price, excluding VAT. Price including tax and price excluding tax cannot be combined.

data.​additionalFieldstring or null[ 1 .. 255 ] characters

In case of pickup, given value must be a unique identificator of pickup place. You can find these identificators on website of delivery company. In case of other delivery type (e.g. home delivery) it works as a note.

data.​statusIdnumber

Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the Change status of items in the order flag set, then the item will have this status. Otherwise the default status of the e-shop is used.

curl -i -X POST \
  'https://api.myshoptet.com/api/orders/{code}/shipping' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "vatRate": "string",
      "itemPriceWithVat": "121.00",
      "itemPriceWithoutVat": "100.00",
      "additionalField": "Home delivery",
      "statusId": -1
    }
  }'

Responses

Created

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

Order shipping update

Request

Path
codestringrequired

order code

Example: 2018000079
idnumberrequired

id of order item

Example: 1
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectnon-emptyrequired
data.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Guid of shipping method.

data.​vatRatestring

VAT rate (0.00 for VAT non-payers).

data.​itemPriceWithVatstring

Item price, including VAT. Price including tax and price excluding tax cannot be combined.

data.​itemPriceWithoutVatstring

Item price, excluding VAT. Price including tax and price excluding tax cannot be combined.

data.​additionalFieldstring or null[ 1 .. 255 ] characters

In case of pickup, given value must be a unique identificator of pickup place. You can find these identificators on website of delivery company. In case of other delivery type (e.g. home delivery) it works as a note.

data.​statusIdnumber

Order item status. Optional, if not indicated, default value is guided by the order status. If the order status was indicated and this status has the Change status of items in the order flag set, then the item will have this status. Otherwise the default status of the e-shop is used.

curl -i -X PATCH \
  'https://api.myshoptet.com/api/orders/{code}/shipping/{id}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "guid": "1b02cb8e-d7b5-11e0-9a5c-feab5ed617ed",
      "vatRate": "string",
      "itemPriceWithVat": "121.00",
      "itemPriceWithoutVat": "100.00",
      "additionalField": "Home delivery",
      "statusId": -1
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderItemobject(orderItem)required
data.​orderItem.​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​orderItem.​codestring or nullrequired

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.​orderItem.​eanstring or nullrequired

EAN of the product variant (can be null)

data.​orderItem.​itemTypestringrequired
data.​orderItem.​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​orderItem.​namestringrequired

Product name, with possible addition (Free Gift)

data.​orderItem.​variantNamestring or nullrequired

variant name (can be null)

data.​orderItem.​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​orderItem.​remarkstring or nullrequired

remark

data.​orderItem.​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​orderItem.​additionalFieldstring or nullrequired

additional field for remarks

data.​orderItem.​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​orderItem.​amountUnitstring or nullrequired

product unit of quantity

data.​orderItem.​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​orderItem.​statusobjectrequired
data.​orderItem.​status.​namestring or nullrequired

order item status description (can be null)

data.​orderItem.​status.​idnumberrequired

identifier of order item status

data.​orderItem.​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​orderItem.​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​orderItem.​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​orderItem.​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​orderItem.​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​orderItem.​displayPricesArray of objects(itemPrice)
data.​orderItem.​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​orderItem.​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​orderItem.​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​orderItem.​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​orderItem.​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​orderItem.​mainImageobject or null
data.​orderItem.​stockLocationstring or null

position in stock (can be null)

data.​orderItem.​supplierNamestring or null

product supplier (can be null)

data.​orderItem.​itemIdnumberrequired

order item identifier

data.​orderItem.​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​orderItem.​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​orderItem.​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​orderItem.​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​orderItem.​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​orderItem.​productFlagsArray of objects(productFlags)

list of product flags

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "orderItem": {} }, "errors": [ {} ] }

Download order as PDF

Request

You can request the order as PDF file, response will be as application/octet-stream. You can download pdf documents

only one-by-one for every e-shop. Parallel requests end with 423 Locked error.

Path
codestringrequired
Example: 2018000004
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  'https://api.myshoptet.com/api/orders/{code}/pdf' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": null, "errors": [ {} ] }

List of remarks for the order

Request

The endpoint shows the order history which is displayed in Shoptet administration in the

“History” tab, in the order detail. Thus they are the most important system actions that have affected the order (they cannot be

changed by the user) and then the notes added by the e-shop, primarily intended as messages between several employees,

which may be needed to coordinate the order processing (these can be entered and deleted by the user).

Path
codestringrequired

Order code

Example: 2018000067
Query
systemboolean

allows filtering only system/non-system remarks

Example: system=true
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  'https://api.myshoptet.com/api/orders/{code}/history?system=true' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderHistoryArray of objectsrequired
data.​orderHistory[].​idnumberrequired

order history identifier

data.​orderHistory[].​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

Creation time of the order history record.

data.​orderHistory[].​textstringrequired

Transaction Id at payment gateway side: GHJ36

data.​orderHistory[].​userobject or nullrequired

the user or system process that caused the change

data.​orderHistory[].​user.​idstringrequired

identification of change originator, either user’s e-mail, or system process identifier

data.​orderHistory[].​user.​namestringrequired

the user name or description of the system service that caused the change

data.​orderHistory[].​systembooleanrequired

flag, whether the remark is entered by Shoptet (system: true), by user, or by API (system: false)

data.​orderHistory[].​typestringrequired

Record type

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "orderHistory": [] }, "errors": [ {} ] }

Insertion of remark to order

Request

This endpoint may be used to add the user remark into the order history.

For example the payment gateway may give the payment identification at its side, or

add the remarks during the process of payment or order processing. The remarks

are displayed in administration, in the “History” tab, in the order detail,

together with main system changes of the order.

Path
codestringrequired
Example: 2018000012
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectrequired
data.​textstringrequired
data.​typestringnon-empty
curl -i -X POST \
  'https://api.myshoptet.com/api/orders/{code}/history' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "text": "Transported from Jičín, will be here on Wednesday",
      "type": "comment"
    }
  }'

Responses

Created

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobject
errorsArray of objects or null(Errors)
Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "data": "null" }, "errors": [ {} ] }

Delete order history item

Request

Delete order history item by primary key.

Path
codestringrequired

Order code

Example: 2018000067
idnumberrequired

ID of history item

Example: 4
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X DELETE \
  'https://api.myshoptet.com/api/orders/{code}/history/{id}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
datanullrequired
errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": null, "errors": [ {} ] }

Update remarks for the order

Request

The endpoint enables the remarks and additional fields (index 1 - 6) to be updated for the order. Within a call, the update

of more data can be called for.

The individual data object keys are not optional. Only the key values, which are included in the data object, will be updated.

If "customerRemark", "trackingNumber", "eshopRemark" have a value of NULL, the originally saved value will be deleted.

For additional fields ("additionalFields” key) only the fields included in this field are updated.

If the key value is "text" for NULL additional field, the originally saved text in this field will be deleted.

If the non-existing key is entered, or the call is erroneous in another way, no item is updated.

Please note that trackingNumber cannot be longer than 32 characters.

Please note that additionalField with index 1, 2 & 3 cannot be longer than 255 characters.

Path
codestringrequired
Example: 2018000012
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
curl -i -X PATCH \
  'https://api.myshoptet.com/api/orders/{code}/notes' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "customerRemark": "Deliver to mailing addres",
      "trackingNumber": "DR1234567890E",
      "additionalFields": [
        {
          "index": 1,
          "text": "Text of additional field no. 1"
        },
        {
          "index": 2,
          "text": "Text of additional field no. 2"
        },
        {
          "index": 3,
          "text": "Text of additional field no. 3"
        },
        {
          "index": 4,
          "text": "Text of additional field no. 4"
        },
        {
          "index": 5,
          "text": "Text of additional field no. 5"
        },
        {
          "index": 6,
          "text": "Text of additional field no. 6"
        }
      ],
      "eshopRemark": "In stock from 20.1. 2019"
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobject
errorsArray of objects or null(Errors)
Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "data": {} }, "errors": [ {} ] }

Update of order status

Request

The endpoint enables the order status, “paid” flag and payment method to be updated. This data must be set during a call.

All the fields to be updated are optional, but at least one has to be specified.

If the key value is "text" for NULL additional field, the originally saved text in this field will be deleted.

If a non-existing key is entered, or the call is erroneous in another way, no item is updated.

If you call the status setting within your request, which has "set the order as paid" in the definition, and at the same time you required

a change of paid to false, the order status will be carried out and the paid value set to false.

If the status definition includes sending an e-mail, such an e-mail will be sent. If not required, sending an e-mail can be suppressed with the

?suppressEmailSending=true parameter. Similarly, sending information SMS messages when the order is changed (if set) can be suppressed with the ?suppressSmsSending=true parameter. In analogy, if the status includes document generation (for example a proforma invoice), the document will be generated (if not existent). The generation can be suppressed with the ?suppressDocumentGeneration=true parameter.

This endpoint tries not to unnecessarily change the order status. If you try to set the status that the order already has, no change is done and no document is generated.

When calling the same requests in parallel, there is the risk that there may be concurrence and related actions may be executed twice. Therefore we recommend calling this request from one source only, in a serial manner.

Order status change might imply automatic documents (e. g. invoice) generation. In exceptional cases the generation might fail,

although the order status itself gets actually changed. In such case the API return status code 200 (OK), but in the data field

you can find the order details and in the errors array eventually details about the failed documents generation. The error

code is document-not-generated. Example of an error message:


"errors": [
    {
        "errorCode": "document-not-generated",
        "message": "Delivery note belonging to order \"2020000149\" was not created. Generating document code failed.",
        "instance": "2020000149"
    }
]

Path
codestringrequired
Example: 2018000012
Query
suppressDocumentGenerationstring

suppress the generation of linked documents.

Default "false"
Example: suppressDocumentGeneration=true
suppressEmailSendingstring

suppress sending the linked information e-mails.

Default "false"
Example: suppressEmailSending=true
suppressSmsSendingstring

suppress sending the linked information SMS messages.

Default "false"
Example: suppressSmsSending=true
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectnon-emptyrequired
data.​statusIdnumber

new order status. The order statuses are specific for each e-shopand it is possible to gain these from the endpoint E-shop info with the include=orderStatuses parameter

data.​paidboolean or null

paid flag

data.​billingMethodIdnumber
curl -i -X PATCH \
  'https://api.myshoptet.com/api/orders/{code}/status?suppressDocumentGeneration=false&suppressEmailSending=false&suppressSmsSending=false' \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "statusId": -1,
      "paid": true,
      "billingMethodId": 1
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​orderobjectrequired
data.​order.​codestringrequired

order number. Caution! This does not have to be just a number, it can also contain letters, a dash, etc.

data.​order.​guidstringrequired

global unique permanent order identifier (can be null for old orders)

data.​order.​externalCodestring or nullrequired

Identification of the order in external system (or null).

data.​order.​creationTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time, when the order was created. ISO 8601 format.

data.​order.​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time of the order's last change. ISO 8601 format.

data.​order.​emailstring or nullrequired

purchaser e-mail (can be null)

data.​order.​phonestring or nullrequired

purchaser phone number (can be null)

data.​order.​birthDatestring or null

customer's date of birth stated in the order

data.​order.​clientIPAddressstring or nullrequired

IP address of the client who made the order

data.​order.​customerGuidstring(typeGuidUnlimited)<= 36 charactersrequired

customer identifier, if the customer is registered in the e-shop (can be null)

data.​order.​cashDeskOrderbooleanrequired

flag, whether the order is from the cash desk (as opposed to the e-shop)

data.​order.​stockIdnumberrequired

identifier of the stock, from which the order was taken

data.​order.​addressesEqualbooleanrequired

flag, whether the delivery address is the same as the invoicing address

data.​order.​vatPayerbooleanrequired

Is the tradesman a VAT payer, when purchasing? (can be null, if this is unknown)

data.​order.​vatModestring or null
data.​order.​billingMethodobject(billingMethod)required
data.​order.​billingMethod.​idintegerrequired

unique identifier of billing method

data.​order.​billingMethod.​namestringrequired
data.​order.​paymentMethodobject(paymentMethod)required
data.​order.​paymentMethod.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

payment method identifier (can be null)

data.​order.​paymentMethod.​namestringrequired

description of payment method

data.​order.​shippingobject(shipping)required
data.​order.​shipping.​guidstring(typeGuid)<= 36 characters^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$required

transport type identifier

data.​order.​shipping.​namestringrequired

description of transport method (Czech post, PPL, in person..)

data.​order.​shippingDetailsobject or null
data.​order.​adminUrlstringrequired

URL to administration leading to order detail. URL keeps the administration language settings.

data.​order.​statusobject or nullrequired
data.​order.​status.​namestring or nullrequired

status name

data.​order.​status.​idnumberrequired

status identifier

data.​order.​sourceobject or null

source of the order

data.​order.​priceobject(price)required

price of the order

data.​order.​price.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​price.​toPaystring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

total price to pay

data.​order.​price.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​order.​price.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​price.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​price.​exchangeRatestring(typeExchangeRate)^[0-9]+\.[0-9]{8}$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.​partialPaymentAmountstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$

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.​partialPaymentTypestring

'percents' = partial payment as percentage from total price | 'absolute' = exact expression of partial payment in money

data.​order.​paidboolean or nullrequired

flag, whether the order was paid. In addition to true a false, can also be null, if the payment status is unknown.

data.​order.​billingAddressobject(billingAddress)required
data.​order.​billingAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​billingAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​billingAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​billingAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​billingAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​billingAddress.​districtstring or nullrequired

county (or null)

data.​order.​billingAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​billingAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​billingAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​billingAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​billingAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​billingAddress.​companyIdstring or nullrequired

Company registration number. (can be null)

data.​order.​billingAddress.​vatIdstring or nullrequired

VAT identification number. (can be null)

data.​order.​billingAddress.​vatIdValidationStatusany

Info, whether VAT ID has been verified, enum [unverified, verified, waiting]

Enum"unverified""verified""waiting"null
data.​order.​billingAddress.​taxIdstring or nullrequired

TAX identification number. For Czech address, taxId is same as vatId. (can be null)

data.​order.​deliveryAddressaddress (object) or nullrequired
One of:
data.​order.​deliveryAddress.​companystring or nullrequired

name of purchaser''s company (or null)

data.​order.​deliveryAddress.​fullNamestring or nullrequired

name of purchaser (or null)

data.​order.​deliveryAddress.​streetstring or nullrequired

street of purchaser (or null)

data.​order.​deliveryAddress.​houseNumberstring or nullrequired

street number (or null)

data.​order.​deliveryAddress.​citystring or nullrequired

city/town (village) (or null)

data.​order.​deliveryAddress.​districtstring or nullrequired

county (or null)

data.​order.​deliveryAddress.​additionalstring or nullrequired

additional address information (or null)

data.​order.​deliveryAddress.​zipstring or nullrequired

ZIP or postal code (or null)

data.​order.​deliveryAddress.​countryCodestring or nullrequired

tree-character ISO country code (ISO 4217)

data.​order.​deliveryAddress.​regionNamestring or nullrequired

region name (or null)

data.​order.​deliveryAddress.​regionShortcutstring or nullrequired

region abbreviation (or null)

data.​order.​onlinePaymentLinkstring or null

URL to online payment

data.​order.​languagestring

language code of the order

data.​order.​refererstring or null

which page (url) has the user come from

data.​order.​paymentMethodsArray of objects

all order payment methods

data.​order.​shippingsArray of objects

all order shippings

data.​order.​itemsArray of objects(orderItem)required

all order items

data.​order.​items[].​productGuidstring(typeGuidUnlimited)<= 36 charactersrequired

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 null)

data.​order.​items[].​codestring or nullrequired

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[].​eanstring or nullrequired

EAN of the product variant (can be null)

data.​order.​items[].​itemTypestringrequired
data.​order.​items[].​productTypestring or null

product type at the time of the order (product, product-set..). See also Product type code list (can be null).

data.​order.​items[].​namestringrequired

Product name, with possible addition (Free Gift)

data.​order.​items[].​variantNamestring or nullrequired

variant name (can be null)

data.​order.​items[].​brandstring or nullrequired

product brand (or manufacturer, possibly)

data.​order.​items[].​remarkstring or nullrequired

remark

data.​order.​items[].​weightstring(typeWeight)^[0-9]{1,6}\.[0-9]{3}$required

weight in kg, unpacked (can be null). 3 decimal places. Maximum value 999999.

data.​order.​items[].​additionalFieldstring or nullrequired

additional field for remarks

data.​order.​items[].​amountstring or null(typeAmount)^(-)?[0-9]+\.[0-9]{3}$required

product quantity

data.​order.​items[].​amountUnitstring or nullrequired

product unit of quantity

data.​order.​items[].​priceRatiostring(typePriceRatio)[0-9]+\.[0-9]{4}$required

price coefficient. This also represents a discount (discount 10 % means priceRatio = 0.9)

data.​order.​items[].​statusobjectrequired
data.​order.​items[].​status.​namestring or nullrequired

order item status description (can be null)

data.​order.​items[].​status.​idnumberrequired

identifier of order item status

data.​order.​items[].​itemPriceobject(itemPrice)required

the price of the item including the discount (priceRatio) and quantity (amount).

data.​order.​items[].​itemPrice.​withVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price including tax

data.​order.​items[].​itemPrice.​withoutVatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price excluding tax

data.​order.​items[].​itemPrice.​vatstring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

VAT value, two decimal places

data.​order.​items[].​itemPrice.​vatRatestring(typeVatRate)^[0-9]+\.[0-9]{2}$required

VAT rate

data.​order.​items[].​displayPricesArray of objects(itemPrice)
data.​order.​items[].​buyPriceobject(itemPrice)

purchase price of the item including the discount (priceRatio) and quantity (amount). (or possibly null)

data.​order.​items[].​recyclingFeeobject or null(recyclingFee)required

recycling fee including category and price (or possibly null).

data.​order.​items[].​recyclingFee.​categorystring(typeNonEmptyString)non-emptyrequired

Recycling fee category name.

data.​order.​items[].​recyclingFee.​feestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

Recycling fee.

data.​order.​items[].​recyclingFee.​unitany

Recycling fee unit.

Enum"pcs""kg"
data.​order.​items[].​mainImageobject or null
data.​order.​items[].​stockLocationstring or null

position in stock (can be null)

data.​order.​items[].​supplierNamestring or null

product supplier (can be null)

data.​order.​items[].​itemIdnumberrequired

order item identifier

data.​order.​items[].​warrantyDescriptionstring or nullrequired

textual description of warranty length (can be null)

data.​order.​items[].​amountCompletedstring or null(typePositiveAmount)^[0-9]+\.[0-9]{3}$required

quantity of completed product

data.​order.​items[].​surchargeParametersTextsArray of strings

DEPRECATED - list of custom surcharge parameters names

data.​order.​items[].​surchargeParametersArray of objects(itemSurchargeParameters)

items surcharge parameters, filled in order creation. Cannot be edited.

data.​order.​items[].​specificSurchargeParametersArray of objects(itemSpecificSurchargeParameters)

list of specific surcharge parameters for order item detail, created from surchargeParameters, but editable in order item detail in eshop administration or via order item detail surcharge-parameters endpoint.

data.​order.​items[].​productFlagsArray of objects(productFlags)

list of product flags

data.​order.​notesobject

order notes (only filled in on request if include=notes is listed)

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "order": {} }, "errors": [ {} ] }

List of order statuses

Request

Detailed information on order status within the e-shop.

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  https://api.myshoptet.com/api/orders/statuses \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​defaultStatusnumberrequired
data.​statusesArray of objectsrequired
data.​statuses[].​idnumberrequired

order status id

data.​statuses[].​namestringrequired

order status name

data.​statuses[].​systembooleanrequired

Is this the system status?

data.​statuses[].​ordernumberrequired

status order sequence in the administration

data.​statuses[].​markAsPaidbooleanrequired

Should the order be marked as paid in this status?

data.​statuses[].​colorstring or null

color of orders in this status

data.​statuses[].​backgroundColorstring or null

background of order in this status

data.​statuses[].​changeOrderItemsbooleanrequired

change status of the items in the order

data.​statuses[].​stockClaimResolvedbooleanrequired

stock demand resolved

data.​statuses[].​documentsobjectrequired
data.​statuses[].​documents.​generateProformaInvoicebooleanrequired

proforma invoice is generated in this status.

data.​statuses[].​documents.​generateInvoicebooleanrequired

tax document is generated in this status.

data.​statuses[].​documents.​generateDeliveryNotebooleanrequired

delivery note is generated in this status.

data.​statuses[].​documents.​generateProofPaymentboolean or nullrequired

proof of payment is generated in this status.

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "defaultStatus": 0, "statuses": [] }, "errors": [ {} ] }

List of order sources

Request

Detailed information on current possible order sources within the e-shop.

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  https://api.myshoptet.com/api/orders/sources \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​sourcesArray of objectsrequired
data.​sources[].​idnumberrequired

order source ID, it can also be negative

data.​sources[].​namestringrequired

The name of the order source.

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "sources": [] }, "errors": [ {} ] }

Last order changes

Request

The Endpoint is intended to determine the changes after you have loaded the complete list of orders and you need to know, if any of these has been changed (or deleted). Guaranteed history is 30 days, the older data are deleted progressively.

Each order in the log is only mentioned with its last change. For example, if the order was modified and then deleted, the log will only show information about its deletion.

Creation is considered as edit action. So, when there is a new item created, it will be displayed like edit action.

Endpoint supports pagination.

Query
fromstringrequired
Example: from=2018-05-28T14:17:00+02:00
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  'https://api.myshoptet.com/api/orders/changes?from=string' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​changesArray of objectsrequired
data.​changes[].​codestringrequired

identifier (number) of the order, which can be used to query about the details.

data.​changes[].​changeTimestring or null(typeDateTime)^[0-9]{4}-[01][0-9]-[0123][0-9]T[012][0-9]:[0...required

date and time when the event happened. ISO 8601 format (2017-12-12T22:08:01+0100).

data.​changes[].​changeTypestringrequired

type of event that happened with the entity. Possible values are following: add, edit, delete.

data.​paginatorobject(paginator)required
data.​paginator.​totalCountintegerrequired

total number of available records

data.​paginator.​pageintegerrequired

current page

data.​paginator.​pageCountintegerrequired

total available of pages

data.​paginator.​itemsOnPageintegerrequired

number of currently returned records

data.​paginator.​itemsPerPageintegerrequired

required number of records per page

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "changes": [], "paginator": {} }, "errors": [ {} ] }

Get order gifts list

Request

This endpoint allow get, add or delete order related gifts. Gifts is relation to product variant by its code identifier and is ordered by priority field

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  https://api.myshoptet.com/api/orders/gifts \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​itemsArray of objects(orderGift)required
data.​items[].​idintegerrequired

primary key of gift, should be used when delete gift

data.​items[].​codestringrequired

identifier of product variant, which will be added as a gift

data.​items[].​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​items[].​orderPricestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price which order total price should overcome. to add this gift

data.​items[].​includingVatbooleanrequired

flag, if price is including VAT

data.​items[].​priorityintegerrequired

define order

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "items": [] }, "errors": [ {} ] }

Add order gift at the end of the list

Request

Add order gift (product variant) at the end of the order gift list. Gift is defined by code.

code, orderPrice and currencyCode is required.

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectrequired
data.​codestringrequired

code od product variant

data.​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​orderPricestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price which order total price should overcome. to add this gift

data.​includingVatboolean

if true, orderPrice is including VAT

curl -i -X POST \
  https://api.myshoptet.com/api/orders/gifts \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "code": "0005",
      "currencyCode": "CZK",
      "orderPrice": "21.00",
      "includingVat": true
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​itemsArray of objects(orderGift)required
data.​items[].​idintegerrequired

primary key of gift, should be used when delete gift

data.​items[].​codestringrequired

identifier of product variant, which will be added as a gift

data.​items[].​currencyCodestring(typeCurrencyCode)^[a-zA-Z]{3}$required

currency code. List of available currencies within the e-shop can be found in endpoint GET /api/eshop.

data.​items[].​orderPricestring or null(typePrice)^(-)?[0-9]+\.[0-9]{2}$required

price which order total price should overcome. to add this gift

data.​items[].​includingVatbooleanrequired

flag, if price is including VAT

data.​items[].​priorityintegerrequired

define order

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "items": [] }, "errors": [ {} ] }

Delete order gift

Request

Delete order gift item by primary key.

Path
idnumberrequired

ID of gift

Example: 4
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X DELETE \
  'https://api.myshoptet.com/api/orders/gifts/{id}' \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
datanullrequired
errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": null, "errors": [ {} ] }

Get order gift settings

Request

There are order gift setting, which influence general behaviour.

  • The behavior of the gifts - set if gifts are dependent on each product or whole order (stock dependent/independent)
  • Offer to wholesale customers - define if customer with wholesale module have gifts offer available
  • Gift to whole order or each product
Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
curl -i -X GET \
  https://api.myshoptet.com/api/orders/gifts/settings \
  -H 'Content-Type: application/vnd.shoptet.v1.0' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​stockDependentbooleanrequired

define if gifts are dependent on each product or whole order, stock dependent/independent

data.​wholesaleGiftsEnabledbooleanrequired

define if customer with wholesale module have gifts offer available

data.​productGiftsstringrequired

set if gifts are dependent on each product or whole order, possible values are per-amount and `per-order

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "stockDependent": false, "wholesaleGiftsEnabled": true, "productGifts": "per-amount" }, "errors": [ {} ] }

Update order gift settings

Request

Method updates order gift settings. Every item in request body is optional, but at least one setting is required.

Headers
Content-Typestringrequired
Default application/vnd.shoptet.v1.0
Bodyapplication/vnd.shoptet.v1.0+json
dataobjectrequired
data.​stockDependentboolean

define if gifts are dependent on each product or whole order, stock dependent/independent

data.​wholesaleGiftsEnabledboolean

define if customer with wholesale module have gifts offer available

data.​productGiftsstring

set if gifts are dependent on each product or whole order, possible values are per-amount and `per-order

Enum"per-amount""per-order"
curl -i -X PATCH \
  https://api.myshoptet.com/api/orders/gifts/settings \
  -H 'Content-Type: application/vnd.shoptet.v1.0+json' \
  -H 'Shoptet-Access-Token: YOUR_API_KEY_HERE' \
  -d '{
    "data": {
      "stockDependent": false,
      "wholesaleGiftsEnabled": true,
      "productGifts": "per-amount"
    }
  }'

Responses

OK

Bodyapplication/vnd.shoptet.v1.0+json; charset=utf-8
dataobjectrequired
data.​stockDependentbooleanrequired

define if gifts are dependent on each product or whole order, stock dependent/independent

data.​wholesaleGiftsEnabledbooleanrequired

define if customer with wholesale module have gifts offer available

data.​productGiftsstringrequired

set if gifts are dependent on each product or whole order, possible values are per-amount and `per-order

errorsArray of objects or null(Errors)required
errors[].​errorCodestringrequired

Short text error identification

errors[].​messagestringrequired

Descriptive error message

errors[].​instancestringrequired

Identification of the entity referenced

Response
application/vnd.shoptet.v1.0+json; charset=utf-8
{ "data": { "stockDependent": false, "wholesaleGiftsEnabled": true, "productGifts": "per-amount" }, "errors": [ {} ] }

Invoices

Invoice endpoints are used for managing invoices in the e-shop.

Operations

Proforma invoices

Proforma invoice endpoints are used for managing proforma invoices in the e-shop.

The code (code) is the proforma invoice identifier. Although this is usually a number, it is necessary to take into account that this might also include

letters, a dash, etc.

Operations

Credit notes

Credit note endpoints are used for managing credit notes in the e-shop.

The code (code) is the credit note identifier. Although this is usually a number, it is necessary to take into account that this might also include

letters, a dash, etc.

Operations

Delivery notes

Delivery note endpoints are used for managing delivery notes in the e-shop.

The code (code) is the credit notes identifier. Although this is usually a number, it is necessary to take into account that this might also include

letters, a dash, etc.

Operations

Proof payments

The code (code) is the proof payments identifier. Although this is usually a number, it is necessary to take into account that this might also include letters, a dash, etc.

Operations

Stocks

Stock endpoints are used for managing stocks in the e-shop.

Operations

Suppliers

Supplier endpoints are used for managing suppliers in the e-shop.

Operations

Brands

Brand endpoints are used for managing brands in the e-shop.

Please note, the field code is deprecated - use indexName instead. Parameter code accepts both: guid string style, e.g. d467bfbe-4334-11ef-ad70-0242ac1f0005, and index name string style, e.g. willy-wonka. The index name string style is deprecated - use guid style.

Operations

Customers

Customer endpoints are used for managing customers in the e-shop.

Operations

Templates

In the last Shoptet version, it is not possible to change the e-shop design via API. However, it is possible to include HTML codes

into previously defined places. This enables the code or link to a file containing additional CSS styles or JavaScript codes to be entered.

The same functionality is now included within the e-shop administration (/admin/html-kody/, HTML code tab).

There are 3 possible locations, where HTML codes can be inserted:

  • common-header - the code will be inserted into each e-shop page header (<HEAD>)

  • common-footer - the code will be inserted into each e-shop page foot (before end </BODY>)

  • order-confirmed - the code will be inserted in the page confirming the order (the "thank you page")

The inserted codes may come from 3 sources, and they are included in the following order:

  1. Codes from addons (the addon defines HTML codes to be inserted for anybody, who installs the addon). If there are more of these, they are inserted progressively, the order cannot be relied upon.

  2. Codes entered via API. Each addon can insert only one code into each location. If there are more of these addons, the codes will be inserted progressively, one after another, the order cannot be relied upon.

  3. The code entered in the administration GUI (/admin/html-kody/, HTML code tab).

Operations

Payment gateways

API endpoints for integration of payment gateways.

If you are a Premium client, contact your Account or Onboarding manager. New payment gateway has to be approved by Shoptet and client needs to be familiar with the terms of payment in advance.

Operations

Webhooks

API endpoints for webhook servicing. It offers the possibility to read, add, change and delete the registered webhooks. Furthermore, it offers

a list of notifications about invoked webhooks and their status.

The webhooks are HTTP calls, which send HTTPs calls to registered subscribers if a specific event happens,

for example creating an order. Then the information, in JSON format, is delivered to the defined URL.


{
    "eshopId": 222651,
    "event": "order:create",
    "eventCreated": "2019-01-08T15:13:39+0100",
    "eventInstance": "2018000057"
}

The meaning of individual items:

  • eshopId - number of the e-shop, where the event happened

  • event - event which invoked the call (see code list Webhook event types)

  • eventCreated - accurate time, when the event happened

  • eventInstance - reference to a specified entity - according to the context, order number, invoice number, product GUID, etc.

For more information about the function of webhooks, see https://developers.shoptet.com/webhooks/.

Operations

Shipping methods

Shipping methods endpoints are used for managing shipping methods in the e-shop.

Operations

Shipping requests

Shipping requests endpoints are used for managing shipping requests in the e-shop.

Operations

Payment methods

Payment methods endpoints are used for managing payment methods in the e-shop.

Operations

Unsubscribed emails

This functionality allows you to manage a list of email addresses that opted out of receiving marketing communications in compliance with legal requirements, including the possibility of comparing any further mailings with this list to exclude opt-out contacts.

Operations

E-mail distribution lists

The functionality is subject to module activation Mass e-mailing within the e-shop. The addon using this endpoint must therefore have this module defined as dependency.

Operations

Discount coupons

Discount coupons endpoints are used for managing discount coupons in the e-shop.

Operations

X + Y discounts

X + Y discounts endpoints are used for managing X + Y discounts in the e-shop.

Operations

Articles

Article endpoints are used for managing articles in the e-shop.

Operations

Pages

Page endpoints are used for managing pages in the e-shop.

Operations

Discussions

Discussion endpoints are used for managing discussions in the e-shop.

Operations

Job endpoints

Job endpoints are used for managing asynchronous jobs in the e-shop.

Operations

Files

File endpoints are used for managing files in the e-shop.

Operations

System endpoints

This endpoints are used for obtaining information for endpoints in API.

Operations