openapi: 3.1.0
info:
version: 1.2.2-oas3.1
title: Ankorstore Stock Tracking and Logistics Applications Ordering API
summary: API specification for the Ankorstore Stock Tracking and Logistics system
description: Ankorstore Stock Tracking and Logistics (ASTRAL) API specification
contact:
name: Ankorstore
url: https://www.ankorstore.com
email: api@ankorstore.com
license:
url: https://creativecommons.org/publicdomain/zero/1.0/
name: CC0 1.0 Universal
servers:
- url: http://www.ankorlocal.com:8000
description: Local Development Server
- url: https://www.preprod.ankorstore.com
description: Staging Environment
- url: https://www.ankorstore.com
description: Prod Environment
tags:
- name: Ordering
description: "ℹ️ This section of API allows to manage different types of orders in the system. Depending on the order type, there are\ndifferent endpoints available to manage them. Before starting to work with the API, it is recommended to read the\ndocumentation to better understand the differences between the order types, their workflow and lifecycle.\n\n## \U0001F4A1 General conceptions\n\n- _Internal Order_ - A regular type of order created via Ankorstore platform. It may have different types of shipping\n and payment.\n The client of such an order is always an existing retailer entity, available in Ankorstore.\n- _External Order_ - A special type of order created by a brand for an external customer, which might not exist in\n Ankorstore. This type of order does not expect retailer as a reference to the Ankorstore entity, but rather allows brand\n to provide a custom client details, such as address, contact information etc. The orders of this type in the\n current version of the platform are fulfilled by the Fulfillment Centers only and do not support any other type of shipping.\n- _Master Order_ - Not a separate type of order, but rather a wrapper over other order types.\n It allows to have a single reference to the order, regardless of its type. A _Master Order_ usually has a one-to-one\n relationship with either _Internal Order_ or _External Order_ so either of these order can be accessed via the _Master\n Order_ reference.\n\n## \U0001F4A1 Working with Master Orders\n\n### Access different types of orders via Master Order\n\nAs mentioned above, the _Master Order_ is a wrapper over other order types.\nIt allows to have a single reference to the underlying order, regardless of its type.\nThe available _Master Order_ endpoints allow to fetch a list of available _Master Orders_\nand also get a single _Master Order_ by its ID and, following JSON:API specification, including the\nunderlying orders as relations. This approach allows to deal with different order types in a unified way\n(e.g. listing, pagination). However, it is still possible to access the underlying _Internal Orders_ directly,\nin order to keep the backward compatibility.\n\n
\ngraph LR\n A[Master Order] --> B[Internal Order]\n A --> C[External Order]\n
\n\n_Master Order_ as a standalone resource might not bring much value, but the _Master Order_ endpoints allow\nto include a corresponding wrapped orders as relations, which per se contain a useful payload.\n\n### Includes\n\nThe _Master Order_ has a one-to-one relationship with either _Internal Order_ or _External Order_. Hence,\npassing query parameter `?include=internalOrder`, `?include=externalOrder` or by combining different includes,\n(separated by comma e.g. `?include=internalOrder,externalOrder`) you will receive wrapped order as a relation.\n\nFor example, let's say you have only 2 orders, one of them is _Internal Order_, another is _External Order_.\nIf you don't include any relation into request to the [List Master Orders](#tag/Ordering/operation/list-master-orders),\n\n```\n[GET] /api/v1/master-orders\n```\n\nthe response will contain only a list of identifiers without any wrapped orders:\n\n```json5\n{\n //...\n \"data\": [\n {\n \"type\": \"master-orders\",\n \"id\": \"a470c8d6-1bda-4612-b0bd-3ea2a81a9e89\",\n },\n {\n \"type\": \"master-orders\",\n \"id\": \"0ca13de1-8e4b-4e67-a147-185cc5f6f57f\",\n },\n //...\n ],\n //...\n}\n```\n\nBut with the inclusion of the wrapped order relations to the same endpoint\n\n```\n[GET] /api/v1/master-orders?include=internalOrder,externalOrder\n```\n\nthe result will contain included information about the actual orders:\n```json5\n{\n //...\n \"data\": [\n {\n \"type\": \"master-orders\",\n \"id\": \"a470c8d6-1bda-4612-b0bd-3ea2a81a9e89\",\n \"relationships\": {\n \"internalOrder\": {\n \"data\": {\n \"type\": \"internal-orders\",\n \"id\": \"a470c8d6-1bda-4612-b0bd-3ea2a81a9e89\"\n }\n },\n }\n },\n {\n \"type\": \"master-orders\",\n \"id\": \"0ca13de1-8e4b-4e67-a147-185cc5f6f57f\",\n \"relationships\": {\n \"externalOrder\": {\n \"data\": {\n \"type\": \"external-orders\",\n \"id\": \"0ca13de1-8e4b-4e67-a147-185cc5f6f57f\"\n }\n }\n }\n },\n //...\n ],\n \"included\": [\n {\n \"type\": \"internal-orders\",\n \"id\": \"a470c8d6-1bda-4612-b0bd-3ea2a81a9e89\",\n \"attributes\": {\n // Internal order attributes here\n }\n },\n {\n \"type\": \"master-orders\",\n \"id\": \"0ca13de1-8e4b-4e67-a147-185cc5f6f57f\",\n \"attributes\": {\n // External order attributes here\n }\n },\n //...\n ]\n //...\n}\n```\n\nTo learn more about JSON:API include mechanism, please refer to the [official docs](https://jsonapi.org/format/#fetching-includes).\n\n## \U0001F4A1 Working with Internal Orders\n\nDespite the fact that the _Internal Orders_ can be accessed via the _Master Order_ endpoints, it is still possible to\naccess them directly, in order to keep the backward compatibility. Moreover, some actions (e.g. transiting an _Internal\nOrder_ to the next state) are only available via the direct _Internal Order_ endpoints.\n\n### Includes\n\nFor every endpoint that returns the _Internal Order_ resource you may pass an `?include=` query parameter\nthat will return extra information inside the `included` root level object.\nThe supported resources to include are `retailer`, `billingItems`, `orderItems`, `orderItems.productVariant`\nand `orderItems.productVariant.product`.\nPlease note that, if you include `orderItems.productVariant` you do not need to specify `orderItems` separately.\nIt will be automatically included. As an example, to include all data possible you would\ndo `?include=retailer,billingItems,orderItems.productVariant.product`\n\n\n\n#### Product options usage is deprecated\n\nPlease note, that we have fully completed migrating our system to the new product model with product options\nreplaced by product variants. It means, the usage of product options is deprecated and will be removed in the future\nversions of the API.\n\nPlease, consider updating your API clients in favor of using `orderItems.productVariant` instead of `orderItems.productOption`\nto avoid any issues in the future. For the time being, the API still supports both approaches, but we strongly encourage\nyou to not rely on the deprecated resources anymore because we cannot fully guarantee their stability due to some technical limitations.\n\n
\n\n### Important Fields within Internal Order resource\n\nIf the field contains no data, it will be `null`. The only exception currently to this is `shippingOverview` which can\nbe viewed below. The fields listed below are not all the fields, please see the API specification for all of them.\n\n### Status `status`\n\nThe status field is the current state of the order, below is a table that describes each step:\n\n| Status | Description |\n|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ankor_confirmed` | The order has been confirmed by Ankorstore and now a decision can be made whether to accept or reject this order. |\n| `rejected` | The order has been rejected, Ankorstore needs to approve this rejection. If it does, the status will moved to `cancelled`. |\n| `brand_confirmed` | The order has been accepted. it now needs to be shipped to the retailer. |\n| `shipping_labels_generated` | The order has been shipped with Ankorstore and the labels have been generated - these are now available in the order resource data within `shippingOverview`. |\n| `fulfillment_requested` | The brand has chosen to fulfill the order, or the order was automatically fulfilled. The order will remain in this state until it has been fulfilled by the fulfillment provider. |\n| `shipped` | The order has either been picked up by an Ankorstore carrier (e.g UPS) or the brand has chosen to ship with their own carrier. |\n| `received` | The retailer has received the package, if shipped with Ankorstore this is automatic from the carrier otherwise for custom shipping the retailer has to manually acknowledge this. |\n| `reception_refused` | The retailer has refused the reception of the package - if Ankorstore approves the reason the order will move to cancelled. The status can also move to `received` if the retailers issues have been resolved by the brand or Ankorstore. |\n| `invoiced` | The final invoice has been issued for this order. |\n| `brand_paid` | The brand has been paid in full for this order. |\n| `cancelled` | The order is cancelled. |\n\n\nflowchart LR\n ankor_confirmed -- accept order -->brand_confirmed\n ankor_confirmed -- reject order -->rejected-->cancelled\n brand_confirmed -- shipping method: custom -->shipped\n brand_confirmed -- shipping method: ankorstore -->shipping_labels_generated\n brand_confirmed -- shipping method: fulfillment -->fulfillment_requested\n shipping_labels_generated-->shipped\n fulfillment_requested-->shipped\n shipped-->reception_refused-->cancelled\n shipped-->received-->invoiced-->brand_paid\n reception_refused-->received\n
\n\n\n\n#### Not to be confused: Status vs Shipping Flow\n\nThe above diagram shows what status the order will be in **based** on the actions performed in the API. The most\nconfusing may be the shipping flow. To reach the `shipped` or `shipping_labels_generated` status, a shipping quote must\nalways be generated and then confirmed. Please see [shipping an order](#tag/Order/Shipping-an-Order) for further\ndetails.\n\n
\n\n### Shipping Method `shippingMethod`\n\nWhat shipment method has been chosen for this order. Either `ankorstore` for using Ankorstore's shipping service,\n`custom` for using the brand's own carrier or `fulfillment` if the order is shipped from a fulfillment centre\nThis field is `null` when no choice has yet been made.\n\n### Shipping Overview `shippingOverview`\n\n\n\n#### Field Availability\n\nThe object `shippingOverview` is only available when retrieving a single order. This data is not available when\nretrieving a list of orders.\n\n
\n\n### Submitted At `submittedAt`\n\nThis is the date the retailer submitted their whole order.\n\n### Shipped At `shippedAt`\n\nThis is when the brand shipped the order.\n\n### Brand Paid At `brandPaidAt`\n\nThis is when Ankorstore pays the brand, if it is `null` then payment is still pending.\n\n### Interacting with Internal Orders\n\nWhen a brand receives a new order, it arrives in the `ankor_confirmed` status. The brand can then perform certain\ntransitions using a single endpoint:\n\n`POST /api/v1/orders/{id}/-actions/transition`\n\nThis endpoint will accept different payloads depending on what transition is provided. This page will detail each\ntransition that may be performed and when.\n\nAll the implementation details and fields can be found in the endpoint documentation.\n\n\n\n#### No going back!\n\nOnce an order is accepted or rejected it cannot be reversed. If this was a mistake the brand can contact Ankorstore\nthrough the normal channels to revert the order to `ankor_confirmed`.\n\n
\n\nIf an order is rejected you need to provide a detailed reject reason. Otherwise, after the order is accepted the brand\nthen needs to ship it.\nPlease see [shipping](#tag/Shipping) for further details.\n\n### Accepting an Internal Order\n\nCan be performed when the order is in `ankor_confirmed`.\n\nIn order to accept an order without any item modifications a simple payload detailing the transition will suffice:\n\n```json\n{\n \"data\": {\n \"type\": \"brand-validates\"\n }\n}\n```\n\nThe order will move from `ankor_confirmed` to `brand_confirmed`.\n\n### Accepting an Internal Order with modifications\n\nCan be performed when the order is in `ankor_confirmed`.\n\nSometimes you may wish to modify the order before accepting it if for example you do not have the items in stock or\nfurther communication has taken place with the retailer.\n\nThe order items can **only be modified at this stage**. The rules of the payload are as follows:\n\n- To leave an item's quantity as is, do not include it in the payload below\n- To update an item's quantity, include it in the payload below with the new quantity (cannot be above the current\n quantity)\n- To remove an item entirely, set the item's quantity to 0.\n\nYou cannot remove all items, please reject the order in this scenario.\n\n```json\n{\n \"data\": {\n \"type\": \"brand-validates\",\n \"attributes\": {\n \"orderItems\": [\n {\n \"id\": \"a470c8d6-1bda-4612-b0bd-3ea2a81a9e89\",\n \"type\": \"order-items\",\n \"attributes\": {\n \"quantity\": 12\n }\n },\n {\n \"id\": \"0ca13de1-8e4b-4e67-a147-185cc5f6f57f\",\n \"type\": \"order-items\",\n \"attributes\": {\n \"quantity\": 0\n }\n }\n ]\n }\n }\n}\n```\n\nThe order will move from `ankor_confirmed` to `brand_confirmed`.\n\n### Rejecting an Internal Order\n\nCan be performed when the order is in `ankor_confirmed`.\n\nTo reject an order you must provide a reason listed below for the `rejectType` field.\n\n- `BRAND_ALREADY_HAS_CUSTOMER_IN_THE_AREA` - Brand already has a customer in the area\n- `BRAND_CANNOT_DELIVER_TO_THE_AREA` - Brand cannot make a delivery to the target area\n- `BRAND_HAS_EXCLUSIVE_DISTRIBUTOR_IN_THE_REGION` - The brand already has an exclusive distributor in the target region\n- `BUYER_NOT_A_RETAILER` - The buyer does not seem to be a retailer\n- `ORDER_ITEMS_PRICES_INCORRECT` - The prices of items in this order were incorrect\n- `PAYMENT_ISSUES_WITH_RETAILER` - Brand had payment issues in the past with this retailer\n- `PREPARATION_TIME_TOO_HIGH` - The time needed for the order preparation is excessively high\n- `PRODUCT_OUT_OF_STOCK` - Order cannot be processed because one or multiple ordered products are not in the stock\n- `PURCHASE_NOT_FOR_RESALE` - This purchase does not seem to be for resale\n- `RETAILER_AGREED_TO_DO_CHANGES_TO_ORDER` - The retailer agreed so that they can do changes to the order\n- `RETAILER_NOT_GOOD_FIT_FOR_BRAND` - The retailer who made an order does not fit the brand's criteria\n- `RETAILER_VAT_NUMBER_MISSING` - The retailer VAT number is missing\n\n\n- `OTHER` - If no reason above is suitable you can use value, but you **MUST** provide a `rejectReason` which accepts a\n plain text string of 1000 characters.\n\n### Example rejection\n\n```json\n{\n \"data\": {\n \"type\": \"brand-rejects\",\n \"attributes\": {\n \"rejectType\": \"ORDER_ITEMS_PRICES_INCORRECT\"\n }\n }\n}\n```\n\n### Example rejection with OTHER\n\n```json\n{\n \"data\": {\n \"type\": \"brand-rejects\",\n \"attributes\": {\n \"rejectType\": \"OTHER\",\n \"rejectReason\": \"a different reason\"\n }\n }\n}\n```\n\nThe order will move from `ankor_confirmed` to `cancelled`.\n\n### Resetting an Internal Order's generated shipping labels\n\nCan be performed when the order is in `shipping_labels_generated`.\n\nTo reject an order you must provide a reason listed below for the `resetType` field.\n\n- `BRAND_NEED_MORE_LABELS_TO_SHIP` - Brand needs more shipping labels to ship\n- `BRAND_PUT_WRONG_WEIGHT_DIMENSIONS` - Brand put wrong parcel weight and/or dimensions\n- `BRAND_SHIPS_WITH_DIFFERENT_CARRIER` - Brand wants to ship with a different carrier\n- `PROBLEM_DURING_SHIPPING_LABEL_GENERATION` - There was a problem during the shipping labels generation\n- `RETAILER_ASKED_DELIVERY_ADDRESS_CHANGE` - The retailer asked for a delivery address change\n- `SHIPPING_ADDRESS_MISMATCHES_PICKUP_ADDRESS` - The shipping address mismatches the pickup address\n\n\n- `OTHER` - If no reason above is suitable you can use this value, but you **MUST** provide a `reason` which accepts a\n plain text string of 300 characters maximum.\n\n#### Example reset shipping labels\n\n```json\n{\n \"data\": {\n \"type\": \"brand-resets-shipping-labels-generation\",\n \"attributes\": {\n \"resetType\": \"BRAND_PUT_WRONG_WEIGHT_DIMENSIONS\"\n }\n }\n}\n```\n\n#### Example reset shipping labels with OTHER\n\n```json\n{\n \"data\": {\n \"type\": \"brand-resets-shipping-labels-generation\",\n \"attributes\": {\n \"rejectType\": \"OTHER\",\n \"reason\": \"a different reason\"\n }\n }\n}\n```\n\nThe order will move from `shipping_labels_generated` to `brand_confirmed`.\n\n### Requesting fulfillment by Ankorstore Logistics for an Internal Order\n\nCan be performed when the order is in `brand_confirmed`.\n\nAnkorstore Logistics will fulfill the order and ship it to the retailer.\nThe order will move from `brand_confirmed` to `fulfillment_requested`.\n\nMust be preceded by a [fulfillability check](#tag/Ordering/operation/internal-order-is-fulfillable), since it requires\nthe brand to be enrolled with Ankorstore logistics, and sufficient stock to be available in an Ankorstore warehouse.\n\nValidation errors can include:\n- `not_a_fulfillment_brand` - The brand is not enrolled with Ankorstore Logistics\n- `unavailable_items` - One or more items are not available in the warehouse. The response will include a list of the\n unavailable items, which map to` productVariant.fulfillableId`\n- `already_being_fulfilled` - The order is already being fulfilled\n- `not_available_for_international_orders` - Fulfillment is currently not available for orders crossing a customs border\n- `missing_hs_code_for_international_order` - One or more products are missing a Harmonized System code (HS code), required for customs clearance on non-EU destinations\n- `stock_is_being_transferred` - The stock is currently being transferred between warehouses\n\n### Available operations on Internal Orders\n\n- [List Internal Orders](#tag/Ordering/operation/list-internal-orders)\n- [Retrieve a single Internal Order](#tag/Ordering/operation/get-internal-order)\n- [Transition an Internal Order](#tag/Ordering/operation/transition-internal-order) - accept, reject order etc.\n- [List shipping quotes](#tag/Shipping/operation/list-order-shipping-quotes) - get a list of shipping quotes for a given order\n- [Confirm shipping quote](#tag/Shipping/operation/confirm-order-shipping-quote) - confirm the shipping quote and move the order into its shipping phase\n- [Schedule pickup for order](#tag/Shipping/operation/ship-internal-order-schedule-pickup) - schedule a pickup for the order (if shipped with Ankorstore)\n- [Ship order with custom](#tag/Shipping/operation/ship-internal-order-custom) - generate a quote for shipping with your own carrier\n- [Check fulfillability](#tag/Ordering/operation/internal-order-is-fulfillable) - check whether an order is fulfillable by Ankorstore Logistics\n\nYou can also find some details about shipping in the dedicated [Shipping](#tag/Shipping) section,\n\n## \U0001F4A1 Working with External Orders\n\nThe information about _External Orders_ can be only listed and retrieved as a relation of _Master Order_ endpoints.\nHowever, some _External Order_-specific operations are also available, see the section below.\n\n### How to create External Order?\n\nThe creation of _External Order_ is as easy as just sending one request to the API.\nThe process of creation is asynchronous, because it involves some 3rd party services, such as Fulfillment Center\noperators, who needs to confirm the possibility of fulfillment (availability of the stock, etc.).\n\nFor better understanding, you can treat the creation of _External Order_ an \"intent to create an order with particular items for\nparticular client\". So after submission, the intent is either accepted or rejected by API, depending on the different\nfactors (such as availability of the stock, etc.). More on this below.\n\n#### Preparing for External Order creation\n\nUsually, before sending the actual `Create External Order` request, you need collect some information in order to make the request valid.\n\nThe request payload is described in details in the [endpoint specification](#tag/Ordering/operation/ordering-create-non-ankorstore-fulfillment-order)\nbut here we will take a general look at the necessary pieces of the information required for the request:\n\n1. **Valid set of fulfillables.** The endpoint accepts the list of [fulfillable items](#tag/Fulfillment/About-Fulfillment).\n The identifiers should be valid and the quantities should be evenly divisible by the batch size. Otherwise, the\n request might be rejected by the API.\n2. **Valid shipping address.** This is one of the most important parts of the order, please make sure the address is\n completely valid, the provided postal code and phone number match the specified country etc. Otherwise, any mistake\n in the address fields could be only fixed with the help of the Ankorstore Support team.\n3. **Generate unique identifier (UUID) for the order.** Despite this field is optional, considering the asynchronous\n nature of the process, it is highly recommended to provide it. This will allow you to immediately get the information\n about the order, check its status etc. Omitting this field will result in the generation of the identifier by API\n and will only make sense if you don't want to check the result immediately (\"fire-and-forget\").\n\nThe last 2 steps can be done independently, but the first step is a bit more complicated, because it requires the knowledge\nabout the available products and their identifiers. This information can be obtained via the [Catalog API](#tag/Products)\nand [Fulfillment API](#tag/Fulfillment).\n\n### A practical example\n\n\n\nThe assumption here is that you already authenticated and able to access the API.\nIf not, please follow the [Authentication](#tag/Authentication) section first.\n\n
\n\nHere is an example of the real use-case for the External Order creation.\nLet's say, you'd like to create an order for the following client:\n\n| Field | Value |\n|--------------|-------------------------------------------|\n| Client name | John Doe |\n| Company name | ACME |\n| Phone | +33 612345678 |\n| Email | john@acme.com |\n| Address | 123, Rue de Foo Bar, Paris, 75001, France |\n\nwith the following content:\n\n| Product SKU | Quantity |\n|-------------|----------|\n| AB-1234 | 12 |\n| CD-00-XY | 5 |\n\nIn this scenario, you should take the following steps:\n\n#### [1] Find the fulfillable identifiers for the given products\n\nThis can be achieved by sending a request to the [List Product Variants](#tag/Catalog/operation/list-product-variants-with-stock)\n\n```\n[GET] /api/v1/product-variants?filter[sku]=AB-1234,CD-00-XY\n```\n\nand finding the fulfillable identifiers for the desired products.\n\nAs a result of this step, you should have the following information:\n\n| Product SKU | Quantity | Fulfillable ID |\n|-------------|----------|--------------------------------------|\n| AB-1234 | 12 | 1ac37dbf-f25d-4c0c-bcc8-ad8af946b541 |\n| CD-00-XY | 5 | e5e91243-d11a-47a3-9308-22af70da5bc4 |\n\n#### [2] Find the information about the available stocks for the products\n\nThis information can be retrieved by sending a request to [List Fulfillable Endpoint](#tag/Fulfillment/operation/fulfillment-list-fulfillable).\nWith the fulfillable identifiers from the previous step, you can send the following request:\n\n```\n[GET] /api/v1/fulfillment/fulfillable?fulfillableIds[]=1ac37dbf-f25d-4c0c-bcc8-ad8af946b541&=fulfillableIds[]=e5e91243-d11a-47a3-9308-22af70da5bc4\n```\n\nand get quantity information for the given fulfillables from the response.\n\nFor each requested fulfillable item, the response of this endpoint contains 2 properties:\n\n- `unitQuantity` - the total available quantity of the product, in minimal atomic units (e.g. bottles)\n- `batchQuantity` - the total available quantity of the batches (packs) of the product (e.g. boxes of bottles)\n\nHaving these 2 properties, you should check 2 things, before move on:\n\n1. The planned quantity for the corresponding product in the order should not exceed `unitQuantity` from the response.\n If the requested quantity is greater than the `unitQuantity`, the request will be rejected.\n2. The requested quantity of the product should be evenly divisible by the \"batchSize\", which can be calculated\n by dividing returned `unitQuantity` by the `batchQuantity`. This is required because the Fulfillment Center can only\n fulfill products by the whole batches (packs). Violating this rule will result in the rejection of the request.\n\nAfter these simply calculations, you should end up with the following information:\n\n| Product SKU | Quantity | Fulfillable ID | Batch Size |\n|-------------|----------|--------------------------------------|------------|\n| AB-1234 | 12 | 1ac37dbf-f25d-4c0c-bcc8-ad8af946b541 | 3 |\n| CD-00-XY | 5 | e5e91243-d11a-47a3-9308-22af70da5bc4 | 5 |\n\nas you can see here, the quantities are evenly divisible by the batch sizes, which means the products information is\nready to go. For instance, the products from our example will be fulfilled by 4 packs of `AB-1234` and 1 pack of `CD-00-XY`.\n\n#### [3] Validate the shipping address\n\nThe next step is to validate the shipping address. As it was mentioned before, the address properties should\ncorrespond to each other and be valid.\n\nSo the user information in this example looks valid and the only thing left is to distribute the address fields\nto the corresponding properties:\n```json5\n{\n \"country\": \"FR\", // ISO 3166-1 alpha-2 country code\n \"postalCode\": \"75001\", // Valid postal code for France\n \"city\": \"Paris\",\n \"street\": \"123, Rue de Foo Bar\", // 60 characters max, otherwise will not fit the place on the printed label\n \"company\": \"ACME\",\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"phone\": \"+33 612345678\", // Valid phone number for France\n \"email\": \"john@acme.com\"\n}\n\n```\n\n#### [4] Generate unique identifier for the order\n\nThe next step is to generate UUID (preferably [UUIDv6](https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#name-uuid-version-6)) for the order being created.\nYou can use any library of your choice to generate it, the only requirement is that it should follow the specification.\n\n#### [5] Send the request to the API\n\nAt this point, you are ready to send the request to the API. What is left to do is to prepare API request payload by putting\ntogether all the information collected in the previous steps. For the exact payload structure, please refer to the\n[endpoint specification](#tag/Ordering/operation/ordering-create-non-ankorstore-fulfillment-order).\n\nThe successful acceptance of the request does not mean 100% guarantee that the order will be fulfilled by Fulfillment\nCentre. The validation on the Fulfillment Centre side is usually taking some time, so you should check the status of\nthe order by sending request to the [Get Master Order](#tag/Ordering/operation/get-master-order) endpoint, using the\ngenerated UUID as an identifier and including the `externalOrder` relation. The status of the included _External Order_\nwill indicate the actual status of the order.\n\n## ⚠️ Deprecation notice\n\n\n\nSome of the endpoints and documents from this section are deprecated and will be removed in the future.\nYou can temporarily still find them [here](#tag/Deprecated).\n\n
\n"
paths:
/api/v1/ordering/billing-exports:
post:
summary: Create Billing Export
operationId: ordering-billing-exports-create
description: Allow brands to request a bulk billing export
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
requestBody:
required: true
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
type:
type: string
enum:
- billing-exports
attributes:
type: object
properties:
exports:
type: array
items:
type: object
properties:
type:
type: string
enum:
- accounting
- accounting_complete
- invoicing
formats:
type: array
items:
type: string
enum:
- csv
- xlsx
- pdf
required:
- type
- formats
from:
type: string
format: date
to:
type: string
format: date
required:
- from
- to
- exports
required:
- attributes
required:
- data
responses:
'200':
description: Single Billing Export
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id001
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
data:
type: object
properties:
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
type:
type: string
enum:
- invoicing
- accounting
brandUuid:
type: string
format: uuid
filename:
type: string
status:
type: string
enum:
- created
- in_process
- completed
- partially_completed
- failed
from:
type: string
format: date-time
to:
type: string
format: date-time
expiresAt:
type: string
format: date-time
finishedAt:
type:
- 'null'
- string
format: date-time
downloadLink:
type:
- 'null'
- string
format: url
required:
- type
- brandUuid
- filename
- status
- from
- to
- expiresAt
required:
- type
- id
- attributes
required:
- data
- jsonapi
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id002
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id001
additionalProperties: false
required: &id003
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Bad request
status: '400'
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id002
required: *id003
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id002
required: *id003
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id002
required: *id003
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id002
required: *id003
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id002
required: *id003
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
'500':
description: '[Server Error](https://jsonapi.org/format/#errors)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id002
required: *id003
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
get:
summary: List Billing Exports
operationId: ordering-billing-exports-list
description: Returns a list of billing exports for the authenticated brand
tags:
- Ordering
responses:
'200':
description: Collection of billing exports
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id004
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
data:
type: array
items:
type: object
properties:
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
type:
type: string
enum:
- invoicing
- accounting
brandUuid:
type: string
format: uuid
filename:
type: string
status:
type: string
enum:
- created
- in_process
- completed
- partially_completed
- failed
from:
type: string
format: date-time
to:
type: string
format: date-time
expiresAt:
type: string
format: date-time
finishedAt:
type:
- 'null'
- string
format: date-time
downloadLink:
type:
- 'null'
- string
format: url
required:
- type
- brandUuid
- filename
- status
- from
- to
- expiresAt
required:
- type
- id
- attributes
required:
- data
- jsonapi
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id005
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id004
additionalProperties: false
required: &id006
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id005
required: *id006
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id005
required: *id006
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id005
required: *id006
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/ordering/billing-exports/{billing_export}/-actions/download:
get:
summary: Download a Billing Export
operationId: ordering-billing-exports-download
description: Downloads a completed billing export
tags:
- Ordering
parameters:
- schema:
type: string
format: uuid
name: billing_export
in: path
required: true
description: Uuid of the Billing Export to download
responses:
'200':
description: Returns billing export file content in body
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
file:
type: string
format: binary
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id007
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
required:
- data
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id008
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id007
additionalProperties: false
required: &id009
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id008
required: *id009
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id008
required: *id009
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id008
required: *id009
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id008
required: *id009
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'500':
description: '[Server Error](https://jsonapi.org/format/#errors)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id008
required: *id009
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/master-orders:
get:
summary: List Master Orders
description: Retrieve a list of Master Orders
operationId: list-master-orders
tags:
- Ordering
parameters:
- name: include
in: query
allowEmptyValue: true
required: false
schema:
type: string
enum:
- internalOrder
- externalOrder
- shipment
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: page[limit]
in: query
description: limit the amount of results returned
required: false
schema:
type: integer
format: int64
- name: page[before]
in: query
description: show items before the provided ID (uuid format)
required: false
schema:
type: string
- name: page[after]
in: query
description: show items after the provided ID (uuid format)
required: false
schema:
type: string
responses:
'200':
description: '[OK](https://jsonapi.org/format/#fetching-resources-responses-200)'
content:
application/vnd.api+json:
schema:
title: Master Order List
type: object
additionalProperties: false
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id013
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
meta:
type: object
description: Meta with Pagination Details
required:
- page
additionalProperties: true
properties:
page:
description: Cursor pagination details
type: object
properties:
from:
type:
- string
- 'null'
to:
type:
- string
- 'null'
hasMore:
type: boolean
perPage:
type: integer
required:
- from
- to
- perPage
links:
description: Pagination navigation links. If a link does not exist then you cannot paginate any further in that direction.
type: object
properties:
first:
type: string
format: url
next:
type: string
format: url
prev:
type: string
format: url
data:
type: array
items:
title: Master Order
type: object
additionalProperties: false
properties:
type:
type: string
default: master-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
type: object
additionalProperties: false
properties:
internalOrder:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: internal-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
externalOrder:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: external-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
shipment:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: shipments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
included:
description: One of the included resources
type: array
items:
anyOf:
- description: The resource object for Order
type: object
additionalProperties: false
title: Order Resource
properties:
type:
type: string
default: orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
properties:
masterOrderId:
type: string
description: The identifier of the linked master order
format: uuid
status:
type: string
example: ankor_confirmed
enum:
- ankor_confirmed
- rejected
- brand_confirmed
- shipping_labels_generated
- fulfillment_requested
- shipped
- reception_refused
- received
- invoiced
- brand_paid
- cancelled
reference:
type: integer
description: The order reference used on shipping labels, communication etc
brandCurrency:
type: string
description: The currency the brand is paid in
brandNetAmount:
description: The amount the brand is paid (total - fees - shipping cost + shipping refund). You may find the Ankorstore fees and the other amounts by including the orders billing items.
type: integer
brandTotalAmount:
description: The total of all order items not including VAT
type: integer
brandTotalAmountVat:
description: The total VAT of all order items
type: integer
brandTotalAmountWithVat:
description: The total of all order items including VAT
type: integer
shippingMethod:
type:
- 'null'
- string
description: The chosen shipping method after going through the shipping process
enum:
- ankorstore
- custom
- null
shippingOverview:
title: Order Resource -> Shipping Overview
description: Contains all information related to either shipping method (`ankorstore` or `custom`). This field is ONLY included when fetching a single order at a time.
type: object
properties:
availableShippingMethods:
type: array
description: Available shipping methods to use. Custom is ship with your own carrier outside of Ankorstore.
items:
enum:
- ankorstore
- custom
shipToAddress:
type: object
description: The address the order needs to be shipped to
required:
- street
- city
- postalCode
properties:
name:
type:
- 'null'
- string
description: The first and last name of the recipient
organisationName:
type:
- 'null'
- string
description: The organisational name of the recipient
street:
type:
- 'null'
- string
city:
type:
- 'null'
- string
postalCode:
type:
- 'null'
- string
countryCode:
type:
- 'null'
- string
expectedShippingDates:
type: object
description: The minimum and maximum expected shipping dates
required:
- minimum
- maximum
properties:
minimum:
type: string
format: datetime
maximum:
type: string
format: datetime
updatedMaximum:
type:
- 'null'
- string
format: datetime
provider:
type:
- 'null'
- string
description: The company providing the shipping service
enum:
- ups
- tnt
- gls
- dpd
- dhl
- dhl_express
- colissimo
- chronopost
- null
tracking:
type:
- 'null'
- object
description: Tracking details of the order
properties:
number:
type: string
link:
type: string
format: url
description: A URL to view the tracking status
latestQuote:
description: 'The quote is the price of the parcel(s) shipping.
If this object is null then no quote has been generated.'
type:
- 'null'
- object
properties:
id:
type: string
description: Id of the last quote generated. Every time a ship call is done, a new calculation is made based on parcels dimensions and weight sent
provider:
type: string
enum:
- custom
- ups
description: 'Provider responsible for the calculation. If custom, the calculation is done by Ankorstore and refunded.
If any other, the calculation is done by the provider and the shipping price is covered by Ankorstore (most of the case, see shippingCostsOverview section).'
rateProvider:
type: string
description: The provider of the rate for `rateAmount`.
enum:
- ups
- ankorstore
rateAmount:
type: object
description: Amount calculated for the parcels provided.
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
shippingCostsOverview:
type: object
description: Overview of costs related to shipping. This object is displayed only if a shipping cost fee or a refund exists
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
type:
type: string
enum:
- refund
- fee
description: 'Type of shipping costs:
If type = `refund` the amount will be refunded to the brand (added to brand net amount).
if type = `fee` the amount will be subtracted from brand net amount as a contribution to shipping costs.'
required:
- id
- provider
parcels:
type: array
uniqueItems: true
items:
description: Shipping Label Parcel
type: object
properties:
length:
type: integer
maximum: 274
width:
type: integer
maximum: 274
height:
type: integer
maximum: 274
distanceUnit:
type: string
description: The unit of distance
enum:
- cm
weight:
type: integer
minimum: 1
maximum: 30000
massUnit:
type: string
description: The unit of mass
enum:
- g
trackedPackage:
type:
- 'null'
- object
description: The tracking per parcel
properties:
labelUrl:
description: The URL to download the shipping label
type:
- 'null'
- string
format: url
eta:
type:
- 'null'
- string
format: datetime
trackingNumber:
type: string
trackingLink:
type: string
currentStatus:
type: object
properties: &id010
status:
type: string
description: The current status of the order/parcel
enum:
- UNKNOWN
- PRE_TRANSIT
- DELIVERED
- RETURNED
- FAILURE
statusDetails:
description: Human readable version of status
type:
- string
- 'null'
updatedAt:
type: string
description: Last time the status was updated
format: datetime
location:
type: object
description: Last known location
properties:
city:
type:
- 'null'
- string
state:
type:
- 'null'
- string
zip:
type:
- 'null'
- string
country:
type:
- 'null'
- string
required:
- labelUrl
- eta
- trackingLink
- currentStatus
required:
- length
- width
- height
- distanceUnit
- weight
- massUnit
- trackedPackage
transaction:
type:
- 'null'
- object
properties:
pickup:
description: The scheduled pickup, requires an API call to be made after the shipping labels have been generated.
type:
- 'null'
- object
required:
- pickupDate
- closeTime
- readyTime
- externalReferenceId
properties:
pickupDate:
type: string
format: datetime
description: The date of the pickup
readyTime:
type: string
description: 'Opening time of pickup Eg: 10:00:00'
closeTime:
type: string
description: 'Close time (pickup required to happen before this time) Eg: 13:00:00'
externalReferenceId:
type: string
description: The reference number for this pickup
tracking:
description: The tracking details for the overall shipment
type: object
properties:
eta:
type:
- 'null'
- string
format: datetime
description: The estimated time of arrival for the order
trackingNumber:
type: string
description: The tracking number of the order
trackingLink:
type: string
format: url
description: The tracking link for the order
currentStatus:
type: object
properties: *id010
required:
- pickup
- tracking
required:
- availableShippingMethods
- shipToAddress
- expectedShippingDates
brandRejectReason:
type:
- 'null'
- string
description: The reason the brand has given for rejecting the order
retailerRejectReason:
type:
- 'null'
- string
description: The reason the retailer rejected the reception of the order
retailerCancellationRequestReason:
type:
- 'null'
- string
description: The reason the retailer has given for a cancellation request
billingName:
type:
- 'null'
- string
description: The billing address name
billingOrganisationName:
type:
- 'null'
- string
description: The billing address organisation name
billingStreet:
type:
- 'null'
- string
description: The billing address street name
billingPostalCode:
type:
- 'null'
- string
description: The billing address postal code
billingCity:
type:
- 'null'
- string
description: The billing address city
billingCountryCode:
type:
- 'null'
- string
description: The billing address country code - ISO format
submittedAt:
type: string
format: datetime
description: The timestamp of when the order was submitted (order is placed)
shippedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the order was shipped
brandPaidAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the brand was paid
createdAt:
type: string
format: datetime
description: (deprecated) The timestamp of when the order was created (before retailer payment)
updatedAt:
type: string
format: datetime
description: The timestamp of when the order was updated (does not include other resources)
relationships:
type: object
properties:
retailer:
description: Related Retailer Resource
type: object
properties:
data:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id011
- id
- type
properties: &id012
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
- type: object
properties:
type:
const: retailers
billingItems:
description: Related Billing Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
- type: object
properties:
type:
const: billing-items
orderItems:
description: Related Order Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
- type: object
properties:
type:
const: order-items
orderItems-productOption:
description: 'Schema: Order Item -> Product Option Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
orderItems-productOption-product:
description: 'Schema: Order Item -> Product Option Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
orderItems-productVariant:
description: 'Schema: Order Item -> Product Variant Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
orderItems-productVariant-product:
description: 'Schema: Order Item -> Product Variant Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
required:
- type
- id
- title: Order Item Resource
type: object
additionalProperties: false
examples:
- type: order-items
id: 62b263a8-00e1-1ecb-98d2-0242ac170007
attributes:
brandCurrency: EUR
quantity: 1
multipliedQuantity: 12
vatRate: 5.5
brandAmount: 3996
brandAmountVat: 220
brandAmountWithVat: 4216
brandUnitPrice: 333
createdAt: '2022-02-02T19:43:14.000000Z'
updatedAt: '2022-02-02T19:43:14.000000Z'
relationships:
productOption:
data:
type: productOption
id: '114135'
properties:
type:
type: string
default: order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
brandCurrency:
type: string
description: The currency of the amounts for the brand
quantity:
type: integer
description: The ordered quantity of the product
multipliedQuantity:
type: integer
description: Some products are sold in fixed quantities, e.g a case of 6 wine bottles. If the quantity was 2, the multiplied quantity of wine bottles would be 12 (6 x 2). This "unitMultiplier" can be found on the product.
vatRate:
type: number
format: float
description: The VAT percentage rate of the order item (0-100)
brandAmount:
description: The amount due to the brand for this item
type: integer
brandAmountVat:
description: The VAT amount due to the brand for this item
type: integer
brandAmountWithVat:
description: The amount + VAT due to the brand for this item
type: integer
brandUnitPrice:
description: The cost of a single unit of this item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp this order item was created
updatedAt:
type: string
format: datetime
description: The timestamp this order item was updated
relationships:
type: object
properties:
productOptions:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id011
properties: *id012
additionalProperties: false
uniqueItems: true
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
required:
- type
- id
- type: object
title: External Order Resource
description: The resource object for External Order
additionalProperties: false
properties:
type:
type: string
default: external-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
- shippingAddress
properties:
status:
type: string
description: Status of the order.
customReference:
type:
- 'null'
- string
description: Custom reference of the order.
shippingAddress:
type: object
description: Shipping address of the recipient.
required:
- firstName
- lastName
- email
- phoneNumber
- company
- street
- city
- countryCode
- postalCode
properties:
firstName:
type: string
description: First name of the person, receiving the order
lastName:
type: string
description: Last name of the person, receiving the order
email:
type: string
format: email
description: Email of the person, receiving the order
phoneNumber:
type: string
description: Phone number of the person, receiving the order.
company:
type:
- 'null'
- string
description: Name of the company.
street:
type: string
description: Street address of the destination place.
city:
type: string
description: Name of the destination city.
postalCode:
type: string
description: Postal code of the destination place.
countryCode:
type: string
description: ISO 3166-1 country code.
relationships:
type: object
additionalProperties: false
properties:
orderItems:
type: object
required:
- data
properties:
data:
type: array
items:
type: object
required:
- type
- id
properties:
type:
type: string
default: external-order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- type: object
title: External Order Item Resource
description: The resource object for External Order Item
additionalProperties: false
properties:
type:
type: string
default: external-order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- productVariantUuid
- batchQuantity
- unitQuantity
properties:
productVariantUuid:
type: string
format: uuid
batchQuantity:
type: integer
unitQuantity:
type: integer
- title: Order shipment
type: object
additionalProperties: false
properties:
type:
type: string
default: shipments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- shippedAt
- trackingNumber
- shippingCarrier
- trackingUrl
properties:
shippedAt:
type:
- 'null'
- string
format: date-time
trackingNumber:
type:
- 'null'
- string
shippingCarrier:
type:
- 'null'
- string
trackingUrl:
type:
- 'null'
- string
examples:
without-includes:
summary: List without includes for an internal order
value:
jsonapi:
version: '1.0'
meta:
page:
from: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
to: 0ca13de1-8e4b-4e67-a147-185cc5f6f57f
hasMore: true
perPage: 15
links:
first: https://www.ankorstore.com/api/v1/master-orders?page%5Blimit%5D=15
prev: https://www.ankorstore.com/api/v1/master-orders?page%5Bbefore%5D=1ee03e6f-86a7-6836-9999-6a8e7ae4b00f&page%5Blimit%5D=15
next: https://www.ankorstore.com/api/v1/master-orders?page%5Bafter%5D=0ca13de1-8e4b-4e67-a147-185cc5f6f57f&page%5Blimit%5D=15
data:
- type: master-orders
id: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
relationships:
internalOrder:
data:
type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
- type: master-orders
id: 0ca13de1-8e4b-4e67-a147-185cc5f6f57f
relationships:
externalOrder:
data:
type: external-orders
id: f47ac10b-58cc-4372-a567-0e02b2c3d479
with-includes:
summary: List with ?include=internalOrder
value:
jsonapi:
version: '1.0'
meta:
page:
from: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
to: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
hasMore: false
perPage: 15
links:
first: https://www.ankorstore.com/api/v1/master-orders?include=internalOrder&page%5Blimit%5D=15
data:
- type: master-orders
id: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
relationships:
internalOrder:
data:
type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
included:
- type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
attributes:
masterOrderId: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
status: brand_paid
brandCurrency: EUR
reference: 2633636
brandNetAmount: 16991
brandTotalAmount: 16320
brandTotalAmountVat: 897
brandTotalAmountWithVat: 17217
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Kim-Léa Dinh
billingOrganisationName: coeur épicerie
billingStreet: 18 rue du Général Guilhem
billingPostalCode: '75011'
billingCity: Paris
billingCountryCode: FR
submittedAt: '2023-06-05T21:21:43+00:00'
shippedAt: '2023-06-09T14:25:22+00:00'
brandPaidAt: '2023-08-10T01:05:48+00:00'
createdAt: '2023-06-05T18:07:45+00:00'
updatedAt: '2023-08-11T06:11:55+00:00'
shippingMethod: custom
shippingOverview:
shipToAddress:
name: Kim-Léa Dinh
organisationName: coeur épicerie
street: 18 rue du Géneral Guilhem
city: Paris
postalCode: '75011'
countryCode: FR
expectedShippingDates:
minimum: '2023-06-05T00:00:00+00:00'
maximum: '2023-06-07T23:59:59+00:00'
provider: other
tracking:
number: ''
link: ''
latestQuote:
id: 1ee06d17-3eb5-6b32-b2bc-72868949c404
provider: custom
rateAmount:
amount: 0
currency: EUR
rateProvider: ankorstore
parcels:
- length: null
width: null
height: null
weight: 40000
distanceUnit: cm
massUnit: g
trackedPackage: null
transaction:
pickup: null
tracking:
eta: null
trackingNumber: ''
trackingLink: null
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: null
location:
city: null
state: null
zip: null
country: null
availableShippingMethods:
- ankorstore
- custom
relationships:
retailer:
data:
type: retailers
id: 1ecba0f4-adf0-6fbe-badf-9eb2e4c4d56c
billingItems:
data:
- type: billing-items
id: 1ece8a8c-55b9-63c6-95c3-0242ac160007
orderItems:
data:
- type: order-items
id: 1ece8a8c-73ad-6ae4-a4ab-0242ac160007
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id014
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id013
additionalProperties: false
required: &id015
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id014
required: *id015
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id014
required: *id015
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id014
required: *id015
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/master-orders/{master_order}:
get:
summary: Get Master Order
description: Retrieve a specific Master Order
operationId: get-master-order
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: master_order
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- name: include
in: query
allowEmptyValue: true
required: false
schema:
type: string
enum:
- internalOrder
- externalOrder
- shipment
responses:
'200':
description: '[OK](https://jsonapi.org/format/#fetching-resources-responses-200)'
content:
application/vnd.api+json:
schema:
title: Master Order Get
type: object
additionalProperties: false
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id019
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
data:
title: Master Order
type: object
additionalProperties: false
properties:
type:
type: string
default: master-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
type: object
additionalProperties: false
properties:
internalOrder:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: internal-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
externalOrder:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: external-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
shipment:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: shipments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
included:
description: One of the included resources
type: array
items:
anyOf:
- description: The resource object for Order
type: object
additionalProperties: false
title: Order Resource
properties:
type:
type: string
default: orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
properties:
masterOrderId:
type: string
description: The identifier of the linked master order
format: uuid
status:
type: string
example: ankor_confirmed
enum:
- ankor_confirmed
- rejected
- brand_confirmed
- shipping_labels_generated
- fulfillment_requested
- shipped
- reception_refused
- received
- invoiced
- brand_paid
- cancelled
reference:
type: integer
description: The order reference used on shipping labels, communication etc
brandCurrency:
type: string
description: The currency the brand is paid in
brandNetAmount:
description: The amount the brand is paid (total - fees - shipping cost + shipping refund). You may find the Ankorstore fees and the other amounts by including the orders billing items.
type: integer
brandTotalAmount:
description: The total of all order items not including VAT
type: integer
brandTotalAmountVat:
description: The total VAT of all order items
type: integer
brandTotalAmountWithVat:
description: The total of all order items including VAT
type: integer
shippingMethod:
type:
- 'null'
- string
description: The chosen shipping method after going through the shipping process
enum:
- ankorstore
- custom
- null
shippingOverview:
title: Order Resource -> Shipping Overview
description: Contains all information related to either shipping method (`ankorstore` or `custom`). This field is ONLY included when fetching a single order at a time.
type: object
properties:
availableShippingMethods:
type: array
description: Available shipping methods to use. Custom is ship with your own carrier outside of Ankorstore.
items:
enum:
- ankorstore
- custom
shipToAddress:
type: object
description: The address the order needs to be shipped to
required:
- street
- city
- postalCode
properties:
name:
type:
- 'null'
- string
description: The first and last name of the recipient
organisationName:
type:
- 'null'
- string
description: The organisational name of the recipient
street:
type:
- 'null'
- string
city:
type:
- 'null'
- string
postalCode:
type:
- 'null'
- string
countryCode:
type:
- 'null'
- string
expectedShippingDates:
type: object
description: The minimum and maximum expected shipping dates
required:
- minimum
- maximum
properties:
minimum:
type: string
format: datetime
maximum:
type: string
format: datetime
updatedMaximum:
type:
- 'null'
- string
format: datetime
provider:
type:
- 'null'
- string
description: The company providing the shipping service
enum:
- ups
- tnt
- gls
- dpd
- dhl
- dhl_express
- colissimo
- chronopost
- null
tracking:
type:
- 'null'
- object
description: Tracking details of the order
properties:
number:
type: string
link:
type: string
format: url
description: A URL to view the tracking status
latestQuote:
description: 'The quote is the price of the parcel(s) shipping.
If this object is null then no quote has been generated.'
type:
- 'null'
- object
properties:
id:
type: string
description: Id of the last quote generated. Every time a ship call is done, a new calculation is made based on parcels dimensions and weight sent
provider:
type: string
enum:
- custom
- ups
description: 'Provider responsible for the calculation. If custom, the calculation is done by Ankorstore and refunded.
If any other, the calculation is done by the provider and the shipping price is covered by Ankorstore (most of the case, see shippingCostsOverview section).'
rateProvider:
type: string
description: The provider of the rate for `rateAmount`.
enum:
- ups
- ankorstore
rateAmount:
type: object
description: Amount calculated for the parcels provided.
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
shippingCostsOverview:
type: object
description: Overview of costs related to shipping. This object is displayed only if a shipping cost fee or a refund exists
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
type:
type: string
enum:
- refund
- fee
description: 'Type of shipping costs:
If type = `refund` the amount will be refunded to the brand (added to brand net amount).
if type = `fee` the amount will be subtracted from brand net amount as a contribution to shipping costs.'
required:
- id
- provider
parcels:
type: array
uniqueItems: true
items:
description: Shipping Label Parcel
type: object
properties:
length:
type: integer
maximum: 274
width:
type: integer
maximum: 274
height:
type: integer
maximum: 274
distanceUnit:
type: string
description: The unit of distance
enum:
- cm
weight:
type: integer
minimum: 1
maximum: 30000
massUnit:
type: string
description: The unit of mass
enum:
- g
trackedPackage:
type:
- 'null'
- object
description: The tracking per parcel
properties:
labelUrl:
description: The URL to download the shipping label
type:
- 'null'
- string
format: url
eta:
type:
- 'null'
- string
format: datetime
trackingNumber:
type: string
trackingLink:
type: string
currentStatus:
type: object
properties: &id016
status:
type: string
description: The current status of the order/parcel
enum:
- UNKNOWN
- PRE_TRANSIT
- DELIVERED
- RETURNED
- FAILURE
statusDetails:
description: Human readable version of status
type:
- string
- 'null'
updatedAt:
type: string
description: Last time the status was updated
format: datetime
location:
type: object
description: Last known location
properties:
city:
type:
- 'null'
- string
state:
type:
- 'null'
- string
zip:
type:
- 'null'
- string
country:
type:
- 'null'
- string
required:
- labelUrl
- eta
- trackingLink
- currentStatus
required:
- length
- width
- height
- distanceUnit
- weight
- massUnit
- trackedPackage
transaction:
type:
- 'null'
- object
properties:
pickup:
description: The scheduled pickup, requires an API call to be made after the shipping labels have been generated.
type:
- 'null'
- object
required:
- pickupDate
- closeTime
- readyTime
- externalReferenceId
properties:
pickupDate:
type: string
format: datetime
description: The date of the pickup
readyTime:
type: string
description: 'Opening time of pickup Eg: 10:00:00'
closeTime:
type: string
description: 'Close time (pickup required to happen before this time) Eg: 13:00:00'
externalReferenceId:
type: string
description: The reference number for this pickup
tracking:
description: The tracking details for the overall shipment
type: object
properties:
eta:
type:
- 'null'
- string
format: datetime
description: The estimated time of arrival for the order
trackingNumber:
type: string
description: The tracking number of the order
trackingLink:
type: string
format: url
description: The tracking link for the order
currentStatus:
type: object
properties: *id016
required:
- pickup
- tracking
required:
- availableShippingMethods
- shipToAddress
- expectedShippingDates
brandRejectReason:
type:
- 'null'
- string
description: The reason the brand has given for rejecting the order
retailerRejectReason:
type:
- 'null'
- string
description: The reason the retailer rejected the reception of the order
retailerCancellationRequestReason:
type:
- 'null'
- string
description: The reason the retailer has given for a cancellation request
billingName:
type:
- 'null'
- string
description: The billing address name
billingOrganisationName:
type:
- 'null'
- string
description: The billing address organisation name
billingStreet:
type:
- 'null'
- string
description: The billing address street name
billingPostalCode:
type:
- 'null'
- string
description: The billing address postal code
billingCity:
type:
- 'null'
- string
description: The billing address city
billingCountryCode:
type:
- 'null'
- string
description: The billing address country code - ISO format
submittedAt:
type: string
format: datetime
description: The timestamp of when the order was submitted (order is placed)
shippedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the order was shipped
brandPaidAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the brand was paid
createdAt:
type: string
format: datetime
description: (deprecated) The timestamp of when the order was created (before retailer payment)
updatedAt:
type: string
format: datetime
description: The timestamp of when the order was updated (does not include other resources)
relationships:
type: object
properties:
retailer:
description: Related Retailer Resource
type: object
properties:
data:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id017
- id
- type
properties: &id018
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
- type: object
properties:
type:
const: retailers
billingItems:
description: Related Billing Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
- type: object
properties:
type:
const: billing-items
orderItems:
description: Related Order Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
- type: object
properties:
type:
const: order-items
orderItems-productOption:
description: 'Schema: Order Item -> Product Option Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
orderItems-productOption-product:
description: 'Schema: Order Item -> Product Option Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
orderItems-productVariant:
description: 'Schema: Order Item -> Product Variant Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
orderItems-productVariant-product:
description: 'Schema: Order Item -> Product Variant Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
required:
- type
- id
- type: object
title: External Order Resource
description: The resource object for External Order
additionalProperties: false
properties:
type:
type: string
default: external-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
- shippingAddress
properties:
status:
type: string
description: Status of the order.
customReference:
type:
- 'null'
- string
description: Custom reference of the order.
shippingAddress:
type: object
description: Shipping address of the recipient.
required:
- firstName
- lastName
- email
- phoneNumber
- company
- street
- city
- countryCode
- postalCode
properties:
firstName:
type: string
description: First name of the person, receiving the order
lastName:
type: string
description: Last name of the person, receiving the order
email:
type: string
format: email
description: Email of the person, receiving the order
phoneNumber:
type: string
description: Phone number of the person, receiving the order.
company:
type:
- 'null'
- string
description: Name of the company.
street:
type: string
description: Street address of the destination place.
city:
type: string
description: Name of the destination city.
postalCode:
type: string
description: Postal code of the destination place.
countryCode:
type: string
description: ISO 3166-1 country code.
relationships:
type: object
additionalProperties: false
properties:
orderItems:
type: object
required:
- data
properties:
data:
type: array
items:
type: object
required:
- type
- id
properties:
type:
type: string
default: external-order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- type: object
title: External Order Item Resource
description: The resource object for External Order Item
additionalProperties: false
properties:
type:
type: string
default: external-order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- productVariantUuid
- batchQuantity
- unitQuantity
properties:
productVariantUuid:
type: string
format: uuid
batchQuantity:
type: integer
unitQuantity:
type: integer
- title: Order Item Resource
type: object
additionalProperties: false
examples:
- type: order-items
id: 62b263a8-00e1-1ecb-98d2-0242ac170007
attributes:
brandCurrency: EUR
quantity: 1
multipliedQuantity: 12
vatRate: 5.5
brandAmount: 3996
brandAmountVat: 220
brandAmountWithVat: 4216
brandUnitPrice: 333
createdAt: '2022-02-02T19:43:14.000000Z'
updatedAt: '2022-02-02T19:43:14.000000Z'
relationships:
productOption:
data:
type: productOption
id: '114135'
properties:
type:
type: string
default: order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
brandCurrency:
type: string
description: The currency of the amounts for the brand
quantity:
type: integer
description: The ordered quantity of the product
multipliedQuantity:
type: integer
description: Some products are sold in fixed quantities, e.g a case of 6 wine bottles. If the quantity was 2, the multiplied quantity of wine bottles would be 12 (6 x 2). This "unitMultiplier" can be found on the product.
vatRate:
type: number
format: float
description: The VAT percentage rate of the order item (0-100)
brandAmount:
description: The amount due to the brand for this item
type: integer
brandAmountVat:
description: The VAT amount due to the brand for this item
type: integer
brandAmountWithVat:
description: The amount + VAT due to the brand for this item
type: integer
brandUnitPrice:
description: The cost of a single unit of this item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp this order item was created
updatedAt:
type: string
format: datetime
description: The timestamp this order item was updated
relationships:
type: object
properties:
productOptions:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id017
properties: *id018
additionalProperties: false
uniqueItems: true
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
required:
- type
- id
examples:
without-includes:
summary: Get without includes for an internal order
value:
jsonapi:
version: '1.0'
data:
type: master-orders
id: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
relationships:
internalOrder:
data:
type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
with-includes:
summary: Get with ?include=internalOrder,shipment
value:
jsonapi:
version: '1.0'
data:
type: master-orders
id: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
relationships:
internalOrder:
data:
type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
shipment:
data:
type: shipments
id: 9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6
included:
- type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
attributes:
masterOrderId: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
status: brand_paid
brandCurrency: EUR
reference: 2633636
brandNetAmount: 16991
brandTotalAmount: 16320
brandTotalAmountVat: 897
brandTotalAmountWithVat: 17217
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Kim-Léa Dinh
billingOrganisationName: coeur épicerie
billingStreet: 18 rue du Général Guilhem
billingPostalCode: '75011'
billingCity: Paris
billingCountryCode: FR
submittedAt: '2023-06-05T21:21:43+00:00'
shippedAt: '2023-06-09T14:25:22+00:00'
brandPaidAt: '2023-08-10T01:05:48+00:00'
createdAt: '2023-06-05T18:07:45+00:00'
updatedAt: '2023-08-11T06:11:55+00:00'
shippingMethod: custom
relationships:
retailer:
data:
type: retailers
id: 1ecba0f4-adf0-6fbe-badf-9eb2e4c4d56c
billingItems:
data:
- type: billing-items
id: 1ece8a8c-55b9-63c6-95c3-0242ac160007
orderItems:
data:
- type: order-items
id: 1ece8a8c-73ad-6ae4-a4ab-0242ac160007
- type: shipments
id: 9f8e7d6c-5b4a-3c2d-1e0f-a1b2c3d4e5f6
attributes:
shippedAt: '2023-06-09T14:25:22+00:00'
trackingNumber: 1Z999AA10123456784
shippingCarrier: ups
trackingUrl: https://www.ups.com/track?tracknum=1Z999AA10123456784
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id020
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id019
additionalProperties: false
required: &id021
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id020
required: *id021
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id020
required: *id021
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id020
required: *id021
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
patch:
summary: Patch Master Order
description: Patch a specific Master Order
operationId: patch-master-order
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: master_order
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
requestBody:
description: Master Order update payload
required: true
content:
application/vnd.api+json:
schema:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- attributes
properties:
type:
type: string
enum:
- internal-order
- external-order
attributes:
type: object
properties:
expected_maximum_shipping_date:
type: string
format: date
description: The expected maximum shipping date. Must be today or a future date.
responses:
'200':
description: '[OK](https://jsonapi.org/format/#fetching-resources-responses-200)'
content:
application/vnd.api+json:
schema:
title: Master Order Get
type: object
additionalProperties: false
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id025
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
data:
title: Master Order
type: object
additionalProperties: false
properties:
type:
type: string
default: master-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
type: object
additionalProperties: false
properties:
internalOrder:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: internal-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
externalOrder:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: external-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
shipment:
type: object
required:
- data
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
default: shipments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
included:
description: One of the included resources
type: array
items:
anyOf:
- description: The resource object for Order
type: object
additionalProperties: false
title: Order Resource
properties:
type:
type: string
default: orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
properties:
masterOrderId:
type: string
description: The identifier of the linked master order
format: uuid
status:
type: string
example: ankor_confirmed
enum:
- ankor_confirmed
- rejected
- brand_confirmed
- shipping_labels_generated
- fulfillment_requested
- shipped
- reception_refused
- received
- invoiced
- brand_paid
- cancelled
reference:
type: integer
description: The order reference used on shipping labels, communication etc
brandCurrency:
type: string
description: The currency the brand is paid in
brandNetAmount:
description: The amount the brand is paid (total - fees - shipping cost + shipping refund). You may find the Ankorstore fees and the other amounts by including the orders billing items.
type: integer
brandTotalAmount:
description: The total of all order items not including VAT
type: integer
brandTotalAmountVat:
description: The total VAT of all order items
type: integer
brandTotalAmountWithVat:
description: The total of all order items including VAT
type: integer
shippingMethod:
type:
- 'null'
- string
description: The chosen shipping method after going through the shipping process
enum:
- ankorstore
- custom
- null
shippingOverview:
title: Order Resource -> Shipping Overview
description: Contains all information related to either shipping method (`ankorstore` or `custom`). This field is ONLY included when fetching a single order at a time.
type: object
properties:
availableShippingMethods:
type: array
description: Available shipping methods to use. Custom is ship with your own carrier outside of Ankorstore.
items:
enum:
- ankorstore
- custom
shipToAddress:
type: object
description: The address the order needs to be shipped to
required:
- street
- city
- postalCode
properties:
name:
type:
- 'null'
- string
description: The first and last name of the recipient
organisationName:
type:
- 'null'
- string
description: The organisational name of the recipient
street:
type:
- 'null'
- string
city:
type:
- 'null'
- string
postalCode:
type:
- 'null'
- string
countryCode:
type:
- 'null'
- string
expectedShippingDates:
type: object
description: The minimum and maximum expected shipping dates
required:
- minimum
- maximum
properties:
minimum:
type: string
format: datetime
maximum:
type: string
format: datetime
updatedMaximum:
type:
- 'null'
- string
format: datetime
provider:
type:
- 'null'
- string
description: The company providing the shipping service
enum:
- ups
- tnt
- gls
- dpd
- dhl
- dhl_express
- colissimo
- chronopost
- null
tracking:
type:
- 'null'
- object
description: Tracking details of the order
properties:
number:
type: string
link:
type: string
format: url
description: A URL to view the tracking status
latestQuote:
description: 'The quote is the price of the parcel(s) shipping.
If this object is null then no quote has been generated.'
type:
- 'null'
- object
properties:
id:
type: string
description: Id of the last quote generated. Every time a ship call is done, a new calculation is made based on parcels dimensions and weight sent
provider:
type: string
enum:
- custom
- ups
description: 'Provider responsible for the calculation. If custom, the calculation is done by Ankorstore and refunded.
If any other, the calculation is done by the provider and the shipping price is covered by Ankorstore (most of the case, see shippingCostsOverview section).'
rateProvider:
type: string
description: The provider of the rate for `rateAmount`.
enum:
- ups
- ankorstore
rateAmount:
type: object
description: Amount calculated for the parcels provided.
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
shippingCostsOverview:
type: object
description: Overview of costs related to shipping. This object is displayed only if a shipping cost fee or a refund exists
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
type:
type: string
enum:
- refund
- fee
description: 'Type of shipping costs:
If type = `refund` the amount will be refunded to the brand (added to brand net amount).
if type = `fee` the amount will be subtracted from brand net amount as a contribution to shipping costs.'
required:
- id
- provider
parcels:
type: array
uniqueItems: true
items:
description: Shipping Label Parcel
type: object
properties:
length:
type: integer
maximum: 274
width:
type: integer
maximum: 274
height:
type: integer
maximum: 274
distanceUnit:
type: string
description: The unit of distance
enum:
- cm
weight:
type: integer
minimum: 1
maximum: 30000
massUnit:
type: string
description: The unit of mass
enum:
- g
trackedPackage:
type:
- 'null'
- object
description: The tracking per parcel
properties:
labelUrl:
description: The URL to download the shipping label
type:
- 'null'
- string
format: url
eta:
type:
- 'null'
- string
format: datetime
trackingNumber:
type: string
trackingLink:
type: string
currentStatus:
type: object
properties: &id022
status:
type: string
description: The current status of the order/parcel
enum:
- UNKNOWN
- PRE_TRANSIT
- DELIVERED
- RETURNED
- FAILURE
statusDetails:
description: Human readable version of status
type:
- string
- 'null'
updatedAt:
type: string
description: Last time the status was updated
format: datetime
location:
type: object
description: Last known location
properties:
city:
type:
- 'null'
- string
state:
type:
- 'null'
- string
zip:
type:
- 'null'
- string
country:
type:
- 'null'
- string
required:
- labelUrl
- eta
- trackingLink
- currentStatus
required:
- length
- width
- height
- distanceUnit
- weight
- massUnit
- trackedPackage
transaction:
type:
- 'null'
- object
properties:
pickup:
description: The scheduled pickup, requires an API call to be made after the shipping labels have been generated.
type:
- 'null'
- object
required:
- pickupDate
- closeTime
- readyTime
- externalReferenceId
properties:
pickupDate:
type: string
format: datetime
description: The date of the pickup
readyTime:
type: string
description: 'Opening time of pickup Eg: 10:00:00'
closeTime:
type: string
description: 'Close time (pickup required to happen before this time) Eg: 13:00:00'
externalReferenceId:
type: string
description: The reference number for this pickup
tracking:
description: The tracking details for the overall shipment
type: object
properties:
eta:
type:
- 'null'
- string
format: datetime
description: The estimated time of arrival for the order
trackingNumber:
type: string
description: The tracking number of the order
trackingLink:
type: string
format: url
description: The tracking link for the order
currentStatus:
type: object
properties: *id022
required:
- pickup
- tracking
required:
- availableShippingMethods
- shipToAddress
- expectedShippingDates
brandRejectReason:
type:
- 'null'
- string
description: The reason the brand has given for rejecting the order
retailerRejectReason:
type:
- 'null'
- string
description: The reason the retailer rejected the reception of the order
retailerCancellationRequestReason:
type:
- 'null'
- string
description: The reason the retailer has given for a cancellation request
billingName:
type:
- 'null'
- string
description: The billing address name
billingOrganisationName:
type:
- 'null'
- string
description: The billing address organisation name
billingStreet:
type:
- 'null'
- string
description: The billing address street name
billingPostalCode:
type:
- 'null'
- string
description: The billing address postal code
billingCity:
type:
- 'null'
- string
description: The billing address city
billingCountryCode:
type:
- 'null'
- string
description: The billing address country code - ISO format
submittedAt:
type: string
format: datetime
description: The timestamp of when the order was submitted (order is placed)
shippedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the order was shipped
brandPaidAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the brand was paid
createdAt:
type: string
format: datetime
description: (deprecated) The timestamp of when the order was created (before retailer payment)
updatedAt:
type: string
format: datetime
description: The timestamp of when the order was updated (does not include other resources)
relationships:
type: object
properties:
retailer:
description: Related Retailer Resource
type: object
properties:
data:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id023
- id
- type
properties: &id024
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
- type: object
properties:
type:
const: retailers
billingItems:
description: Related Billing Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
- type: object
properties:
type:
const: billing-items
orderItems:
description: Related Order Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
- type: object
properties:
type:
const: order-items
orderItems-productOption:
description: 'Schema: Order Item -> Product Option Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
orderItems-productOption-product:
description: 'Schema: Order Item -> Product Option Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
orderItems-productVariant:
description: 'Schema: Order Item -> Product Variant Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
orderItems-productVariant-product:
description: 'Schema: Order Item -> Product Variant Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
required:
- type
- id
- type: object
title: External Order Resource
description: The resource object for External Order
additionalProperties: false
properties:
type:
type: string
default: external-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
- shippingAddress
properties:
status:
type: string
description: Status of the order.
customReference:
type:
- 'null'
- string
description: Custom reference of the order.
shippingAddress:
type: object
description: Shipping address of the recipient.
required:
- firstName
- lastName
- email
- phoneNumber
- company
- street
- city
- countryCode
- postalCode
properties:
firstName:
type: string
description: First name of the person, receiving the order
lastName:
type: string
description: Last name of the person, receiving the order
email:
type: string
format: email
description: Email of the person, receiving the order
phoneNumber:
type: string
description: Phone number of the person, receiving the order.
company:
type:
- 'null'
- string
description: Name of the company.
street:
type: string
description: Street address of the destination place.
city:
type: string
description: Name of the destination city.
postalCode:
type: string
description: Postal code of the destination place.
countryCode:
type: string
description: ISO 3166-1 country code.
relationships:
type: object
additionalProperties: false
properties:
orderItems:
type: object
required:
- data
properties:
data:
type: array
items:
type: object
required:
- type
- id
properties:
type:
type: string
default: external-order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- type: object
title: External Order Item Resource
description: The resource object for External Order Item
additionalProperties: false
properties:
type:
type: string
default: external-order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- productVariantUuid
- batchQuantity
- unitQuantity
properties:
productVariantUuid:
type: string
format: uuid
batchQuantity:
type: integer
unitQuantity:
type: integer
- title: Order Item Resource
type: object
additionalProperties: false
examples:
- type: order-items
id: 62b263a8-00e1-1ecb-98d2-0242ac170007
attributes:
brandCurrency: EUR
quantity: 1
multipliedQuantity: 12
vatRate: 5.5
brandAmount: 3996
brandAmountVat: 220
brandAmountWithVat: 4216
brandUnitPrice: 333
createdAt: '2022-02-02T19:43:14.000000Z'
updatedAt: '2022-02-02T19:43:14.000000Z'
relationships:
productOption:
data:
type: productOption
id: '114135'
properties:
type:
type: string
default: order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
brandCurrency:
type: string
description: The currency of the amounts for the brand
quantity:
type: integer
description: The ordered quantity of the product
multipliedQuantity:
type: integer
description: Some products are sold in fixed quantities, e.g a case of 6 wine bottles. If the quantity was 2, the multiplied quantity of wine bottles would be 12 (6 x 2). This "unitMultiplier" can be found on the product.
vatRate:
type: number
format: float
description: The VAT percentage rate of the order item (0-100)
brandAmount:
description: The amount due to the brand for this item
type: integer
brandAmountVat:
description: The VAT amount due to the brand for this item
type: integer
brandAmountWithVat:
description: The amount + VAT due to the brand for this item
type: integer
brandUnitPrice:
description: The cost of a single unit of this item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp this order item was created
updatedAt:
type: string
format: datetime
description: The timestamp this order item was updated
relationships:
type: object
properties:
productOptions:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id023
properties: *id024
additionalProperties: false
uniqueItems: true
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
required:
- type
- id
examples:
example:
value:
jsonapi:
version: '1.0'
data:
type: master-orders
id: 1ee03e6f-86a7-6836-9999-6a8e7ae4b00f
relationships:
internalOrder:
data:
type: orders
id: 1ee03cbd-f11c-64b8-9901-e22795c3e3c4
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id026
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id025
additionalProperties: false
required: &id027
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id026
required: *id027
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id026
required: *id027
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id026
required: *id027
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id026
required: *id027
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
/api/v1/master-orders/{orderId}/-actions/check-fulfillability:
get:
summary: Check whether a master order is fulfillable
operationId: master-order-check-fulfillability
description: Check whether a master order is fulfillable
tags:
- Ordering
responses:
'200':
description: No content
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id028
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id029
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id028
additionalProperties: false
required: &id030
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id029
required: *id030
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id029
required: *id030
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id029
required: *id030
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id029
required: *id030
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id029
required: *id030
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
parameters:
- schema:
type: string
in: header
name: Accept
description: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
/api/v1/master-orders/{orderId}/-actions/request-fulfillment:
post:
summary: Request fulfillment for a master order
operationId: master-order-request-fulfillment
description: Request fulfillment for a master order
tags:
- Ordering
responses:
'200':
description: No content
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id031
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id032
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id031
additionalProperties: false
required: &id033
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id032
required: *id033
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id032
required: *id033
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id032
required: *id033
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id032
required: *id033
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id032
required: *id033
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
requestBody:
required: false
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
items:
type: array
description: 'Per-item minimum remaining shelf life overrides. When specified, the fulfillment center will ensure items have at least this many days of shelf life remaining.
'
items:
type: object
properties:
productVariantId:
type: string
format: uuid
description: The product variant UUID
minimumRemainingShelfLife:
type: integer
nullable: true
description: Minimum remaining shelf life in days.
required:
- productVariantId
parameters:
- schema:
type: string
in: header
name: Accept
description: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
/api/v1/master-orders/{orderId}/fulfillment-orders:
get:
summary: List Master Order Fulfillments Relationships
description: Retrieve a list of fulfillment relationships for a Master Order
operationId: ordering-master-orders-relationships-fulfillment-orders
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
responses:
'200':
description: Set of fulfillment orders
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: array
items:
properties:
type:
type: string
default: fulfillment-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
reference:
description: Unique human readable reference for the fulfillment order, used for communication with the warehouse
type: string
pattern: ^O_[0-9]{1,18}|[A-HJ-NP-TV-Z0-9]+(_\d+)?$
status:
type: string
enum: &id034
- internal
- requested
- created
- scheduled
- released
- shipped
- cancelled
- cancellation_requested
readOnly: true
createdAt:
type: string
format: date-time
readOnly: true
items:
type: array
items:
type: object
properties:
fulfillmentItemId:
type: string
format: uuid
quantity:
type: integer
description: quantity in batches
lotNumber:
type:
- 'null'
- string
expiryDate:
type:
- 'null'
- string
format: date-time
required:
- fulfillmentItemId
- quantity
shippedItems:
type: array
items:
type: object
properties:
fulfillableId:
type: string
format: uuid
batchQuantity:
type: integer
unitQuantity:
type: integer
lotNumber:
type:
- 'null'
- string
expiryDate:
type:
- 'null'
- string
format: date-time
required:
- fulfillableId
- batchQuantity
- unitQuantity
recipientType:
type: string
enum:
- consumer
- business
default: business
description: The type of recipient for a fulfillment order
externalReference:
type:
- string
- 'null'
instructionText:
deprecated: true
description: '[Deprecated] This field is deprecated and will be removed in a future version. Use instructions.externalReference instead'
type:
- string
- 'null'
instructions:
anyOf:
- type: object
properties:
externalReference:
type:
- string
- 'null'
deliverySchedule:
anyOf:
- type: object
additionalProperties: false
properties:
timeSlots:
type: array
description: 'Opening times for the customer''s business. The time slots when the customer is available for delivery expressed as ranges in 24-hour time format. When null, the customer can be delivered anytime.
'
items:
type: object
additionalProperties: false
properties:
startTime:
type: string
description: 'Start of the opening time expressed in a 24-hour time format (e.g. `14:00`).
'
example: 09:30
endTime:
type: string
description: 'End of the opening time expressed in a 24-hour time format (e.g. `14:00`).
'
example: '12:30'
required:
- startTime
- endTime
nullable: true
openDays:
description: 'The opening days for the customer''s business. ISO 8601 numeric representation of the day of the week (`1` for Monday through `7` for Sunday).
'
type: array
items:
type: integer
minimum: 1
maximum: 7
minItems: 1
uniqueItems: true
example:
- 1
- 2
- 3
required:
- timeSlots
- openDays
- type: 'null'
packingInstruction:
anyOf:
- type: object
additionalProperties: false
required:
- services
properties:
services:
type: array
description: List of services to be performed on the order. Either `PALLETISE`, `DOCS` or `CUSTOM_BUILD`
minItems: 1
items:
type: string
enum:
- PALLETISE
- CUSTOM_BUILD
- DOCS
instruction:
type: string
description: Instruction text for packing the order.
- type: 'null'
- type: 'null'
required:
- items
links:
type: object
properties:
order:
type: string
relationships:
type: object
properties:
statusUpdates:
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required:
- id
- type
properties:
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
uniqueItems: true
required:
- type
- id
- attributes
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id035
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
included:
type: array
items:
anyOf:
- properties:
type:
type: string
default: fulfillment-order-status-updates
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
description: Fulfillment order status update
type: object
properties:
status:
type: string
enum: *id034
readOnly: true
receivedAt:
type: string
format: date-time
readOnly: true
required:
- data
- jsonapi
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id036
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id035
additionalProperties: false
required: &id037
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id036
required: *id037
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id036
required: *id037
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id036
required: *id037
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/master-orders/{orderId}/relationships/fulfillment-orders:
get:
summary: List Master Order Fulfillments
description: Retrieve a list of fulfillments for a Master Order
operationId: ordering-master-orders-relationship-fulfillment-orders
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
responses:
'200':
description: Set of fulfillment order id and links
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required:
- id
- type
properties:
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
uniqueItems: true
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id038
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
required:
- data
- jsonapi
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id039
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id038
additionalProperties: false
required: &id040
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id039
required: *id040
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id039
required: *id040
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id039
required: *id040
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/master-orders/{orderId}/tracking:
get:
summary: List master order shipment tracking
description: Retrieve shipment information like the parcels and the tracking information
operationId: get-master-order-shipping-shipment
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- name: include
in: query
allowEmptyValue: true
required: false
schema:
type: string
enum:
- shipmentParcel
- shipmentQuote
- shippedItems
responses:
'200':
description: Shipment tracking information
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type:
- 'null'
- object
properties:
type:
type: string
default: shipment-trackings
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- carrier
- trackingNumber
- trackingLink
- status
properties:
carrier:
type:
- 'null'
- string
serviceCode:
type:
- 'null'
- string
trackingNumber:
type: string
trackingLink:
type:
- 'null'
- string
status:
type:
- 'null'
- string
relationships:
type: object
description: Only presented if asked explicitly in the request
properties:
shipmentParcel:
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: &id043
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id041
- id
- type
properties: &id042
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
uniqueItems: true
shipmentQuote:
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id041
properties: *id042
additionalProperties: false
shippedItems:
type: object
description: Only presented if asked explicitly in the request with ?include=shippedItems
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id043
uniqueItems: true
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id044
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
included:
type: array
items:
anyOf:
- properties:
type:
type: string
default: tracked-packages
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- trackingNumber
- trackingLink
- status
properties:
height:
description: Height of the package (cm)
type:
- 'null'
- integer
width:
description: Width of the package (cm)
type:
- 'null'
- integer
length:
description: Length of the package (cm)
type:
- 'null'
- integer
weight:
description: Weight of the package (g)
type:
- 'null'
- integer
trackingNumber:
type: string
description: Tracking number of the package
trackingLink:
type: string
description: Tracking link of the package
status:
type: string
description: Status of the package
serialShippingContainerCode:
type:
- 'null'
- string
description: Serial Shipping Container Code (SSCC) for traceability
label:
type:
- 'null'
- object
description: Label of the package
properties:
content:
type: string
description: Content of the label
contentType:
type: string
description: Content type of the label (gif, pdf)
- properties:
type:
type: string
default: shipping-shipment-shipped-item
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- parcelId
- productVariantId
- batchQuantity
- unitQuantity
properties:
parcelId:
type: string
format: uuid
description: The UUID of the parcel (tracked package) this item belongs to
productVariantId:
type: string
format: uuid
description: The UUID of the product variant
batchQuantity:
type: integer
minimum: 1
description: Number of batches (e.g. boxes) shipped
unitQuantity:
type: integer
minimum: 1
description: Number of individual units shipped
lotNumber:
type:
- 'null'
- string
description: Lot or batch number for traceability
expiryDate:
type:
- 'null'
- string
format: date
description: Expiry date of the items (YYYY-MM-DD)
required:
- data
- jsonapi
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id045
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id044
additionalProperties: false
required: &id046
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id045
required: *id046
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id045
required: *id046
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id045
required: *id046
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
post:
summary: Create master order shipment tracking
description: Create shipment information like the parcels and the tracking information
operationId: post-master-order-shipping-shipment
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- name: include
in: query
allowEmptyValue: true
required: false
schema:
type: string
enum:
- shipmentParcel
- shipmentQuote
- shippedItems
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
type:
type: string
enum:
- shipping-shipment
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
- carrier
properties:
carrier:
type:
- 'null'
- string
description: The carrier name - set 'other' if the carrier is not known yet
trackingNumber:
type:
- 'null'
- string
trackingLink:
type:
- 'null'
- string
description: Tracking link to the carrier's website - if null and if the carrier is known, the tracking link will be generated by Ankorstore
status:
type: string
enum:
- UNKNOWN
- PRE_TRANSIT
- TRANSIT
- DELIVERED
- RETURNED
- FAILURE
fromAddress:
description: The address from where the parcels are shipped
type: object
properties:
data:
type: object
required:
- name
- street
- city
- postalCode
- countryCode
properties:
name:
type: string
street:
type: string
city:
type: string
postalCode:
type: string
countryCode:
type: string
format: iso3166-1-alpha-2
relationships:
type: object
required:
- shipmentParcel
properties:
shipmentParcel:
type: object
properties:
data:
type: array
items:
type: object
required:
- type
- id
properties:
type:
type: string
enum:
- shipping-shipment-parcel
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
properties:
trackingNumber:
type:
- 'null'
- string
trackingLink:
type:
- 'null'
- string
description: Tracking link to the carrier's website - if null and if the carrier is known, the tracking link will be generated by Ankorstore
status:
type: string
enum:
- UNKNOWN
- PRE_TRANSIT
- TRANSIT
- DELIVERED
- RETURNED
- FAILURE
length:
description: The length of the parcel in cm
type:
- 'null'
- integer
width:
description: The width of the parcel in cm
type:
- 'null'
- integer
height:
description: The height of the parcel in cm
type:
- 'null'
- integer
weight:
description: The weight of the parcel in grams
type:
- 'null'
- integer
sscc:
description: Serial Shipping Container Code (SSCC) for traceability
type:
- 'null'
- string
shippedItems:
description: Items shipped in this parcel
type: array
items:
type: object
required:
- productVariantUuid
- batchQuantity
- unitQuantity
properties:
productVariantUuid:
type: string
format: uuid
description: The UUID of the product variant
batchQuantity:
type: integer
minimum: 1
description: Number of batches (e.g. boxes) shipped
unitQuantity:
type: integer
minimum: 1
description: Number of individual units shipped
lotNumber:
type:
- 'null'
- string
description: Lot or batch number for traceability
maxLength: 100
expiryDate:
type:
- 'null'
- string
format: date
description: Expiry date of the items (YYYY-MM-DD)
shipmentQuote:
type:
- 'null'
- object
description: The quote is the price of the shipping
properties:
data:
type: object
required:
- type
- id
properties:
type:
type: string
enum:
- shipping-quotes
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
responses:
'201':
description: Shipment tracking information
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type:
- 'null'
- object
properties:
type:
type: string
default: shipment-trackings
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- carrier
- trackingNumber
- trackingLink
- status
properties:
carrier:
type:
- 'null'
- string
serviceCode:
type:
- 'null'
- string
trackingNumber:
type: string
trackingLink:
type:
- 'null'
- string
status:
type:
- 'null'
- string
relationships:
type: object
description: Only presented if asked explicitly in the request
properties:
shipmentParcel:
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: &id049
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id047
- id
- type
properties: &id048
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
uniqueItems: true
shipmentQuote:
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id047
properties: *id048
additionalProperties: false
shippedItems:
type: object
description: Only presented if asked explicitly in the request with ?include=shippedItems
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id049
uniqueItems: true
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id050
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
included:
type: array
items:
anyOf:
- properties:
type:
type: string
default: tracked-packages
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- trackingNumber
- trackingLink
- status
properties:
height:
description: Height of the package (cm)
type:
- 'null'
- integer
width:
description: Width of the package (cm)
type:
- 'null'
- integer
length:
description: Length of the package (cm)
type:
- 'null'
- integer
weight:
description: Weight of the package (g)
type:
- 'null'
- integer
trackingNumber:
type: string
description: Tracking number of the package
trackingLink:
type: string
description: Tracking link of the package
status:
type: string
description: Status of the package
serialShippingContainerCode:
type:
- 'null'
- string
description: Serial Shipping Container Code (SSCC) for traceability
label:
type:
- 'null'
- object
description: Label of the package
properties:
content:
type: string
description: Content of the label
contentType:
type: string
description: Content type of the label (gif, pdf)
- type: object
description: Quote resource
properties:
quoteUuid:
type: string
description: The unique identifier for the quote as an uuid
carrierCode:
type: string
description: The carrier code for the quote
serviceCode:
type: string
description: The service code for the quote
serviceCommercialName:
type: string
description: The commercial name of the service
collectionMethod:
description: The collection method for the quote
type: array
items:
type: string
enum:
- pickup
- drop-off
shippingCost:
type: object
properties:
amount:
type: number
description: The amount of the shipping cost
currency:
type: string
description: The currency of the shipping cost
timeInTransit:
type:
- 'null'
- object
description: Delivery estimation information if provided by carrier
properties:
estimatedDeliveryDate:
type:
- 'null'
- string
format: date
description: Estimation of delivery date by the carrier
pickupDate:
type:
- 'null'
- string
format: date
description: Pickup date considered for the estimation
businessDaysInTransit:
type:
- 'null'
- number
description: Number of business days the shipment is in transit
required:
- data
- jsonapi
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id051
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id050
additionalProperties: false
required: &id052
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id051
required: *id052
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id051
required: *id052
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id051
required: *id052
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id051
required: *id052
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id051
required: *id052
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
patch:
summary: Update master order shipment tracking
description: Update shipment information like the parcels and the tracking information
operationId: patch-master-order-shipping-shipment
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: orderId
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- name: include
in: query
allowEmptyValue: true
required: false
schema:
type: string
enum:
- shipmentParcel
- shipmentQuote
- shippedItems
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
type:
type: string
enum:
- shipping-shipment
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
- carrier
properties:
carrier:
type:
- 'null'
- string
description: The carrier name - set 'other' if the carrier is not known yet
trackingNumber:
type:
- 'null'
- string
trackingLink:
type:
- 'null'
- string
description: Tracking link to the carrier's website - if null and if the carrier is known, the tracking link will be generated by Ankorstore
status:
type: string
enum:
- UNKNOWN
- PRE_TRANSIT
- TRANSIT
- DELIVERED
- RETURNED
- FAILURE
relationships:
type: object
required:
- shipmentParcel
properties:
shipmentParcel:
type: object
properties:
data:
type: array
items:
type: object
required:
- type
- id
properties:
type:
type: string
enum:
- shipping-shipment-parcel
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- status
properties:
trackingNumber:
type:
- 'null'
- string
trackingLink:
type:
- 'null'
- string
description: Tracking link to the carrier's website - if null and if the carrier is known, the tracking link will be generated by Ankorstore
status:
type: string
enum:
- UNKNOWN
- PRE_TRANSIT
- TRANSIT
- DELIVERED
- RETURNED
- FAILURE
length:
type:
- 'null'
- integer
width:
type:
- 'null'
- integer
height:
type:
- 'null'
- integer
weight:
type:
- 'null'
- integer
sscc:
description: Serial Shipping Container Code (SSCC) for traceability
type:
- 'null'
- string
shippedItems:
description: Items shipped in this parcel
type: array
items:
type: object
required:
- productVariantUuid
- batchQuantity
- unitQuantity
properties:
productVariantUuid:
type: string
format: uuid
description: The UUID of the product variant
batchQuantity:
type: integer
minimum: 1
description: Number of batches (e.g. boxes) shipped
unitQuantity:
type: integer
minimum: 1
description: Number of individual units shipped
lotNumber:
type:
- 'null'
- string
description: Lot or batch number for traceability
maxLength: 100
expiryDate:
type:
- 'null'
- string
format: date
description: Expiry date of the items (YYYY-MM-DD)
responses:
'200':
description: Shipment tracking information
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type:
- 'null'
- object
properties:
type:
type: string
default: shipment-trackings
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- carrier
- trackingNumber
- trackingLink
- status
properties:
carrier:
type:
- 'null'
- string
serviceCode:
type:
- 'null'
- string
trackingNumber:
type: string
trackingLink:
type:
- 'null'
- string
status:
type:
- 'null'
- string
relationships:
type: object
description: Only presented if asked explicitly in the request
properties:
shipmentParcel:
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: &id055
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id053
- id
- type
properties: &id054
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
uniqueItems: true
shipmentQuote:
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id053
properties: *id054
additionalProperties: false
shippedItems:
type: object
description: Only presented if asked explicitly in the request with ?include=shippedItems
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id055
uniqueItems: true
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id056
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
included:
type: array
items:
anyOf:
- properties:
type:
type: string
default: tracked-packages
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
required:
- trackingNumber
- trackingLink
- status
properties:
height:
description: Height of the package (cm)
type:
- 'null'
- integer
width:
description: Width of the package (cm)
type:
- 'null'
- integer
length:
description: Length of the package (cm)
type:
- 'null'
- integer
weight:
description: Weight of the package (g)
type:
- 'null'
- integer
trackingNumber:
type: string
description: Tracking number of the package
trackingLink:
type: string
description: Tracking link of the package
status:
type: string
description: Status of the package
serialShippingContainerCode:
type:
- 'null'
- string
description: Serial Shipping Container Code (SSCC) for traceability
label:
type:
- 'null'
- object
description: Label of the package
properties:
content:
type: string
description: Content of the label
contentType:
type: string
description: Content type of the label (gif, pdf)
- type: object
description: Quote resource
properties:
quoteUuid:
type: string
description: The unique identifier for the quote as an uuid
carrierCode:
type: string
description: The carrier code for the quote
serviceCode:
type: string
description: The service code for the quote
serviceCommercialName:
type: string
description: The commercial name of the service
collectionMethod:
description: The collection method for the quote
type: array
items:
type: string
enum:
- pickup
- drop-off
shippingCost:
type: object
properties:
amount:
type: number
description: The amount of the shipping cost
currency:
type: string
description: The currency of the shipping cost
timeInTransit:
type:
- 'null'
- object
description: Delivery estimation information if provided by carrier
properties:
estimatedDeliveryDate:
type:
- 'null'
- string
format: date
description: Estimation of delivery date by the carrier
pickupDate:
type:
- 'null'
- string
format: date
description: Pickup date considered for the estimation
businessDaysInTransit:
type:
- 'null'
- number
description: Number of business days the shipment is in transit
required:
- data
- jsonapi
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id057
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id056
additionalProperties: false
required: &id058
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id057
required: *id058
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id057
required: *id058
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id057
required: *id058
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id057
required: *id058
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id057
required: *id058
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
/api/v1/ordering/master-orders/{id}/-actions/update-order-items:
post:
summary: Update wrapped order items by given master order ID
operationId: ordering-update-order-items
description: 'Updates the target quantity for one or more items of an order.
**Quantity**
Each item requires a `unitQuantity` field representing the total unit count.
| `unitQuantity` value | Stored batch qty | Stored multiplied qty |
|---|---|---|
| evenly divisible by `unit_multiplier` | `unitQuantity / unit_multiplier` | `unitQuantity` |
| **not** evenly divisible | `1` (one custom batch) | `unitQuantity` |
| `0` | — | line removed |
**Behavior**
- `unitQuantity = 0` removes the line.
- If the same `orderItemUuid` appears multiple times in `items`, **the last occurrence wins**.
- Items not belonging to this order are **ignored**. If all rows are foreign, the response is **204** with **no new event**.
'
tags:
- Ordering
parameters:
- name: id
in: path
description: UUID of the requested resource
schema:
type: string
format: uuid
required: true
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
requestBody:
required: true
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
required:
- attributes
properties:
type:
type: string
attributes:
type: object
required:
- items
properties:
items:
type: array
minItems: 1
items:
type: object
description: One batch update row.
properties:
orderItemUuid:
type:
- string
- 'null'
format: uuid
description: UUID of an existing order item to update/remove.
productVariantUuid:
type:
- string
- 'null'
format: uuid
description: UUID of a product variant to add as a new line (used when `orderItemUuid` is omitted).
unitQuantity:
type: integer
minimum: 0
description: 'Target unit quantity for the line (0 removes the line). Stored directly as `multiplied_quantity`. Does not need to be evenly divisible by the product''s `unit_multiplier`. When evenly divisible, batch quantity = `unitQuantity / unit_multiplier`; when not evenly divisible, packs are broken and batch quantity = `1` (one custom batch).
'
unitPrice:
type:
- integer
- 'null'
minimum: 0
description: Wholesale price for item.
required:
- unitQuantity
anyOf:
- required:
- orderItemUuid
- required:
- productVariantUuid
responses:
'204':
description: No content
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id059
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id060
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id059
additionalProperties: false
required: &id061
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Bad request
status: '400'
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
'500':
description: '[Server Error](https://jsonapi.org/format/#errors)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id060
required: *id061
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/orders:
get:
summary: List Internal Orders
description: Retrieve a list of Internal Orders
operationId: list-internal-orders
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: filter[retailer]
in: query
description: Retailer Id
allowEmptyValue: true
required: false
schema:
type: string
example: 23e4567-e89b-12d3-a456-426614174000
- name: filter[status]
in: query
description: Order Status
allowEmptyValue: true
required: false
schema:
type: string
example: ankor_confirmed
enum: &id062
- ankor_confirmed
- rejected
- brand_confirmed
- shipping_labels_generated
- fulfillment_requested
- shipped
- reception_refused
- received
- invoiced
- brand_paid
- cancelled
- name: include
in: query
description: 'A comma-separated list of resources to include (e.g: retailer,billingItems,orderItems.productVariant.product). If you include orderItems.productVariant you do not need to specify orderItems separately, it will be automatically included.'
schema:
type: string
enum:
- retailer
- billingItems
- orderItems
- orderItems.productVariant
- orderItems.productVariant.product
- name: page[limit]
in: query
description: limit the amount of results returned
required: false
schema:
type: integer
format: int64
- name: page[before]
in: query
description: show items before the provided ID (uuid format)
required: false
schema:
type: string
- name: page[after]
in: query
description: show items after the provided ID (uuid format)
required: false
schema:
type: string
responses:
'200':
description: '[OK](https://jsonapi.org/format/#fetching-resources-responses-200)'
content:
application/vnd.api+json:
schema:
title: Order Collection
type: object
required:
- data
properties:
data:
description: List of Order resource objects
type: array
uniqueItems: true
items:
description: The resource object for Order
type: object
additionalProperties: false
title: Order Resource
properties:
type:
type: string
default: orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
properties:
masterOrderId:
type: string
description: The identifier of the linked master order
format: uuid
status:
type: string
example: ankor_confirmed
enum: *id062
reference:
type: integer
description: The order reference used on shipping labels, communication etc
brandCurrency:
type: string
description: The currency the brand is paid in
brandNetAmount:
description: The amount the brand is paid (total - fees - shipping cost + shipping refund). You may find the Ankorstore fees and the other amounts by including the orders billing items.
type: integer
brandTotalAmount:
description: The total of all order items not including VAT
type: integer
brandTotalAmountVat:
description: The total VAT of all order items
type: integer
brandTotalAmountWithVat:
description: The total of all order items including VAT
type: integer
shippingMethod:
type:
- 'null'
- string
description: The chosen shipping method after going through the shipping process
enum:
- ankorstore
- custom
- null
shippingOverview:
title: Order Resource -> Shipping Overview
description: Contains all information related to either shipping method (`ankorstore` or `custom`). This field is ONLY included when fetching a single order at a time.
type: object
properties:
availableShippingMethods:
type: array
description: Available shipping methods to use. Custom is ship with your own carrier outside of Ankorstore.
items:
enum:
- ankorstore
- custom
shipToAddress:
type: object
description: The address the order needs to be shipped to
required:
- street
- city
- postalCode
properties:
name:
type:
- 'null'
- string
description: The first and last name of the recipient
organisationName:
type:
- 'null'
- string
description: The organisational name of the recipient
street:
type:
- 'null'
- string
city:
type:
- 'null'
- string
postalCode:
type:
- 'null'
- string
countryCode:
type:
- 'null'
- string
expectedShippingDates:
type: object
description: The minimum and maximum expected shipping dates
required:
- minimum
- maximum
properties:
minimum:
type: string
format: datetime
maximum:
type: string
format: datetime
updatedMaximum:
type:
- 'null'
- string
format: datetime
provider:
type:
- 'null'
- string
description: The company providing the shipping service
enum:
- ups
- tnt
- gls
- dpd
- dhl
- dhl_express
- colissimo
- chronopost
- null
tracking:
type:
- 'null'
- object
description: Tracking details of the order
properties:
number:
type: string
link:
type: string
format: url
description: A URL to view the tracking status
latestQuote:
description: 'The quote is the price of the parcel(s) shipping.
If this object is null then no quote has been generated.'
type:
- 'null'
- object
properties:
id:
type: string
description: Id of the last quote generated. Every time a ship call is done, a new calculation is made based on parcels dimensions and weight sent
provider:
type: string
enum:
- custom
- ups
description: 'Provider responsible for the calculation. If custom, the calculation is done by Ankorstore and refunded.
If any other, the calculation is done by the provider and the shipping price is covered by Ankorstore (most of the case, see shippingCostsOverview section).'
rateProvider:
type: string
description: The provider of the rate for `rateAmount`.
enum:
- ups
- ankorstore
rateAmount:
type: object
description: Amount calculated for the parcels provided.
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
shippingCostsOverview:
type: object
description: Overview of costs related to shipping. This object is displayed only if a shipping cost fee or a refund exists
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
type:
type: string
enum:
- refund
- fee
description: 'Type of shipping costs:
If type = `refund` the amount will be refunded to the brand (added to brand net amount).
if type = `fee` the amount will be subtracted from brand net amount as a contribution to shipping costs.'
required:
- id
- provider
parcels:
type: array
uniqueItems: true
items:
description: Shipping Label Parcel
type: object
properties:
length:
type: integer
maximum: 274
width:
type: integer
maximum: 274
height:
type: integer
maximum: 274
distanceUnit:
type: string
description: The unit of distance
enum:
- cm
weight:
type: integer
minimum: 1
maximum: 30000
massUnit:
type: string
description: The unit of mass
enum:
- g
trackedPackage:
type:
- 'null'
- object
description: The tracking per parcel
properties:
labelUrl:
description: The URL to download the shipping label
type:
- 'null'
- string
format: url
eta:
type:
- 'null'
- string
format: datetime
trackingNumber:
type: string
trackingLink:
type: string
currentStatus:
type: object
properties: &id063
status:
type: string
description: The current status of the order/parcel
enum:
- UNKNOWN
- PRE_TRANSIT
- DELIVERED
- RETURNED
- FAILURE
statusDetails:
description: Human readable version of status
type:
- string
- 'null'
updatedAt:
type: string
description: Last time the status was updated
format: datetime
location:
type: object
description: Last known location
properties:
city:
type:
- 'null'
- string
state:
type:
- 'null'
- string
zip:
type:
- 'null'
- string
country:
type:
- 'null'
- string
required:
- labelUrl
- eta
- trackingLink
- currentStatus
required:
- length
- width
- height
- distanceUnit
- weight
- massUnit
- trackedPackage
transaction:
type:
- 'null'
- object
properties:
pickup:
description: The scheduled pickup, requires an API call to be made after the shipping labels have been generated.
type:
- 'null'
- object
required:
- pickupDate
- closeTime
- readyTime
- externalReferenceId
properties:
pickupDate:
type: string
format: datetime
description: The date of the pickup
readyTime:
type: string
description: 'Opening time of pickup Eg: 10:00:00'
closeTime:
type: string
description: 'Close time (pickup required to happen before this time) Eg: 13:00:00'
externalReferenceId:
type: string
description: The reference number for this pickup
tracking:
description: The tracking details for the overall shipment
type: object
properties:
eta:
type:
- 'null'
- string
format: datetime
description: The estimated time of arrival for the order
trackingNumber:
type: string
description: The tracking number of the order
trackingLink:
type: string
format: url
description: The tracking link for the order
currentStatus:
type: object
properties: *id063
required:
- pickup
- tracking
required:
- availableShippingMethods
- shipToAddress
- expectedShippingDates
brandRejectReason:
type:
- 'null'
- string
description: The reason the brand has given for rejecting the order
retailerRejectReason:
type:
- 'null'
- string
description: The reason the retailer rejected the reception of the order
retailerCancellationRequestReason:
type:
- 'null'
- string
description: The reason the retailer has given for a cancellation request
billingName:
type:
- 'null'
- string
description: The billing address name
billingOrganisationName:
type:
- 'null'
- string
description: The billing address organisation name
billingStreet:
type:
- 'null'
- string
description: The billing address street name
billingPostalCode:
type:
- 'null'
- string
description: The billing address postal code
billingCity:
type:
- 'null'
- string
description: The billing address city
billingCountryCode:
type:
- 'null'
- string
description: The billing address country code - ISO format
submittedAt:
type: string
format: datetime
description: The timestamp of when the order was submitted (order is placed)
shippedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the order was shipped
brandPaidAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the brand was paid
createdAt:
type: string
format: datetime
description: (deprecated) The timestamp of when the order was created (before retailer payment)
updatedAt:
type: string
format: datetime
description: The timestamp of when the order was updated (does not include other resources)
relationships:
type: object
properties:
retailer:
description: Related Retailer Resource
type: object
properties:
data:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id064
- id
- type
properties: &id065
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
- type: object
properties:
type:
const: retailers
billingItems:
description: Related Billing Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
- type: object
properties:
type:
const: billing-items
orderItems:
description: Related Order Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
- type: object
properties:
type:
const: order-items
orderItems-productOption:
description: 'Schema: Order Item -> Product Option Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
orderItems-productOption-product:
description: 'Schema: Order Item -> Product Option Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
orderItems-productVariant:
description: 'Schema: Order Item -> Product Variant Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
orderItems-productVariant-product:
description: 'Schema: Order Item -> Product Variant Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
required:
- type
- id
included:
description: To reduce the number of HTTP requests, servers **MAY** allow responses that include related resources along with the requested primary resources. Such responses are called `compound documents`.
type: array
items:
anyOf:
- title: Retailer Resource
type: object
additionalProperties: false
example:
type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
attributes:
companyName: null
storeName: TEST RETAILER
storeUrl: null
email: retailer@example.com
firstName: John
lastName: Smith
taxNumber: '12345678'
vatNumber: FR123456789
eoriNumber: null
phoneNumberE164: '+3345656456456'
businessIdentifier: '3454353455'
createdAt: '2020-06-19T11:59:30.000000Z'
updatedAt: '2020-06-21T15:27:39.000000Z'
properties:
type:
type: string
default: retailers
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
companyName:
type:
- string
- 'null'
description: The registered company of the retailer
storeName:
type: string
description: The name of the store
storeUrl:
type:
- string
- 'null'
format: url
description: The store's website
email:
type: string
format: email
description: Contact email for the retailer
firstName:
type: string
description: Retailer's first name
lastName:
type: string
description: Retailer's last name
taxNumber:
type: string
description: Retailer's tax number
vatNumber:
type: string
description: Retailer's VAT number
eoriNumber:
type:
- string
- 'null'
description: Retailer's EORI number
phoneNumberE164:
type: string
description: Retailer's phone number (E164 format)
businessIdentifier:
type: string
description: The tax field to use - tax or vat number. If the retailer is a sole trader, this field will instead be their sole trading number
createdAt:
type: string
format: datetime
description: The timestamp when the retailer was created
updatedAt:
type: string
format: datetime
description: The timestamp when the retailer was updated
relationships:
type: object
properties:
orders:
description: The order's belonging to a retailer. See [Order Resource](https://ankorstore.github.io/api-docs/#tag/Order/operation/list-orders)
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: &id066
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
uniqueItems: true
required:
- type
- id
- attributes
- title: Order Item Resource
type: object
additionalProperties: false
examples:
- type: order-items
id: 62b263a8-00e1-1ecb-98d2-0242ac170007
attributes:
brandCurrency: EUR
quantity: 1
multipliedQuantity: 12
vatRate: 5.5
brandAmount: 3996
brandAmountVat: 220
brandAmountWithVat: 4216
brandUnitPrice: 333
createdAt: '2022-02-02T19:43:14.000000Z'
updatedAt: '2022-02-02T19:43:14.000000Z'
relationships:
productOption:
data:
type: productOption
id: '114135'
properties:
type:
type: string
default: order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
brandCurrency:
type: string
description: The currency of the amounts for the brand
quantity:
type: integer
description: The ordered quantity of the product
multipliedQuantity:
type: integer
description: Some products are sold in fixed quantities, e.g a case of 6 wine bottles. If the quantity was 2, the multiplied quantity of wine bottles would be 12 (6 x 2). This "unitMultiplier" can be found on the product.
vatRate:
type: number
format: float
description: The VAT percentage rate of the order item (0-100)
brandAmount:
description: The amount due to the brand for this item
type: integer
brandAmountVat:
description: The VAT amount due to the brand for this item
type: integer
brandAmountWithVat:
description: The amount + VAT due to the brand for this item
type: integer
brandUnitPrice:
description: The cost of a single unit of this item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp this order item was created
updatedAt:
type: string
format: datetime
description: The timestamp this order item was updated
relationships:
type: object
properties:
productOptions:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id066
uniqueItems: true
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
required:
- type
- id
- title: Billing Item Resource
type: object
additionalProperties: false
examples:
- type: billing-items
id: f1dd6498-c5f8-1eca-a6b7-0242ac170007
attributes:
type: brand_platform_fees
currency: EUR
vatRate: 20
currencyRate: 1
amount: -1259
amountVat: -252
amountWithVat: -1511
createdAt: '2022-02-02T19:42:32.000000Z'
updatedAt: '2022-02-02T20:15:06.000000Z'
properties:
type:
type: string
default: billing-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
type:
description: 'The `brand_platform_fees` is a commission for using our platform. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_new_customer_fees` is a commission on the first Order between brand and retailer. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_payment_fees` is a commission to guarantee Payment for brand. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_fast_payment` is a commission for using our fast payment feature. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_flat_shipping_fees` is the shipping cost collected from the retailer when the order is below brand Franco. It is positive and adds to the total amount paid.
The `brand_shipping_fees` is a shipping cost. This type reduces the amount paid to the brand (but will be a positive value).
The `brand_shipping_fees_refund` is a refund from Ankorstore to brand for shipping. This type is positive and adds to the total amount paid.
The `brand_shipping_fees_discount` is a referral shipping offer. This type is positive and adds to the total amount paid.
There still might also be legacy types which are not listed here but they will be removed in the nearest future.
'
type: string
enum:
- brand_platform_fees
- brand_new_customer_fees
- brand_payment_fees
- brand_fast_payment
- brand_flat_shipping_fees
- brand_shipping_fees
- brand_shipping_fees_refund
- brand_shipping_fees_discount
currency:
type: string
description: The currency of the billing item
vatRate:
type: number
format: float
description: The VAT percentage rate of the billing item, (from 0 - 100).
currencyRate:
type: number
format: float
description: If the currency is not in EUR, this is the conversion rate used
amount:
description: The amount for the billing item
type: integer
amountVat:
description: The VAT amount for the billing item
type: integer
amountWithVat:
description: The amount including VAT for the billing item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp when the billing item was created
updatedAt:
type: string
format: datetime
description: The timestamp when the billing item was updated
required:
- type
- id
- title: Product Option Resource
description: A unique option for a product
type: object
additionalProperties: false
examples:
- type: product-options
id: 7ec06d5c-023e-1ecb-a477-0242ac170007
attributes:
name: Test Product Option
sku: '051100'
ian: '3770005999506'
outOfStock: false
createdAt: '2020-08-27T14:29:15.000000Z'
updatedAt: '2021-10-04T12:03:31.000000Z'
archivedAt: null
relationships:
product:
data:
type: products
id: 7f4665f6-023e-1ecb-a4b2-0242ac170007
properties:
type:
type: string
default: product-options
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the option
sku:
type: string
description: The SKU of the option
ian:
type:
- 'null'
- string
description: The IAN (EAN) of the option, can be null
outOfStock:
type: boolean
description: Whether the product is in stock or not
createdAt:
type: string
format: datetime
description: Timestamp of when this option was created
updatedAt:
type: string
format: datetime
description: Timestamp of when this option was updated
archivedAt:
type:
- 'null'
- string
description: Timestamp of when this option was archived
relationships:
type: object
properties:
product:
description: 'Reference: Product Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
required:
- type
- id
- title: Product Variant Resource
description: Variant details for a given product. Unique products will have one single variant.
type: object
additionalProperties: false
examples:
- type: product-variants
id: 2171bdc1-fa01-44fa-9342-d99bd1c2befa
attributes:
name: Test Product Variant
sku: Product-Variant-001
ian: '1924859325863'
createdAt: '2020-08-27T14:29:15.000000Z'
updatedAt: '2021-10-04T12:03:31.000000Z'
archivedAt: null
retailPrice: 800
wholesalePrice: 500
originalWholesalePrice: 500
availableQuantity: 125
reservedQuantity: 25
stockQuantity: 150
isAlwaysInStock: false
inventoryPolicy: deny
fulfillableId: 8f066352-67cb-1efa-bddb-9e3047198b2e
availableAt: '2028-01-01T00:00:00.000000Z'
images:
- order: 1
url: https://example.com/image1.jpg
- order: 2
url: https://example.com/image2.jpg
relationships:
product:
data:
type: products
id: c8466a3c-4fb8-4474-a86f-20f10d14314f
properties:
type:
type: string
default: product-variants
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the product variant
sku:
type: string
description: The SKU of the product variant
ian:
type:
- 'null'
- string
description: The IAN (EAN) of the product variant, can be null
createdAt:
type: string
format: datetime
description: Timestamp of when this product variant was created
updatedAt:
type: string
format: datetime
description: Timestamp of when this product variant was updated
archivedAt:
type:
- 'null'
- string
description: Timestamp of when this product variant was archived
retailPrice:
description: The suggested retail price of the product
type: integer
wholesalePrice:
description: The wholesale price after the discount rate is applied
type: integer
originalWholesalePrice:
description: The original wholesale price set by the brand
type: integer
availableQuantity:
type:
- 'null'
- integer
description: Number of units that are available to order
reservedQuantity:
type: integer
description: Number of units in stock that are reserved
stockQuantity:
type:
- 'null'
- integer
description: Total number of units in stock (available + reserved)
isAlwaysInStock:
type: boolean
description: True if the product is always in stock, false otherwise
inventoryPolicy:
type: string
description: 'Sell-when-out-of-stock policy. `deny` (default) rejects orders once
available stock reaches zero; `continue` allows the variant to accept
orders even when available stock is zero or negative. `continue`
requires `isAlwaysInStock=false`.
'
enum:
- deny
- continue
default: deny
fulfillableId:
type:
- 'null'
- string
format: uuid
description: Resource ID used for interacting with the fulfillment service
availableAt:
type: string
nullable: true
format: date
description: Shipping date(in future) of a preorder product e.g. 2028-12-01
images:
type: array
description: List of variant images ordered by display priority
items:
type: object
properties:
order:
type: integer
description: Display order of the image (lower is higher priority)
url:
type: string
description: URL of the variant image
relationships:
type: object
properties:
product:
description: 'Reference: Product Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id064
properties: *id065
additionalProperties: false
required:
- type
- id
- title: Product Resource
description: The resource object for Product
type: object
additionalProperties: false
properties:
type:
type: string
default: products
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the product
description:
type: string
description: The description of the product
language:
type: string
description: The language of the title and description
dimensions:
type: string
description: The human readable dimensions of the product
netWeight:
type: string
description: The weight of the product itself
capacity:
type: string
description: eg. Capacity in weight eg 100g
position:
type: number
description: The position of the product in the brands catalog, lower the higher it is
unitMultiplier:
type: integer
description: How many products are shipped together, ie a case of 6 wine bottles. Presented options then would be 6, 12, 18 etc.
vatRate:
type: number
format: float
description: The VAT rate of the product
discountRate:
description: The percentage discount if a brand is offering one (0 - 1)
type: number
format: float
productTypeId:
description: 'Product Type ID
Deprecation Notice This attribute is deprecated and will be removed in a future release.
We strongly encourage all users to update their integrations accordingly to ensure continued compatibility. If you have any questions or need assistance, please contact support.
'
type: number
format: integer
active:
type: boolean
description: Whether the product is active or not
outOfStock:
type: boolean
description: Whether the product is out of stock or not
archived:
type: boolean
description: Whether the product is archived or not
retailPrice:
description: The suggested retail price of the product
type: integer
wholesalePrice:
description: The wholesale price after the discount rate is applied
type: integer
originalWholesalePrice:
description: The original wholesale price set by the brand
type: integer
createdAt:
type: string
format: datetime
description: The timestamp when the product was created
indexedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp when the product was indexed
updatedAt:
type: string
format: datetime
description: The timestamp when the product was updated
images:
type: array
description: List of product images ordered by display priority
items:
type: object
properties:
order:
type: integer
description: Display order of the image (lower is higher priority)
url:
type: string
description: URL of the product image
tags:
type: array
description: List of tags associated with the product
items:
type: string
relationships:
type: object
properties:
productOption:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id066
uniqueItems: true
productVariant:
description: 'Reference: Product Variant Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id066
uniqueItems: true
required:
- type
- id
uniqueItems: true
meta:
type: object
description: Meta with Pagination Details
required:
- page
additionalProperties: true
properties:
page:
description: Cursor pagination details
type: object
properties:
from:
type:
- string
- 'null'
to:
type:
- string
- 'null'
hasMore:
type: boolean
perPage:
type: integer
required:
- from
- to
- perPage
links:
description: Pagination navigation links. If a link does not exist then you cannot paginate any further in that direction.
type: object
properties:
first:
type: string
format: url
next:
type: string
format: url
prev:
type: string
format: url
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id067
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
additionalProperties: false
examples:
example:
value:
meta:
page:
from: 123e4567-e89b-12d3-a456-426614174000
hasMore: true
perPage: 2
to: 1ecb023e-7ec0-6d5c-a477-0242ac170008
jsonapi:
version: '1.0'
links:
first: https://www.ankorstore.com/api/v1/orders?include=&page%5Blimit%5D=2
next: https://www.ankorstore.com/api/v1/orders?include=&page%5Bafter%5D=797910&page%5Blimit%5D=2
prev: https://www.ankorstore.com/api/v1/orders?include=&page%5Bbefore%5D=904234&page%5Blimit%5D=2
data:
- type: orders
id: 123e4567-e89b-12d3-a456-426614174000
attributes:
masterOrderId: 7ad5afec-c558-4d8f-9cc4-dac87c50c9d7
status: invoiced
reference: 3434273911
brandCurrency: EUR
brandNetAmount: 20596
brandTotalAmount: 23405
brandTotalAmountVat: 0
brandTotalAmountWithVat: 23405
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-03-15T10:05:09+00:00'
shippedAt: '2022-03-17T15:05:19+00:00'
brandPaidAt: null
createdAt: '2022-03-13T16:36:24+00:00'
updatedAt: '2022-03-31T11:57:13+00:00'
shippingMethod: ankorstore
relationships:
retailer:
data:
type: retailers
id: 1ecba0f4-adf0-6fbe-badf-9eb2e4c4d56c
billingItems:
data:
- type: billing-items
id: 1ece8a8c-55b9-63c6-95c3-0242ac160007
orderItems:
data:
- type: order-items
id: 1ece8a8c-73ad-6ae4-a4ab-0242ac160007
- type: order-items
id: 1ece8a8c-623e-6ccc-aa2e-0242ac160007
- type: orders
id: 1ecb023e-7ec0-6d5c-a477-0242ac170007
attributes:
masterOrderId: ef19dab7-a89e-44c7-82c2-554df38e8ba4
status: ankor_confirmed
reference: 3434273911
brandCurrency: EUR
brandNetAmount: 10229
brandTotalAmount: 10940
brandTotalAmountVat: 602
brandTotalAmountWithVat: 11542
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-03-17T13:19:33+00:00'
shippedAt: null
brandPaidAt: null
createdAt: '2022-02-01T14:37:10+00:00'
updatedAt: '2022-03-31T11:56:01+00:00'
shippingMethod: null
relationships:
retailer:
data:
type: retailers
id: 1ecba0f4-adf0-6fbe-badf-9eb2e4c4d56c
billingItems:
data:
- type: billing-items
id: 1ece8a8c-55b9-63c6-95c3-0242ac160007
orderItems:
data:
- type: order-items
id: 1ece8a8c-73ad-6ae4-a4ab-0242ac160007
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id068
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id067
additionalProperties: false
required: &id069
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Bad request
status: '400'
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id068
required: *id069
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id068
required: *id069
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id068
required: *id069
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/orders/{order}:
get:
summary: Get Internal Order
description: Retrieve a specific order
operationId: get-internal-order
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: order
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- name: include
in: query
description: 'A comma-separated list of resources to include (e.g: retailer,billingItems,orderItems.productVariant.product). If you include orderItems.productVariant you do not need to specify orderItems separately, it will be automatically included.'
schema:
type: string
enum:
- retailer
- billingItems
- orderItems
- orderItems.productVariant
- orderItems.productVariant.product
responses:
'200':
description: '[OK](https://jsonapi.org/format/#fetching-resources-responses-200)'
content:
application/vnd.api+json:
schema:
title: Order Get
type: object
additionalProperties: false
examples:
- jsonapi:
version: '1.0'
data:
type: orders
id: 1ecb023e-7ec0-6d5c-a477-0242ac170007
attributes:
masterOrderId: a35ec01f-d2b7-4124-a7ed-c82320c629fa
status: shipped
reference: 3434273911
brandCurrency: EUR
brandTotalAmount: 12588
brandTotalAmountVat: 693
brandTotalAmountWithVat: 13281
shippingMethod: ankorstore
shippingOverview:
availableShippingMethods:
- custom
- ankorstore
shipToAddress:
name: John Smith
organisationName: Test Retailer
street: Test Street
city: Roma
postalCode: '00222'
countryCode: IT
expectedShippingDates:
minimum: '2022-03-28T00:00:00+00:00'
maximum: '2022-03-30T23:59:59+00:00'
updatedMaximum: '2022-04-27T23:59:59+00:00'
provider: ups
tracking: null
latestQuote:
id: 5cc76f26-0f5d-1ecb-a0d6-0242ac170009
provider: ups
parcels:
- length: 50
width: 100
height: 50
weight: 10000
distanceUnit: cm
massUnit: g
trackedPackage:
labelUrl: https://www.ankorstore.com/api/v1/orders/1ecb023e-7ec0-6d5c-a477-0242ac170007/shipping-labels/335654/pdf
eta: null
trackingNumber: 1Z8A76E49136380279
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E49136380279&requester=WT/trackdetails
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: '2022-03-28T15:35:19+00:00'
location:
city: null
state: null
zip: null
country: null
- length: 75
width: 50
height: 50
weight: 5200
distanceUnit: cm
massUnit: g
trackedPackage:
labelUrl: https://www.ankorstore.com/api/v1/orders/1ecb023e-7ec0-6d5c-a477-0242ac170007/shipping-labels/335655/pdf
eta: null
trackingNumber: 1Z8A76E49137225882
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E49137225882&requester=WT/trackdetails
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: '2022-03-28T15:35:19+00:00'
location:
city: null
state: null
zip: null
country: null
transaction:
pickup:
pickupDate: '2022-03-30T00:00:00+00:00'
closeTime: '15:00:00'
readyTime: 09:00:00
externalReferenceId: 2929602E9CP
tracking:
eta: null
trackingNumber: 1Z8A76E49136380279
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E49136380279&requester=WT/trackdetails
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: '2022-03-28T15:35:19+00:00'
location:
city: null
state: null
zip: null
country: null
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-02-02T20:15:05.000000Z'
shippedAt: '2022-02-09T15:05:27.000000Z'
brandPaidAt: null
createdAt: '2022-02-02T19:42:31.000000Z'
updatedAt: '2022-03-11T08:57:56.000000Z'
relationships:
retailer:
data:
type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
included:
- type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
attributes:
companyName: null
storeName: TEST RETAILER
storeUrl: null
email: test-retailer@gmail.com
firstName: Marie-France
lastName: DESCHAMPS
taxNumber: '819470824'
vatNumber: FR58819470824
eoriNumber: null
phoneNumberE164: '+33688615593'
businessIdentifier: '819470824'
createdAt: '2020-06-19T11:59:30.000000Z'
updatedAt: '2020-06-21T15:27:39.000000Z'
properties:
data:
description: The resource object for Order
type: object
additionalProperties: false
title: Order Resource
properties:
type:
type: string
default: orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
properties:
masterOrderId:
type: string
description: The identifier of the linked master order
format: uuid
status:
type: string
example: ankor_confirmed
enum:
- ankor_confirmed
- rejected
- brand_confirmed
- shipping_labels_generated
- fulfillment_requested
- shipped
- reception_refused
- received
- invoiced
- brand_paid
- cancelled
reference:
type: integer
description: The order reference used on shipping labels, communication etc
brandCurrency:
type: string
description: The currency the brand is paid in
brandNetAmount:
description: The amount the brand is paid (total - fees - shipping cost + shipping refund). You may find the Ankorstore fees and the other amounts by including the orders billing items.
type: integer
brandTotalAmount:
description: The total of all order items not including VAT
type: integer
brandTotalAmountVat:
description: The total VAT of all order items
type: integer
brandTotalAmountWithVat:
description: The total of all order items including VAT
type: integer
shippingMethod:
type:
- 'null'
- string
description: The chosen shipping method after going through the shipping process
enum:
- ankorstore
- custom
- null
shippingOverview:
title: Order Resource -> Shipping Overview
description: Contains all information related to either shipping method (`ankorstore` or `custom`). This field is ONLY included when fetching a single order at a time.
type: object
properties:
availableShippingMethods:
type: array
description: Available shipping methods to use. Custom is ship with your own carrier outside of Ankorstore.
items:
enum:
- ankorstore
- custom
shipToAddress:
type: object
description: The address the order needs to be shipped to
required:
- street
- city
- postalCode
properties:
name:
type:
- 'null'
- string
description: The first and last name of the recipient
organisationName:
type:
- 'null'
- string
description: The organisational name of the recipient
street:
type:
- 'null'
- string
city:
type:
- 'null'
- string
postalCode:
type:
- 'null'
- string
countryCode:
type:
- 'null'
- string
expectedShippingDates:
type: object
description: The minimum and maximum expected shipping dates
required:
- minimum
- maximum
properties:
minimum:
type: string
format: datetime
maximum:
type: string
format: datetime
updatedMaximum:
type:
- 'null'
- string
format: datetime
provider:
type:
- 'null'
- string
description: The company providing the shipping service
enum:
- ups
- tnt
- gls
- dpd
- dhl
- dhl_express
- colissimo
- chronopost
- null
tracking:
type:
- 'null'
- object
description: Tracking details of the order
properties:
number:
type: string
link:
type: string
format: url
description: A URL to view the tracking status
latestQuote:
description: 'The quote is the price of the parcel(s) shipping.
If this object is null then no quote has been generated.'
type:
- 'null'
- object
properties:
id:
type: string
description: Id of the last quote generated. Every time a ship call is done, a new calculation is made based on parcels dimensions and weight sent
provider:
type: string
enum:
- custom
- ups
description: 'Provider responsible for the calculation. If custom, the calculation is done by Ankorstore and refunded.
If any other, the calculation is done by the provider and the shipping price is covered by Ankorstore (most of the case, see shippingCostsOverview section).'
rateProvider:
type: string
description: The provider of the rate for `rateAmount`.
enum:
- ups
- ankorstore
rateAmount:
type: object
description: Amount calculated for the parcels provided.
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
shippingCostsOverview:
type: object
description: Overview of costs related to shipping. This object is displayed only if a shipping cost fee or a refund exists
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
type:
type: string
enum:
- refund
- fee
description: 'Type of shipping costs:
If type = `refund` the amount will be refunded to the brand (added to brand net amount).
if type = `fee` the amount will be subtracted from brand net amount as a contribution to shipping costs.'
required:
- id
- provider
parcels:
type: array
uniqueItems: true
items:
description: Shipping Label Parcel
type: object
properties:
length:
type: integer
maximum: 274
width:
type: integer
maximum: 274
height:
type: integer
maximum: 274
distanceUnit:
type: string
description: The unit of distance
enum:
- cm
weight:
type: integer
minimum: 1
maximum: 30000
massUnit:
type: string
description: The unit of mass
enum:
- g
trackedPackage:
type:
- 'null'
- object
description: The tracking per parcel
properties:
labelUrl:
description: The URL to download the shipping label
type:
- 'null'
- string
format: url
eta:
type:
- 'null'
- string
format: datetime
trackingNumber:
type: string
trackingLink:
type: string
currentStatus:
type: object
properties: &id070
status:
type: string
description: The current status of the order/parcel
enum:
- UNKNOWN
- PRE_TRANSIT
- DELIVERED
- RETURNED
- FAILURE
statusDetails:
description: Human readable version of status
type:
- string
- 'null'
updatedAt:
type: string
description: Last time the status was updated
format: datetime
location:
type: object
description: Last known location
properties:
city:
type:
- 'null'
- string
state:
type:
- 'null'
- string
zip:
type:
- 'null'
- string
country:
type:
- 'null'
- string
required:
- labelUrl
- eta
- trackingLink
- currentStatus
required:
- length
- width
- height
- distanceUnit
- weight
- massUnit
- trackedPackage
transaction:
type:
- 'null'
- object
properties:
pickup:
description: The scheduled pickup, requires an API call to be made after the shipping labels have been generated.
type:
- 'null'
- object
required:
- pickupDate
- closeTime
- readyTime
- externalReferenceId
properties:
pickupDate:
type: string
format: datetime
description: The date of the pickup
readyTime:
type: string
description: 'Opening time of pickup Eg: 10:00:00'
closeTime:
type: string
description: 'Close time (pickup required to happen before this time) Eg: 13:00:00'
externalReferenceId:
type: string
description: The reference number for this pickup
tracking:
description: The tracking details for the overall shipment
type: object
properties:
eta:
type:
- 'null'
- string
format: datetime
description: The estimated time of arrival for the order
trackingNumber:
type: string
description: The tracking number of the order
trackingLink:
type: string
format: url
description: The tracking link for the order
currentStatus:
type: object
properties: *id070
required:
- pickup
- tracking
required:
- availableShippingMethods
- shipToAddress
- expectedShippingDates
brandRejectReason:
type:
- 'null'
- string
description: The reason the brand has given for rejecting the order
retailerRejectReason:
type:
- 'null'
- string
description: The reason the retailer rejected the reception of the order
retailerCancellationRequestReason:
type:
- 'null'
- string
description: The reason the retailer has given for a cancellation request
billingName:
type:
- 'null'
- string
description: The billing address name
billingOrganisationName:
type:
- 'null'
- string
description: The billing address organisation name
billingStreet:
type:
- 'null'
- string
description: The billing address street name
billingPostalCode:
type:
- 'null'
- string
description: The billing address postal code
billingCity:
type:
- 'null'
- string
description: The billing address city
billingCountryCode:
type:
- 'null'
- string
description: The billing address country code - ISO format
submittedAt:
type: string
format: datetime
description: The timestamp of when the order was submitted (order is placed)
shippedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the order was shipped
brandPaidAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the brand was paid
createdAt:
type: string
format: datetime
description: (deprecated) The timestamp of when the order was created (before retailer payment)
updatedAt:
type: string
format: datetime
description: The timestamp of when the order was updated (does not include other resources)
relationships:
type: object
properties:
retailer:
description: Related Retailer Resource
type: object
properties:
data:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id071
- id
- type
properties: &id072
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
- type: object
properties:
type:
const: retailers
billingItems:
description: Related Billing Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
- type: object
properties:
type:
const: billing-items
orderItems:
description: Related Order Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
- type: object
properties:
type:
const: order-items
orderItems-productOption:
description: 'Schema: Order Item -> Product Option Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
orderItems-productOption-product:
description: 'Schema: Order Item -> Product Option Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
orderItems-productVariant:
description: 'Schema: Order Item -> Product Variant Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
orderItems-productVariant-product:
description: 'Schema: Order Item -> Product Variant Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
required:
- type
- id
included:
description: To reduce the number of HTTP requests, servers **MAY** allow responses that include related resources along with the requested primary resources. Such responses are called `compound documents`.
type: array
uniqueItems: true
items:
anyOf:
- title: Retailer Resource
type: object
additionalProperties: false
example:
type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
attributes:
companyName: null
storeName: TEST RETAILER
storeUrl: null
email: retailer@example.com
firstName: John
lastName: Smith
taxNumber: '12345678'
vatNumber: FR123456789
eoriNumber: null
phoneNumberE164: '+3345656456456'
businessIdentifier: '3454353455'
createdAt: '2020-06-19T11:59:30.000000Z'
updatedAt: '2020-06-21T15:27:39.000000Z'
properties:
type:
type: string
default: retailers
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
companyName:
type:
- string
- 'null'
description: The registered company of the retailer
storeName:
type: string
description: The name of the store
storeUrl:
type:
- string
- 'null'
format: url
description: The store's website
email:
type: string
format: email
description: Contact email for the retailer
firstName:
type: string
description: Retailer's first name
lastName:
type: string
description: Retailer's last name
taxNumber:
type: string
description: Retailer's tax number
vatNumber:
type: string
description: Retailer's VAT number
eoriNumber:
type:
- string
- 'null'
description: Retailer's EORI number
phoneNumberE164:
type: string
description: Retailer's phone number (E164 format)
businessIdentifier:
type: string
description: The tax field to use - tax or vat number. If the retailer is a sole trader, this field will instead be their sole trading number
createdAt:
type: string
format: datetime
description: The timestamp when the retailer was created
updatedAt:
type: string
format: datetime
description: The timestamp when the retailer was updated
relationships:
type: object
properties:
orders:
description: The order's belonging to a retailer. See [Order Resource](https://ankorstore.github.io/api-docs/#tag/Order/operation/list-orders)
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: &id073
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
uniqueItems: true
required:
- type
- id
- attributes
- title: Order Item Resource
type: object
additionalProperties: false
examples:
- type: order-items
id: 62b263a8-00e1-1ecb-98d2-0242ac170007
attributes:
brandCurrency: EUR
quantity: 1
multipliedQuantity: 12
vatRate: 5.5
brandAmount: 3996
brandAmountVat: 220
brandAmountWithVat: 4216
brandUnitPrice: 333
createdAt: '2022-02-02T19:43:14.000000Z'
updatedAt: '2022-02-02T19:43:14.000000Z'
relationships:
productOption:
data:
type: productOption
id: '114135'
properties:
type:
type: string
default: order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
brandCurrency:
type: string
description: The currency of the amounts for the brand
quantity:
type: integer
description: The ordered quantity of the product
multipliedQuantity:
type: integer
description: Some products are sold in fixed quantities, e.g a case of 6 wine bottles. If the quantity was 2, the multiplied quantity of wine bottles would be 12 (6 x 2). This "unitMultiplier" can be found on the product.
vatRate:
type: number
format: float
description: The VAT percentage rate of the order item (0-100)
brandAmount:
description: The amount due to the brand for this item
type: integer
brandAmountVat:
description: The VAT amount due to the brand for this item
type: integer
brandAmountWithVat:
description: The amount + VAT due to the brand for this item
type: integer
brandUnitPrice:
description: The cost of a single unit of this item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp this order item was created
updatedAt:
type: string
format: datetime
description: The timestamp this order item was updated
relationships:
type: object
properties:
productOptions:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id073
uniqueItems: true
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
required:
- type
- id
- title: Billing Item Resource
type: object
additionalProperties: false
examples:
- type: billing-items
id: f1dd6498-c5f8-1eca-a6b7-0242ac170007
attributes:
type: brand_platform_fees
currency: EUR
vatRate: 20
currencyRate: 1
amount: -1259
amountVat: -252
amountWithVat: -1511
createdAt: '2022-02-02T19:42:32.000000Z'
updatedAt: '2022-02-02T20:15:06.000000Z'
properties:
type:
type: string
default: billing-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
type:
description: 'The `brand_platform_fees` is a commission for using our platform. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_new_customer_fees` is a commission on the first Order between brand and retailer. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_payment_fees` is a commission to guarantee Payment for brand. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_fast_payment` is a commission for using our fast payment feature. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_flat_shipping_fees` is the shipping cost collected from the retailer when the order is below brand Franco. It is positive and adds to the total amount paid.
The `brand_shipping_fees` is a shipping cost. This type reduces the amount paid to the brand (but will be a positive value).
The `brand_shipping_fees_refund` is a refund from Ankorstore to brand for shipping. This type is positive and adds to the total amount paid.
The `brand_shipping_fees_discount` is a referral shipping offer. This type is positive and adds to the total amount paid.
There still might also be legacy types which are not listed here but they will be removed in the nearest future.
'
type: string
enum:
- brand_platform_fees
- brand_new_customer_fees
- brand_payment_fees
- brand_fast_payment
- brand_flat_shipping_fees
- brand_shipping_fees
- brand_shipping_fees_refund
- brand_shipping_fees_discount
currency:
type: string
description: The currency of the billing item
vatRate:
type: number
format: float
description: The VAT percentage rate of the billing item, (from 0 - 100).
currencyRate:
type: number
format: float
description: If the currency is not in EUR, this is the conversion rate used
amount:
description: The amount for the billing item
type: integer
amountVat:
description: The VAT amount for the billing item
type: integer
amountWithVat:
description: The amount including VAT for the billing item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp when the billing item was created
updatedAt:
type: string
format: datetime
description: The timestamp when the billing item was updated
required:
- type
- id
- title: Product Option Resource
description: A unique option for a product
type: object
additionalProperties: false
examples:
- type: product-options
id: 7ec06d5c-023e-1ecb-a477-0242ac170007
attributes:
name: Test Product Option
sku: '051100'
ian: '3770005999506'
outOfStock: false
createdAt: '2020-08-27T14:29:15.000000Z'
updatedAt: '2021-10-04T12:03:31.000000Z'
archivedAt: null
relationships:
product:
data:
type: products
id: 7f4665f6-023e-1ecb-a4b2-0242ac170007
properties:
type:
type: string
default: product-options
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the option
sku:
type: string
description: The SKU of the option
ian:
type:
- 'null'
- string
description: The IAN (EAN) of the option, can be null
outOfStock:
type: boolean
description: Whether the product is in stock or not
createdAt:
type: string
format: datetime
description: Timestamp of when this option was created
updatedAt:
type: string
format: datetime
description: Timestamp of when this option was updated
archivedAt:
type:
- 'null'
- string
description: Timestamp of when this option was archived
relationships:
type: object
properties:
product:
description: 'Reference: Product Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
required:
- type
- id
- title: Product Variant Resource
description: Variant details for a given product. Unique products will have one single variant.
type: object
additionalProperties: false
examples:
- type: product-variants
id: 2171bdc1-fa01-44fa-9342-d99bd1c2befa
attributes:
name: Test Product Variant
sku: Product-Variant-001
ian: '1924859325863'
createdAt: '2020-08-27T14:29:15.000000Z'
updatedAt: '2021-10-04T12:03:31.000000Z'
archivedAt: null
retailPrice: 800
wholesalePrice: 500
originalWholesalePrice: 500
availableQuantity: 125
reservedQuantity: 25
stockQuantity: 150
isAlwaysInStock: false
inventoryPolicy: deny
fulfillableId: 8f066352-67cb-1efa-bddb-9e3047198b2e
availableAt: '2028-01-01T00:00:00.000000Z'
images:
- order: 1
url: https://example.com/image1.jpg
- order: 2
url: https://example.com/image2.jpg
relationships:
product:
data:
type: products
id: c8466a3c-4fb8-4474-a86f-20f10d14314f
properties:
type:
type: string
default: product-variants
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the product variant
sku:
type: string
description: The SKU of the product variant
ian:
type:
- 'null'
- string
description: The IAN (EAN) of the product variant, can be null
createdAt:
type: string
format: datetime
description: Timestamp of when this product variant was created
updatedAt:
type: string
format: datetime
description: Timestamp of when this product variant was updated
archivedAt:
type:
- 'null'
- string
description: Timestamp of when this product variant was archived
retailPrice:
description: The suggested retail price of the product
type: integer
wholesalePrice:
description: The wholesale price after the discount rate is applied
type: integer
originalWholesalePrice:
description: The original wholesale price set by the brand
type: integer
availableQuantity:
type:
- 'null'
- integer
description: Number of units that are available to order
reservedQuantity:
type: integer
description: Number of units in stock that are reserved
stockQuantity:
type:
- 'null'
- integer
description: Total number of units in stock (available + reserved)
isAlwaysInStock:
type: boolean
description: True if the product is always in stock, false otherwise
inventoryPolicy:
type: string
description: 'Sell-when-out-of-stock policy. `deny` (default) rejects orders once
available stock reaches zero; `continue` allows the variant to accept
orders even when available stock is zero or negative. `continue`
requires `isAlwaysInStock=false`.
'
enum:
- deny
- continue
default: deny
fulfillableId:
type:
- 'null'
- string
format: uuid
description: Resource ID used for interacting with the fulfillment service
availableAt:
type: string
nullable: true
format: date
description: Shipping date(in future) of a preorder product e.g. 2028-12-01
images:
type: array
description: List of variant images ordered by display priority
items:
type: object
properties:
order:
type: integer
description: Display order of the image (lower is higher priority)
url:
type: string
description: URL of the variant image
relationships:
type: object
properties:
product:
description: 'Reference: Product Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id071
properties: *id072
additionalProperties: false
required:
- type
- id
- title: Product Resource
description: The resource object for Product
type: object
additionalProperties: false
properties:
type:
type: string
default: products
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the product
description:
type: string
description: The description of the product
language:
type: string
description: The language of the title and description
dimensions:
type: string
description: The human readable dimensions of the product
netWeight:
type: string
description: The weight of the product itself
capacity:
type: string
description: eg. Capacity in weight eg 100g
position:
type: number
description: The position of the product in the brands catalog, lower the higher it is
unitMultiplier:
type: integer
description: How many products are shipped together, ie a case of 6 wine bottles. Presented options then would be 6, 12, 18 etc.
vatRate:
type: number
format: float
description: The VAT rate of the product
discountRate:
description: The percentage discount if a brand is offering one (0 - 1)
type: number
format: float
productTypeId:
description: 'Product Type ID
Deprecation Notice This attribute is deprecated and will be removed in a future release.
We strongly encourage all users to update their integrations accordingly to ensure continued compatibility. If you have any questions or need assistance, please contact support.
'
type: number
format: integer
active:
type: boolean
description: Whether the product is active or not
outOfStock:
type: boolean
description: Whether the product is out of stock or not
archived:
type: boolean
description: Whether the product is archived or not
retailPrice:
description: The suggested retail price of the product
type: integer
wholesalePrice:
description: The wholesale price after the discount rate is applied
type: integer
originalWholesalePrice:
description: The original wholesale price set by the brand
type: integer
createdAt:
type: string
format: datetime
description: The timestamp when the product was created
indexedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp when the product was indexed
updatedAt:
type: string
format: datetime
description: The timestamp when the product was updated
images:
type: array
description: List of product images ordered by display priority
items:
type: object
properties:
order:
type: integer
description: Display order of the image (lower is higher priority)
url:
type: string
description: URL of the product image
tags:
type: array
description: List of tags associated with the product
items:
type: string
relationships:
type: object
properties:
productOption:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id073
uniqueItems: true
productVariant:
description: 'Reference: Product Variant Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id073
uniqueItems: true
required:
- type
- id
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id074
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
required:
- data
examples:
example:
value:
jsonapi:
version: '1.0'
data:
type: order
id: 1ecb023e-7ec0-6d5c-a477-0242ac170009
attributes:
masterOrderId: 52d7c518-b820-41af-9cc4-59dae40f2c73
status: invoiced
reference: 3434273911
brandCurrency: EUR
brandNetAmount: 20596
brandTotalAmount: 23405
brandTotalAmountVat: 0
brandTotalAmountWithVat: 23405
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-03-15T10:05:09+00:00'
shippedAt: '2022-03-17T15:05:19+00:00'
brandPaidAt: null
createdAt: '2022-03-13T16:36:24+00:00'
updatedAt: '2022-03-31T11:57:13+00:00'
shippingMethod: ankorstore
shippingOverview:
availableShippingMethods:
- custom
- ankorstore
shipToAddress:
name: John Smith
organisationName: TEST RETAILER
street: Test Street 14
city: DEN HAAG
postalCode: 3333HC
countryCode: NL
expectedShippingDates:
minimum: '2022-03-18T00:00:00+00:00'
maximum: '2022-03-22T23:59:59+00:00'
updatedMaximum: '2022-03-30T23:59:59+00:00'
provider: ups
tracking: null
latestQuote:
id: 5cc76f26-0f5d-1ecb-a0d6-0242ac170009
provider: ups
rateAmount:
amount: 1359
currency: EUR
rateProvider: ankorstore
shippingCostsOverview:
amount: 1037
currency: EUR
type: fee
parcels:
- length: 30
width: 60
height: 40
weight: 16500
distanceUnit: cm
massUnit: g
trackedPackage:
labelUrl: null
eta: null
trackingNumber: 1Z8A76119134110028
trackingLink: https://www.ups.com/track?tracknum=1Z8A76119134110028&requester=WT/trackdetails
currentStatus:
status: DELIVERED
statusDetails: Delivered
updatedAt: '2022-03-21T10:36:46+00:00'
location:
city: DEN HAAG
state: null
zip: 3333HC
country: NL
transaction:
pickup:
pickupDate: '2022-03-18T00:00:00+00:00'
closeTime: '15:00:00'
readyTime: 09:00:00
externalReferenceId: 29QGCN35P8R
tracking:
eta: null
trackingNumber: 1Z8A76E493544110028
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E493544110028&requester=WT/trackdetails
currentStatus:
status: DELIVERED
statusDetails: Delivered
updatedAt: '2022-03-21T10:36:46+00:00'
location:
city: DEN HAAG
state: null
zip: 3333HC
country: NL
included:
- type: retailer
id: 3b656e82-0260-1ecb-9e4c-0242ac170007
attributes:
companyName: null
storeName: TEST RETAILER
storeUrl: null
email: test_retailer@gmail.com
firstName: Test
lastName: Retailer
taxNumber: '222270824'
vatNumber: FR52222470824
eoriNumber: null
phoneNumberE164: '+33688615666'
businessIdentifier: '819470111'
createdAt: '2020-06-19T11:59:30.000000Z'
updatedAt: '2020-06-21T15:27:39.000000Z'
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id075
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id074
additionalProperties: false
required: &id076
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id075
required: *id076
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id075
required: *id076
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id075
required: *id076
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/orders/{order}/is-fulfillable:
get:
summary: Check Internal Order Fulfillability
operationId: internal-order-is-fulfillable
description: Check whether an internal order can be fulfilled by Ankorstore logistics
tags:
- Ordering
responses:
'200':
description: No content
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id077
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id078
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id077
additionalProperties: false
required: &id079
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id078
required: *id079
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id078
required: *id079
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id078
required: *id079
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: Blockers that disqualify an order from fulfillment via Ankorstore logistics
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id077
additionalProperties: false
errors:
type: array
items:
type: object
properties:
detail:
type: string
enum:
- not_a_fulfillment_brand
- unavailable_items
- already_being_fulfilled
- not_available_for_international_orders
- missing_hs_code_for_international_order
- stock_is_being_transferred
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: General description of the problem
type: string
meta:
type: object
additionalProperties: true
properties:
undeclaredItems:
type: array
items:
type: string
format: uuid
unavailableItems:
type: array
items:
type: string
format: uuid
'500':
description: '[Server Error](https://jsonapi.org/format/#errors)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id078
required: *id079
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
parameters:
- schema:
type: string
in: header
name: Accept
description: application/vnd.api+json
- name: order
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
/api/v1/orders/{order}/-actions/transition:
post:
summary: Transition Internal Order
operationId: transition-internal-order
description: 'Transition an order to a new state. This endpoint can be used to accept an order (with or without modifications),
reject an order or reset generated shipping labels currently. Please see the documentation for more information.
'
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: order
in: path
required: true
schema:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
- name: include
in: query
description: 'A comma-separated list of resources to include (e.g: retailer,billingItems,orderItems.productVariant.product). If you include orderItems.productVariant you do not need to specify orderItems separately, it will be automatically included.'
schema:
type: string
enum:
- retailer
- billingItems
- orderItems
- orderItems.productVariant
- orderItems.productVariant.product
requestBody:
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
oneOf:
- title: Brand Accepts Payload
type: object
required:
- type
properties:
type:
type: string
description: The transition to use
enum:
- brand-validates
attributes:
type: object
properties:
orderItems:
type: array
uniqueItems: true
description: 'To accept the order as is, leave array empty.\
To modify a single items quantity, include it with the new quantity value.\
To remove an order item, specify its quantity as 0.\
Some products are sold in fixed quantities, e.g a case of 6 wine bottles. To confirm a pack of 6 bottles pass a quantity of 1.
'
items:
type: object
required:
- id
- type
- attributes
properties:
id:
type: string
description: Order Item Uuid
type:
type: string
enum:
- order-items
attributes:
type: object
required:
- quantity
properties:
quantity:
type: integer
description: A value of 0 indicates this order item will be removed. This value cannot go higher than the current quantity.
minimum: 0
- type: object
title: Brand Rejects Payload
required:
- type
- attributes
properties:
type:
type: string
description: The transition to use
enum:
- brand-rejects
attributes:
type: object
required:
- rejectType
properties:
rejectReason:
type: string
description: A detailed description of the reason for the order rejection. Required if reject type "OTHER" is used, optional for the rest of the predefined reject types
minLength: 1
maxLength: 1000
writeOnly: true
rejectType:
type: string
description: One of the available reject reasons.
enum:
- BRAND_ALREADY_HAS_CUSTOMER_IN_THE_AREA
- BRAND_CANNOT_DELIVER_TO_THE_AREA
- BRAND_HAS_EXCLUSIVE_DISTRIBUTOR_IN_THE_REGION
- BUYER_NOT_A_RETAILER
- ORDER_ITEMS_PRICES_INCORRECT
- PAYMENT_ISSUES_WITH_RETAILER
- PREPARATION_TIME_TOO_HIGH
- PRODUCT_OUT_OF_STOCK
- PURCHASE_NOT_FOR_RESALE
- RETAILER_AGREED_TO_DO_CHANGES_TO_ORDER
- RETAILER_NOT_GOOD_FIT_FOR_BRAND
- RETAILER_VAT_NUMBER_MISSING
- OTHER
writeOnly: true
- type: object
title: Brand Resets Shipping Labels Generation
required:
- type
- attributes
properties:
type:
type: string
description: The transition to use
enum:
- brand-resets-shipping-labels-generation
attributes:
type: object
required:
- resetType
properties:
resetType:
type: string
description: One of the available reset reasons.
enum:
- BRAND_NEED_MORE_LABELS_TO_SHIP
- BRAND_PUT_WRONG_WEIGHT_DIMENSIONS
- BRAND_SHIPS_WITH_DIFFERENT_CARRIER
- PROBLEM_DURING_SHIPPING_LABEL_GENERATION
- RETAILER_ASKED_DELIVERY_ADDRESS_CHANGE
- SHIPPING_ADDRESS_MISMATCHES_PICKUP_ADDRESS
- OTHER
writeOnly: true
reason:
type: string
description: A detailed description of the reason for resetting the generated shipping labels. Required if reset type "OTHER" is used, optional for the rest of the predefined reset types
minLength: 1
maxLength: 300
writeOnly: true
- type: object
title: Brand Requests Fulfillment
required:
- type
properties:
type:
type: string
description: The transition to use
enum:
- brand-requests-fulfillment
examples:
brand-validates:
value:
data:
type: brand-validates
brand-validates-with-modifications:
value:
data:
type: brand-validates
attributes:
orderItems:
- id: 1ecb023e-8ec0-6d5c-a477-0242ac170008
type: order-items
attributes:
quantity: 5
brand-rejects-1:
value:
data:
type: brand-rejects
attributes:
rejectType: BRAND_ALREADY_HAS_CUSTOMER_IN_THE_AREA
brand-rejects-2:
value:
data:
type: brand-rejects
attributes:
rejectType: OTHER
rejectReason: An example reason that justifies using OTHER
brand-resets-shipping-labels-generation-using-predefined-reason:
value:
data:
type: brand-resets-shipping-labels-generation
attributes:
resetType: RETAILER_ASKED_DELIVERY_ADDRESS_CHANGE
brand-resets-shipping-labels-generation-using-custom-reason:
value:
data:
type: brand-resets-shipping-labels-generation
attributes:
resetType: OTHER
reason: An example reason that justifies using OTHER
brand-requests-fulfillment:
value:
data:
type: brand-requests-fulfillment
responses:
'200':
description: '[OK](https://jsonapi.org/format/#fetching-resources-responses-200)'
content:
application/vnd.api+json:
schema:
title: Order Get
type: object
additionalProperties: false
examples:
- jsonapi:
version: '1.0'
data:
type: orders
id: 1ecb023e-7ec0-6d5c-a477-0242ac170007
attributes:
masterOrderId: a35ec01f-d2b7-4124-a7ed-c82320c629fa
status: shipped
reference: 3434273911
brandCurrency: EUR
brandTotalAmount: 12588
brandTotalAmountVat: 693
brandTotalAmountWithVat: 13281
shippingMethod: ankorstore
shippingOverview:
availableShippingMethods:
- custom
- ankorstore
shipToAddress:
name: John Smith
organisationName: Test Retailer
street: Test Street
city: Roma
postalCode: '00222'
countryCode: IT
expectedShippingDates:
minimum: '2022-03-28T00:00:00+00:00'
maximum: '2022-03-30T23:59:59+00:00'
updatedMaximum: '2022-04-27T23:59:59+00:00'
provider: ups
tracking: null
latestQuote:
id: 5cc76f26-0f5d-1ecb-a0d6-0242ac170009
provider: ups
parcels:
- length: 50
width: 100
height: 50
weight: 10000
distanceUnit: cm
massUnit: g
trackedPackage:
labelUrl: https://www.ankorstore.com/api/v1/orders/1ecb023e-7ec0-6d5c-a477-0242ac170007/shipping-labels/335654/pdf
eta: null
trackingNumber: 1Z8A76E49136380279
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E49136380279&requester=WT/trackdetails
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: '2022-03-28T15:35:19+00:00'
location:
city: null
state: null
zip: null
country: null
- length: 75
width: 50
height: 50
weight: 5200
distanceUnit: cm
massUnit: g
trackedPackage:
labelUrl: https://www.ankorstore.com/api/v1/orders/1ecb023e-7ec0-6d5c-a477-0242ac170007/shipping-labels/335655/pdf
eta: null
trackingNumber: 1Z8A76E49137225882
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E49137225882&requester=WT/trackdetails
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: '2022-03-28T15:35:19+00:00'
location:
city: null
state: null
zip: null
country: null
transaction:
pickup:
pickupDate: '2022-03-30T00:00:00+00:00'
closeTime: '15:00:00'
readyTime: 09:00:00
externalReferenceId: 2929602E9CP
tracking:
eta: null
trackingNumber: 1Z8A76E49136380279
trackingLink: https://www.ups.com/track?tracknum=1Z8A76E49136380279&requester=WT/trackdetails
currentStatus:
status: UNKNOWN
statusDetails: null
updatedAt: '2022-03-28T15:35:19+00:00'
location:
city: null
state: null
zip: null
country: null
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-02-02T20:15:05.000000Z'
shippedAt: '2022-02-09T15:05:27.000000Z'
brandPaidAt: null
createdAt: '2022-02-02T19:42:31.000000Z'
updatedAt: '2022-03-11T08:57:56.000000Z'
relationships:
retailer:
data:
type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
included:
- type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
attributes:
companyName: null
storeName: TEST RETAILER
storeUrl: null
email: test-retailer@gmail.com
firstName: Marie-France
lastName: DESCHAMPS
taxNumber: '819470824'
vatNumber: FR58819470824
eoriNumber: null
phoneNumberE164: '+33688615593'
businessIdentifier: '819470824'
createdAt: '2020-06-19T11:59:30.000000Z'
updatedAt: '2020-06-21T15:27:39.000000Z'
properties:
data:
description: The resource object for Order
type: object
additionalProperties: false
title: Order Resource
properties:
type:
type: string
default: orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
additionalProperties: false
properties:
masterOrderId:
type: string
description: The identifier of the linked master order
format: uuid
status:
type: string
example: ankor_confirmed
enum:
- ankor_confirmed
- rejected
- brand_confirmed
- shipping_labels_generated
- fulfillment_requested
- shipped
- reception_refused
- received
- invoiced
- brand_paid
- cancelled
reference:
type: integer
description: The order reference used on shipping labels, communication etc
brandCurrency:
type: string
description: The currency the brand is paid in
brandNetAmount:
description: The amount the brand is paid (total - fees - shipping cost + shipping refund). You may find the Ankorstore fees and the other amounts by including the orders billing items.
type: integer
brandTotalAmount:
description: The total of all order items not including VAT
type: integer
brandTotalAmountVat:
description: The total VAT of all order items
type: integer
brandTotalAmountWithVat:
description: The total of all order items including VAT
type: integer
shippingMethod:
type:
- 'null'
- string
description: The chosen shipping method after going through the shipping process
enum:
- ankorstore
- custom
- null
shippingOverview:
title: Order Resource -> Shipping Overview
description: Contains all information related to either shipping method (`ankorstore` or `custom`). This field is ONLY included when fetching a single order at a time.
type: object
properties:
availableShippingMethods:
type: array
description: Available shipping methods to use. Custom is ship with your own carrier outside of Ankorstore.
items:
enum:
- ankorstore
- custom
shipToAddress:
type: object
description: The address the order needs to be shipped to
required:
- street
- city
- postalCode
properties:
name:
type:
- 'null'
- string
description: The first and last name of the recipient
organisationName:
type:
- 'null'
- string
description: The organisational name of the recipient
street:
type:
- 'null'
- string
city:
type:
- 'null'
- string
postalCode:
type:
- 'null'
- string
countryCode:
type:
- 'null'
- string
expectedShippingDates:
type: object
description: The minimum and maximum expected shipping dates
required:
- minimum
- maximum
properties:
minimum:
type: string
format: datetime
maximum:
type: string
format: datetime
updatedMaximum:
type:
- 'null'
- string
format: datetime
provider:
type:
- 'null'
- string
description: The company providing the shipping service
enum:
- ups
- tnt
- gls
- dpd
- dhl
- dhl_express
- colissimo
- chronopost
- null
tracking:
type:
- 'null'
- object
description: Tracking details of the order
properties:
number:
type: string
link:
type: string
format: url
description: A URL to view the tracking status
latestQuote:
description: 'The quote is the price of the parcel(s) shipping.
If this object is null then no quote has been generated.'
type:
- 'null'
- object
properties:
id:
type: string
description: Id of the last quote generated. Every time a ship call is done, a new calculation is made based on parcels dimensions and weight sent
provider:
type: string
enum:
- custom
- ups
description: 'Provider responsible for the calculation. If custom, the calculation is done by Ankorstore and refunded.
If any other, the calculation is done by the provider and the shipping price is covered by Ankorstore (most of the case, see shippingCostsOverview section).'
rateProvider:
type: string
description: The provider of the rate for `rateAmount`.
enum:
- ups
- ankorstore
rateAmount:
type: object
description: Amount calculated for the parcels provided.
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
shippingCostsOverview:
type: object
description: Overview of costs related to shipping. This object is displayed only if a shipping cost fee or a refund exists
properties:
amount:
type: integer
description: Lowest denomination of the currency this amount belongs to.
currency:
type: string
type:
type: string
enum:
- refund
- fee
description: 'Type of shipping costs:
If type = `refund` the amount will be refunded to the brand (added to brand net amount).
if type = `fee` the amount will be subtracted from brand net amount as a contribution to shipping costs.'
required:
- id
- provider
parcels:
type: array
uniqueItems: true
items:
description: Shipping Label Parcel
type: object
properties:
length:
type: integer
maximum: 274
width:
type: integer
maximum: 274
height:
type: integer
maximum: 274
distanceUnit:
type: string
description: The unit of distance
enum:
- cm
weight:
type: integer
minimum: 1
maximum: 30000
massUnit:
type: string
description: The unit of mass
enum:
- g
trackedPackage:
type:
- 'null'
- object
description: The tracking per parcel
properties:
labelUrl:
description: The URL to download the shipping label
type:
- 'null'
- string
format: url
eta:
type:
- 'null'
- string
format: datetime
trackingNumber:
type: string
trackingLink:
type: string
currentStatus:
type: object
properties: &id080
status:
type: string
description: The current status of the order/parcel
enum:
- UNKNOWN
- PRE_TRANSIT
- DELIVERED
- RETURNED
- FAILURE
statusDetails:
description: Human readable version of status
type:
- string
- 'null'
updatedAt:
type: string
description: Last time the status was updated
format: datetime
location:
type: object
description: Last known location
properties:
city:
type:
- 'null'
- string
state:
type:
- 'null'
- string
zip:
type:
- 'null'
- string
country:
type:
- 'null'
- string
required:
- labelUrl
- eta
- trackingLink
- currentStatus
required:
- length
- width
- height
- distanceUnit
- weight
- massUnit
- trackedPackage
transaction:
type:
- 'null'
- object
properties:
pickup:
description: The scheduled pickup, requires an API call to be made after the shipping labels have been generated.
type:
- 'null'
- object
required:
- pickupDate
- closeTime
- readyTime
- externalReferenceId
properties:
pickupDate:
type: string
format: datetime
description: The date of the pickup
readyTime:
type: string
description: 'Opening time of pickup Eg: 10:00:00'
closeTime:
type: string
description: 'Close time (pickup required to happen before this time) Eg: 13:00:00'
externalReferenceId:
type: string
description: The reference number for this pickup
tracking:
description: The tracking details for the overall shipment
type: object
properties:
eta:
type:
- 'null'
- string
format: datetime
description: The estimated time of arrival for the order
trackingNumber:
type: string
description: The tracking number of the order
trackingLink:
type: string
format: url
description: The tracking link for the order
currentStatus:
type: object
properties: *id080
required:
- pickup
- tracking
required:
- availableShippingMethods
- shipToAddress
- expectedShippingDates
brandRejectReason:
type:
- 'null'
- string
description: The reason the brand has given for rejecting the order
retailerRejectReason:
type:
- 'null'
- string
description: The reason the retailer rejected the reception of the order
retailerCancellationRequestReason:
type:
- 'null'
- string
description: The reason the retailer has given for a cancellation request
billingName:
type:
- 'null'
- string
description: The billing address name
billingOrganisationName:
type:
- 'null'
- string
description: The billing address organisation name
billingStreet:
type:
- 'null'
- string
description: The billing address street name
billingPostalCode:
type:
- 'null'
- string
description: The billing address postal code
billingCity:
type:
- 'null'
- string
description: The billing address city
billingCountryCode:
type:
- 'null'
- string
description: The billing address country code - ISO format
submittedAt:
type: string
format: datetime
description: The timestamp of when the order was submitted (order is placed)
shippedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the order was shipped
brandPaidAt:
type:
- 'null'
- string
format: datetime
description: The timestamp of when the brand was paid
createdAt:
type: string
format: datetime
description: (deprecated) The timestamp of when the order was created (before retailer payment)
updatedAt:
type: string
format: datetime
description: The timestamp of when the order was updated (does not include other resources)
relationships:
type: object
properties:
retailer:
description: Related Retailer Resource
type: object
properties:
data:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: &id081
- id
- type
properties: &id082
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
type:
type: string
description: '[resource object type](https://jsonapi.org/format/#document-resource-object-identification)'
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
- type: object
properties:
type:
const: retailers
billingItems:
description: Related Billing Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
- type: object
properties:
type:
const: billing-items
orderItems:
description: Related Order Item Resources
type: object
properties:
data:
type: array
uniqueItems: true
items:
allOf:
- description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
- type: object
properties:
type:
const: order-items
orderItems-productOption:
description: 'Schema: Order Item -> Product Option Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
orderItems-productOption-product:
description: 'Schema: Order Item -> Product Option Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
orderItems-productVariant:
description: 'Schema: Order Item -> Product Variant Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
orderItems-productVariant-product:
description: 'Schema: Order Item -> Product Variant Resource -> Product'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
required:
- type
- id
included:
description: To reduce the number of HTTP requests, servers **MAY** allow responses that include related resources along with the requested primary resources. Such responses are called `compound documents`.
type: array
uniqueItems: true
items:
anyOf:
- title: Retailer Resource
type: object
additionalProperties: false
example:
type: retailers
id: 092b63ce-c5b9-1eca-b05f-0242ac170007
attributes:
companyName: null
storeName: TEST RETAILER
storeUrl: null
email: retailer@example.com
firstName: John
lastName: Smith
taxNumber: '12345678'
vatNumber: FR123456789
eoriNumber: null
phoneNumberE164: '+3345656456456'
businessIdentifier: '3454353455'
createdAt: '2020-06-19T11:59:30.000000Z'
updatedAt: '2020-06-21T15:27:39.000000Z'
properties:
type:
type: string
default: retailers
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
companyName:
type:
- string
- 'null'
description: The registered company of the retailer
storeName:
type: string
description: The name of the store
storeUrl:
type:
- string
- 'null'
format: url
description: The store's website
email:
type: string
format: email
description: Contact email for the retailer
firstName:
type: string
description: Retailer's first name
lastName:
type: string
description: Retailer's last name
taxNumber:
type: string
description: Retailer's tax number
vatNumber:
type: string
description: Retailer's VAT number
eoriNumber:
type:
- string
- 'null'
description: Retailer's EORI number
phoneNumberE164:
type: string
description: Retailer's phone number (E164 format)
businessIdentifier:
type: string
description: The tax field to use - tax or vat number. If the retailer is a sole trader, this field will instead be their sole trading number
createdAt:
type: string
format: datetime
description: The timestamp when the retailer was created
updatedAt:
type: string
format: datetime
description: The timestamp when the retailer was updated
relationships:
type: object
properties:
orders:
description: The order's belonging to a retailer. See [Order Resource](https://ankorstore.github.io/api-docs/#tag/Order/operation/list-orders)
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: &id083
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
uniqueItems: true
required:
- type
- id
- attributes
- title: Order Item Resource
type: object
additionalProperties: false
examples:
- type: order-items
id: 62b263a8-00e1-1ecb-98d2-0242ac170007
attributes:
brandCurrency: EUR
quantity: 1
multipliedQuantity: 12
vatRate: 5.5
brandAmount: 3996
brandAmountVat: 220
brandAmountWithVat: 4216
brandUnitPrice: 333
createdAt: '2022-02-02T19:43:14.000000Z'
updatedAt: '2022-02-02T19:43:14.000000Z'
relationships:
productOption:
data:
type: productOption
id: '114135'
properties:
type:
type: string
default: order-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
brandCurrency:
type: string
description: The currency of the amounts for the brand
quantity:
type: integer
description: The ordered quantity of the product
multipliedQuantity:
type: integer
description: Some products are sold in fixed quantities, e.g a case of 6 wine bottles. If the quantity was 2, the multiplied quantity of wine bottles would be 12 (6 x 2). This "unitMultiplier" can be found on the product.
vatRate:
type: number
format: float
description: The VAT percentage rate of the order item (0-100)
brandAmount:
description: The amount due to the brand for this item
type: integer
brandAmountVat:
description: The VAT amount due to the brand for this item
type: integer
brandAmountWithVat:
description: The amount + VAT due to the brand for this item
type: integer
brandUnitPrice:
description: The cost of a single unit of this item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp this order item was created
updatedAt:
type: string
format: datetime
description: The timestamp this order item was updated
relationships:
type: object
properties:
productOptions:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id083
uniqueItems: true
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
required:
- type
- id
- title: Billing Item Resource
type: object
additionalProperties: false
examples:
- type: billing-items
id: f1dd6498-c5f8-1eca-a6b7-0242ac170007
attributes:
type: brand_platform_fees
currency: EUR
vatRate: 20
currencyRate: 1
amount: -1259
amountVat: -252
amountWithVat: -1511
createdAt: '2022-02-02T19:42:32.000000Z'
updatedAt: '2022-02-02T20:15:06.000000Z'
properties:
type:
type: string
default: billing-items
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
type:
description: 'The `brand_platform_fees` is a commission for using our platform. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_new_customer_fees` is a commission on the first Order between brand and retailer. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_payment_fees` is a commission to guarantee Payment for brand. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_fast_payment` is a commission for using our fast payment feature. It will be a negative amount which reduces the total amount paid to the brand.
The `brand_flat_shipping_fees` is the shipping cost collected from the retailer when the order is below brand Franco. It is positive and adds to the total amount paid.
The `brand_shipping_fees` is a shipping cost. This type reduces the amount paid to the brand (but will be a positive value).
The `brand_shipping_fees_refund` is a refund from Ankorstore to brand for shipping. This type is positive and adds to the total amount paid.
The `brand_shipping_fees_discount` is a referral shipping offer. This type is positive and adds to the total amount paid.
There still might also be legacy types which are not listed here but they will be removed in the nearest future.
'
type: string
enum:
- brand_platform_fees
- brand_new_customer_fees
- brand_payment_fees
- brand_fast_payment
- brand_flat_shipping_fees
- brand_shipping_fees
- brand_shipping_fees_refund
- brand_shipping_fees_discount
currency:
type: string
description: The currency of the billing item
vatRate:
type: number
format: float
description: The VAT percentage rate of the billing item, (from 0 - 100).
currencyRate:
type: number
format: float
description: If the currency is not in EUR, this is the conversion rate used
amount:
description: The amount for the billing item
type: integer
amountVat:
description: The VAT amount for the billing item
type: integer
amountWithVat:
description: The amount including VAT for the billing item
type: integer
createdAt:
type: string
format: datetime
description: The timestamp when the billing item was created
updatedAt:
type: string
format: datetime
description: The timestamp when the billing item was updated
required:
- type
- id
- title: Product Option Resource
description: A unique option for a product
type: object
additionalProperties: false
examples:
- type: product-options
id: 7ec06d5c-023e-1ecb-a477-0242ac170007
attributes:
name: Test Product Option
sku: '051100'
ian: '3770005999506'
outOfStock: false
createdAt: '2020-08-27T14:29:15.000000Z'
updatedAt: '2021-10-04T12:03:31.000000Z'
archivedAt: null
relationships:
product:
data:
type: products
id: 7f4665f6-023e-1ecb-a4b2-0242ac170007
properties:
type:
type: string
default: product-options
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the option
sku:
type: string
description: The SKU of the option
ian:
type:
- 'null'
- string
description: The IAN (EAN) of the option, can be null
outOfStock:
type: boolean
description: Whether the product is in stock or not
createdAt:
type: string
format: datetime
description: Timestamp of when this option was created
updatedAt:
type: string
format: datetime
description: Timestamp of when this option was updated
archivedAt:
type:
- 'null'
- string
description: Timestamp of when this option was archived
relationships:
type: object
properties:
product:
description: 'Reference: Product Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
required:
- type
- id
- title: Product Variant Resource
description: Variant details for a given product. Unique products will have one single variant.
type: object
additionalProperties: false
examples:
- type: product-variants
id: 2171bdc1-fa01-44fa-9342-d99bd1c2befa
attributes:
name: Test Product Variant
sku: Product-Variant-001
ian: '1924859325863'
createdAt: '2020-08-27T14:29:15.000000Z'
updatedAt: '2021-10-04T12:03:31.000000Z'
archivedAt: null
retailPrice: 800
wholesalePrice: 500
originalWholesalePrice: 500
availableQuantity: 125
reservedQuantity: 25
stockQuantity: 150
isAlwaysInStock: false
inventoryPolicy: deny
fulfillableId: 8f066352-67cb-1efa-bddb-9e3047198b2e
availableAt: '2028-01-01T00:00:00.000000Z'
images:
- order: 1
url: https://example.com/image1.jpg
- order: 2
url: https://example.com/image2.jpg
relationships:
product:
data:
type: products
id: c8466a3c-4fb8-4474-a86f-20f10d14314f
properties:
type:
type: string
default: product-variants
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the product variant
sku:
type: string
description: The SKU of the product variant
ian:
type:
- 'null'
- string
description: The IAN (EAN) of the product variant, can be null
createdAt:
type: string
format: datetime
description: Timestamp of when this product variant was created
updatedAt:
type: string
format: datetime
description: Timestamp of when this product variant was updated
archivedAt:
type:
- 'null'
- string
description: Timestamp of when this product variant was archived
retailPrice:
description: The suggested retail price of the product
type: integer
wholesalePrice:
description: The wholesale price after the discount rate is applied
type: integer
originalWholesalePrice:
description: The original wholesale price set by the brand
type: integer
availableQuantity:
type:
- 'null'
- integer
description: Number of units that are available to order
reservedQuantity:
type: integer
description: Number of units in stock that are reserved
stockQuantity:
type:
- 'null'
- integer
description: Total number of units in stock (available + reserved)
isAlwaysInStock:
type: boolean
description: True if the product is always in stock, false otherwise
inventoryPolicy:
type: string
description: 'Sell-when-out-of-stock policy. `deny` (default) rejects orders once
available stock reaches zero; `continue` allows the variant to accept
orders even when available stock is zero or negative. `continue`
requires `isAlwaysInStock=false`.
'
enum:
- deny
- continue
default: deny
fulfillableId:
type:
- 'null'
- string
format: uuid
description: Resource ID used for interacting with the fulfillment service
availableAt:
type: string
nullable: true
format: date
description: Shipping date(in future) of a preorder product e.g. 2028-12-01
images:
type: array
description: List of variant images ordered by display priority
items:
type: object
properties:
order:
type: integer
description: Display order of the image (lower is higher priority)
url:
type: string
description: URL of the variant image
relationships:
type: object
properties:
product:
description: 'Reference: Product Resource'
type: object
properties:
data:
description: Resource identification present in Resource Objects and Resource Identifier Objects.
type: object
required: *id081
properties: *id082
additionalProperties: false
required:
- type
- id
- title: Product Resource
description: The resource object for Product
type: object
additionalProperties: false
properties:
type:
type: string
default: products
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
name:
type: string
description: The name of the product
description:
type: string
description: The description of the product
language:
type: string
description: The language of the title and description
dimensions:
type: string
description: The human readable dimensions of the product
netWeight:
type: string
description: The weight of the product itself
capacity:
type: string
description: eg. Capacity in weight eg 100g
position:
type: number
description: The position of the product in the brands catalog, lower the higher it is
unitMultiplier:
type: integer
description: How many products are shipped together, ie a case of 6 wine bottles. Presented options then would be 6, 12, 18 etc.
vatRate:
type: number
format: float
description: The VAT rate of the product
discountRate:
description: The percentage discount if a brand is offering one (0 - 1)
type: number
format: float
productTypeId:
description: 'Product Type ID
Deprecation Notice This attribute is deprecated and will be removed in a future release.
We strongly encourage all users to update their integrations accordingly to ensure continued compatibility. If you have any questions or need assistance, please contact support.
'
type: number
format: integer
active:
type: boolean
description: Whether the product is active or not
outOfStock:
type: boolean
description: Whether the product is out of stock or not
archived:
type: boolean
description: Whether the product is archived or not
retailPrice:
description: The suggested retail price of the product
type: integer
wholesalePrice:
description: The wholesale price after the discount rate is applied
type: integer
originalWholesalePrice:
description: The original wholesale price set by the brand
type: integer
createdAt:
type: string
format: datetime
description: The timestamp when the product was created
indexedAt:
type:
- 'null'
- string
format: datetime
description: The timestamp when the product was indexed
updatedAt:
type: string
format: datetime
description: The timestamp when the product was updated
images:
type: array
description: List of product images ordered by display priority
items:
type: object
properties:
order:
type: integer
description: Display order of the image (lower is higher priority)
url:
type: string
description: URL of the product image
tags:
type: array
description: List of tags associated with the product
items:
type: string
relationships:
type: object
properties:
productOption:
description: 'Reference: Product Option Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id083
uniqueItems: true
productVariant:
description: 'Reference: Product Variant Resource'
type: object
properties:
data:
description: An array of objects each containing `type` and `id` members for to-many relationships.
type: array
items: *id083
uniqueItems: true
required:
- type
- id
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id084
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
required:
- data
examples:
brand-validates:
value:
jsonapi:
version: '1.0'
data:
type: order
id: 1ecb023e-8ec0-6d5c-a477-0242ac170007
attributes:
status: brand_confirmed
reference: 3434273911
brandCurrency: EUR
brandNetAmount: 10229
brandTotalAmount: 10940
brandTotalAmountVat: 602
brandTotalAmountWithVat: 11542
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-03-17T13:19:33+00:00'
shippedAt: null
brandPaidAt: null
createdAt: '2022-02-01T14:37:10+00:00'
updatedAt: '2022-03-31T15:10:07+00:00'
shippingMethod: null
shippingOverview:
availableShippingMethods:
- custom
- ankorstore
shipToAddress:
name: John Smith
organisationName: Test
street: Test Street
city: Commentry
postalCode: '03633'
countryCode: FR
expectedShippingDates:
minimum: '2022-03-22T00:00:00+00:00'
maximum: '2022-03-24T23:59:59+00:00'
updatedMaximum: '2022-03-27T23:59:59+00:00'
provider: null
tracking: null
latestQuote: null
parcels: []
transaction: null
brand-validates-with-modifications:
value:
jsonapi:
version: '1.0'
data:
type: order
id: 1ecb023e-8ec0-6d5c-a477-0242ac170007
attributes:
status: brand_confirmed
reference: 3434273911
brandCurrency: EUR
brandNetAmount: 10229
brandTotalAmount: 10940
brandTotalAmountVat: 602
brandTotalAmountWithVat: 11542
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-03-17T13:19:33+00:00'
shippedAt: null
brandPaidAt: null
createdAt: '2022-02-01T14:37:10+00:00'
updatedAt: '2022-03-31T15:10:07+00:00'
shippingMethod: null
shippingOverview:
availableShippingMethods:
- custom
- ankorstore
shipToAddress:
name: John Smith
organisationName: Test
street: Test Street
city: Commentry
postalCode: '03633'
countryCode: FR
expectedShippingDates:
minimum: '2022-03-22T00:00:00+00:00'
maximum: '2022-03-24T23:59:59+00:00'
updatedMaximum: '2022-03-27T23:59:59+00:00'
provider: null
tracking: null
latestQuote: null
parcels: []
transaction: null
brand-rejects:
value:
jsonapi:
version: '1.0'
data:
type: order
id: 1ecb023e-8ec0-6d5c-a477-0242ac170007
attributes:
status: cancelled
reference: 3434273911
brandCurrency: EUR
brandNetAmount: 10229
brandTotalAmount: 10940
brandTotalAmountVat: 602
brandTotalAmountWithVat: 11542
brandRejectReason: null
retailerRejectReason: null
retailerCancellationRequestReason: null
billingName: Charles Attan
billingOrganisationName: Jumbo
billingStreet: Kortricklaan 101
billingPostalCode: 8121 GW
billingCity: Arnhem
billingCountryCode: NL
submittedAt: '2022-03-17T13:19:33+00:00'
shippedAt: null
brandPaidAt: null
createdAt: '2022-02-01T14:37:10+00:00'
updatedAt: '2022-03-31T15:10:07+00:00'
shippingMethod: null
shippingOverview:
availableShippingMethods:
- custom
- ankorstore
shipToAddress:
name: John Smith
organisationName: Test
street: Test Street
city: Commentry
postalCode: '03633'
countryCode: FR
expectedShippingDates:
minimum: '2022-03-22T00:00:00+00:00'
maximum: '2022-03-24T23:59:59+00:00'
updatedMaximum: '2022-03-27T23:59:59+00:00'
provider: null
tracking: null
latestQuote: null
parcels: []
transaction: null
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id085
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id084
additionalProperties: false
required: &id086
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id085
required: *id086
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'404':
description: '[Not found](https://jsonapi.org/format/#fetching-resources-responses-404)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id085
required: *id086
example:
jsonapi:
version: '1.0'
errors:
- detail: Not found
status: '404'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id085
required: *id086
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'409':
description: Conflict
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id085
required: *id086
example:
jsonapi:
version: '1.0'
errors:
- code: ORDER_ACTION_TRANSITION_FAILED
detail: Order cannot be transitioned using brand-validates from this state
status: '409'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id085
required: *id086
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
/api/v1/external-orders/non-ankorstore-fulfillment-orders:
post:
summary: Create NAFO External Order
operationId: ordering-create-non-ankorstore-fulfillment-order
description: Creates a new External Order of type `nafo`
tags:
- Ordering
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
shippingAddress:
description: Shipping address of the recipient.
type: object
properties:
country:
type: string
description: ISO 3166-1 country code.
pattern: ^[A-Z]{2}$
postalCode:
type: string
description: Valid postal code, matching the country.
city:
type: string
minLength: 1
maxLength: 255
description: Name of the destination city.
street:
type: string
minLength: 1
maxLength: 60
description: 'Street address, should not exceed the maximum length
in order to fit the dedicated place on the shipping label.
'
company:
type: string
maxLength: 70
description: Name of the company
firstName:
type: string
minLength: 1
maxLength: 64
description: First name of the person, receiving the order
lastName:
type: string
minLength: 1
maxLength: 64
description: Last name of the person, receiving the order
phone:
type: string
minLength: 1
description: Phone number of the person, receiving the order. The format match the country.
email:
type: string
format: email
description: Email of the person, receiving the order
required:
- country
- postalCode
- city
- street
- company
- firstName
- lastName
- phone
- email
items:
type: array
description: List of fulfillable items with their corresponding quantities.
items:
type: object
properties:
fulfillableId:
type: string
format: uuid
description: Fulfillable identifier, find more about it [here](#tag/Fulfillment/About-Fulfillment).
quantity:
type: integer
description: Quantity of the fulfillable item in units.
minimumRemainingShelfLife:
type: integer
nullable: true
description: Minimum remaining shelf life in days. When specified, the fulfillment center will ensure items have at least this many days of shelf life remaining.
required:
- fulfillableId
- quantity
masterOrderUuid:
type: string
format: uuid
description: 'Pre-generated UUID for the order being created. Despite this UUID is optional and being omitted,
will be generated by the system, having it in advance will make it easier to identify and track the
status of the created order (considering the asynchronous nature of the process).
'
customReference:
type: string
description: 'Optional brand-defined custom reference to add to the created order.
Usually represents some order identifier in the brand''s order management system, used outside of Ankorstore.
'
recipientType:
description: The type of recipient for this order
type: string
enum:
- business
- consumer
default: business
pickupAtDock:
type: boolean
nullable: true
default: false
description: 'Indicates whether the shipment should be picked up at the dock.
Defaults to false if not provided.
'
deliverySchedule:
nullable: true
description: 'Allow you to specify opening times for the customer.
'
type: object
additionalProperties: false
properties:
timeSlots:
type: array
description: 'Opening times for the customer''s business. The time slots when the customer is available for delivery expressed as ranges in 24-hour time format. When null, the customer can be delivered anytime.
'
items:
type: object
additionalProperties: false
properties:
startTime:
type: string
description: 'Start of the opening time expressed in a 24-hour time format (e.g. `14:00`).
'
example: 09:30
endTime:
type: string
description: 'End of the opening time expressed in a 24-hour time format (e.g. `14:00`).
'
example: '12:30'
required:
- startTime
- endTime
nullable: true
openDays:
description: 'The opening days for the customer''s business. ISO 8601 numeric representation of the day of the week (`1` for Monday through `7` for Sunday).
'
type: array
items:
type: integer
minimum: 1
maximum: 7
minItems: 1
uniqueItems: true
example:
- 1
- 2
- 3
required:
- timeSlots
- openDays
packingInstruction:
nullable: true
description: Allow you to specify specific instructions for packing.
type: object
additionalProperties: false
required:
- services
properties:
services:
type: array
description: List of services to be performed on the order. Either `PALLETISE`, `DOCS`, `CUSTOM_BUILD` or `SSCC`
minItems: 1
items:
type: string
enum:
- PALLETISE
- CUSTOM_BUILD
- DOCS
- SSCC
instruction:
type: string
description: Instruction text for packing the order.
deliveryAppointment:
nullable: true
description: 'Allow you to specify the need of booking an appointment before delivery
'
type: object
additionalProperties: false
required:
- requested
properties:
requested:
type: boolean
description: Is an appointment requested?
instruction:
type: string
description: Instruction text for booking an appointment.
invoiceUuid:
type: string
format: uuid
description: 'UUID for the invoice document (type: fulfillment-media) associated with this order. The UUID should correspond to a document previously uploaded via POST /api/fulfillment/v1/media/upload
Required if the order crosses a customs border
'
required:
- shippingAddress
- items
responses:
'200':
description: No content
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id087
version:
type: string
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id088
errors:
type: array
uniqueItems: true
items:
type: object
properties:
code:
description: An application-specific error code, expressed as a string value.
type: string
detail:
description: A human-readable explanation specific to this occurrence of the problem.
type: string
status:
description: The HTTP status code applicable to this problem, expressed as a string value.
type: string
title:
description: The HTTP status code description applicable to this problem
type: string
source:
type: object
description: Optional object pointing towards the problematic field
properties:
pointer:
type: string
description: The field key
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
additionalProperties: false
jsonapi:
description: An object describing the server's implementation
type: object
properties: *id087
additionalProperties: false
required: &id089
- errors
example:
jsonapi:
version: '1.0'
errors:
- detail: Bad request
status: '400'
'401':
description: Unauthorized
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id088
required: *id089
example:
jsonapi:
version: '1.0'
errors:
- detail: Unauthorized
status: '401'
'403':
description: '[Forbidden](https://jsonapi.org/format/#crud-creating-responses-403)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id088
required: *id089
example:
jsonapi:
version: '1.0'
errors:
- detail: Forbidden
status: '403'
'406':
description: Not Acceptable
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id088
required: *id089
example:
jsonapi:
version: '1.0'
errors:
- detail: Not Acceptable
status: '406'
'415':
description: Unsupported Media Type
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id088
required: *id089
example:
jsonapi:
version: '1.0'
errors:
- detail: Unsupported Media Type
status: '415'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id088
required: *id089
example:
jsonapi:
version: string
errors:
- detail: The field is required.
source:
pointer: data.attributes.field
status: '422'
title: Unprocessable Content
'500':
description: '[Server Error](https://jsonapi.org/format/#errors)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id088
required: *id089
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
components:
securitySchemes:
CookieKey:
type: apiKey
name: ankorstore_session
in: cookie