# Shoptet API 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](https://www.shoptetpremium.cz/). 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:///action/ApiOAuthServer/getAccessToken` address with HTTP header `Authorization: Bearer `. 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 header`Shoptet-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 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. ### Leaky bucket We have also prepared more detailed rules for checking the efficiency of calling your integrations using a leaky bucket algorithm. We inform you about reaching the limits via headers `X-RateLimit-Bucket-Filling` (in every response), and `Retry-After` (only if bucket is fulfilled), e.g. ``` X-RateLimit-Bucket-Filling: 200/200 Retry-After: Mon, 01 Jul 2024 12:01:11 GMT ``` For more information, visit [API Rate limiter](https://developers.shoptet.com/api-rate-limiter/). ## 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. ## 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/json' \ '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/json' \ 'https://api.myshoptet.com/api/eshop' ``` Example of response: ``` HTTP/2 200 date: Fri, 13 Jul 2018 15:57:29 GMT content-type: application/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](https://developers.shoptet.com/asynchronous-requests/). Your request will be queued and you receive only job identification in the response. You will be notified using a [webhook](https://developers.shoptet.com/api/documentation/webhooks/) 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 [Job detail](#tag/jobs/getjobdetail) 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 header - see also [Deprecated header + Sunset](#section/basic-principles/deprecated-header-+-sunset). ## 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 a`Sunset` 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 [Locks](#section/basic-principles/locks) section. 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 upload For files upload, there are [Files](#tag/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](#section/code-lists/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) ```json "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 Value | Description -------- | --------- orig | original image (in the original resolution) big | big image (typically 1024x768 px) detail |image detail (typically 360x270 px) category | size for listing in category (typically 216x105 px) related | size for related products (typically 100x100 px) ## Product visibility Value | Description -------- | --------- hidden | Hide product visible | Show product blocked | Cannot be ordered show-registered | Show only to logged-in users block-unregistered | Do not allow order to logged-out users cash-desk-only | Show only in cash desk detail-only | Do not show e-shop navigation ## Product types Value | Description -------- | --------- product | Product bazar | Second-hand product service | Service gift-certificate | Gift (deprecated) product-set | Product set ## Types of order items Value | Description -------- | --------- product | Product bazar | Second-hand product service | Service shipping | Transportation billing | Payment method discount-coupon | Discount coupon volume-discount | Volume discount gift | Gift gift-certificate | Gift certificate generic-item | Non-specific item product-set | Product set product-set-item | Product set item deposit | Deposit ## Sorting of products in category Value | Description -------- | --------- default | Default most-selling | Most selling first cheapest | Cheapest first most-expensive | Most expensive first oldest | Oldest first newest | Newest first alphabetically | Alphabetically alphabetically-desc | Alphabetically, descending product-code | Per product code product-code-desc | Per product code, descending category-priority | Category priority category-priority-desc | Category priority, descending ## Webhook event types Value | Description | Identifier meaning -------- | --------- | --------- brand:create | Brand creation event | String (`code`) - brand unique code brand:update | Brand change event | String (`code`) - brand unique code brand:delete | Brand deleting event | String (`code`) - brand unique code category:create | Category creation event | String (`guid`) of product category category:update | Category change event | String (`guid`) of product category category:delete | Category deleting event | String (`guid`) of product category creditNote:create | Credit note creation event | Number (`code`) of credit note creditNote:delete | Credit note deleting event | Number (`code`) of credit note creditNote:update | Credit note change event | Number (`code`) of credit note customer:create | New customer was created | Customer GUID customer:update | Customer was updated. Throws `409 Conflict` when try to register simultaneously with `customer:disableOrders` or `customer:enableOrders` | Customer GUID customer:disableOrders | An event disabled the customer, and his future orders will be automatically cancelled. Throws `409 Conflict` when try to register simultaneously with `customer:update` | Customer GUID customer:enableOrders | An event enabled the customer's future orders. Throws `409 Conflict` when try to register simultaneously with `customer:update` | Customer GUID customer:import | Import of 1 and more customers was executed | Fixed string "customers" customer:delete | Customer was deleted | Customer GUID deliveryNote:create | Delivery note creation event | Number (`code`) of delivery note deliveryNote:delete | Delivery note deleting event | Number (`code`) of delivery note deliveryNote:update | Delivery note change event | Number (`code`) of delivery note discountCoupon:create | Discount coupon creating event | String (`code`) - discount coupon unique code discountCoupon:delete | Discount coupon deleting event | String (`code`) of discount coupon discountCoupon:update | Discount coupon updating event | String (`code`) - discount coupon unique code eshop:currencies | Currencies settings change event | ID of eshop eshop:billingInformation | Billing information (i.e. eshop billing address) change event | ID of eshop eshop:settingsInformation | Eshop settings change event. Whenever some attribute from `data.settings` response section of GET eshop detail change | ID of eshop eshop:design | Design settings (template, colors, fonts, layout) | ID of eshop eshop:mandatoryFields | Mandatory fields of customer were updated | ID of eshop eshop:projectDomain | Domain of eshop was changed | ID of eshop invoice:create | Invoice creation event | Number (`code`) of invoice invoice:delete | Invoice deleting event | Number (`code`) of invoice invoice:update | Invoice change event | Number (`code`) of invoice job:finished | The asynchronous request was finished | Job `id` mailingListEmail:create | E-mail addition event into the e-mail distribution list | Name (`code`) of e-mail distribution list mailingListEmail:delete | E-mail deleting event from the e-mail distribution list | Name (`code`) of e-mail distribution order:cancel | Order cancel event. Webhook is emitted when order status is set to `canceled`. Throws `409 Conflict` when try to register simultaneously with `order:update` | Number (`code`) of order order:create | Order creation event | Number (`code`) of order order:delete | Order deleting event | Number (`code`) of order order:update | Order change event. Throws `409 Conflict` when try to register simultaneously with `order:cancel` | Number (`code`) of order orderHistoryRemarks:change | Order history remarks have been changed. Emitted when order remark is created or deleted | Number (`code`) of order orderStatusesList:change | Order status list change event. Emitted when order status is created, updated or deleted | Order status `ID` paymentMethod:change | Payment method change event | Payment method GUID proformaInvoice:create | Proforma invoice creation event | Number (`code`) of proforma invoice proformaInvoice:delete | Proforma invoice deleting event | Number (`code`) of proforma invoice proformaInvoice:update | Proforma invoice change event | Number (`code`) of proforma invoice proofPayment:create | Proof of payment creation event | Number (`code`) of proof payment proofPayment:delete | Proof of payment deleting event | Number (`code`) of proof payment proofPayment:update | Proof of payment change event | Number (`code`) of proof payment quantityDiscount:create | Quantity discount creation event | ID of quantity discount quantityDiscount:update | Quantity discount change event | ID of quantity discount quantityDiscount:delete | Quantity discount deleting event | ID of quantity discount shippingMethod:change | Shipping method change event | Shipping method GUID shippingRequest:cancelled | Shipping request was not chosen for order delivery | `shippingRequestCode` associated with the cart shippingRequest:confirmed | Shipping request was chosen for order delivery | `shippingRequestCode` associated with the cart stock:movement | Stock change event | Stock 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](https://developers.shoptet.com/category/api/) for more info Value | Description | Identifier meaning -------- | --------- | --------- category:massCreate | Mass create of product categories event | Json serialized list of string (`guid`) of product categories category:massUpdate | Mass change of product categories event | Json serialized list of string (`guid`) of product categories category:massDelete | Mass delete of product categories event | Json serialized list of string (`guid`) of product categories discountCoupon:massCreate | Mass create of discount coupons event | Json serialized list of string (`code`) of discount coupons discountCoupon:massDelete | Mass delete of discount coupons event | Json serialized list of string (`code`) of discount coupons invoice:massUpdate | Mass change of invoices event | Json serialized list of number (`code`) of invoices order:massCreate | Mass create of orders event | Json serialized list of number (`code`) of orders order:massUpdate | Mass change of orders event | Json serialized list of number (`code`) of orders quantityDiscount:massDelete | Mass delete of quantity discount event | Json serialized list of quantity discounts IDs quantityDiscount:massUpdate | Mass change of quantity discount event | Json serialized list of quantity discounts IDs ### System Webhooks These webhooks cannot be registered via API, they are setup in Partners' Addon administration section instead. Value | Description ----- | ----------- addon:suspend | The addon was suspended by the eshop or by Shoptet operations staff addon:approve | The addon was approved (resumed) after it was suspended addon:terminate | The addon was terminated by the eshop or by Shoptet operations staff addon:uninstall | The addon was uninstalled by the eshop admin or the eshop was terminated ## URL address from endpoint Eshop info See endpoint [Eshop info](#tag/eshop/geteshopinfo) Ident | Description ------| ----- admin-orders-list | Listing of orders in administration admin-customers-list | List of customers in administration oauth | OAuth server address, used for [e-shop user verification](https://developers.shoptet.com/api/documentation/eshop-verification-using-oauth/) ## List of product catalogues Provider (identification) | Description ------| ----- glami | Glami google | Google heureka | Heuréka zbozi | Zboží.cz ## Invoice billing methods id | Description ------| ----- 1 | COD (cz: Dobírka) 2 | Wire transfer (cz: Převodem) 3 | Cash (cz: Hotově) 4 | Card (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](https://swagger.io/specification/) - openapi.yaml ) into your postman client ## Fork Shoptet API Collection from Shoptet Public API Workspace (recommended) See [Shoptet Public API Workspace](https://www.postman.com/shoptet-developers/shoptet-public-api-workspace). Also check postman documentation for more details: [Fork a collection](https://learning.postman.com/docs/collaborating-in-postman/using-version-control/forking-elements/). ### 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](https://github.com/shoptet/developers/blob/master/openapi/openapi.yaml) file from our developers [repository](https://github.com/shoptet/developers). - 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/). Version: 1.0.0 ## Servers ``` https://api.myshoptet.com ``` ## Security ### shoptetAccessToken Type: apiKey In: header Name: Shoptet-Access-Token ### shoptetPrivateApiToken Type: apiKey In: header Name: Shoptet-Private-Api-Token ## Download OpenAPI description [Shoptet API](https://api.docs.shoptet.com/_spec/Shoptet%20API/openapi.yaml) ## Orders Basic endpoints for managing orders. See the sections below for other specific actions. ### List of orders - [GET /api/orders](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getlistoforders.md): List of orders in e-shop and cash desks. Endpoint supports Paging. For default calls, it returns 50 orders, using the parameter , you can request up to 100 orders at a time. Temporarily disabled, only 50 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 () 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. Use request parameter to get the list of specific orders. Order codes are separated by a comma. If you use this query parameter, other filters are not applied, and the set of particular orders is returned. Please note that this parameter . ### Order insertion - [POST /api/orders](https://api.docs.shoptet.com/shoptet-api/openapi/orders/createorder.md): 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): Whether the field is mandatory, apart from the basic definition, also depends on whether the order was created via the cash desk () 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 ). When the order is created, it is checked, whether the e-shop includes products with the respective code (can be suppressed with GET parameter ), the products from the order are deducted from the stock (can be suppressed with the GET parameter ), documentation is created for the order (can be suppressed with the GET parameter ), a confirmation e-mail is sent (can be suppressed with the GET parameter ) and a webhook is executed for the new order. Parameters and 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 can be used to disable mandatory fields checks, but only for "historical" orders ( 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 and allow corresponding field ( and/or ) to be . In that case, if an billing/shipping item is provided in list, 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 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 ). 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 . We will internally convert it to the correct format to be compatible with eshop statistics calculations. Because of the conversion, the value of 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 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](https://developers.shoptet.com/api/documentation/creating-order/) 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 endpoint. - .. maxLength 10 characters - .. maxLength 100 characters - .. maxLength 32 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 18 characters - .. maxLength 16 characters - .. maxLength 16 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 32 characters - .. maxLength 250 characters - .. maxLength 128 characters - .. maxLength 64 characters - .. maxLength 255 characters - .. maxLength 64 characters - .. maxLength 255 characters - .. maxLength 16 characters ### List of all orders - [GET /api/orders/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getlistofallorders.md): 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 attribute) This endpoint has several sections, which are exported only when requested in the parameter (see Section on demand). Include parameter | Meaning --- | --- | Order remarks, including up to six additional fields, which can be freely used by e-shop for its individual needs. The field names can be defined in administration and this section returns their names. | Order images | Transport details | Position in the stock | Item surcharge parameters | Item product flags Use request parameter to get the list of specific orders. Order codes are separated by a comma. If you use this query parameter, other filters are not applied, and the set of particular orders is returned. Please note that this parameter . Result file is compressed using GZIP. ### Order detail - [GET /api/orders/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getorderdetail.md): This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Order remarks, including up to six additional fields, which can be freely used by e-shop for its individual needs. The field names can be defined in administration and this section returns their names. | Order images | Transport details | Position in the stock | Item surcharge parameters | Item product flags Returns the detail for one order. In the field, the individual items of the order, including transport and payment methods. The product name and variants, weight, manufacturer and similar items are copied into the order items when the order is made. Even though the products are changed later in the shop, the orders are not affected. item contains GUID of purchased product. If this is changed or deleted, the order is not affected. You have to take into account that does not have to refer to an existing product. The same goes for the item, containing the identification of a purchased variant or product. You have to take into account that when deleting the product or changing the of the product, the reference from the order is lost. In other words, you have to take into account the fact that the or do not have to refer to one of the currently existing products (variant). They may also be . In most cases the items in the response are the same as you can see in the administration of PDF printout of an order. There are however some advanced cases (in case of coupon discount with absolute value or in case of a volume discount and products with multiple VAT rates in the order), in which case they are different: - Administration and PDF will show multiple rows for the discount – for each VAT rate one row and the price field split evenly. - The API response will return only one row indicating the total price of the discount. The difference is based on how data is internally stored and presented. The API is bases more on internal storage principle, there is however also an array , which contains the presentation (printout) version of each item. If you state the parameter within the URL, the information about the main image for all products in the order will also be part of the response. For more information about access to images go to Product images. In the section, there is an information about shipping the order. is used for the identification of the carrier's branch and next fields are used for the detail of the branch (name, address, etc.). is used for the numeral identification of the carrier. Nowadays this field is used for Zasilkovna only and the value can be for Czech Zasilkovna or integer for Zasilkovna in the other countries. ### Order deletion - [DELETE /api/orders/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/orders/deleteorder.md) ### Order head change - [PATCH /api/orders/{code}/head](https://api.docs.shoptet.com/shoptet-api/openapi/orders/updateorderhead.md): You can change basic info (head) of order with this method. - .. maxLength 100 characters - .. maxLength 32 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 18 characters - .. maxLength 16 characters - .. maxLength 16 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters - .. maxLength 255 characters ### Download order as PDF - [GET /api/orders/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/orders/downloadorderaspdf.md): 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 error. ### Update remarks for the order - [PATCH /api/orders/{code}/notes](https://api.docs.shoptet.com/shoptet-api/openapi/orders/updateremarksfororder.md): 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 cannot be longer than 32 characters. Please note that with index 1, 2 & 3 cannot be longer than 255 characters. ### Update of order status - [PATCH /api/orders/{code}/status](https://api.docs.shoptet.com/shoptet-api/openapi/orders/updateorderstatus.md): 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 to , the order status will be carried out and the value set to . 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 parameter. Similarly, sending information SMS messages when the order is changed (if set) can be suppressed with the 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 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 field you can find the order details and in the array eventually details about the failed documents generation. The error code is . Example of an error message: ### Order copy - [POST /api/orders/{code}/copy](https://api.docs.shoptet.com/shoptet-api/openapi/orders/ordercopy.md): This endpoint allows you to copy a order identified by its code. You can choose scope in which will be the order copied. The scope can be - - copy the order with all its items - - copy the order without billing and shipping items - - copy the order without any items Please note, that copy order creates stock demand (if stock module is active and negative stock amount is not allowed) and if this demand overflows the stock, the order will be fully created with error . You can use parameter to include additional parts of response, same as in order detail, to retrieve more information about the copied order in copy response. ### List of order statuses - [GET /api/orders/statuses](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getlistoforderstatuses.md): Detailed information on order status within the e-shop. ### List of order sources - [GET /api/orders/sources](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getlistofordersources.md): Detailed information on current possible order sources within the e-shop. ### Last order changes - [GET /api/orders/changes](https://api.docs.shoptet.com/shoptet-api/openapi/orders/getlastorderchanges.md): 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. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging. ### Order BATCH insertion - [POST /api/orders/batch](https://api.docs.shoptet.com/shoptet-api/openapi/orders/orderbatchinsertion.md): This endpoint allows you to create multiple orders at once. Batch insertion is processed asynchronously in the same way as, for example, List of all orders, but it does not have in the response. Instead, you can check the attribute which contains successfully created orders and errors. See how Asynchronous requests work on our developer's portal. File with data for insert must be in JSONL (jsonlines) format. Each line must contain one order in JSON format. Maximum size of file is 100MB. The base structure of a JSON row contains 2 main parameters and . Default suppress params for each row can be defined in URL params same as in Order insertion endpoint above. In the parameter, you can modify suppress parameters for specific row/record. - - _true_ value is applied. - - _false_ value is applied. - _parameter is missing_ - The value from corresponding request parameter is used, if corresponding request parameter is not defined the value is set to . - : (, _optional_) - Suppress the generation of linked documents. - : (, _optional_) - Suppress sending the linked information e-mails. - : (, _optional_) - Suppress the product existence check as per code and GUID. - : (, _optional_) - Suppress deduction of the products from stock. - : (, _optional_) - Set the flag that disables mandatory fields checking. - : (, _optional_) - Set the flag that can be . - : (, _optional_) - Set the flag that can be . Structure of the parameter is the same as the structure of JSON for single order insertion above. * For better understanding, see the example of one record bellow ( _The example is formatted for better readability. For common use, it needs to be compressed on one line_): The asynchronous job processes the JSONL file row by row and tries to validate and save the data. If there is any error, the row is skipped and the error is logged, but it does not stop the processing of other rows. In the log, every order is identified by its position in the file (starting from 1). ## Order gifts Managing order gifts. ### Get order gifts list - [GET /api/orders/gifts](https://api.docs.shoptet.com/shoptet-api/openapi/order-gifts/getordergiftslist.md): This endpoint allow get, add or delete order related gifts. Gifts is relation to product variant by its identifier and is ordered by field ### Add order gift at the end of the list - [POST /api/orders/gifts](https://api.docs.shoptet.com/shoptet-api/openapi/order-gifts/addordergift.md): Add order gift (product variant) at the end of the order gift list. Gift is defined by . , and is required. ### Delete order gift - [DELETE /api/orders/gifts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/order-gifts/deleteordergift.md): Delete order gift item by primary key. ## Order history Managing order history. ### List of all remarks - [GET /api/orders/history/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/order-history/getlistofallremarks.md): Using this endpoint, you can get list of all remarks with detailed info of each remark asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each remark taking one line of output file. One remark in response has the same format as an item in List of remarks for order and is extended with field, which identifies the relation to the order. Use request parameter to get the list of specific orders remarks. Order codes are separated by a comma. Please note that this parameter . Result file is compressed using GZIP. ### List of remarks for the order - [GET /api/orders/{code}/history](https://api.docs.shoptet.com/shoptet-api/openapi/order-history/getlistofremarksfororder.md): 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). ### Insertion of remark to order - [POST /api/orders/{code}/history](https://api.docs.shoptet.com/shoptet-api/openapi/order-history/createorderremark.md): 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. ### Delete order history item - [DELETE /api/orders/{code}/history/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/order-history/deleteorderhistoryitem.md): Delete order history item by primary key. ## Order items Managing order items. ### Order item add - [POST /api/orders/{code}/item](https://api.docs.shoptet.com/shoptet-api/openapi/order-items/createorderitem.md) ### Order item change - [PATCH /api/orders/{code}/item/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/order-items/updateorderitem.md) ### Order item delete - [DELETE /api/orders/{code}/item/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/order-items/deleteorderitem.md) ### Order item surcharge parameters insertion - [POST /api/orders/{code}/item/{id}/surcharge-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/order-items/createorderitemsurchargeparameters.md): There is possibility to edit surcharge parameters related to order item. For that purpose, there is in get order item detail endpoint attribute which returned adjusted surcharge parameters data (see order item detail endpoint) This mean that attribute in order detail is persistent and any adjustment in surcharge parameters appears in This endpoint purpose is to add surcharge parameter in relation within order item. You have to send one of attributes with or . Cant send this attributes together. If you post and , 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 instead, which could have any form, but has to be unique. If price is not send, than it will be set to . ### Order item surcharge parameters deletion - [DELETE /api/orders/{code}/item/{id}/surcharge-parameters/{relationId}](https://api.docs.shoptet.com/shoptet-api/openapi/order-items/deleteorderitemsurchargeparameters.md): You have to provide dynamically generated which identify which surcharge parameter related to order item you want to delete. ## Order payment Managing order payment. ### Order payment add - [POST /api/orders/{code}/payment](https://api.docs.shoptet.com/shoptet-api/openapi/order-payment/createorderpayment.md) ### Order payment update - [PATCH /api/orders/{code}/payment/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/order-payment/updateorderpayment.md) ## Order shipping Managing order shipping. ### Order shipping add - [POST /api/orders/{code}/shipping](https://api.docs.shoptet.com/shoptet-api/openapi/order-shipping/addordershipping.md) ### Order shipping update - [PATCH /api/orders/{code}/shipping/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/order-shipping/updateordershipping.md) ## Credit notes 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. ### List of credit notes - [GET /api/credit-notes](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/getlistofcreditnotes.md): The list of credit notes supports Paging ### List of all credit notes - [GET /api/credit-notes/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/getlistofallcreditnotes.md): Additional information about one credit notes. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Credit note detail - [GET /api/credit-notes/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/getcreditnotedetail.md): Additional information about one credit note. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Credit note update - [PATCH /api/credit-notes/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/updatecreditnote.md) ### Credit note deletion - [DELETE /api/credit-notes/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/deletecreditnote.md) ### Credit note restock - [POST /api/credit-notes/{code}/restock](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/restockcreditnote.md): Restock items from credit note. ### Credit note from invoice creation - [POST /api/invoices/{code}/credit-note](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/createcreditnotefrominvoice.md): Creating credit note from existing invoice. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters It will create a credit note from the given invoice. It will automatically take all invoice items and add them to the credit note. If you want to add just some items from the invoice or different amount, use the parameter . This parameter will allow you to generate credit note only with provided items. ### Credit note from proof of payment - [POST /api/proof-payments/{code}/credit-note](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/createcreditnotefromproofofpayment.md): Creating credit note from existing proof of payment. It will create a credit note from the given proof of payment. It will automatically take all proof of payment items and add them to the credit note. ### Creation of credit note item - [POST /api/credit-notes/{code}/item](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/createcreditnoteitem.md): Creates a new credit note item to an existing credit note. ### Update of credit note item - [PATCH /api/credit-notes/{code}/item/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/updatecreditnoteitem.md): Updates credit note item. It's not possible to change property and it's not possible to update credit note item of another type then or . ### Deletion of credit note item - [DELETE /api/credit-notes/{code}/item/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/deletecreditnoteitem.md): Deletes credit note item. It's not possible to delete credit note item of another type then or . ### Download credit note as PDF - [GET /api/credit-notes/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/downloadcreditnotepdf.md): You can request the credit note 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 error. ### Download credit note as ISDOC - [GET /api/credit-notes/{code}/isdoc](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/downloadcreditnoteasisdoc.md): You can request the credit note as ISDOC file, response will be as application/octet-stream. You can download the documents only one-by-one for every e-shop. Parallel requests end with error. ### Last credit note changes - [GET /api/credit-notes/changes](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/getlastcreditnotechanges.md): Returns the list of credit notes, which were changed. The Endpoint is intended to determine the changes after you have loaded the list of credit notes and you need to know the changes. The guaranteed history of changes is 30 days. Each credit note is only given in the listing with its last change. For example, if the credit note was modified and then deleted, the listing will only show information about its deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging. ### Credit note from proof of payment - [POST /api/proof-payments/{code}/credit-note](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/createcreditnotefromproofofpayment.md): Creating credit note from existing proof of payment. It will create a credit note from the given proof of payment. It will automatically take all proof of payment items and add them to the credit note. ## 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. ### Credit note from proof of payment - [POST /api/proof-payments/{code}/credit-note](https://api.docs.shoptet.com/shoptet-api/openapi/credit-notes/createcreditnotefromproofofpayment.md): Creating credit note from existing proof of payment. It will create a credit note from the given proof of payment. It will automatically take all proof of payment items and add them to the credit note. ### List of proof payments - [GET /api/proof-payments](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/getlistofproofpayments.md): The list of proof payments supports Paging. ### Proof payment insertion - [POST /api/proof-payments](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/createproofpayment.md) ### Proof payment detail - [GET /api/proof-payments/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/getproofpaymentdetail.md): Additional information about one proof payment. ### Proof payment update - [PATCH /api/proof-payments/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/updateproofpayment.md): If the proof payment is closed, response code is returned and the document cannot be updated. Proof payment is closed if: - proof payment is/was linked to the invoice or - there is a manual lock of proof payment. ### Proof payment deletion - [DELETE /api/proof-payments/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/deleteproofpayment.md): If the proof payment is closed, response code is returned and the document cannot be deleted. Proof payment is closed if: - proof payment is/was linked to the invoice or - there is a manual lock of proof payment. ### List of all proof payments - [GET /api/proof-payments/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/getlistofallproofpayments.md): Using this endpoint, you can get list of all proof payments with detailed info of each proof payment (like in Proof payment Detail endpoint). Response will be in jsonlines format with each proof payment taking one line of output file. One proof payment in response has the same format as proof payment detail response. Result file is compressed using GZIP. ### Proof payment detail by order code - [GET /api/proof-payments/order/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/getproofpaymentdetailbyordercode.md) ### Proof payment insertion by order code - [POST /api/proof-payments/order/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/createproofpaymentbyordercode.md) ### Proof payment detail by proforma invoice code - [GET /api/proof-payments/proforma-invoice/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/getproofpaymentdetailbyproformainvoicecode.md) ### Proof payment insertion by proforma invoice code - [POST /api/proof-payments/proforma-invoice/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/createproofpaymentbyproformainvoicecode.md) ### Proof payment document settings - [POST /api/proof-payments/{code}/document-settings](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/proofpaymentdocumentsettings.md): Using this endpoint, you can unlink an invoice from a proof of payment. After successfully unlinking the invoice, the price of the linked invoice will be recalculated and increased by the price of the proof of payment. Linking of the invoice to the proof of payment is not possible at this endpoint. You can also close a proof of payment with this endpoint. You can open a proof of payment if it is not linked to any invoice. Otherwise, a response code 409 is returned and the document cannot be closed. Important note: If the document is closed, the invoice or proof of payment may have already been sent to the customer! ### Download proof of payment as PDF - [GET /api/proof-payments/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/downloadproofofpaymentpdf.md): You can request the proof of payment 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 error. ### Download proof payment as ISDOC - [GET /api/proof-payments/{code}/isdoc](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/downloadproofpaymentasisdoc.md): You can request the proof payment as ISDOC file, response will be as application/octet-stream. You can download the documents only one-by-one for every e-shop. Parallel requests end with error. ### Last proof payments changes - [GET /api/proof-payments/changes](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/getlastproofpaymentschanges.md): Returns the list of proof payments, which were changed. The Endpoint is intended to determine the changes after you have loaded the list of proof payments and you need to know the changes. The guaranteed history of changes is 30 days. Each proof payment is only given in the listing with its last change. For example, if the proof payment was modified and then deleted, the listing will only show information about its deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging ### Credit note from proof of payment - [POST /api/proof-payments/{code}/credit-note](https://api.docs.shoptet.com/shoptet-api/openapi/proof-payments/createcreditnotefromproofofpayment.md): Creating credit note from existing proof of payment. It will create a credit note from the given proof of payment. It will automatically take all proof of payment items and add them to the credit note. ## Delivery notes 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. ### List of delivery notes - [GET /api/delivery-notes](https://api.docs.shoptet.com/shoptet-api/openapi/delivery-notes/getlistofdeliverynotes.md): The list of delivery notes supports the Paging. ### List of all delivery notes - [GET /api/delivery-notes/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/delivery-notes/getlistofalldeliverynotes.md): Using this endpoint, you can get list of all delivery notes with detailed info of each delivery note (like in delivery Note Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One delivery note in response has the same format as delivery note detail response. ### Detail of delivery note - [GET /api/delivery-notes/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/delivery-notes/getdetailofdeliverynote.md): Additional information about one delivery note. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Download delivery note as PDF - [GET /api/delivery-notes/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/delivery-notes/downloaddeliverynoteaspdf.md): You can request the delivery note 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 error. ## Invoices Managing invoices in the e-shop. ### List of invoices - [GET /api/invoices](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getlistofinvoices.md): Returns the list of invoices with basic information. The list of invoices supports Paging The code () is the invoice identifier. Although this is usually a number, it is necessary to take into account that this might also include letters, a dash, etc. Filtering uses string comparison with >=, <= operators. ### List of all invoices - [GET /api/invoices/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getlistofallinvoices.md): Using this endpoint, you can get list of all invoices with detailed info of each invoice (like in Invoice Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One invoice in response has the same format as invoice detail response. Result file is compressed using GZIP. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Invoice detail - [GET /api/invoices/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getinvoicedetail.md): Detailed information about one invoice. In most cases the items in the response are the same as you can see in the administration of PDF printout of an invoice. 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 invoice), 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. - API response will return only one row indication the total discount price. The difference is based on how data is internally stored and presented. The API is bases more on internal storage principle, there is however also an array , which contains the presentation (printout) form of each item. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Invoice from order creation - [POST /api/orders/{code}/invoice](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/createinvoicefromorder.md): Creating invoice from existing order. ### Invoice from proforma invoice creation - [POST /api/proforma-invoices/{code}/invoice](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/createinvoicefromproformainvoice.md): Creating invoice from existing proforma invoice. ### Invoice link proforma invoices - [PATCH /api/invoices/{code}/link-proforma-invoice](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/invoicelinkproformainvoices.md): Linking proforma invoices to invoice. Proforma invoices must be related to the order, must be in same currency as the order, must be valid and cannot be linked to another invoice. Important note: this endpoint allowed only one proforma linked to the invoice at this time. Once is sunset, more proforma invoices will be allowed to link to the invoice. This endpoint has several sections, which are only sent when requested in the parameter (see Requested sections). Value | Section --------|------ | Item surcharge parameters ### Invoice link proof payments - [PATCH /api/invoices/{code}/link-proof-payment](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/invoicelinkproofpayments.md): Linking proof payments to invoice. Proof payments must be related to the order, must be in same currency as the order, must be valid and cannot be linked to another invoice. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Download invoice as PDF - [GET /api/invoices/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/downloadinvoiceaspdf.md): You can request the invoice 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 error. ### Download invoice as ISDOC - [GET /api/invoices/{code}/isdoc](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/downloadinvoiceasisdoc.md): You can request the invoice as ISDOC file, response will be as application/octet-stream. You can download the documents only one-by-one for every e-shop. Parallel requests end with error. ### Last invoice changes - [GET /api/invoices/changes](https://api.docs.shoptet.com/shoptet-api/openapi/invoices/getlastinvoicechanges.md): Returns the list of invoices, which were changed (added/changed or deleted). Endpoint is intended to determine the changes after you have loaded the complete list of invoices and you need to know if any of these was been changed (or deleted). Guaranteed history is 30 days, the older data are deleted progressively. Each invoice in the log is only mentioned with its last change. For example, if the invoice was modified and then deleted, the log will only show information about its deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging. ## Proforma invoices 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. ### List of proforma invoices - [GET /api/proforma-invoices](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getlistofproformainvoices.md): Returns the list of proforma invoices. Supports the Paging. ### List of all proforma invoices - [GET /api/proforma-invoices/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getlistofallproformainvoices.md): Using this endpoint, you can get list of all proforma invoices with detailed info of each invoice (like in Proforma Invoice Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One invoice in response has the same format as invoice detail response. Result file is compressed using GZIP. This endpoint has one section, which is only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Proforma invoice detail - [GET /api/proforma-invoices/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getproformainvoicedetail.md): Additional information about one proforma invoice. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand). Value | Section --------|------ | Item surcharge parameters ### Download proforma invoice as PDF - [GET /api/proforma-invoices/{code}/pdf](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/downloadproformainvoicepdf.md): You can request the proforma invoice 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 error. ### Last proforma invoice changes - [GET /api/proforma-invoices/changes](https://api.docs.shoptet.com/shoptet-api/openapi/proforma-invoices/getlastproformainvoicechanges.md): Returns the list of proforma invoices, which were changed. The Endpoint is intended to determine the changes after you have loaded the list of proforma invoices and you need to know the changes. The guaranteed history of changes is 30 days. Each proforma invoice is only given in the listing with its last change. For example, if the proforma invoices was modified and then deleted, the listing will only show information about its deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging ## Alternative products Managing alternative products. ### List of product alternative products - [GET /api/products/{guid}/alternativeProducts](https://api.docs.shoptet.com/shoptet-api/openapi/alternative-products/getlistofproductalternativeproducts.md): Returns list of alternative products related to product defined by , list is ordered by priority parameter. If option () is enabled, list of items will be enriched by items that has called product in own alternative table. ### Add alternative product - [POST /api/products/{guid}/alternativeProducts](https://api.docs.shoptet.com/shoptet-api/openapi/alternative-products/addalternativeproduct.md): This method add given product, defined with at the end of the alternative product list. After product is successfully saved, complete list of alternative product is returned in response. ### Set alternative products - [PUT /api/products/{guid}/alternativeProducts](https://api.docs.shoptet.com/shoptet-api/openapi/alternative-products/setalternativeproducts.md): This method set given products (minimum 0, maximum 50), defined with to the alternative product list. After product is successfully saved, complete list of alternative product is returned in response. ## Brands 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. ### List of brands - [GET /api/brands](https://api.docs.shoptet.com/shoptet-api/openapi/brands/getlistofbrands.md): Returns the list of brands. Supports the Paging ### Creation of brand - [POST /api/brands](https://api.docs.shoptet.com/shoptet-api/openapi/brands/createbrand.md) ### Detail of brand - [GET /api/brands/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/brands/getdetailofbrand.md) ### Update of brand - [PATCH /api/brands/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/brands/updatebrand.md) ### Deletion of brand - [DELETE /api/brands/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/brands/deletebrand.md): If the brand cannot be deleted, because it is used by some product, a 409 code is returned. Optional parameter with value allows deletion of brand used by products. ### BATCH creation of brands - [POST /api/brands/batch](https://api.docs.shoptet.com/shoptet-api/openapi/brands/createbrandbatch.md): This endpoint allows you to create multiple brands at once. Batch creation is processed asynchronously in same way as for example products snapshot, but it does not have in response. Instead, you can check attribute which contains successfully created brands and errors. See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. File with data for update must be in JSONL (jsonlines) format. Each line must contain one brand in JSON format. Maximum size of file is 100MB. Structure of JSON row is same as structure of JSON for single brand creation above. Asynchronous job process jsonl file row by row and try to validate and save data. If there is any error, row is skipped and error is logged, but it does not stop processing of other rows. In Log, every product is identified by its position in file (starting from 1). ## Price lists Price lists are used for setting up different prices for products for different customer groups. ### List of price lists - [GET /api/pricelists](https://api.docs.shoptet.com/shoptet-api/openapi/price-lists/getlistofpricelists.md): Listing of all price lists set up in e-shop. Does not contain the paging, always lists all price lists. ### Pricelist insertion - [POST /api/pricelists](https://api.docs.shoptet.com/shoptet-api/openapi/price-lists/createpricelist.md) ### Pricelist detail - [GET /api/pricelists/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/price-lists/getpricelistdetail.md): Price list detail with product prices (variants) and info on discounts and limitations of purchase (minimum and maximum price) ### Update pricelist - [PATCH /api/pricelists/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/price-lists/updatepricelist.md): This endpoint allows updating price fields and other attributes from a pricelist of a product (variant). You can request multiple updates at once; the maximum is 300 updates per request. The request must contain a product variant code and at least one of the , , , or objects. Send only fields you want to change, the others will stay untouched. Be aware of the difference between - not providing a field: the field will not be changed - providing e. g. will remove the price In case the request will be properly formatted, but an error occurs for one of the records, the correct records will be updated, the response will be and there will be records in the array for each failed record. If all records are incorrect, the response code will be instead. If you set or field, current data for product (or variant) will be recalculated. (even through untouched by your request) Object directly sets price of product, without recalculating. Object sets price of product, respecting it is price VAT and thus recalculating if needed. Object sets price of product, respecting it is price VAT and thus recalculating if needed. Note, that you can change only for default price list! For others price lists, value stays . For non-vat payer e-shops, and fields are forbidden to use and fields , and all works the same. In order to change the currency of the prices, you will need to have the Currencies module (Cizí měny) activated on the customer's e-shop. Note that if you change the currency code of the price list, all prices will not be recalculated to the new currency; only the currency code will be changed. ### Pricelist delete - [DELETE /api/pricelists/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/price-lists/deletepricelist.md): Deletion of pricelist can fail with error in case of running import. ### List of all price list details - [GET /api/pricelists/{id}/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/price-lists/getlistofallpricelistdetails.md): Using this endpoint, you can get list of all price list details with information on each price (like in Price list Detail endpoint) asynchronously. See how Asynchronous requests work on our developer’s portal. Response will be in jsonlines format with each product taking one line of output file. One price list in response has the same format as price list detail response. Result file is compressed using GZIP. ## Products Managing products in the e-shop and also its related modules. ### List of products - [GET /api/products](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlistofproducts.md): Returns the list of products - only basic info and GUID, using this you can determine the details with another API call. Endpoint supports Paging. This endpoint has several sections, which are sent only when requested in the parameter (see Section on demand. If you state the parameter within the URL, then information about main product image will also be part of the response. For more information about the chapter Product images. Please note it is better to use List of all products endpoint for getting all products from eshop. Use or request parameter to get the list of specific products. Product codes/GUIDs are separated by a comma. If you use this query parameter, other filters are not applied, and the set of particular products is returned. Please note that these parameters and cannot be combined. ### Product insertion - [POST /api/products](https://api.docs.shoptet.com/shoptet-api/openapi/products/createproduct.md): This endpoint allows you to insert products into Shoptet. You can use it for an import from an external system. Request is sent in JSON format in its body. For detailed description of items, which can be provided, see the right-most pane, section "Request" » "Attributes". When creating product without variants, add one variant to array and it will be created as product without variants, but with values specified in the . When creating product with multiple variants, you must specify which are different in each variant (variant A with color black and size XXL and variant B with color yellow and size XXL is correct, but two variants with color black and size XXL is not correct). Also, must be unique in a variant (variant A with color black and color white is not correct). ### Product copy - [POST /api/products/{guid}/copy](https://api.docs.shoptet.com/shoptet-api/openapi/products/productcopy.md): This endpoint allows you to copy a product identified by a GUID. The new product will have the same attributes as the original product. Many settings can be copied from the original product,but some settings require an active module. See the details below. By default, all parameters are copied and set to true unless specified otherwise. If you only want to copy certain parameters, select those you want to copy and set the others to false. If you wish to copy all parameters, you don't need to include them in the request list at all. Important note: If you previously had any active modules (such as Heureka, Seznam, GlobalSaleVat) that are no longer active, the resulting data may differ slightly because data requiring an active module will not be copied in this case. ### List of all products - [GET /api/products/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlistofallproducts.md): Using this endpoint, you can get list of all products with detailed info of each product (like in Product Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One product in response has the same format as product detail response (in attribute) This endpoint has several sections, which are exported only when requested in the parameter (see Section on demand). Include parameter | Meaning --- | --- images | Export will also contain the list of all product images. For more information about the chapter Product images. variantParameters | Export will also contain a field of variant parameters and a variant description, as they are visible to customers. allCategories | Export will also contain information on all the categories that the product was assigned into flags | Details on product designation descriptiveParameters | Export will also contain descriptive parameters of the product measureUnit | Export will also contain measure unit info of every variant. surchargeParameters | Export will also contain surcharge parameters of the product. setItems | Export will also contain items, products, in set. filteringParameters | Export will also contain filtering parameters of the product. recyclingFee | Export will also contain recycling fee. consumptionTax | Export will also contain consumption tax. Requires the "Consumption tax" module to be enabled on the current e-shop. warranty | Export will also contain product warranty. sortVariants | Product variants will be sorted as in administration. gifts | List of gifts (variants) related to product alternativeProducts | The response will also contain alternative products. relatedProducts | The response will also contain related products. relatedVideos | The response will also contain related videos. relatedFiles | The response will also contain related files. perStockAmounts | The response will also contain amounts/claims per individual stocks. Requires the "stock" module to be enabled on the current e-shop. perPricelistPrices | The response will also contain prices per individual price lists. Use or request parameter to get the list of specific products. Product codes/GUIDs are separated by a comma. If you use this query parameter, other filters are not applied, and the set of particular products is returned. Please note that these parameters and cannot be combined. Result file is compressed using GZIP. ### List of all products and pricelist prices - [GET /api/products/snapshot/pricelists](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlistofallproductsandpricelistprices.md): Using this endpoint, you can get list of all products with basic data such as product guid, id, code and its prices across all pricelists. Response will be in jsonlines format with each product taking one line of output file. Result file is compressed using GZIP. ### Product detail - [GET /api/products/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/products/getproductdetail.md): Returns detailed information about one product. The product includes the variant field. In case the product comes in variants, the field contains all the available variants. If the product does not have any variants, it contains only one variant with product information. This endpoint has several sections, which are sent only when requested in the parameter (see Section on demand). Include parameter | Meaning --- | --- images | The response will also contain the list of all product images. For more information about the chapter Product images. variantParameters | The response will also contain a field of variant parameters and a variant description, as they are visible to customers. allCategories | The response will also contain information on all the categories that the product was assigned into flags | Details on product designation descriptiveParameters | The response will also contain descriptive parameters of the product measureUnit | The response will also contain measure unit info of every variant. surchargeParameters | The response will also contain surcharge parameters of the product. setItems | The response will also contain items, products, in set. filteringParameters | The response will also contain filtering parameters of the product. recyclingFee | The response will also contain recycling fee. consumptionTax | The response will also contain consumption tax. Requires the "Consumption tax" module to be enabled on the current e-shop. warranty | The response will also contain product warranty. sortVariants | Product variants will be sorted as in administration. gifts | Product gifts, will be sorted as in administration alternativeProducts | The response will also contain alternative products. relatedProducts | The response will also contain related products. relatedVideos | The response will also contain related videos. relatedFiles | The response will also contain related files. perStockAmounts | The response will also contain amounts/claims per individual stocks. Requires the "stock" module to be enabled on the current e-shop. perPricelistPrices | The response will also contain prices per individual price lists. ### Product update - [PATCH /api/products/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/products/updateproduct.md): Allows you to change a product, which is identified by the guid. This endpoint allows you to update products in Shoptet. Request is sent in JSON format in its body. For detailed description of items, which can be updated and their format, check the right-most pane, section "Request" » "Attributes" Product variant can be updated by specifying its . When is not specified or not existing, new variant will be created. If you want to change of variant, use to specify variant to be changed and for specifying new code. Field should contain ALL parameters that the edited variant should contain. That means, if you have for example "color:black" in variant and you specify only new parameter "size", parameter color will be deleted. ### Product deletion - [DELETE /api/products/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/products/deleteproduct.md): Deletes product as per entered . If successful, returns the code 200. If the product does not exist within the e-shop, a 404 code is returned. If the product cannot be deleted, because it is part of set or used as a gift to some product, a 409 code is returned. ### Product BATCH update - [PATCH /api/products/batch](https://api.docs.shoptet.com/shoptet-api/openapi/products/productbatchupdate.md): This endpoint allows you to update multiple products at once. Batch update is processed asynchronously in same way as for example products snapshot, but it does not have with products to download in response. Instead, you can check attribute which contains successfully updated products and errors. See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. File with data for update must be in JSONL (jsonlines) format. Each line must contain one product in JSON format. Maximum size of file is 100MB. Structure of JSON row is same as structure of JSON for single product update above. You can add one extra optional attribute "language" which defines language of updating product, so you are able to update multiple language attributes (i.e. "name", "description" etc.) of one product in one batch file. If language is not defined, default language of shop is used. Asynchronous job process jsonl file row by row and try to validate and save data. If there is any error, row is skipped and error is logged, but it does not stop processing of other rows. In Log, every product is identified by its position in file (starting from 1). ### Product detail by code - [GET /api/products/code/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/products/getproductdetailbycode.md): Retrieve details about one product. Optional sections can be requested using parameter The response format is the same as for Product detail endpoint. ### Product update by code - [PATCH /api/products/code/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/products/updateproductbycode.md): This endpoint allows you to update products identified by a product code in Shoptet. Request is sent in JSON format in its body. For detailed description of items, which can be updated and their format, check the right-most pane, section "Request" » "Attributes". Product variant can be updated by specifying its . When is not specified or not existing, new variant will be created. If you want to change of variant, use to specify variant to be changed and for specifying new code. Field should contain ALL parameters that the edited variant should contain. That means, if you have for example "color:black" in variant and you specify only new parameter "velikost", parameter color will be deleted. Please note that any product's variant can be edited by this endpoint, not only the one in url ### Product variant deletion - [DELETE /api/products/code/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/products/deleteproductvariant.md): Deletes product variant as per entered . If this is the last product variant, the entire product is deleted. If successful, returns the code 200. If the product variant does not exist within the e-shop, a 404 code is returned. If the product variant cannot be deleted, because it is part of set or used as a gift to some product, a 409 code is returned. ### Product related file link - [POST /api/products/{guid}/related-files](https://api.docs.shoptet.com/shoptet-api/openapi/products/createrelatedfilelink.md): Linking related file from temporary storage to product. ### Last product changes - [GET /api/products/changes](https://api.docs.shoptet.com/shoptet-api/openapi/products/getlastproductchanges.md): Returns the list of products, which were changed (added/edited or deleted). Endpoint is intended to determine the changes after you have loaded the complete list of products and you need to know if any of these have been changed. Guaranteed history is 30 days, older data are deleted progressively. Each product in the log is mentioned only with its last change. For example, if the product was modified and then deleted, the log will show only information about its deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging. Description of object attributes with information about changes: |Field | Causes product change | Notes. | |--------------------------------------|---------------------|---------------------------------------| |guid |Yes | | |type |Yes | | |visibility |Yes | | |creationTime |Yes | | |changeTime |Yes | | |shortDescription |Yes | | |description |Yes | | |metaDescription |Yes | | |name |Yes | | |internalNote |Yes | | |defaultCategory |Yes |Only category - product relation change| |defaultCategory.guid |No | | |defaultCategory.name |No | | |supplier |Yes |Only supplier - product relation change| |supplier.guid |No | | |supplier.name |No | | |brand |Yes |Only brand - product relation change | |brand.code |No | | |brand.name |No | | |categories |Yes |Only product - category relation | |categories.guid |No | | |categories.parentGuid |No | | |categories.name |No | | |url |Yes |Only for relative url. Domain change no| |flags |Yes | | |flags.code |No | | |flags.title |No | | |flags.dateFrom |Yes | | |flags.dateTo |Yes | | |variants |Yes | | |variants.code |Yes | | |variants.ean |Yes | | |variants.stock |no | | |variants.unit |yes | | |variants.weight |yes | | |variants.visible |yes | | |variants.minStockSupply |yes | | |variants.negativeStockAllowed |yes | | |variants.amountDecimalPlaces |yes | | |variants.price |yes | | |variants.includingVat |yes | | |variants.vatRate |yes | | |variants.currencyCode |yes | | |variants.actionPrice |yes | | |variants.commonPrice |yes | | |variants.manufacturerCode |yes | | |variants.pluCode |yes | | |variants.isbn |yes | | |variants.serialNo |yes | | |variants.mpn |yes | | |variants.availability |yes | | |variants.availabilityWhenSoldOut |yes | | |variants.image |yes | | |variants.parameters |yes | | |variants.name |yes | | |variants.measureUnit |yes | | |variants.measureUnit.measureAmount |yes | | |variants.measureUnit.measureUnitId |yes | | |variants.measureUnit.packagingAmount |yes | | |variants.measureUnit.packagingUnitId |yes | | |variants.measureUnit.measureUnitName |yes | | |variants.measureUnit.packagingUnitName|yes | | |variants.measureUnit.measurePrice |yes | | |variants.recyclingFee |yes | | |images |yes | | |images.name |yes | | |images.priority |yes | | |images.description |yes | | |images.changeTime |yes | | |images.seoName |yes | | |images.cdnName |yes | | |descriptiveParameters |yes | | |descriptiveParameters.name |yes | | |descriptiveParameters.value |yes | | |descriptiveParameters.description |yes | | |descriptiveParameters.priority |yes | | |surchargeParameters |no | | |surchargeParameters.code |no | | |surchargeParameters.name |no | | |surchargeParameters.displayName |no | | |surchargeParameters.description |no | | |surchargeParameters.priority |no | | |surchargeParameters.required |no | | |surchargeParameters.currency |no | | |surchargeParameters.includingVat |no | | |surchargeParameters.values |no | | |surchargeParameters.values.valueIndex |no | | |surchargeParameters.values.description|no | | |surchargeParameters.values.price |no | | |surchargeParameters.values.priority |no | | |surchargeParameters.values.visible |no | | |setItems |yes | | |setItems.guid |no | | |setItems.code |no | | |setItems.amount |no | | |filteringParameters |yes |Only relation | |filteringParameters.code |no | | |filteringParameters.name |no | | |filteringParameters.displayName |no | | |filteringParameters.description |no | | |filteringParameters.priority |yes | | |filteringParameters.googleMapping |no | | |filteringParameters.values |yes |Only relation | |filteringParameters.values.valueIndex |no | | |filteringParameters.values.name |no | | |filteringParameters.values.priority |no | | |filteringParameters.values.color |no | | |filteringParameters.values.image |no | | |warranty |yes |only relation | |warranty.inMonths |no | | |warranty.description |no | | ## Product availabilities ### List of products availabilities - [GET /api/products/availabilities](https://api.docs.shoptet.com/shoptet-api/openapi/product-availabilities/getlistofproductsavailabilities.md): Returns the list of product availabilities within the e-shop and default availabilities ids. ### Product availability creation - [POST /api/products/availabilities](https://api.docs.shoptet.com/shoptet-api/openapi/product-availabilities/createproductavailability.md): Creates a new product availability. ### Update of product availability - [PATCH /api/products/availabilities/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/product-availabilities/updateproductavailability.md): Updates a product availability. ### Deletion of product availability - [DELETE /api/products/availabilities/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/product-availabilities/deleteproductavailability.md): Deletes a product availability. ## Product gifts Managing product gifts. ### List of product gifts - [GET /api/products/{guid}/gifts](https://api.docs.shoptet.com/shoptet-api/openapi/product-gifts/getlistofproductgifts.md): Returns list of gifts related (product variants) to product. ### Insertion gift product - [POST /api/products/{guid}/gifts](https://api.docs.shoptet.com/shoptet-api/openapi/product-gifts/createproductgift.md) ### Setting gifts to product - [PUT /api/products/{guid}/gifts](https://api.docs.shoptet.com/shoptet-api/openapi/product-gifts/stegiftstoproduct.md) ## Product images Managing product images. ### List of product images - [GET /api/products/{guid}/images/{gallery}](https://api.docs.shoptet.com/shoptet-api/openapi/product-images/getlistofproductimages.md): Returns list of product's images. Data from this endpoint and from product's detail endpoint (list named when using parameter) are the same. Use this endpoint when working only with product images to save time. ### Delete all product images in gallery - [DELETE /api/products/{guid}/images/{gallery}](https://api.docs.shoptet.com/shoptet-api/openapi/product-images/deleteallproductimagesingallery.md): Deletes all product's images by gallery name. If parameter is not present or set to and if image is referenced as variant image, then image will be skipped and present in in response. If is set to true, then this reference will be removed with the image. Returns status code. If any image deletion failed, it will be noted in section in response. ### Product images update - [PATCH /api/products/{guid}/images/{gallery}](https://api.docs.shoptet.com/shoptet-api/openapi/product-images/getproductimagesupdate.md): Using this endpoint you can modify product images attributes, such as description and priority (order). Maximum of 100 images can be sent at once. ### Product images insertion - [POST /api/products/{guid}/images/{gallery}](https://api.docs.shoptet.com/shoptet-api/openapi/product-images/createproductimages.md): Using this endpoint you can upload new images to a product. This is an asynchronous request, see how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. Maximum of 100 images can be sent at once. ### Product images source update - [PATCH /api/products/{guid}/images/{gallery}/source](https://api.docs.shoptet.com/shoptet-api/openapi/product-images/updateproductimagessource.md): Using this endpoint you can modify product image attributes and also upload a new image and replace the existing one. This is an asynchronous request, see how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. ### Delete one product image - [DELETE /api/products/{guid}/images/{gallery}/{imageName}](https://api.docs.shoptet.com/shoptet-api/openapi/product-images/deleteoneproductimage.md): Deletes product's image. If parameter is not present or set to and if image is referenced as variant image, then image won't be deleted and response will have status code . If is set to true, then this reference will be removed with the image. ## Product sets Managing product sets. ### Add item to product-set - [POST /api/products/{guid}/set](https://api.docs.shoptet.com/shoptet-api/openapi/product-sets/additemtoproductset.md): This method adding product defined by product variant to the bundle (product set). Product defined in url by , must be set as : . When successfully saved, complete list of products in the set is returned in response. It is not allowed to add a product of the type to an existing product set. ### Set product-set items - [PUT /api/products/{guid}/set](https://api.docs.shoptet.com/shoptet-api/openapi/product-sets/setproductsetitems.md): This method set given products (minimum 0, maximum 50), defined by product variant to the bundle of products (product-set). Product defined in url by , must be set as : . When successfully saved, complete list of products in the set is returned in response. It is not allowed to add a product of the type to an existing product set. ## Related products Managing related products. ### List of product related products - [GET /api/products/{guid}/relatedProducts](https://api.docs.shoptet.com/shoptet-api/openapi/related-products/getlistofproductrelatedproducts.md): Returns list of related products related to product defined by , list is ordered by priority parameter. If option () is enabled, list of items will be enriched by items that has called product in own related table. ### Add related product - [POST /api/products/{guid}/relatedProducts](https://api.docs.shoptet.com/shoptet-api/openapi/related-products/addrelatedproduct.md): This method add given product, defined with at the end of the related product list. After product is successfully saved, complete list of related product is returned in response. ### Set related products - [PUT /api/products/{guid}/relatedProducts](https://api.docs.shoptet.com/shoptet-api/openapi/related-products/setrelatedproducts.md): This method set given products (minimum 0, maximum 50), defined with to the related product list. After product is successfully saved, complete list of related product is returned in response. ## Customers Managing customers in the e-shop. ### List of customers - [GET /api/customers](https://api.docs.shoptet.com/shoptet-api/openapi/customers/getlistofcustomers.md): Listing of customers. Supports the Paging. ### Creation of customer - [POST /api/customers](https://api.docs.shoptet.com/shoptet-api/openapi/customers/createcustomer.md) ### List of all customers - [GET /api/customers/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/customers/getlistofallcustomers.md): Using this endpoint, you can get list of all customers with detailed info of each customer (like in Customer Detail endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One product in response has the same format as product detail response (in attribute) Result file is compressed using GZIP. ### Customer detail - [GET /api/customers/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/customers/getcustomerdetail.md): Additional information about one customer. ### Update of customer - [PATCH /api/customers/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/customers/updatecustomer.md) ### Deletion of customer - [DELETE /api/customers/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/customers/deletecustomer.md) ### Last customer changes - [GET /api/customers/changes](https://api.docs.shoptet.com/shoptet-api/openapi/customers/getlastcustomerchanges.md): Returns the list of customers who have been changed (added/changed or deleted). The Endpoint is intended to determine the changes after you have loaded the complete list of customers and you need to know, if any of these has been changed (or added or deleted). Guaranteed history is 30 days, the older data are deleted progressively. Each customer in the log is only mentioned with their last change. For example, if the customer was modified and then deleted, the log will only show information about the deletion. Can be filtered by changeType = edit/delete parameter. Creation is considered as action. So, when there is a new item created, it will be displayed like action. Endpoint supports Paging. ### List of customer regions - [GET /api/customers/regions](https://api.docs.shoptet.com/shoptet-api/openapi/customers/getlistofcustomerregions.md): Returns the list of customer regions. The regions are ordered by id. The list is not paginated. ### List of customer groups - [GET /api/customers/groups](https://api.docs.shoptet.com/shoptet-api/openapi/customers/getlistofcustomergroups.md): Returns list of customer groups ordered by priority. List is not paginated. ## Customer accounts Managing customer accounts. ### List of customer accounts - [GET /api/customers/{guid}/accounts](https://api.docs.shoptet.com/shoptet-api/openapi/customer-accounts/getlistofcustomeraccounts.md): List of customer accounts supports the Paging. ### Creation of customer account - [POST /api/customers/{guid}/accounts](https://api.docs.shoptet.com/shoptet-api/openapi/customer-accounts/createcustomeraccount.md) ### Detail of customer account - [GET /api/customers/{guid}/accounts/{accountGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-accounts/getdetailofcustomeraccount.md) ### Update of customer account - [PATCH /api/customers/{guid}/accounts/{accountGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-accounts/updatecustomeraccount.md) ### Deletion of customer account - [DELETE /api/customers/{guid}/accounts/{accountGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-accounts/deletecustomeraccount.md) ## Customer delivery addresses Managing customer delivery addresses. ### List of customer delivery addresses - [GET /api/customers/{guid}/delivery-addresses](https://api.docs.shoptet.com/shoptet-api/openapi/customer-delivery-addresses/gelistofcustomerdeliveryaddresses.md): List of customer delivery addresses, supports the Paging. ### Creation of delivery address - [POST /api/customers/{guid}/delivery-addresses](https://api.docs.shoptet.com/shoptet-api/openapi/customer-delivery-addresses/createdeliveryaddress.md) ### Detail of customer delivery address - [GET /api/customers/{guid}/delivery-addresses/{addressGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-delivery-addresses/getdetailofcustomerdeliveryaddress.md) ### Update of customer delivery address - [PATCH /api/customers/{guid}/delivery-addresses/{addressGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-delivery-addresses/updatecustomerdeliveryaddress.md) ### Deletion of customer delivery address - [DELETE /api/customers/{guid}/delivery-addresses/{addressGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-delivery-addresses/deletecustomerdeliveryaddress.md) ## Customer remarks Managing customer remarks. ### List of customer remarks - [GET /api/customers/{guid}/remarks](https://api.docs.shoptet.com/shoptet-api/openapi/customer-remarks/getlistofcustomerremarks.md): List of customer remarks, supports the Paging. ### Creation of customer remark - [POST /api/customers/{guid}/remarks](https://api.docs.shoptet.com/shoptet-api/openapi/customer-remarks/createcustomerremark.md) ### Detail of customer remark - [GET /api/customers/{guid}/remarks/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-remarks/getdetailofcustomerremark.md) ### Update of customer remark - [PATCH /api/customers/{guid}/remarks/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-remarks/updatecustomerremark.md) ### Deletion of customer remark - [DELETE /api/customers/{guid}/remarks/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/customer-remarks/deletecustomerremark.md) ## Articles Managing articles in the e-shop. ### List of articles - [GET /api/articles](https://api.docs.shoptet.com/shoptet-api/openapi/articles/getlistofarticles.md): Returns a list of articles with basic info. Supports Paging ### Insert of article - [POST /api/articles](https://api.docs.shoptet.com/shoptet-api/openapi/articles/createarticle.md): Creates a new article. ### List of all articles - [GET /api/articles/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/articles/getlistallarticles.md): Using this endpoint, you can get list of all articles with detailed info of each article (like in Detail of article endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One article in response has the same format as article detail response. Result file is compressed using GZIP. ### Detail of article - [GET /api/articles/{articleId}](https://api.docs.shoptet.com/shoptet-api/openapi/articles/getdetailofarticle.md): Returns a detail of the article. ### Update of article - [PATCH /api/articles/{articleId}](https://api.docs.shoptet.com/shoptet-api/openapi/articles/updatearticle.md): Updates the article. ### Delete of article - [DELETE /api/articles/{articleId}](https://api.docs.shoptet.com/shoptet-api/openapi/articles/deletearticle.md): Deletes the article. ### List of article sections - [GET /api/articles/sections](https://api.docs.shoptet.com/shoptet-api/openapi/articles/getlistofarticlesections.md): Returns a list of article sections. ### Insert of article section - [POST /api/articles/sections](https://api.docs.shoptet.com/shoptet-api/openapi/articles/createarticlesection.md): Creates a new article section. ### Detail of article section - [GET /api/articles/sections/{articleSectionId}](https://api.docs.shoptet.com/shoptet-api/openapi/articles/getdetailofarticlesection.md): Returns a detail of the article section. ### Update of article section - [PATCH /api/articles/sections/{articleSectionId}](https://api.docs.shoptet.com/shoptet-api/openapi/articles/updatearticlesection.md): Updates the article section. ### Deletion of article section - [DELETE /api/articles/sections/{articleSectionId}](https://api.docs.shoptet.com/shoptet-api/openapi/articles/deletearticlesection.md): If the article section cannot be deleted, because it contains article(s), a 409 code is returned. Optional parameter with value allows deletion of article section including permanent deletion of article(s) having this section set as default. ## Discussions Managing discussions in the e-shop. ### List of discussion posts - [GET /api/discussions-posts](https://api.docs.shoptet.com/shoptet-api/openapi/discussions/getlistofdiscussionposts.md): List of discussion posts, filterable by product GUID, author's e-mail and creation date. ## Pages Managing pages in the e-shop. ### List of pages - [GET /api/pages](https://api.docs.shoptet.com/shoptet-api/openapi/pages/getlistofpages.md): Returns a list of pages. ### Insert of page - [POST /api/pages](https://api.docs.shoptet.com/shoptet-api/openapi/pages/createpage.md): Creates a new page. ### Detail of page - [GET /api/pages/{pageId}](https://api.docs.shoptet.com/shoptet-api/openapi/pages/getdetailofpage.md): Returns a detail of the page. ### Delete of page - [DELETE /api/pages/{pageId}](https://api.docs.shoptet.com/shoptet-api/openapi/pages/deletepage.md): Deletes the page. ### Update of page - [PATCH /api/pages/{pageId}](https://api.docs.shoptet.com/shoptet-api/openapi/pages/updatepage.md): Updates the page. ## Reviews Managing reviews in the e-shop. ### List of eshop reviews - [GET /api/eshop/reviews](https://api.docs.shoptet.com/shoptet-api/openapi/reviews/getlistofeshopreviews.md): Returns a list of the e-shop's reviews. This endpoint is available only when the 'Rating' module is active. Also, the e-shop must have store ratings enabled in the administration settings. The endpoint supports Paging. ### List of products reviews - [GET /api/products/reviews](https://api.docs.shoptet.com/shoptet-api/openapi/reviews/getlistofproductsreviews.md): Returns list of product's reviews. ## 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 (``) * `common-footer` - the code will be inserted into each e-shop page foot (before end ``) * `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). ### Listing of codes - [GET /api/template-include](https://api.docs.shoptet.com/shoptet-api/openapi/templates/getlistingofhtmlcodes.md): This lists currently defined HTML codes for this addon, in all possible locations. Each addon sees only “its own” codes, it cannot see other codes of other addons, not even from the same developer. Also, it does not see the code inserted within the administration. ### Inserting and editing codes - [POST /api/template-include](https://api.docs.shoptet.com/shoptet-api/openapi/templates/createandedithtmlcodes.md): This adds new or changes the current (if exists) HTML code. It is possible to enter 1-3 changes at a time (typically 3 possible locations). If the value already exists, it is simply overwritten. The limit for HTML code is 8192 characters. In case that any of the requirements fail, the detailed information is returned in the field. ### Removal of code - [DELETE /api/template-include/{location}](https://api.docs.shoptet.com/shoptet-api/openapi/templates/deletehtmlcode.md): This call can be used to delete the existing code from the given location. if the code for the given (position) does not exist, the API returns ## Discount coupons Managing discount coupons in the e-shop. ### List of discount coupons - [GET /api/discount-coupons](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/getlistofdiscountcoupons.md): List of discount coupons within the e-shop. The list is paged at 1000 coupons. The discount coupons can be filtered according to the date of creation, validity, repeatability of usage or their template. If absolute price is used, the amount is interpreted with the default VAT rate of the eshop (in administration: Settings » Basic Settings » Tax Classes). It can be retrieved using endpoint Eshop Info, array . The same is valid for minimum price. ### Discount coupons insertion - [POST /api/discount-coupons](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/creatediscountcoupons.md): This endpoint allows you to insert specific discount coupons into Shoptet. Request is sent in JSON format in its body. It is good to compare count of requested coupons with count of cooupons in response as it can be different. It is because of request validation, where it ignores invalid coupons. ### Bulk discount coupon deletion - [DELETE /api/discount-coupons](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/bulkdeletediscountcoupons.md): Bulk deletion of discount coupons as per list of . If successful, returns the code 200. If some discount coupons does not exist within the e-shop, a 422 code is returned. ### List of all discount coupons - [GET /api/discount-coupons/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/getlistofalldiscountcoupons.md): Using this endpoint, you can get list of all discount coupons with detailed info of each discount coupon asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each product taking one line of output file. One discount coupon in response has the same format as one discount coupon item form list response. Result file is compressed using GZIP. ### Detail of discount coupon - [GET /api/discount-coupons/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/getdetailofdiscountcoupon.md): Detail of discount coupon within the e-shop. ### Discount coupon deletion - [DELETE /api/discount-coupons/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/deletediscountcoupon.md): Deletes discount coupon as per entered . If successful, returns the code 200. If the discount coupon does not exist within the e-shop, a 404 code is returned. ### Discount coupons set creation - [POST /api/discount-coupons/set](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/creatediscountcouponsset.md): This endpoint allows you to create set of discount coupons for Shoptet.It is good to compare count of requested coupons with count of cooupons in response as it can be different. It is because of request validation, where it ignores invalid coupons. ### Discount coupons usage update - [PATCH /api/discount-coupons/use/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/updatediscountcouponsusage.md): This endpoint allows you to set usage of discount coupon. ### Templates of discount coupons - [GET /api/discount-coupons/templates](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/gettemplatesofdiscountcoupons.md): Templates of discount coupons within the e-shop. All templates are listed at a time. Without possibility of paging or filtering. ### Discount coupons template insertion - [POST /api/discount-coupons/templates](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/creatediscountcouponstemplate.md) ### Discount coupons template deletion - [DELETE /api/discount-coupons/templates/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/discount-coupons/deletediscountcouponstemplate.md): Deletes discount coupon template as per entered . If successful, returns the code 200. If the discount coupon template does not exist within the e-shop, a 404 code is returned. If the discount coupon template cannot be deleted, because it is used as template of discount coupon, a 409 code is returned. ## E-mail distribution lists The functionality is subject to module activation [Mass e-mailing](https://doplnky.shoptet.cz/hromadne-rozesilani-emailu) within the e-shop. The addon using this endpoint must therefore have this module defined as dependency. ### Listing of e-mail distribution lists - [GET /api/mailing-lists](https://api.docs.shoptet.com/shoptet-api/openapi/e-mail-distribution-lists/getlistingofemaildistributionlists.md): The e-mail distribution list named "newsletters" is the system one and is always available (if the e-shop has the module installed). This e-mail distribution list includes the e-mails of all customers who agreed to receiving e-mails. ### Insertion of e-mail distribution list - [POST /api/mailing-lists](https://api.docs.shoptet.com/shoptet-api/openapi/e-mail-distribution-lists/createemaildistributionlist.md) ### Detail of e-mail distribution list - [GET /api/mailing-lists/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/e-mail-distribution-lists/getdetailofemaildistributionlist.md): This endpoint returns a list of e-mail addresses of the distribution list. Upon initial call, it returns up to 500 e-mail addresses; using the parameter, you can requests any number of records per page, up to 500 items limit. Endpoint supports Paging. ### Distribution list e-mails insertion - [POST /api/mailing-lists/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/e-mail-distribution-lists/createemailsdistributionlist.md): This endpoint allows you to add new e-mail addresses to the distribution list identified by its . In the response you will receive structured info about the result of the insertion. In the key there will be a list of e-mails successfully inserted, in the key, there will be a list of skipped e-mails, because there were already in the list. In the key, there will be a list of invalid e-mails (wrong format or non-existing MX domain record) and finally in the key, there will be a list of error messages generated for invalid e-mails. ### Last changes in distribution list - [GET /api/mailing-lists/{code}/changes](https://api.docs.shoptet.com/shoptet-api/openapi/e-mail-distribution-lists/getlastchangesindistributionlist.md): Endpoint is intended to determine the changes after you load the complete e-mail list and you need to know if any of these e-mails were added or removed. Guaranteed history is 30 days, the older data are deleted progressively. Each e-mail on single e-mail list is only mentioned with its last change, within the log. For example, if the e-mail is deleted and then added again, the log will only show information about its addition. The e-mail lists are not dependant on each other (removing an e-mail from one list does not cause any change in another list, unless the e-mail was originally included in both). Can be filtered by changeType = edit/delete parameter. Endpoint supports Paging. ## Quantity discounts Managing quantity discounts in the e-shop. ### List of quantity discounts - [GET /api/quantity-discounts](https://api.docs.shoptet.com/shoptet-api/openapi/quantity-discounts/getlistofquantitydiscounts.md): Returns a list of quantity discounts with basic info. Supports Paging. ### Quantity discount insertion - [POST /api/quantity-discounts](https://api.docs.shoptet.com/shoptet-api/openapi/quantity-discounts/createquantitydiscount.md) ### List of all quantity discounts - [GET /api/quantity-discounts/snapshot](https://api.docs.shoptet.com/shoptet-api/openapi/quantity-discounts/getlistofallquantitydiscounts.md): Using this endpoint, you can get list of all quantity discounts with detailed info of each article (like in Detail of quantity discount endpoint) asynchronously. See how Asynchronous requests work on our developer's portal. Response will be in jsonlines format with each discount taking one line of output file. One discount in response has the same format as in Detail of quantity discount endpoint response. Result file is compressed using GZIP. ### Detail of quantity discounts - [GET /api/quantity-discounts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/quantity-discounts/getdetailofquantitydiscounts.md) ### Quantity discount update - [PATCH /api/quantity-discounts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/quantity-discounts/updatequantitydiscount.md) ### Delete of quantity discount - [DELETE /api/quantity-discounts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/quantity-discounts/deletequantitydiscount.md) ## 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. ### Listing of unsubscribed e-mails - [GET /api/unsubscribed-emails](https://api.docs.shoptet.com/shoptet-api/openapi/unsubscribed-emails/getlistingofunsubscribedemails.md) ### Unsubscribed e-mail insertion - [POST /api/unsubscribed-emails](https://api.docs.shoptet.com/shoptet-api/openapi/unsubscribed-emails/createunsubscribedemail.md) ## Volume discounts Managing volume discounts in the e-shop. ### List of volume discounts - [GET /api/volume-discounts](https://api.docs.shoptet.com/shoptet-api/openapi/volume-discounts/getlistofvolumediscounts.md) ## XY discounts Managing X + Y discounts in the e-shop. ### List of X + Y discounts - [GET /api/xy-discounts](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/getlistofxydiscounts.md) ### X + Y discount insertion - [POST /api/xy-discounts](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/createxydiscount.md) ### Detail of X + Y discounts - [GET /api/xy-discounts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/getdetailofxydiscounts.md) ### X + Y discount update - [PATCH /api/xy-discounts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/updatexydiscount.md) ### Delete of X + Y discount - [DELETE /api/xy-discounts/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/deletexydiscount.md) ### X + Y discounts settings - [GET /api/xy-discounts/settings](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/getxydiscountssettings.md): Lists & updates settings of X + Y discounts. Please note, that setting is not supported on HU projects. ### X + Y discount settings update - [PATCH /api/xy-discounts/settings](https://api.docs.shoptet.com/shoptet-api/openapi/xy-discounts/updatexydiscountsettings.md): Updates settings for X + Y discounts. All settings are optional, but at least one should be present. Please note, that updating "enableInCashdesk" setting on HU projects will throw an exception. If you're targeting a discount to a specific category, right now, we only include products that have that category as their primary one. If you want to include all products in that category in the discount, not just the ones in the primary category, please use attribute with value. ## Categories Managing categories in the e-shop. ### List of product categories - [GET /api/categories](https://api.docs.shoptet.com/shoptet-api/openapi/categories/getlistofproductcategories.md): Returns the list of product categories. ### Product category create - [POST /api/categories](https://api.docs.shoptet.com/shoptet-api/openapi/categories/createproductcategory.md): Creates new category ### Product category detail - [GET /api/categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/categories/getproductcategorydetail.md): Returns category info ### Product category update - [PATCH /api/categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/categories/updateproductcategory.md): Updates existing category. ### Product category deletion - [DELETE /api/categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/categories/deleteproductcategory.md): Deletes product category as per entered . If successful, returns the code 200. If the category does not exist within the e-shop, a 404 code is returned. If the category cannot be deleted, because it is used by some product or has children, a 409 code is returned. Optional parameter allows deleting categories used by products. The products are marked as changed. Optional parameter allows deleting categories with child categories. The children are deleted too. ### Product category BATCH update - [PATCH /api/categories/batch](https://api.docs.shoptet.com/shoptet-api/openapi/categories/updateproductcategorybatch.md): This endpoint allows you to update multiple categories at once. Batch update is processed asynchronously in same way as for example products snapshot, but it does not have with categories to download in response. Instead, you can check attribute which contains successfully updated categories and errors. See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. File with data for update must be in JSONL (jsonlines) format. Each line must contain one category in JSON format. Maximum size of file is 100MB. Structure of JSON row is same as structure of JSON for single category update above. You can add one extra optional attribute "language" which defines language of updating category, so you are able to update multiple language attributes (i.e. "name", "description" etc.) of one category in one batch file. If language is not defined, default language of shop is used. Asynchronous job process jsonl file row by row and try to validate and save data. If there is any error, row is skipped and error is logged, but it does not stop processing of other rows. In Log, every product is identified by its position in file (starting from 1). ### List of products order in category - [GET /api/categories/{categoryGuid}/productsPriority](https://api.docs.shoptet.com/shoptet-api/openapi/categories/getlistofproductsorderincategory.md): Retrieves products and their priorities within a category. ### Update product order in category - [PATCH /api/categories/{categoryGuid}/productsPriority](https://api.docs.shoptet.com/shoptet-api/openapi/categories/updateproductorderincategory.md): Using this endpoint you can update product priority within a category. You can request multiple updates at once; the maximum is 300 updates per request. In case of a partial failure, the response code will be and the errorneous items will be listed in the array. In case of a complete failure, response code will be . Minimum priority is 0, maximum priority is 65535. ## Parametric categories Managing parametric categories in the e-shop. ### List of parametric categories - [GET /api/parametric-categories](https://api.docs.shoptet.com/shoptet-api/openapi/parametric-categories/getlistofparametriccategories.md): Returns the list of product categories. ### Parametric category detail - [GET /api/parametric-categories/{categoryGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/parametric-categories/getparametriccategorydetail.md): Returns parametric category info. ## Consumption taxes Managing consumption taxes in the e-shop. ### List of product consumption taxes - [GET /api/products/consumption-taxes](https://api.docs.shoptet.com/shoptet-api/openapi/consumption-taxes/getlistofconsumptiontaxes.md): Returns the list of consumption taxes within the e-shop. In order to list consuption taxes, you will need to have the Consumption tax module activated on the customer's e-shop. ### Creation of consumption tax - [POST /api/products/consumption-taxes](https://api.docs.shoptet.com/shoptet-api/openapi/consumption-taxes/createconsumptiontax.md) ### Update of consumption tax - [PATCH /api/products/consumption-taxes/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/consumption-taxes/updateconsumptiontax.md) ### Deletion of consumption tax - [DELETE /api/products/consumption-taxes/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/consumption-taxes/deleteconsumptiontax.md) ## Eshop General information about the e-shop settings. ### Eshop info - [GET /api/eshop](https://api.docs.shoptet.com/shoptet-api/openapi/eshop/geteshopinfo.md): Information about queried e-shop (defined by token). Returns the contact data and e-shop settings. This endpoint has several sections, which are only sent when requested in the parameter (see Section on demand. If you state the parameter within the URL, information about the image cut will also be part of the response. For more information about the chapter Product images. Value | Section --------|------ orderAdditionalFields | The order can contain up to six additional fields, which can be freely used by the e-shop for its individual needs. The field names can be defined in administration and this section returns their names. orderStatuses | The order statuses, as defined for this e-shop. paymentMethods | Payment methods, as defined for this e-shop. shippingMethods | Transportation options, as defined for this e-shop. imageCuts | The information on image cuts (various sizes of the same image) countries | Informations about eshop supported countries (name, validation atterns, ...) cashDesk | Informations about eshop cash desk configuration ### E-shop design - [GET /api/eshop/design](https://api.docs.shoptet.com/shoptet-api/openapi/eshop/geteshopdesign.md): Information about queried e-shop template setting (defined by token). value can internally contain the link to a transparent reference gif, in this case the API returns a NULL value. ### E-shop document settings - [GET /api/eshop/document-settings](https://api.docs.shoptet.com/shoptet-api/openapi/eshop/geteshopdocumentsettings.md): Information about financial documents settings. ### E-shop mandatory fields - [GET /api/eshop/customer-fields](https://api.docs.shoptet.com/shoptet-api/openapi/eshop/geteshopmandatoryfields.md): Information about queried e-shop mandatory fields setting (defined by token). Returns the values, which are set by e-shop administrator in Settings -> Customers -> Mandatory fields. ## Filtering parameters Managing filtering parameters in the e-shop. ### List of filtering parameters - [GET /api/products/filtering-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/getlistoffilteringparameters.md): Returns the list of available filtering parameters with their available values within the e-shop. ### Creation of filtering parameter - [POST /api/products/filtering-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/createfilteringparameter.md) ### Detail of filtering parameter - [GET /api/products/filtering-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/getdetailoffilteringparameter.md) ### Update of filtering parameter - [PATCH /api/products/filtering-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/updatefilteringparameter.md) ### Creation of filtering parameter value - [POST /api/products/filtering-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/createfilteringparametervalue.md) ### Removal of filtering parameter - [DELETE /api/products/filtering-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/deletefilteringparameter.md) ### Removal of filtering parameter value - [DELETE /api/products/filtering-parameters/{code}/{valueIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/deletefilteringparametervalue.md) ### Update of filtering parameter value - [PATCH /api/products/filtering-parameters/{code}/{valueIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/filtering-parameters/updatefilteringparametervalue.md) ## Flags Managing flags in the e-shop. ### List of products flags - [GET /api/products/flags](https://api.docs.shoptet.com/shoptet-api/openapi/flags/getlistofproductsflags.md): Returns the list of product flags within the e-shop. ### Product flag insertion - [POST /api/products/flags](https://api.docs.shoptet.com/shoptet-api/openapi/flags/createproductflag.md) ### Product flag update - [PATCH /api/products/flags/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/flags/updateproductflag.md): Updates the flag. ### Product flag delete - [DELETE /api/products/flags/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/flags/deleteproductflag.md): Deletes the flag. System flags cannot be deleted. ## Gifts Managing order gifts in the e-shop. ### Get order gift settings - [GET /api/orders/gifts/settings](https://api.docs.shoptet.com/shoptet-api/openapi/gifts/getordergiftsettings.md): 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 ### Update order gift settings - [PATCH /api/orders/gifts/settings](https://api.docs.shoptet.com/shoptet-api/openapi/gifts/updateordergiftsettings.md): Method updates order gift settings. Every item in request body is optional, but at least one setting is required. ## Payment methods Managing payment methods in the e-shop. ### Listing of payment methods - [GET /api/payment-methods](https://api.docs.shoptet.com/shoptet-api/openapi/payment-methods/getlistingofpaymentmethods.md): The endpoint returns the listing of all available payment methods and details about their settings. Paging is not used, it always returns all methods at once. ### Adding the payment methods - [POST /api/payment-methods](https://api.docs.shoptet.com/shoptet-api/openapi/payment-methods/createpaymentmethod.md): Adds the new payment method for the specific e-shop. If you are a Premium client, contact your Account or Onboarding manager and request the creation of a new gateway identifier. New payment gateway has to be approved by Shoptet and client needs to be familiar with the terms of payment in advance. The request body includes the mandatory attributes and . The other parameters are not mandatory and their default values will be used: - - - - - - - - Send the logo of the payment gateway as the file content, encoded with base64, in request item. ### Payment method deletion - [DELETE /api/payment-methods/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/payment-methods/deletepaymentmethod.md): Deletes payment method by guid. Only payment methods related to your addon may be deleted. Private API tokens aren't currently supported. ## Project ### Project domains - [GET /api/project/domain](https://api.docs.shoptet.com/shoptet-api/openapi/project/getprojectdomainlist.md): List of all domains project has. ## Recycling fees Managing recycling fees in the e-shop. ### List of recycling fee categories - [GET /api/products/recycling-fee-categories](https://api.docs.shoptet.com/shoptet-api/openapi/recycling-fees/getlistofrecyclingfeecategories.md): Returns the list of recycling fee categories within the e-shop. ## Shipping methods Managing shipping methods in the e-shop. ### List of shipping methods - [GET /api/shipping-methods](https://api.docs.shoptet.com/shoptet-api/openapi/shipping-methods/getlistofshippingmethods.md): Endpoint returns a list of all available shipping methods and details of their settings. Does not use paging, it always returns all methods at once. ### Adding a shipping method - [POST /api/shipping-methods](https://api.docs.shoptet.com/shoptet-api/openapi/shipping-methods/createshippingmethod.md): Adds a new shipping method for the specific e-shop. Should you wish to implement an addon implementing a shipping method, contact our partner support and request the creation of a new "shipping company code" identifier. The request body includes the mandatory attributes and (or deprecated ). The other parameters are not mandatory and their default values will be used: - - - - - - - - - - Send the logo of the shipping method as the file content, encoded with base64, in request item. ## Stocks Managing stocks in the e-shop. ### List of stocks - [GET /api/stocks](https://api.docs.shoptet.com/shoptet-api/openapi/stocks/getlistofstocks.md): Returns the list of stocks. There are usually not many stocks, therefore the endpoint returns all of them without Paging. ### Stock detail - [GET /api/stocks/{stockId}](https://api.docs.shoptet.com/shoptet-api/openapi/stocks/getstockdetail.md): Returns detailed information about one stock. ### Stock movements - [GET /api/stocks/{stockId}/movements](https://api.docs.shoptet.com/shoptet-api/openapi/stocks/getstockmovements.md): It returns the list of changes in product quantity, which were done within one stock. Supports the Paging . This endpoint supports optional parts using the parameter (see Section on demand). Please note that there is some performance penalty associated with the usage of "orderCode" and/or query . ### Update quantity in stock - [PATCH /api/stocks/{stockId}/movements](https://api.docs.shoptet.com/shoptet-api/openapi/stocks/updatequantityinstock.md): Endpoint enables the quantity of product in stock (relative and absolute) to be changed. Within a call, the update of multiple products at once can be requested (max. 300 products/variants). In case an error occurs for one of the records, the correct records will be updated, the response will be and there will be records in the array for each failed record. If all records are incorrect, the response code will be instead. Item is mandatory. Then one of the three items has to be provided: - to increase or decrease amount available for ordering/physically on stock (relative change) - to set amount available for ordering (absolute amount) - to set amount physically stored in a warehouse (absolute amount) The difference between and is amount of goods requested by the pending orders (so called "claim"). = - The claim cannot be changed explicitly, it is updated when a new order is submitted or an order is sent out. Please note, that the stock amount cannot be changed for product sets, where the amount is calculated dynamically from the individual products in the set. Trying to change the amount of product set will result in an error. ### Stock movements - Last move - [GET /api/stocks/{stockId}/movements/last](https://api.docs.shoptet.com/shoptet-api/openapi/stocks/getstockmovementslastmove.md): It returns informations about last stock move. ### Product supplies in stock - [GET /api/stocks/{stockId}/supplies](https://api.docs.shoptet.com/shoptet-api/openapi/stocks/getproductsuppliesinstock.md): Returns the product supplies in stock for all products in a specific stock, contains GUID, code and quantity in stock for a specific product variant. It is possible to filter the specific GUID of a product, possibly a variant code. The endpoint supports Paging, in case of filtering, the amount of items per page increases. This endpoint supports optional parts using the parameter (see Section on demand). The item is always temporarily returned, however as of 16. 3. 2019 only upon using the parameter. If you defined the parameter within the URL, the response will also contain the time when the last quantity in stock was changed. ## Suppliers Managing suppliers in the e-shop. ### List of suppliers - [GET /api/suppliers](https://api.docs.shoptet.com/shoptet-api/openapi/suppliers/getlistofsuppliers.md): Returns the list of suppliers. Supports the Paging ## Surcharge parameters Managing surcharge parameters in the e-shop. ### List of surcharge parameters - [GET /api/products/surcharge-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/getlistofsurchargeparameters.md): Returns the list of available surcharge parameters with their available values within the e-shop. ### Creation of surcharge parameter - [POST /api/products/surcharge-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/createsurchargeparameter.md) ### Detail of surcharge parameter - [GET /api/products/surcharge-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/getdetailofsurchargeparameter.md) ### Update of surcharge parameter - [PATCH /api/products/surcharge-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/updatesurchargeparameter.md) ### Creation of surcharge parameter value - [POST /api/products/surcharge-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/createsurchargeparametervalue.md) ### Removal of surcharge parameter - [DELETE /api/products/surcharge-parameters/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/deletesurchargeparameterbyindex.md) ### Removal of surcharge parameter value - [DELETE /api/products/surcharge-parameters/{paramIndex}/{valueIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/deletesurchargeparametervalue.md) ### Update of surcharge parameter value - [PATCH /api/products/surcharge-parameters/{paramIndex}/{valueIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/surcharge-parameters/updatesurchargeparametervalue.md) ## Units Managing units in the e-shop. ### List of product units - [GET /api/products/units](https://api.docs.shoptet.com/shoptet-api/openapi/units/getlistofproductunits.md) ## Variant parameters Managing variant parameters in the e-shop. ### List of variant parameters - [GET /api/products/variant-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/getlistofvariantparameters.md): Returns the list of available variant parameters with their available values within the e-shop. List of variant parameters endpoint has section, which is only sent when requested in the parameter. Value | Section --------|------ | Variant parameter values ### Creation of variant parameter - [POST /api/products/variant-parameters](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/createvariantparameter.md) ### Detail of variant parameter - [GET /api/products/variant-parameters/{paramIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/getdetailofvariantparameter.md) ### Update of variant parameter - [PATCH /api/products/variant-parameters/{paramIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/updatevariantparameter.md) ### Creation of variant parameter value - [POST /api/products/variant-parameters/{paramIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/createvariantparametervalue.md) ### Removal of variant parameter - [DELETE /api/products/variant-parameters/{paramIndex}](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/deletevariantparameter.md) ### Removal of variant parameter value - [DELETE /api/products/variant-parameters/{paramIndex}/{rawValue}](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/deletevariantparametervalue.md) ### Update of variant parameter value - [PATCH /api/products/variant-parameters/{paramIndex}/{rawValue}](https://api.docs.shoptet.com/shoptet-api/openapi/variant-parameters/updatevariantparametervalue.md) ## Warranties Managing warranties for the products. ### List of product warranties - [GET /api/products/warranties](https://api.docs.shoptet.com/shoptet-api/openapi/warranties/getlistofproductwarranties.md): Returns list of product warranties. ## Endpoints Obtaining information for endpoints in API. ### List of available endpoints - [GET /api/system/endpoints](https://api.docs.shoptet.com/shoptet-api/openapi/endpoints/getlistofavailableendpoints.md): List of endpoints available within the systems. Using the "status" parameter, you can list the approved endpoints, or endpoints pending approval. In default state, without the parameter, the endpoint returns the approved endpoints. ## Exports Exports allow to work with documents of several types in several formats. ### General document export - [GET /api/export/{type}/{format}](https://api.docs.shoptet.com/shoptet-api/openapi/exports/generaldocumentdownload.md): You can request documents of several types in several formats in combination with settings as includes. See tables bellow for possibilities and settings. Export is processed asynchronously. See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. |Document type | Document format | Parameters | Includes -------------------- | ------------------------ | ------------------ | --------------------------------- |invoice | csvDetail | codeFrom | exportWithHistoricalVat | | xlsDetail | codeTo | exportAsForeignCurrency | | pdf | dateFrom | linkProformaInvoices | | isdoc | dateTo | descOrder | | xmlPohodaCz | taxDateFrom | | | xmlPohodaSk | taxDateTo | | | xmlMoneyS3CZ | currency | | | xmlMoneyS3Sk | | | | xlsxSummary | | | | csvSummary | | |proformaInvoice | csvDetail | codeFrom | exportWithHistoricalVat | | xlsDetail | codeTo | exportAsForeignCurrency | | pdf | dateFrom | | | xmlPohodaCz | dateTo | | | xmlPohodaSk | taxDateFrom | | | xmlMoneyS3CZ | taxDateTo | | | xmlMoneyS3Sk | currency | | | xlsxSummary | | | | csvSummary | | |creditNote | csvDetail | codeFrom | exportWithHistoricalVat | | xlsDetail | codeTo | exportAsForeignCurrency | | pdf | dateFrom | | | isdoc | dateTo | | | xmlPohodaCz | taxDateFrom | | | xmlPohodaSk | taxDateTo | | | xmlMoneyS3CZ | currency | | | xmlMoneyS3Sk | | | | xlsxSummary | | | | csvSummary | | |proofPayment | xmlPohodaCz | codeFrom | exportWithHistoricalVat | | xmlPohodaSk | codeTo | exportAsForeignCurrency | | csvDetail | dateFrom | onlyClosedProofPayments | | xlsDetail | dateTo | | | pdf | taxDateFrom | | | | taxDateTo | | | | currency | |deliveryNote | csvDetail | codeFrom | | | xlsDetail | codeTo | | | pdf | dateFrom | | | | dateTo | | | | taxDateFrom | | | | taxDateTo | |Include | Does |------- | ----- |exportWithHistoricalVat | Will export historical rates. |exportAsForeignCurrency | Currency will be exported as foreign regardless of e-shop settings. |linkProformaInvoices | Corresponding proforma invoices will be added to export file. |onlyClosedProofPayments | Exports only finished documents. |descOrder | Sort as starting from oldest ## Files Managing files in the e-shop. ### List of uploaded files - [GET /api/system/files](https://api.docs.shoptet.com/shoptet-api/openapi/files/getlistofuploadedfiles.md): Retrieves your uploaded files that can be copied in supported endpoints to entities within e-shop. ### Batch files upload - [POST /api/system/files](https://api.docs.shoptet.com/shoptet-api/openapi/files/uploadfiles.md): This endpoint has been only renamed from "File upload" after we created new synchronous endpoint one file upload. Url and structure is unchanged Performs file upload asynchronously. Please note that order of files matter (result of job respects the order of images in request). In case of specifying filename, keep in mind that extension is checked whether it respects file type. The result can be found in job detail in . The result is formed as normal API response: In the result's section, there are successfully uploaded images with their info and with field which is order of the image in the request (0-based indexing). In the result's section, there are errors which occurred during some images upload and with number in brackets in in , which is order of the image in the request (0-based indexing). See more about Files upload See how [Asynchronous requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal. Currently maximum of 50 files can be uploaded in one request. Current filesize limit per file is 2MB. ### File upload - [POST /api/system/file](https://api.docs.shoptet.com/shoptet-api/openapi/files/uploadfile.md): This is new endpoint - older asynchronous endpoint has been only renamed to "Batch files upload" in documentation, url and structure is unchanged Performs one file upload synchronously in same way as asynchronous files upload. In the result's section, there are successfully uploaded image with current unique name and upload datetime. See more about Files upload In case of image upload, response tag is "image", any other file types has response key "file" as here: IMAGE: JPG, PNG, GIF ANY OTHER FILE TYPE Current filesize limit is 2MB. ## Jobs Managing asynchronous jobs in the e-shop. ### List of jobs - [GET /api/system/jobs](https://api.docs.shoptet.com/shoptet-api/openapi/jobs/getlistofjobs.md): List of jobs in queue. Using the "status" parameter to filter by completed|pending|running|failed|expired|killed. Without this filter it will show all statuses. Also you can filter results depends on time of creation and completion. ### Job detail - [GET /api/system/jobs/{jobId}](https://api.docs.shoptet.com/shoptet-api/openapi/jobs/getjobdetail.md): Returns information about job. If job is completed, it will contain additional information about job result. Returns 404 if job does not exist. Returns 403 response if job detail of unprocessed job is requested more than 10 times. ## Measure units Allows you to access the system measure unit. These units are convertible to each other and cannot be redefined or extended. For defining/extending your own units use [Units](#tag/units) in the **Settings** section. ### List of products measure units - [GET /api/products/measure-units](https://api.docs.shoptet.com/shoptet-api/openapi/measure-units/getlistofproductsmeasureunits.md): Returns the list of product measure units within the e-shop. ## 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**. ### Gaining the information about payment - [GET /api/payment-status/{paymentCode}](https://api.docs.shoptet.com/shoptet-api/openapi/payment-gateways/getinformationaboutpayment.md): Returns the URL, at which the payment gateway shall redirect the users after completion of operation and order number. ### Payment status update - [PATCH /api/payment-status/{paymentCode}](https://api.docs.shoptet.com/shoptet-api/openapi/payment-gateways/updatepaymentstatus.md): Payment status update via the payment gateway. The is the identifier. Payment status can be updated when the payment has been successfully recorded. ## Shipping requests Shipping requests endpoints are used for managing shipping requests in the e-shop. ### Shipping request for getting cart details - [GET /api/shipping-request/{shippingRequestCode}/{shippingGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/shipping-requests/getshippingrequestforcartdetails.md): Endpoint returns details of cart for shipping request ### Update shipping price & data - [PUT /api/shipping-request/{shippingRequestCode}/{shippingGuid}](https://api.docs.shoptet.com/shoptet-api/openapi/shipping-requests/updateshippingdata.md): Endpoint to set shipping price & data ### Shipping request for getting status of order - [GET /api/shipping-request/{shippingRequestCode}/{shippingGuid}/status](https://api.docs.shoptet.com/shoptet-api/openapi/shipping-requests/getshippingrequestforgettingorderstatus.md): Endpoint returns status of order related to & ## 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. ```javascript { "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](#section/code-lists/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/. ### Overview of registered webhooks - [GET /api/webhooks](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/getoverviewofregisteredwebhooks.md): Returns the list of webhooks, registered by the specific addon for a single e-shop. It is therefore bound to the specific installation. The addon does not have any access to another addon (not even for the same e-shop, or two addons from the same developer). ### Registration of new webhook - [POST /api/webhooks](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/registernewwebhook.md): Registers the webhook. For a single event (, for example ) URL can be registered. If you try to enter the webhook for an that already exists, you will receive error with message . Successful creation (registration) of webhook is signaled by code . The endpoint returns the info on the created webhook. One of the items is , which is assigned to the webhook and is used for its identification upon change or deletion. The supported event can be found in code list Webhook event types. It is possible to enter up to 50 webhooks using a single call. ### Detail of registered webhooks - [GET /api/webhooks/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/getdetailofregisteredwebhooks.md): Shows the information about a single specific registered webhook. ### Update of existing webhook - [PATCH /api/webhooks/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/updateexistingwebhook.md): Modification of the existing webhook. The of the webhook serves as the identifier. Using just one call, only one webhook can be modified. ### Deletion of registered webhook - [DELETE /api/webhooks/{id}](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/deleteregisteredwebhook.md): Deletes the registered webhook, identified by means of . ### Generating of signature key - [POST /api/webhooks/renew-signature-key](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/generatewebhooksignaturekey.md): The endpoint call does not require any body. The endpoint always generates a new signature key for calculating the digest mentioned in the HTTP header of the notification – . The same key is to be used during check after the receipt of notification. For more information see https://developers.shoptet.com/webhooks/#signature ### Webhook notification - [GET /api/webhooks/notifications](https://api.docs.shoptet.com/shoptet-api/openapi/webhooks/getwebhooknotification.md): Returns the notification (invoking) list of webhooks and provides information about these. If you do not have a registered webhook, and the given event happens (for example creation of an order), the registered URLs are called. A notification about a call contains information about the webhook that requested the call, the URL called, the time, delivery status, number of delivery attempts and other information. It is possible to request 7 days history of notification.