Ankorstore Testing API

ℹ️ This section is dedicated to the testing API during development process. The listed endpoints are **not available** on production environment. ### Creating Test Orders When using the public sandbox, a subsection of the API will be available to create test orders. This endpoint `/api/testing/orders/create` can be called to create a new test order with a new retailer, and a couple of new products. You can also pass in options to specify the exact retailer or products themselves. To find out more, you can view the [endpoint specification here](a45de155779ff-create-test-order-sandbox-only). ### Finding the Retailer ID There is an option to specify the `retailerId` to use the same retailer for every test order, to find this, login as that retailer you created and open up the developer tools. You will see it logged to the console.

OpenAPI Specification

ankorstore-testing-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 1.2.2-oas3.1
  title: Ankorstore Stock Tracking and Logistics Applications Testing 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: Testing
  description: "ℹ️ This section is dedicated to the testing API during development process. \nThe listed endpoints are **not available** on production environment.\n\n### Creating Test Orders\n\nWhen using the public sandbox, a subsection of the API will be available to create test orders.\n\nThis endpoint `/api/testing/orders/create` can be called to create a new test order with a new retailer,\nand a couple of new products.\n\nYou can also pass in options to specify the exact retailer or products themselves.\nTo find out more, you can view the [endpoint specification here](a45de155779ff-create-test-order-sandbox-only).\n\n### Finding the Retailer ID\n\nThere is an option to specify the `retailerId` to use the same retailer for every test order, to find this, \nlogin as that retailer you created and open up the developer tools. You will see it logged to the console.\n"
paths:
  /api/testing/orders/create:
    post:
      summary: Create Test Order
      operationId: brand-create-test-order
      description: 'Creates a test order ready to be confirmed based on the options provided.

        **ONLY AVAILABLE IN SANDBOX ENVIRONMENT**.

        '
      tags:
      - Testing
      parameters:
      - 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
      - schema:
          type: string
        in: header
        name: Accept
        description: application/vnd.api+json
      - schema:
          type: string
        in: header
        name: Content-Type
        description: application/vnd.api+json
      requestBody:
        description: The options that can be provided when creating a test order
        content:
          application/vnd.api+json:
            schema:
              description: Options
              type:
              - object
              - 'null'
              properties:
                retailerId:
                  type:
                  - string
                  - 'null'
                  description: The Retailer Id
                itemQuantity:
                  type:
                  - integer
                  - 'null'
                  description: If productVariants/productOptions are not provided, then this will set the quantity each order item created.
                  minimum: 1
                  maximum: 999
                productVariants:
                  type:
                  - array
                  - 'null'
                  description: List of variant IDs and their quantities. Cannot be included with productOptions.
                  uniqueItems: true
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                        format: uuid
                      itemQuantity:
                        type: integer
                        minimum: 1
                        maximum: 999
                productOptions:
                  type:
                  - array
                  - 'null'
                  description: List of option IDs and their quantities - Only use if you are currently using the old options system. Cannot be included with productVariants
                  uniqueItems: true
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
                        format: uuid
                      itemQuantity:
                        type: integer
                        minimum: 1
                        maximum: 999
            examples:
              use-existing-retailer:
                value:
                  retailerId: 5ee4d438-0489-4634-aa60-746f485af458
              use-product-variants:
                value:
                  retailerId: 5ee4d438-0489-4634-aa60-746f485af458
                  productVariants:
                  - id: 73ace86a-db9c-408f-b28f-b478694988c8
                    quantity: 3
                  - id: 88f24110-dc42-42a4-abf0-857f90efce7d
                    quantity: 3
              use-product-options:
                value:
                  retailerId: 5ee4d438-0489-4634-aa60-746f485af458
                  productOptions:
                  - id: 73ace86a-db9c-408f-b28f-b478694988c8
                    quantity: 3
                  - id: 88f24110-dc42-42a4-abf0-857f90efce7d
                    quantity: 3
              no-options-provided:
                description: No options are required
                value: {}
      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: &id001
                                            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: *id001
                                required:
                                - pickup
                                - tracking
                            required:
                            - availableShippingMethods
                            - shipToAddress
                            - exp

# --- truncated at 32 KB (81 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/ankorstore/refs/heads/main/openapi/ankorstore-testing-api-openapi.yml