openapi: 3.1.0
info:
version: 1.2.2-oas3.1
title: Ankorstore Stock Tracking and Logistics Applications OrderPay 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: OrderPay
description: "ℹ️ This section describes the API endpoints for managing _OrderPay_ orders and customers. OrderPay allows brands\nto create and manage orders for their own customers, handle payments, and track order lifecycle — all through the\nAnkorstore platform.\n\n## \U0001F4A1 General Concepts\n\n- _OrderPay Order_ - An order created by a brand on behalf of one of its customers. Unlike _Internal Orders_ (placed\n by retailers on the Ankorstore marketplace), OrderPay orders are initiated by the brand itself. This enables brands\n to sell to customers outside the marketplace while still leveraging Ankorstore's payment processing, invoicing, and\n optionally, fulfillment services.\n- _OrderPay Customer_ - A customer entity managed by the brand. Each customer has billing and shipping addresses,\n contact details, and associated payment methods. Customers must be created before orders can be placed for them.\n- _Custom Items_ - Additional charges on an order beyond product line items, such as shipping fees, excise duties,\n or eco-taxes.\n\n## \U0001F4A1 Working with Customers\n\nBefore creating an order, you need to register the customer. Use the customer endpoints to create and manage your\ncustomer base.\n\n### Creating a Customer\n\nA customer requires at minimum: store name, email, first/last name, phone number, and both billing and shipping\naddresses.\n\n```json5\n// POST /api/v1/order-pay/order-pay-customer\n{\n \"data\": {\n \"type\": \"order-pay-customer\",\n \"attributes\": {\n \"storeName\": \"La Boutique Verte\",\n \"email\": \"contact@laboutiqueverte.fr\",\n \"firstName\": \"Marie\",\n \"lastName\": \"Dupont\",\n \"company\": {\n \"phoneNumber\": \"+33612345678\",\n \"vatNumber\": \"FR12345678901\",\n \"vatExemption\": false\n },\n \"billingAddress\": {\n \"street\": \"12 Rue de la Paix\",\n \"postalCode\": \"75002\",\n \"city\": \"Paris\",\n \"countryCode\": \"FR\"\n },\n \"shippingAddress\": {\n \"street\": \"12 Rue de la Paix\",\n \"postalCode\": \"75002\",\n \"city\": \"Paris\",\n \"countryCode\": \"FR\"\n }\n }\n }\n}\n```\n\n### Listing and Filtering Customers\n\nYou can retrieve your customers with optional filters:\n\n```\n[GET] /api/v1/order-pay/order-pay-customer?filter[storeName]=boutique&sort=storeName\n```\n\nThe response uses page-based pagination with `page[number]` and `page[size]` parameters.\n\n### Including Payment Methods\n\nWhen retrieving a single customer, pass `?include=paymentMethods` to see the customer's stored payment methods.\n\n## \U0001F4A1 Working with Orders\n\n### Order Lifecycle\n\nAn OrderPay order goes through the following statuses:\n\n
\nstateDiagram-v2\n [*] --> created\n created --> brand_confirmed : Brand confirms\n created --> cancelled : Brand cancels\n brand_confirmed --> payment_confirmed : Payment processed\n brand_confirmed --> cancelled : Brand cancels\n payment_confirmed --> waiting_shipping\n waiting_shipping --> shipped\n shipped --> received\n received --> invoiced\n invoiced --> brand_paid\n brand_paid --> [*]\n cancelled --> [*]\n
\n\n| Status | Description |\n| --- | --- |\n| `created` | Order has been created but not yet confirmed by the brand |\n| `brand_confirmed` | Brand has confirmed the order, payment will be processed |\n| `payment_confirmed` | Payment has been successfully processed |\n| `waiting_shipping` | Order is awaiting shipment |\n| `shipped` | Order has been shipped |\n| `received` | Customer has received the order |\n| `invoiced` | Invoice has been generated |\n| `brand_paid` | Brand has been paid for the order |\n| `cancelled` | Order has been cancelled |\n\n### Creating an Order\n\nTo create an order you need the customer UUID and at least one product line item. Each item requires a\n`productVariantUuid`, a `quantity` (in packs), and pricing in the brand's currency.\n\n> ⚠️ The `quantity` field represents the number of **packs**, not individual units. For example, if a product variant is\n> sold in packs of 6, a quantity of 2 means 12 individual units.\n\n```json5\n// POST /api/v1/order-pay/order-pay-orders\n{\n \"data\": {\n \"type\": \"order-pay-orders\",\n \"attributes\": {\n \"customerUuid\": \"f47ac10b-58cc-4372-a567-0e02b2c3d479\",\n \"customReference\": \"SHOP-12345\", // Your reference, shown on customer invoice\n \"items\": [\n {\n \"productVariantUuid\": \"d290f1ee-6c54-4b01-90e6-d701748f0851\",\n \"quantity\": 2,\n \"amounts\": {\n \"brandUnitPrice\": 1500, // 15.00 EUR in cents\n \"discountRate\": 10 // 10% discount\n }\n }\n ],\n \"customItems\": [\n {\n \"type\": \"shippingFees\",\n \"amount\": 800 // 8.00 EUR in cents, excl. VAT\n }\n ],\n \"shippingMethod\": \"custom\" // \"custom\" or \"fulfillment\"\n }\n }\n}\n```\n\n### Shipping Methods\n\n| Method | Description |\n| --- | --- |\n| `custom` | You ship the order using your own carrier |\n| `fulfillment` | The order is fulfilled via AnkorLogistics Fulfillment Centre |\n\nWhen using `fulfillment`, you can optionally provide delivery instructions:\n\n- `deliverySchedule` - Customer opening times with day-of-week and time slots\n- `packingInstruction` - Services like `PALLETISE`, `CUSTOM_BUILD`, or `DOCS`\n- `deliveryAppointment` - Whether an appointment is required for delivery\n\n### Custom Items\n\nUse `customItems` to add charges beyond product line items:\n\n| Type | Description |\n| --- | --- |\n| `shippingFees` | Shipping charges |\n| `exciseDuties` | Excise duties (e.g., on alcohol) |\n| `ecoTax` | Environmental taxes |\n\n> ⚠️ The `amounts.shippingFeesAmount` field is **deprecated**. Use `customItems` with type `shippingFees` instead.\n\n### Custom Reference\n\nUse the `customReference` field to link orders back to your own system (e.g., a Shopify order ID). This reference\nappears on the customer's invoice and can be up to 64 characters.\n\n### Confirming and Cancelling Orders\n\nAfter creating an order, you can:\n\n- **Confirm** it via `POST /api/v1/order-pay/order-pay-orders/{id}/-actions/confirm` — this triggers payment processing\n- **Cancel** it via `POST /api/v1/order-pay/order-pay-orders/{id}/-actions/cancel` — with an optional reason\n\n### Including Payment Details\n\nWhen retrieving an order, pass `?include=payment` or `?include=payment.transactions` to see payment status and\ntransaction details.\n\n## \U0001F4A1 Amounts and Currencies\n\nAll monetary amounts are represented as **integers in the lowest denomination** of the currency (e.g., cents for EUR).\nEvery order response includes both brand-currency and customer-currency amounts, with formatted string equivalents\nfor display purposes.\n\nFor example, a line item response includes fields like:\n- `brandUnitPrice`: `1500` (integer, cents)\n- `brandUnitPriceFormatted`: `\"15.00 EUR\"` (string, for display)\n- `customerUnitPrice`: `1320` (integer, cents in customer currency)\n- `customerUnitPriceFormatted`: `\"13.20 GBP\"` (string, for display)\n\nVAT is calculated automatically based on the customer's address and product configuration.\n"
paths:
/api/v1/order-pay/order-pay-customer:
get:
operationId: list-order-pay-customer
summary: List customers
description: 'Retrieves a list of customers associated with an OrderPay account. The result is paginated. Furthermore a filter can be applied on the result.
'
tags:
- OrderPay
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: filter[storeName]
in: query
required: false
schema:
type: string
- name: filter[email]
in: query
required: false
schema:
type: string
- name: page[number]
in: query
schema:
type: integer
default: 1
description: Page number, starting at 1
- name: page[size]
in: query
schema:
type: integer
default: 20
description: Maximum number of elements per page
- name: sort
in: query
schema:
type: string
enum:
- id
- storeName
description: Comma-separated list of attributes to sort by (storeName by default)
allowEmptyValue: false
- schema:
type: string
enum:
- paymentMethods
name: include
in: query
description: 'A comma-separated list of resources to include (e.g: paymentMethods)'
responses:
'200':
description: Collection of Customer resources
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id005
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:
title: CustomerResource
type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
storeName:
type: string
email:
type: string
firstName:
type:
- string
- 'null'
lastName:
type:
- string
- 'null'
paymentMethods:
type: array
items:
type: object
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- type
company:
type: object
properties:
phoneNumber:
type: string
phoneCountry:
type: object
properties: &id001
isoCode:
type: string
name:
type: string
callingCode:
type: integer
required: &id002
- isoCode
- name
- callingCode
taxNumber:
type:
- string
- 'null'
vatNumber:
type:
- string
- 'null'
vatExemption:
type: boolean
required:
- phoneNumber
- phoneCountry
- taxNumber
- vatNumber
- vatExemption
billingAddress:
type: object
properties: &id003
name:
type: string
street:
type: string
postalCode:
type: string
city:
type: string
country:
type: object
properties: *id001
required: *id002
required: &id004
- name
- street
- postalCode
- city
- country
shippingAddress:
type: object
properties: *id003
required: *id004
required:
- storeName
- email
- firstName
- lastName
- company
relationships:
type: object
properties:
paymentMethods:
type: object
required:
- data
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
type:
type: string
default: order-pay-customer-payment-methods
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
uniqueItems: true
meta:
type: object
additionalProperties: true
properties:
page:
type: object
properties:
currentPage:
type: integer
from:
type: integer
lastPage:
type: integer
perPage:
type: integer
to:
type: integer
total:
type: integer
required:
- page
required:
- jsonapi
- data
- meta
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id006
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: *id005
additionalProperties: false
required: &id007
- 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: *id006
required: *id007
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: *id006
required: *id007
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: *id006
required: *id007
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: *id006
required: *id007
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: *id006
required: *id007
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
post:
operationId: create-order-pay-customer
summary: Create a customer
description: Creates a new OrderPay customer.
tags:
- OrderPay
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
const: order-pay-customer
attributes:
type: object
properties:
storeName:
type: string
email:
type: string
firstName:
type: string
lastName:
type: string
company:
type: object
properties:
phoneNumber:
type: string
taxNumber:
type: string
vatNumber:
type: string
vatExemption:
type: boolean
required:
- phoneNumber
- vatExemption
billingAddress:
type: object
properties:
street:
type: string
postalCode:
type: string
city:
type: string
countryCode:
type: string
default: FR
required:
- street
- postalCode
- city
shippingAddress:
type: object
properties:
street:
type: string
postalCode:
type: string
city:
type: string
countryCode:
type: string
default: FR
required:
- street
- postalCode
- city
required:
- storeName
- email
- firstName
- lastName
- company
- billingAddress
- shippingAddress
required:
- type
- attributes
required:
- data
responses:
'201':
description: Single Customer resource
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id012
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: CustomerResource
type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
storeName:
type: string
email:
type: string
firstName:
type:
- string
- 'null'
lastName:
type:
- string
- 'null'
paymentMethods:
type: array
items:
type: object
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- type
company:
type: object
properties:
phoneNumber:
type: string
phoneCountry:
type: object
properties: &id008
isoCode:
type: string
name:
type: string
callingCode:
type: integer
required: &id009
- isoCode
- name
- callingCode
taxNumber:
type:
- string
- 'null'
vatNumber:
type:
- string
- 'null'
vatExemption:
type: boolean
required:
- phoneNumber
- phoneCountry
- taxNumber
- vatNumber
- vatExemption
billingAddress:
type: object
properties: &id010
name:
type: string
street:
type: string
postalCode:
type: string
city:
type: string
country:
type: object
properties: *id008
required: *id009
required: &id011
- name
- street
- postalCode
- city
- country
shippingAddress:
type: object
properties: *id010
required: *id011
required:
- storeName
- email
- firstName
- lastName
- company
relationships:
type: object
properties:
paymentMethods:
type: object
required:
- data
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
type:
type: string
default: order-pay-customer-payment-methods
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
uniqueItems: true
included:
type: array
items:
anyOf:
- type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer-payment-method
id:
type: string
attributes:
type: object
required:
- type
- email
- name
- last4
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- jsonapi
- data
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id013
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: *id012
additionalProperties: false
required: &id014
- 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: *id013
required: *id014
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: *id013
required: *id014
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: *id013
required: *id014
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: *id013
required: *id014
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: *id013
required: *id014
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/order-pay/order-pay-customer/{order_pay_customer}:
parameters:
- schema:
type: string
format: uuid
name: order_pay_customer
in: path
required: true
description: Customer ID
get:
operationId: show-order-pay-customer
summary: Retrieve a single customer
description: Retrieves details for a single customer.
tags:
- OrderPay
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- schema:
type: string
enum:
- paymentMethods
name: include
in: query
description: A comma-separated list of resources to include
responses:
'200':
description: Single Customer resource
content:
application/vnd.api+json:
schema:
type: object
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: CustomerResource
type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
storeName:
type: string
email:
type: string
firstName:
type:
- string
- 'null'
lastName:
type:
- string
- 'null'
paymentMethods:
type: array
items:
type: object
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- type
company:
type: object
properties:
phoneNumber:
type: string
phoneCountry:
type: object
properties: &id015
isoCode:
type: string
name:
type: string
callingCode:
type: integer
required: &id016
- isoCode
- name
- callingCode
taxNumber:
type:
- string
- 'null'
vatNumber:
type:
- string
- 'null'
vatExemption:
type: boolean
required:
- phoneNumber
- phoneCountry
- taxNumber
- vatNumber
- vatExemption
billingAddress:
type: object
properties: &id017
name:
type: string
street:
type: string
postalCode:
type: string
city:
type: string
country:
type: object
properties: *id015
required: *id016
required: &id018
- name
- street
- postalCode
- city
- country
shippingAddress:
type: object
properties: *id017
required: *id018
required:
- storeName
- email
- firstName
- lastName
- company
relationships:
type: object
properties:
paymentMethods:
type: object
required:
- data
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
type:
type: string
default: order-pay-customer-payment-methods
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
uniqueItems: true
included:
type: array
items:
anyOf:
- type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer-payment-method
id:
type: string
attributes:
type: object
required:
- type
- email
- name
- last4
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- jsonapi
- data
'400':
description: Bad request
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: Bad request
status: '400'
'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'
'500':
description: '[Server Error](https://jsonapi.org/format/#errors)'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id020
required: *id021
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
patch:
operationId: update-order-pay-customer
summary: Update a customer profile
description: Updates a customer profile.
tags:
- OrderPay
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
const: order-pay-customer
id:
type: string
format: uuid
attributes:
type: object
properties:
storeName:
type: string
email:
type: string
firstName:
type: string
lastName:
type: string
company:
type: object
properties:
phoneNumber:
type: string
taxNumber:
type: string
vatNumber:
type: string
vatExemption:
type: boolean
billingAddress:
type: object
properties:
street:
type: string
postalCode:
type: string
city:
type: string
countryCode:
type: string
shippingAddress:
type: object
properties:
street:
type: string
postalCode:
type: string
city:
type: string
countryCode:
type: string
required:
- type
- id
- attributes
required:
- data
responses:
'200':
description: Single Customer resource
content:
application/vnd.api+json:
schema:
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id026
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: CustomerResource
type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
storeName:
type: string
email:
type: string
firstName:
type:
- string
- 'null'
lastName:
type:
- string
- 'null'
paymentMethods:
type: array
items:
type: object
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- type
company:
type: object
properties:
phoneNumber:
type: string
phoneCountry:
type: object
properties: &id022
isoCode:
type: string
name:
type: string
callingCode:
type: integer
required: &id023
- isoCode
- name
- callingCode
taxNumber:
type:
- string
- 'null'
vatNumber:
type:
- string
- 'null'
vatExemption:
type: boolean
required:
- phoneNumber
- phoneCountry
- taxNumber
- vatNumber
- vatExemption
billingAddress:
type: object
properties: &id024
name:
type: string
street:
type: string
postalCode:
type: string
city:
type: string
country:
type: object
properties: *id022
required: *id023
required: &id025
- name
- street
- postalCode
- city
- country
shippingAddress:
type: object
properties: *id024
required: *id025
required:
- storeName
- email
- firstName
- lastName
- company
relationships:
type: object
properties:
paymentMethods:
type: object
required:
- data
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
type:
type: string
default: order-pay-customer-payment-methods
meta:
description: Non-standard meta-information that can not be represented as an attribute or relationship.
type: object
additionalProperties: true
uniqueItems: true
included:
type: array
items:
anyOf:
- type: object
required:
- type
- id
- attributes
properties:
type:
type: string
const: order-pay-customer-payment-method
id:
type: string
attributes:
type: object
required:
- type
- email
- name
- last4
properties:
type:
type: string
email:
type:
- string
- 'null'
name:
type:
- string
- 'null'
last4:
type:
- string
- 'null'
example: '1234'
required:
- jsonapi
- data
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id027
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: *id026
additionalProperties: false
required: &id028
- 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: *id027
required: *id028
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: *id027
required: *id028
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: *id027
required: *id028
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: *id027
required: *id028
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: *id027
required: *id028
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/order-pay/order-pay-orders:
post:
summary: Create a new order
operationId: create-order-pay-order
description: Creates a new OrderPay order.
tags:
- OrderPay
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
const: order-pay-orders
attributes:
type: object
properties:
customerUuid:
type: string
format: uuid
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
customReference:
type:
- string
- 'null'
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
maxLength: 64
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 2
amounts:
type: object
description: Total amounts of the order item.
properties:
brandUnitPrice:
type: integer
description: Order item unit net amount in brand's currency.
example: 1000
discountRate:
type: integer
description: Order item discount rate, in percents.
default: 0
example: 10
discountAmount:
type: integer
description: Order item discount amount, in Currency.
default: 0
example: 100
required:
- brandUnitPrice
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.
discountRate:
type: integer
description: Order discount rate, in percents.
default: 0
example: 10
required:
- productVariantUuid
- quantity
- amounts
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
properties:
type:
type: string
enum: &id029
- shippingFees
- exciseDuties
- ecoTax
description: The type of item.
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
required:
- type
- amount
minItems: 0
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type:
- integer
- 'null'
description: 'Order net shipping fees amount, in retailer''s currency. The `shippingFeesAmount` property is deprecated and will be removed in a future version of the API. To represent shipping fees, please use a custom item in the `customItems` array. This approach provides greater flexibility and aligns with the standardized item structure in the API.
'
default: 0
example: 500
deprecated: true
required:
- brandUnitPrice
shippingMethod:
type: string
enum: &id030
- custom
- fulfillment
example: fulfillment
x-enumDescriptions: &id031
custom: The order is shipped via the brand's own carrier.
fulfillment: The order is fulfilled via the AnkorLogistics Fulfilment Centre.
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.
required:
- customerUuid
required:
- type
- attributes
required:
- data
examples:
basic-order:
summary: Create order with one item and shipping fee
value:
data:
type: order-pay-orders
attributes:
customerUuid: 2cef2271-11fd-4cfc-925f-d5ea761229c6
customReference: SHOP-12345
items:
- productVariantUuid: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
quantity: 2
amounts:
brandUnitPrice: 1700
discountRate: 20
customItems:
- type: shippingFees
amount: 500
shippingMethod: custom
fulfillment-order:
summary: Create order fulfilled via AnkorLogistics
value:
data:
type: order-pay-orders
attributes:
customerUuid: 2cef2271-11fd-4cfc-925f-d5ea761229c6
items:
- productVariantUuid: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
quantity: 7
amounts:
brandUnitPrice: 1700
shippingMethod: fulfillment
deliverySchedule:
openDays:
- 1
- 2
- 3
- 4
- 5
timeSlots:
- startTime: 09:00
endTime: '17:00'
packingInstruction:
services:
- PALLETISE
instruction: Fragile items, handle with care
responses:
'201':
description: OrderPay order created successfully
content:
application/vnd.api+json:
schema:
title: OrderSchema
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id032
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: OrderResource
type: object
properties:
type:
type: string
default: order-pay-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
payment:
type: object
properties:
data:
$ref: ../../../v1.yaml#/components/schemas/relationshipToOne
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
example: '2024-07-01T13:00:50.000000Z'
customerUuid:
type: string
format: uuid
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
discountRate:
type: integer
example: 20
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
example: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
productVariantName:
type: string
description: Product variant name.
example: Voluptas ut consequatur (1789457692, Jaune de Mars)
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 7
multipliedQuantity:
type: integer
description: 'Total quantity of individual units of the item (ex: 2 boxes of 6 bottles of wine each: `multipliedQuantity = 12`)'
example: 7
amounts:
type: object
description: Total amounts of the order item.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandUnitPriceBeforeDiscount:
type: integer
example: 1700
brandUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
brandUnitPrice:
type: integer
example: 1360
brandUnitPriceFormatted:
type: string
example: €13.60
brandAmountBeforeDiscount:
type: integer
example: 11900
brandAmountBeforeDiscountFormatted:
type: string
example: €119.00
brandDiscountAmount:
type: integer
example: 2380
brandDiscountAmountFormatted:
type: string
example: €23.80
brandAmount:
type: integer
example: 9520
brandAmountFormatted:
type: string
example: €95.20
brandAmountVat:
type: integer
example: 1809
brandAmountVatFormatted:
type: string
example: €18.09
brandAmountWithVat:
type: integer
example: 11329
brandAmountWithVatFormatted:
type: string
example: €113.29
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerUnitPriceBeforeDiscount:
type: integer
example: 1700
customerUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
customerUnitPrice:
type: integer
example: 1360
customerUnitPriceFormatted:
type: string
example: €13.60
customerAmountBeforeDiscount:
type: integer
example: 11900
customerAmountBeforeDiscountFormatted:
type: string
example: €119.00
customerDiscountAmount:
type: integer
example: 2380
customerDiscountAmountFormatted:
type: string
example: €23.80
customerAmount:
type: integer
example: 9520
customerAmountFormatted:
type: string
example: €95.20
customerAmountVat:
type: integer
example: 1809
customerAmountVatFormatted:
type: string
example: €18.09
customerAmountWithVat:
type: integer
example: 11329
customerAmountWithVatFormatted:
type: string
example: €113.29
vatRate:
type: integer
example: 19
discountRate:
type: integer
example: 20
discountAmount:
type: integer
example: 100
discountAmountFormatted:
type: string
example: €1.00
required:
- brandCurrency
- brandCurrencyRate
- brandUnitPriceBeforeDiscount
- brandUnitPriceBeforeDiscountFormatted
- brandUnitPrice
- brandUnitPriceFormatted
- brandAmountBeforeDiscount
- brandAmountBeforeDiscountFormatted
- brandDiscountAmount
- brandDiscountAmountFormatted
- brandAmount
- brandAmountFormatted
- brandAmountVat
- brandAmountVatFormatted
- brandAmountWithVat
- brandAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerUnitPriceBeforeDiscount
- customerUnitPriceBeforeDiscountFormatted
- customerUnitPrice
- customerUnitPriceFormatted
- customerAmountBeforeDiscount
- customerAmountBeforeDiscountFormatted
- customerDiscountAmount
- customerDiscountAmountFormatted
- customerAmount
- customerAmountFormatted
- customerAmountVat
- customerAmountVatFormatted
- customerAmountWithVat
- customerAmountWithVatFormatted
- vatRate
- discountRate
- discountAmount
- discountAmountFormatted
required:
- productVariantUuid
- productVariantName
- quantity
- multipliedQuantity
- amounts
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type: integer
description: Order shipping fee amount, in retailer's currency.
example: 500
required:
- brandUnitPrice
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
description: An invoice item representing a custom charge.
properties:
type:
type: string
enum: *id029
description: The type of item.
vatRate:
type: number
example: 12.5
description: 'The VAT rate applied to this item (expressed as a percentage).
'
readOnly: true
minimum: 0
maximum: 100
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
amountVat:
type: integer
description: The total amount of VAT to collect for this item, in cents.
readOnly: true
minimum: 0
amountWithVat:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, including VAT and expressed in the customer''s currency (amount + amountVat).
'
readOnly: true
minimum: 0
minItems: 0
status:
type: string
enum:
- created
- brand_confirmed
- payment_confirmed
- waiting_shipping
- shipped
- received
- invoiced
- brand_paid
- cancelled
masterOrderReference:
type:
- string
- 'null'
example: EACN9214515
customReference:
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
type:
- string
- 'null'
maxLength: 64
amounts:
type: object
description: Total amounts of the order.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandTotalAmountBeforeDiscount:
type: integer
example: 54620
brandTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
brandTotalDiscountAmount:
type: integer
example: 0
brandTotalDiscountAmountFormatted:
type: string
example: €0.00
brandTotalAmount:
type: integer
example: 54620
brandTotalAmountFormatted:
type: string
example: €546.20
brandTotalAmountVat:
type: integer
example: 12633
brandTotalAmountVatFormatted:
type: string
example: €126.33
brandTotalAmountWithVat:
type: integer
example: 67253
brandTotalAmountWithVatFormatted:
type: string
example: €672.53
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerTotalAmountBeforeDiscount:
type: integer
example: 54620
customerTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
customerTotalDiscountAmount:
type: integer
example: 54620
customerTotalDiscountAmountFormatted:
type: string
example: €0.00
customerTotalAmount:
type: integer
example: 54620
customerTotalAmountFormatted:
type: string
example: €546.20
customerTotalAmountVat:
type: integer
example: 12633
customerTotalAmountVatFormatted:
type: string
example: €126.33
customerTotalAmountWithVat:
type: integer
example: 67253
customerTotalAmountWithVatFormatted:
type: string
example: €672.53
shippingFeesAmount:
type: integer
example: 220
shippingFeesAmountFormatted:
type: string
example: €2.20
shippingFeesAmountVat:
type: integer
example: 44
shippingFeesAmountVatFormatted:
type: string
example: €0.44
shippingFeesAmountWithVat:
type: integer
example: 264
shippingFeesAmountWithVatFormatted:
type: string
example: €2.64
customerGrandTotalAmount:
type: integer
example: 54840
customerGrandTotalAmountFormatted:
type: string
example: €548.40
customerGrandTotalAmountVat:
type: integer
example: 12677
customerGrandTotalAmountVatFormatted:
type: string
example: €126.77
customerGrandTotalAmountWithVat:
type: integer
example: 67517
customerGrandTotalAmountWithVatFormatted:
type: string
example: €675.17
required:
- brandCurrency
- brandCurrencyRate
- brandTotalAmountBeforeDiscount
- brandTotalAmountBeforeDiscountFormatted
- brandTotalDiscountAmount
- brandTotalDiscountAmountFormatted
- brandTotalAmount
- brandTotalAmountFormatted
- brandTotalAmountVat
- brandTotalAmountVatFormatted
- brandTotalAmountWithVat
- brandTotalAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerTotalAmountBeforeDiscount
- customerTotalAmountBeforeDiscountFormatted
- customerTotalDiscountAmount
- customerTotalDiscountAmountFormatted
- customerTotalAmount
- customerTotalAmountFormatted
- customerTotalAmountVat
- customerTotalAmountVatFormatted
- customerTotalAmountWithVat
- customerTotalAmountWithVatFormatted
- shippingFeesAmount
- shippingFeesAmountFormatted
- shippingFeesAmountVat
- shippingFeesAmountVatFormatted
- shippingFeesAmountWithVat
- shippingFeesAmountWithVatFormatted
- customerGrandTotalAmount
- customerGrandTotalAmountFormatted
- customerGrandTotalAmountVat
- customerGrandTotalAmountVatFormatted
- customerGrandTotalAmountWithVat
- customerGrandTotalAmountWithVatFormatted
shipping:
type: object
properties:
shippingMethod:
type: string
enum: *id030
example: fulfillment
x-enumDescriptions: *id031
shippingAddress:
type: object
properties:
countryCode:
type: string
example: FR
postalCode:
type: string
example: '92100'
city:
type: string
example: Boulogne-Billancourt
street:
type: string
example: 105, rue de Sevres
addressLine:
type:
- string
- 'null'
required:
- countryCode
- postalCode
- city
- street
contactPerson:
type: object
properties:
email:
type: string
example: etienne.guillou@roy.com
firstName:
type: string
example: Etienne
lastName:
type: string
example: Guillou
company:
type:
- string
- 'null'
phoneNumber:
type:
- string
- 'null'
required:
- email
- firstName
- lastName
required:
- shippingMethod
- shippingAddress
- contactPerson
tracking:
type:
- object
- 'null'
properties:
trackingNumber:
type: string
example: 1Z999AA10123456784
trackingLink:
type: string
example: https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784
status:
type: string
example: shipped
isDelivered:
type: boolean
example: false
required:
- trackingNumber
- trackingUrl
- status
- isDelivered
required:
- createdAt
- customerUuid
- items
- amounts
- shipping
- discountRate
required:
- type
- id
included:
type: array
items:
anyOf:
- title: PaymentResource
description: The resource of a payment object
type: object
properties:
type:
type: string
default: order-pay-payments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
orderUuid:
type: string
format: uuid
description: External order uuid
customerUuid:
type: string
format: uuid
description: OrderPay customer uuid (external)
brandUuid:
type: string
format: uuid
description: Brand uuid
createdAt:
type: string
format: date-time
description: Creation date of the payment
psp:
type: string
enum:
- stripe
description: The payment service provider selected for the payment
status:
type: string
description: Status of the payment
enum:
- pending
- succeeded
- cancelled
amount:
type: integer
currency:
type: string
description: ISO 3-Letter Currency Code
example: EUR
currencyRate:
type: number
format: float
paymentMethod:
type: string
enum:
- sepa_credit_transfer
- sepa_direct_debit
- card
- paypal
description: The payment method selected for the payment
fundedBy:
type:
- string
- 'null'
paymentTerms:
type:
- string
- 'null'
required:
- orderUuid
- customerUuid
- brandUuid
- createdAt
- psp
- status
- amount
- currency
- currencyRate
- paymentMethod
relationships:
type: object
properties:
transactions:
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
- title: TransactionResource
description: The resource of a transaction object
type: object
properties:
type:
type: string
default: order-pay-transactions
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
description: Creation date of the transaction
pspId:
type: string
description: The payment service provider transaction id
amount:
type: integer
currency:
type: string
type:
type: string
status:
type: string
pspData:
type:
- object
- 'null'
properties:
client_secret:
type: string
iban:
type:
- object
- 'null'
properties:
bic:
type: string
iban:
type: string
country:
type: string
reference:
type: string
required:
- createdAt
- pspId
- amount
- currency
- type
- status
required:
- type
- id
- attributes
required:
- jsonapi
- data
examples:
created-order:
summary: Newly created order
value:
jsonapi:
version: '1.0'
data:
type: order-pay-orders
id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
attributes:
createdAt: '2024-07-01T13:00:50.000000Z'
customerUuid: 2cef2271-11fd-4cfc-925f-d5ea761229c6
discountRate: 20
status: created
masterOrderReference: null
customReference: SHOP-12345
items:
- productVariantUuid: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
productVariantName: Voluptas ut consequatur (1789457692, Jaune de Mars)
quantity: 2
multipliedQuantity: 12
amounts:
brandCurrency: EUR
brandCurrencyRate: 1
brandUnitPriceBeforeDiscount: 1700
brandUnitPriceBeforeDiscountFormatted: €17.00
brandUnitPrice: 1360
brandUnitPriceFormatted: €13.60
brandAmountBeforeDiscount: 3400
brandAmountBeforeDiscountFormatted: €34.00
brandDiscountAmount: 680
brandDiscountAmountFormatted: €6.80
brandAmount: 2720
brandAmountFormatted: €27.20
brandAmountVat: 544
brandAmountVatFormatted: €5.44
brandAmountWithVat: 3264
brandAmountWithVatFormatted: €32.64
customerCurrency: EUR
customerCurrencyRate: 1
customerUnitPriceBeforeDiscount: 1700
customerUnitPriceBeforeDiscountFormatted: €17.00
customerUnitPrice: 1360
customerUnitPriceFormatted: €13.60
customerAmountBeforeDiscount: 3400
customerAmountBeforeDiscountFormatted: €34.00
customerDiscountAmount: 680
customerDiscountAmountFormatted: €6.80
customerAmount: 2720
customerAmountFormatted: €27.20
customerAmountVat: 544
customerAmountVatFormatted: €5.44
customerAmountWithVat: 3264
customerAmountWithVatFormatted: €32.64
vatRate: 20
discountRate: 20
discountAmount: 680
discountAmountFormatted: €6.80
customItems:
- type: shippingFees
vatRate: 20
amount: 500
amountVat: 100
amountWithVat: 600
amounts:
brandCurrency: EUR
brandCurrencyRate: 1
brandTotalAmountBeforeDiscount: 3400
brandTotalAmountBeforeDiscountFormatted: €34.00
brandTotalDiscountAmount: 680
brandTotalDiscountAmountFormatted: €6.80
brandTotalAmount: 2720
brandTotalAmountFormatted: €27.20
brandTotalAmountVat: 544
brandTotalAmountVatFormatted: €5.44
brandTotalAmountWithVat: 3264
brandTotalAmountWithVatFormatted: €32.64
customerCurrency: EUR
customerCurrencyRate: 1
customerTotalAmountBeforeDiscount: 3400
customerTotalAmountBeforeDiscountFormatted: €34.00
customerTotalDiscountAmount: 680
customerTotalDiscountAmountFormatted: €6.80
customerTotalAmount: 2720
customerTotalAmountFormatted: €27.20
customerTotalAmountVat: 544
customerTotalAmountVatFormatted: €5.44
customerTotalAmountWithVat: 3264
customerTotalAmountWithVatFormatted: €32.64
shippingFeesAmount: 500
shippingFeesAmountFormatted: €5.00
shippingFeesAmountVat: 100
shippingFeesAmountVatFormatted: €1.00
shippingFeesAmountWithVat: 600
shippingFeesAmountWithVatFormatted: €6.00
customerGrandTotalAmount: 3220
customerGrandTotalAmountFormatted: €32.20
customerGrandTotalAmountVat: 644
customerGrandTotalAmountVatFormatted: €6.44
customerGrandTotalAmountWithVat: 3864
customerGrandTotalAmountWithVatFormatted: €38.64
shipping:
shippingMethod: custom
shippingAddress:
countryCode: FR
postalCode: '75002'
city: Paris
street: 12 Rue de la Paix
addressLine: null
contactPerson:
email: contact@laboutiqueverte.fr
firstName: Marie
lastName: Dupont
company: La Boutique Verte
phoneNumber: '+33612345678'
tracking: null
relationships:
payment:
data: null
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id033
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: *id032
additionalProperties: false
required: &id034
- 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: *id033
required: *id034
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: *id033
required: *id034
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: *id033
required: *id034
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: *id033
required: *id034
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: *id033
required: *id034
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: *id033
required: *id034
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/order-pay/order-pay-orders/{id}:
get:
summary: Retrieve an order
operationId: show-order-pay-order
description: Retrieves an OrderPay order by ID.
tags:
- OrderPay
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: id
in: path
description: UUID of the requested resource
schema:
type: string
format: uuid
required: true
- in: query
name: include
description: 'A comma-separated list of resources to include (e.g: payment,payment.transactions)'
schema:
type: string
enum:
- payment
- payment.transactions
responses:
'200':
description: OrderPay ExternalOrder data
content:
application/vnd.api+json:
schema:
title: OrderSchema
type: object
properties:
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
data:
title: OrderResource
type: object
properties:
type:
type: string
default: order-pay-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
payment:
type: object
properties:
data:
$ref: ../../../v1.yaml#/components/schemas/relationshipToOne
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
example: '2024-07-01T13:00:50.000000Z'
customerUuid:
type: string
format: uuid
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
discountRate:
type: integer
example: 20
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
example: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
productVariantName:
type: string
description: Product variant name.
example: Voluptas ut consequatur (1789457692, Jaune de Mars)
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 7
multipliedQuantity:
type: integer
description: 'Total quantity of individual units of the item (ex: 2 boxes of 6 bottles of wine each: `multipliedQuantity = 12`)'
example: 7
amounts:
type: object
description: Total amounts of the order item.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandUnitPriceBeforeDiscount:
type: integer
example: 1700
brandUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
brandUnitPrice:
type: integer
example: 1360
brandUnitPriceFormatted:
type: string
example: €13.60
brandAmountBeforeDiscount:
type: integer
example: 11900
brandAmountBeforeDiscountFormatted:
type: string
example: €119.00
brandDiscountAmount:
type: integer
example: 2380
brandDiscountAmountFormatted:
type: string
example: €23.80
brandAmount:
type: integer
example: 9520
brandAmountFormatted:
type: string
example: €95.20
brandAmountVat:
type: integer
example: 1809
brandAmountVatFormatted:
type: string
example: €18.09
brandAmountWithVat:
type: integer
example: 11329
brandAmountWithVatFormatted:
type: string
example: €113.29
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerUnitPriceBeforeDiscount:
type: integer
example: 1700
customerUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
customerUnitPrice:
type: integer
example: 1360
customerUnitPriceFormatted:
type: string
example: €13.60
customerAmountBeforeDiscount:
type: integer
example: 11900
customerAmountBeforeDiscountFormatted:
type: string
example: €119.00
customerDiscountAmount:
type: integer
example: 2380
customerDiscountAmountFormatted:
type: string
example: €23.80
customerAmount:
type: integer
example: 9520
customerAmountFormatted:
type: string
example: €95.20
customerAmountVat:
type: integer
example: 1809
customerAmountVatFormatted:
type: string
example: €18.09
customerAmountWithVat:
type: integer
example: 11329
customerAmountWithVatFormatted:
type: string
example: €113.29
vatRate:
type: integer
example: 19
discountRate:
type: integer
example: 20
discountAmount:
type: integer
example: 100
discountAmountFormatted:
type: string
example: €1.00
required:
- brandCurrency
- brandCurrencyRate
- brandUnitPriceBeforeDiscount
- brandUnitPriceBeforeDiscountFormatted
- brandUnitPrice
- brandUnitPriceFormatted
- brandAmountBeforeDiscount
- brandAmountBeforeDiscountFormatted
- brandDiscountAmount
- brandDiscountAmountFormatted
- brandAmount
- brandAmountFormatted
- brandAmountVat
- brandAmountVatFormatted
- brandAmountWithVat
- brandAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerUnitPriceBeforeDiscount
- customerUnitPriceBeforeDiscountFormatted
- customerUnitPrice
- customerUnitPriceFormatted
- customerAmountBeforeDiscount
- customerAmountBeforeDiscountFormatted
- customerDiscountAmount
- customerDiscountAmountFormatted
- customerAmount
- customerAmountFormatted
- customerAmountVat
- customerAmountVatFormatted
- customerAmountWithVat
- customerAmountWithVatFormatted
- vatRate
- discountRate
- discountAmount
- discountAmountFormatted
required:
- productVariantUuid
- productVariantName
- quantity
- multipliedQuantity
- amounts
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type: integer
description: Order shipping fee amount, in retailer's currency.
example: 500
required:
- brandUnitPrice
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
description: An invoice item representing a custom charge.
properties:
type:
type: string
enum:
- shippingFees
- exciseDuties
- ecoTax
description: The type of item.
vatRate:
type: number
example: 12.5
description: 'The VAT rate applied to this item (expressed as a percentage).
'
readOnly: true
minimum: 0
maximum: 100
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
amountVat:
type: integer
description: The total amount of VAT to collect for this item, in cents.
readOnly: true
minimum: 0
amountWithVat:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, including VAT and expressed in the customer''s currency (amount + amountVat).
'
readOnly: true
minimum: 0
minItems: 0
status:
type: string
enum:
- created
- brand_confirmed
- payment_confirmed
- waiting_shipping
- shipped
- received
- invoiced
- brand_paid
- cancelled
masterOrderReference:
type:
- string
- 'null'
example: EACN9214515
customReference:
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
type:
- string
- 'null'
maxLength: 64
amounts:
type: object
description: Total amounts of the order.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandTotalAmountBeforeDiscount:
type: integer
example: 54620
brandTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
brandTotalDiscountAmount:
type: integer
example: 0
brandTotalDiscountAmountFormatted:
type: string
example: €0.00
brandTotalAmount:
type: integer
example: 54620
brandTotalAmountFormatted:
type: string
example: €546.20
brandTotalAmountVat:
type: integer
example: 12633
brandTotalAmountVatFormatted:
type: string
example: €126.33
brandTotalAmountWithVat:
type: integer
example: 67253
brandTotalAmountWithVatFormatted:
type: string
example: €672.53
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerTotalAmountBeforeDiscount:
type: integer
example: 54620
customerTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
customerTotalDiscountAmount:
type: integer
example: 54620
customerTotalDiscountAmountFormatted:
type: string
example: €0.00
customerTotalAmount:
type: integer
example: 54620
customerTotalAmountFormatted:
type: string
example: €546.20
customerTotalAmountVat:
type: integer
example: 12633
customerTotalAmountVatFormatted:
type: string
example: €126.33
customerTotalAmountWithVat:
type: integer
example: 67253
customerTotalAmountWithVatFormatted:
type: string
example: €672.53
shippingFeesAmount:
type: integer
example: 220
shippingFeesAmountFormatted:
type: string
example: €2.20
shippingFeesAmountVat:
type: integer
example: 44
shippingFeesAmountVatFormatted:
type: string
example: €0.44
shippingFeesAmountWithVat:
type: integer
example: 264
shippingFeesAmountWithVatFormatted:
type: string
example: €2.64
customerGrandTotalAmount:
type: integer
example: 54840
customerGrandTotalAmountFormatted:
type: string
example: €548.40
customerGrandTotalAmountVat:
type: integer
example: 12677
customerGrandTotalAmountVatFormatted:
type: string
example: €126.77
customerGrandTotalAmountWithVat:
type: integer
example: 67517
customerGrandTotalAmountWithVatFormatted:
type: string
example: €675.17
required:
- brandCurrency
- brandCurrencyRate
- brandTotalAmountBeforeDiscount
- brandTotalAmountBeforeDiscountFormatted
- brandTotalDiscountAmount
- brandTotalDiscountAmountFormatted
- brandTotalAmount
- brandTotalAmountFormatted
- brandTotalAmountVat
- brandTotalAmountVatFormatted
- brandTotalAmountWithVat
- brandTotalAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerTotalAmountBeforeDiscount
- customerTotalAmountBeforeDiscountFormatted
- customerTotalDiscountAmount
- customerTotalDiscountAmountFormatted
- customerTotalAmount
- customerTotalAmountFormatted
- customerTotalAmountVat
- customerTotalAmountVatFormatted
- customerTotalAmountWithVat
- customerTotalAmountWithVatFormatted
- shippingFeesAmount
- shippingFeesAmountFormatted
- shippingFeesAmountVat
- shippingFeesAmountVatFormatted
- shippingFeesAmountWithVat
- shippingFeesAmountWithVatFormatted
- customerGrandTotalAmount
- customerGrandTotalAmountFormatted
- customerGrandTotalAmountVat
- customerGrandTotalAmountVatFormatted
- customerGrandTotalAmountWithVat
- customerGrandTotalAmountWithVatFormatted
shipping:
type: object
properties:
shippingMethod:
type: string
enum:
- custom
- fulfillment
example: fulfillment
x-enumDescriptions:
custom: The order is shipped via the brand's own carrier.
fulfillment: The order is fulfilled via the AnkorLogistics Fulfilment Centre.
shippingAddress:
type: object
properties:
countryCode:
type: string
example: FR
postalCode:
type: string
example: '92100'
city:
type: string
example: Boulogne-Billancourt
street:
type: string
example: 105, rue de Sevres
addressLine:
type:
- string
- 'null'
required:
- countryCode
- postalCode
- city
- street
contactPerson:
type: object
properties:
email:
type: string
example: etienne.guillou@roy.com
firstName:
type: string
example: Etienne
lastName:
type: string
example: Guillou
company:
type:
- string
- 'null'
phoneNumber:
type:
- string
- 'null'
required:
- email
- firstName
- lastName
required:
- shippingMethod
- shippingAddress
- contactPerson
tracking:
type:
- object
- 'null'
properties:
trackingNumber:
type: string
example: 1Z999AA10123456784
trackingLink:
type: string
example: https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784
status:
type: string
example: shipped
isDelivered:
type: boolean
example: false
required:
- trackingNumber
- trackingUrl
- status
- isDelivered
required:
- createdAt
- customerUuid
- items
- amounts
- shipping
- discountRate
required:
- type
- id
included:
type: array
items:
anyOf:
- title: PaymentResource
description: The resource of a payment object
type: object
properties:
type:
type: string
default: order-pay-payments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
orderUuid:
type: string
format: uuid
description: External order uuid
customerUuid:
type: string
format: uuid
description: OrderPay customer uuid (external)
brandUuid:
type: string
format: uuid
description: Brand uuid
createdAt:
type: string
format: date-time
description: Creation date of the payment
psp:
type: string
enum:
- stripe
description: The payment service provider selected for the payment
status:
type: string
description: Status of the payment
enum:
- pending
- succeeded
- cancelled
amount:
type: integer
currency:
type: string
description: ISO 3-Letter Currency Code
example: EUR
currencyRate:
type: number
format: float
paymentMethod:
type: string
enum:
- sepa_credit_transfer
- sepa_direct_debit
- card
- paypal
description: The payment method selected for the payment
fundedBy:
type:
- string
- 'null'
paymentTerms:
type:
- string
- 'null'
required:
- orderUuid
- customerUuid
- brandUuid
- createdAt
- psp
- status
- amount
- currency
- currencyRate
- paymentMethod
relationships:
type: object
properties:
transactions:
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
- title: TransactionResource
description: The resource of a transaction object
type: object
properties:
type:
type: string
default: order-pay-transactions
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
description: Creation date of the transaction
pspId:
type: string
description: The payment service provider transaction id
amount:
type: integer
currency:
type: string
type:
type: string
status:
type: string
pspData:
type:
- object
- 'null'
properties:
client_secret:
type: string
iban:
type:
- object
- 'null'
properties:
bic:
type: string
iban:
type: string
country:
type: string
reference:
type: string
required:
- createdAt
- pspId
- amount
- currency
- type
- status
required:
- type
- id
- attributes
required:
- jsonapi
- data
'400':
description: Bad request
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: Bad request
status: '400'
'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'
'422':
description: 'Unprocessable Entity : Data provided are invalid'
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: *id036
required: *id037
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: *id036
required: *id037
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
patch:
summary: Update an order
operationId: update-order-pay-order
description: Updates an existing OrderPay order.
tags:
- OrderPay
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: id
in: path
description: UUID of the requested resource
schema:
type: string
format: uuid
required: true
requestBody:
required: true
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
type:
type: string
const: order-pay-orders
attributes:
type: object
properties:
customerUuid:
type: string
format: uuid
description: Must be the same as the `customerUuid` used for order creation.
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
customReference:
type:
- string
- 'null'
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
maxLength: 64
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 2
amounts:
type: object
description: Total amounts of the order item.
properties:
brandUnitPrice:
type: integer
description: Order item unit net amount in brand's currency.
example: 1000
discountRate:
type: integer
description: Order item discount rate, in percents.
default: 0
example: 10
discountAmount:
type: integer
description: Order item discount amount, in Currency.
default: 0
example: 100
required:
- brandUnitPrice
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:
- productVariantUuid
- quantity
- amounts
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
properties:
type:
type: string
enum: &id038
- shippingFees
- exciseDuties
- ecoTax
description: The type of item.
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
required:
- type
- amount
minItems: 0
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type:
- integer
- 'null'
description: Order net shipping fees amount, in retailer's currency.
default: 0
example: 500
required:
- shippingFeesAmount
discountRate:
type: integer
description: Order discount rate, in percents.
default: 0
example: 10
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.
required:
- customerUuid
- items
- amounts
required:
- type
- attributes
required:
- data
responses:
'200':
description: OrderPay ExternalOrder data
content:
application/vnd.api+json:
schema:
title: OrderSchema
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id039
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: OrderResource
type: object
properties:
type:
type: string
default: order-pay-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
payment:
type: object
properties:
data:
$ref: ../../../v1.yaml#/components/schemas/relationshipToOne
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
example: '2024-07-01T13:00:50.000000Z'
customerUuid:
type: string
format: uuid
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
discountRate:
type: integer
example: 20
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
example: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
productVariantName:
type: string
description: Product variant name.
example: Voluptas ut consequatur (1789457692, Jaune de Mars)
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 7
multipliedQuantity:
type: integer
description: 'Total quantity of individual units of the item (ex: 2 boxes of 6 bottles of wine each: `multipliedQuantity = 12`)'
example: 7
amounts:
type: object
description: Total amounts of the order item.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandUnitPriceBeforeDiscount:
type: integer
example: 1700
brandUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
brandUnitPrice:
type: integer
example: 1360
brandUnitPriceFormatted:
type: string
example: €13.60
brandAmountBeforeDiscount:
type: integer
example: 11900
brandAmountBeforeDiscountFormatted:
type: string
example: €119.00
brandDiscountAmount:
type: integer
example: 2380
brandDiscountAmountFormatted:
type: string
example: €23.80
brandAmount:
type: integer
example: 9520
brandAmountFormatted:
type: string
example: €95.20
brandAmountVat:
type: integer
example: 1809
brandAmountVatFormatted:
type: string
example: €18.09
brandAmountWithVat:
type: integer
example: 11329
brandAmountWithVatFormatted:
type: string
example: €113.29
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerUnitPriceBeforeDiscount:
type: integer
example: 1700
customerUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
customerUnitPrice:
type: integer
example: 1360
customerUnitPriceFormatted:
type: string
example: €13.60
customerAmountBeforeDiscount:
type: integer
example: 11900
customerAmountBeforeDiscountFormatted:
type: string
example: €119.00
customerDiscountAmount:
type: integer
example: 2380
customerDiscountAmountFormatted:
type: string
example: €23.80
customerAmount:
type: integer
example: 9520
customerAmountFormatted:
type: string
example: €95.20
customerAmountVat:
type: integer
example: 1809
customerAmountVatFormatted:
type: string
example: €18.09
customerAmountWithVat:
type: integer
example: 11329
customerAmountWithVatFormatted:
type: string
example: €113.29
vatRate:
type: integer
example: 19
discountRate:
type: integer
example: 20
discountAmount:
type: integer
example: 100
discountAmountFormatted:
type: string
example: €1.00
required:
- brandCurrency
- brandCurrencyRate
- brandUnitPriceBeforeDiscount
- brandUnitPriceBeforeDiscountFormatted
- brandUnitPrice
- brandUnitPriceFormatted
- brandAmountBeforeDiscount
- brandAmountBeforeDiscountFormatted
- brandDiscountAmount
- brandDiscountAmountFormatted
- brandAmount
- brandAmountFormatted
- brandAmountVat
- brandAmountVatFormatted
- brandAmountWithVat
- brandAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerUnitPriceBeforeDiscount
- customerUnitPriceBeforeDiscountFormatted
- customerUnitPrice
- customerUnitPriceFormatted
- customerAmountBeforeDiscount
- customerAmountBeforeDiscountFormatted
- customerDiscountAmount
- customerDiscountAmountFormatted
- customerAmount
- customerAmountFormatted
- customerAmountVat
- customerAmountVatFormatted
- customerAmountWithVat
- customerAmountWithVatFormatted
- vatRate
- discountRate
- discountAmount
- discountAmountFormatted
required:
- productVariantUuid
- productVariantName
- quantity
- multipliedQuantity
- amounts
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type: integer
description: Order shipping fee amount, in retailer's currency.
example: 500
required:
- brandUnitPrice
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
description: An invoice item representing a custom charge.
properties:
type:
type: string
enum: *id038
description: The type of item.
vatRate:
type: number
example: 12.5
description: 'The VAT rate applied to this item (expressed as a percentage).
'
readOnly: true
minimum: 0
maximum: 100
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
amountVat:
type: integer
description: The total amount of VAT to collect for this item, in cents.
readOnly: true
minimum: 0
amountWithVat:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, including VAT and expressed in the customer''s currency (amount + amountVat).
'
readOnly: true
minimum: 0
minItems: 0
status:
type: string
enum:
- created
- brand_confirmed
- payment_confirmed
- waiting_shipping
- shipped
- received
- invoiced
- brand_paid
- cancelled
masterOrderReference:
type:
- string
- 'null'
example: EACN9214515
customReference:
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
type:
- string
- 'null'
maxLength: 64
amounts:
type: object
description: Total amounts of the order.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandTotalAmountBeforeDiscount:
type: integer
example: 54620
brandTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
brandTotalDiscountAmount:
type: integer
example: 0
brandTotalDiscountAmountFormatted:
type: string
example: €0.00
brandTotalAmount:
type: integer
example: 54620
brandTotalAmountFormatted:
type: string
example: €546.20
brandTotalAmountVat:
type: integer
example: 12633
brandTotalAmountVatFormatted:
type: string
example: €126.33
brandTotalAmountWithVat:
type: integer
example: 67253
brandTotalAmountWithVatFormatted:
type: string
example: €672.53
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerTotalAmountBeforeDiscount:
type: integer
example: 54620
customerTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
customerTotalDiscountAmount:
type: integer
example: 54620
customerTotalDiscountAmountFormatted:
type: string
example: €0.00
customerTotalAmount:
type: integer
example: 54620
customerTotalAmountFormatted:
type: string
example: €546.20
customerTotalAmountVat:
type: integer
example: 12633
customerTotalAmountVatFormatted:
type: string
example: €126.33
customerTotalAmountWithVat:
type: integer
example: 67253
customerTotalAmountWithVatFormatted:
type: string
example: €672.53
shippingFeesAmount:
type: integer
example: 220
shippingFeesAmountFormatted:
type: string
example: €2.20
shippingFeesAmountVat:
type: integer
example: 44
shippingFeesAmountVatFormatted:
type: string
example: €0.44
shippingFeesAmountWithVat:
type: integer
example: 264
shippingFeesAmountWithVatFormatted:
type: string
example: €2.64
customerGrandTotalAmount:
type: integer
example: 54840
customerGrandTotalAmountFormatted:
type: string
example: €548.40
customerGrandTotalAmountVat:
type: integer
example: 12677
customerGrandTotalAmountVatFormatted:
type: string
example: €126.77
customerGrandTotalAmountWithVat:
type: integer
example: 67517
customerGrandTotalAmountWithVatFormatted:
type: string
example: €675.17
required:
- brandCurrency
- brandCurrencyRate
- brandTotalAmountBeforeDiscount
- brandTotalAmountBeforeDiscountFormatted
- brandTotalDiscountAmount
- brandTotalDiscountAmountFormatted
- brandTotalAmount
- brandTotalAmountFormatted
- brandTotalAmountVat
- brandTotalAmountVatFormatted
- brandTotalAmountWithVat
- brandTotalAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerTotalAmountBeforeDiscount
- customerTotalAmountBeforeDiscountFormatted
- customerTotalDiscountAmount
- customerTotalDiscountAmountFormatted
- customerTotalAmount
- customerTotalAmountFormatted
- customerTotalAmountVat
- customerTotalAmountVatFormatted
- customerTotalAmountWithVat
- customerTotalAmountWithVatFormatted
- shippingFeesAmount
- shippingFeesAmountFormatted
- shippingFeesAmountVat
- shippingFeesAmountVatFormatted
- shippingFeesAmountWithVat
- shippingFeesAmountWithVatFormatted
- customerGrandTotalAmount
- customerGrandTotalAmountFormatted
- customerGrandTotalAmountVat
- customerGrandTotalAmountVatFormatted
- customerGrandTotalAmountWithVat
- customerGrandTotalAmountWithVatFormatted
shipping:
type: object
properties:
shippingMethod:
type: string
enum:
- custom
- fulfillment
example: fulfillment
x-enumDescriptions:
custom: The order is shipped via the brand's own carrier.
fulfillment: The order is fulfilled via the AnkorLogistics Fulfilment Centre.
shippingAddress:
type: object
properties:
countryCode:
type: string
example: FR
postalCode:
type: string
example: '92100'
city:
type: string
example: Boulogne-Billancourt
street:
type: string
example: 105, rue de Sevres
addressLine:
type:
- string
- 'null'
required:
- countryCode
- postalCode
- city
- street
contactPerson:
type: object
properties:
email:
type: string
example: etienne.guillou@roy.com
firstName:
type: string
example: Etienne
lastName:
type: string
example: Guillou
company:
type:
- string
- 'null'
phoneNumber:
type:
- string
- 'null'
required:
- email
- firstName
- lastName
required:
- shippingMethod
- shippingAddress
- contactPerson
tracking:
type:
- object
- 'null'
properties:
trackingNumber:
type: string
example: 1Z999AA10123456784
trackingLink:
type: string
example: https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784
status:
type: string
example: shipped
isDelivered:
type: boolean
example: false
required:
- trackingNumber
- trackingUrl
- status
- isDelivered
required:
- createdAt
- customerUuid
- items
- amounts
- shipping
- discountRate
required:
- type
- id
included:
type: array
items:
anyOf:
- title: PaymentResource
description: The resource of a payment object
type: object
properties:
type:
type: string
default: order-pay-payments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
orderUuid:
type: string
format: uuid
description: External order uuid
customerUuid:
type: string
format: uuid
description: OrderPay customer uuid (external)
brandUuid:
type: string
format: uuid
description: Brand uuid
createdAt:
type: string
format: date-time
description: Creation date of the payment
psp:
type: string
enum:
- stripe
description: The payment service provider selected for the payment
status:
type: string
description: Status of the payment
enum:
- pending
- succeeded
- cancelled
amount:
type: integer
currency:
type: string
description: ISO 3-Letter Currency Code
example: EUR
currencyRate:
type: number
format: float
paymentMethod:
type: string
enum:
- sepa_credit_transfer
- sepa_direct_debit
- card
- paypal
description: The payment method selected for the payment
fundedBy:
type:
- string
- 'null'
paymentTerms:
type:
- string
- 'null'
required:
- orderUuid
- customerUuid
- brandUuid
- createdAt
- psp
- status
- amount
- currency
- currencyRate
- paymentMethod
relationships:
type: object
properties:
transactions:
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
- title: TransactionResource
description: The resource of a transaction object
type: object
properties:
type:
type: string
default: order-pay-transactions
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
description: Creation date of the transaction
pspId:
type: string
description: The payment service provider transaction id
amount:
type: integer
currency:
type: string
type:
type: string
status:
type: string
pspData:
type:
- object
- 'null'
properties:
client_secret:
type: string
iban:
type:
- object
- 'null'
properties:
bic:
type: string
iban:
type: string
country:
type: string
reference:
type: string
required:
- createdAt
- pspId
- amount
- currency
- type
- status
required:
- type
- id
- attributes
required:
- jsonapi
- data
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id040
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: *id039
additionalProperties: false
required: &id041
- 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: *id040
required: *id041
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: *id040
required: *id041
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: *id040
required: *id041
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: *id040
required: *id041
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: *id040
required: *id041
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: *id040
required: *id041
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: *id040
required: *id041
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/order-pay/order-pay-orders/{id}/-actions/cancel:
post:
summary: Cancel an order
operationId: cancel-order-pay-order
description: Allows brand to cancel an order
tags:
- OrderPay
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: id
in: path
description: UUID of the requested resource
schema:
type: string
format: uuid
required: true
requestBody:
required: false
content:
application/vnd.api+json:
schema:
type: object
properties:
data:
type: object
properties:
attributes:
type: object
properties:
reason:
type: string
description: The reason of the cancellation
responses:
'200':
description: OrderPay ExternalOrder data
content:
application/vnd.api+json:
schema:
title: OrderSchema
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id042
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: OrderResource
type: object
properties:
type:
type: string
default: order-pay-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
payment:
type: object
properties:
data:
$ref: ../../../v1.yaml#/components/schemas/relationshipToOne
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
example: '2024-07-01T13:00:50.000000Z'
customerUuid:
type: string
format: uuid
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
discountRate:
type: integer
example: 20
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
example: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
productVariantName:
type: string
description: Product variant name.
example: Voluptas ut consequatur (1789457692, Jaune de Mars)
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 7
multipliedQuantity:
type: integer
description: 'Total quantity of individual units of the item (ex: 2 boxes of 6 bottles of wine each: `multipliedQuantity = 12`)'
example: 7
amounts:
type: object
description: Total amounts of the order item.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandUnitPriceBeforeDiscount:
type: integer
example: 1700
brandUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
brandUnitPrice:
type: integer
example: 1360
brandUnitPriceFormatted:
type: string
example: €13.60
brandAmountBeforeDiscount:
type: integer
example: 11900
brandAmountBeforeDiscountFormatted:
type: string
example: €119.00
brandDiscountAmount:
type: integer
example: 2380
brandDiscountAmountFormatted:
type: string
example: €23.80
brandAmount:
type: integer
example: 9520
brandAmountFormatted:
type: string
example: €95.20
brandAmountVat:
type: integer
example: 1809
brandAmountVatFormatted:
type: string
example: €18.09
brandAmountWithVat:
type: integer
example: 11329
brandAmountWithVatFormatted:
type: string
example: €113.29
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerUnitPriceBeforeDiscount:
type: integer
example: 1700
customerUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
customerUnitPrice:
type: integer
example: 1360
customerUnitPriceFormatted:
type: string
example: €13.60
customerAmountBeforeDiscount:
type: integer
example: 11900
customerAmountBeforeDiscountFormatted:
type: string
example: €119.00
customerDiscountAmount:
type: integer
example: 2380
customerDiscountAmountFormatted:
type: string
example: €23.80
customerAmount:
type: integer
example: 9520
customerAmountFormatted:
type: string
example: €95.20
customerAmountVat:
type: integer
example: 1809
customerAmountVatFormatted:
type: string
example: €18.09
customerAmountWithVat:
type: integer
example: 11329
customerAmountWithVatFormatted:
type: string
example: €113.29
vatRate:
type: integer
example: 19
discountRate:
type: integer
example: 20
discountAmount:
type: integer
example: 100
discountAmountFormatted:
type: string
example: €1.00
required:
- brandCurrency
- brandCurrencyRate
- brandUnitPriceBeforeDiscount
- brandUnitPriceBeforeDiscountFormatted
- brandUnitPrice
- brandUnitPriceFormatted
- brandAmountBeforeDiscount
- brandAmountBeforeDiscountFormatted
- brandDiscountAmount
- brandDiscountAmountFormatted
- brandAmount
- brandAmountFormatted
- brandAmountVat
- brandAmountVatFormatted
- brandAmountWithVat
- brandAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerUnitPriceBeforeDiscount
- customerUnitPriceBeforeDiscountFormatted
- customerUnitPrice
- customerUnitPriceFormatted
- customerAmountBeforeDiscount
- customerAmountBeforeDiscountFormatted
- customerDiscountAmount
- customerDiscountAmountFormatted
- customerAmount
- customerAmountFormatted
- customerAmountVat
- customerAmountVatFormatted
- customerAmountWithVat
- customerAmountWithVatFormatted
- vatRate
- discountRate
- discountAmount
- discountAmountFormatted
required:
- productVariantUuid
- productVariantName
- quantity
- multipliedQuantity
- amounts
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type: integer
description: Order shipping fee amount, in retailer's currency.
example: 500
required:
- brandUnitPrice
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
description: An invoice item representing a custom charge.
properties:
type:
type: string
enum:
- shippingFees
- exciseDuties
- ecoTax
description: The type of item.
vatRate:
type: number
example: 12.5
description: 'The VAT rate applied to this item (expressed as a percentage).
'
readOnly: true
minimum: 0
maximum: 100
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
amountVat:
type: integer
description: The total amount of VAT to collect for this item, in cents.
readOnly: true
minimum: 0
amountWithVat:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, including VAT and expressed in the customer''s currency (amount + amountVat).
'
readOnly: true
minimum: 0
minItems: 0
status:
type: string
enum:
- created
- brand_confirmed
- payment_confirmed
- waiting_shipping
- shipped
- received
- invoiced
- brand_paid
- cancelled
masterOrderReference:
type:
- string
- 'null'
example: EACN9214515
customReference:
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
type:
- string
- 'null'
maxLength: 64
amounts:
type: object
description: Total amounts of the order.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandTotalAmountBeforeDiscount:
type: integer
example: 54620
brandTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
brandTotalDiscountAmount:
type: integer
example: 0
brandTotalDiscountAmountFormatted:
type: string
example: €0.00
brandTotalAmount:
type: integer
example: 54620
brandTotalAmountFormatted:
type: string
example: €546.20
brandTotalAmountVat:
type: integer
example: 12633
brandTotalAmountVatFormatted:
type: string
example: €126.33
brandTotalAmountWithVat:
type: integer
example: 67253
brandTotalAmountWithVatFormatted:
type: string
example: €672.53
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerTotalAmountBeforeDiscount:
type: integer
example: 54620
customerTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
customerTotalDiscountAmount:
type: integer
example: 54620
customerTotalDiscountAmountFormatted:
type: string
example: €0.00
customerTotalAmount:
type: integer
example: 54620
customerTotalAmountFormatted:
type: string
example: €546.20
customerTotalAmountVat:
type: integer
example: 12633
customerTotalAmountVatFormatted:
type: string
example: €126.33
customerTotalAmountWithVat:
type: integer
example: 67253
customerTotalAmountWithVatFormatted:
type: string
example: €672.53
shippingFeesAmount:
type: integer
example: 220
shippingFeesAmountFormatted:
type: string
example: €2.20
shippingFeesAmountVat:
type: integer
example: 44
shippingFeesAmountVatFormatted:
type: string
example: €0.44
shippingFeesAmountWithVat:
type: integer
example: 264
shippingFeesAmountWithVatFormatted:
type: string
example: €2.64
customerGrandTotalAmount:
type: integer
example: 54840
customerGrandTotalAmountFormatted:
type: string
example: €548.40
customerGrandTotalAmountVat:
type: integer
example: 12677
customerGrandTotalAmountVatFormatted:
type: string
example: €126.77
customerGrandTotalAmountWithVat:
type: integer
example: 67517
customerGrandTotalAmountWithVatFormatted:
type: string
example: €675.17
required:
- brandCurrency
- brandCurrencyRate
- brandTotalAmountBeforeDiscount
- brandTotalAmountBeforeDiscountFormatted
- brandTotalDiscountAmount
- brandTotalDiscountAmountFormatted
- brandTotalAmount
- brandTotalAmountFormatted
- brandTotalAmountVat
- brandTotalAmountVatFormatted
- brandTotalAmountWithVat
- brandTotalAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerTotalAmountBeforeDiscount
- customerTotalAmountBeforeDiscountFormatted
- customerTotalDiscountAmount
- customerTotalDiscountAmountFormatted
- customerTotalAmount
- customerTotalAmountFormatted
- customerTotalAmountVat
- customerTotalAmountVatFormatted
- customerTotalAmountWithVat
- customerTotalAmountWithVatFormatted
- shippingFeesAmount
- shippingFeesAmountFormatted
- shippingFeesAmountVat
- shippingFeesAmountVatFormatted
- shippingFeesAmountWithVat
- shippingFeesAmountWithVatFormatted
- customerGrandTotalAmount
- customerGrandTotalAmountFormatted
- customerGrandTotalAmountVat
- customerGrandTotalAmountVatFormatted
- customerGrandTotalAmountWithVat
- customerGrandTotalAmountWithVatFormatted
shipping:
type: object
properties:
shippingMethod:
type: string
enum:
- custom
- fulfillment
example: fulfillment
x-enumDescriptions:
custom: The order is shipped via the brand's own carrier.
fulfillment: The order is fulfilled via the AnkorLogistics Fulfilment Centre.
shippingAddress:
type: object
properties:
countryCode:
type: string
example: FR
postalCode:
type: string
example: '92100'
city:
type: string
example: Boulogne-Billancourt
street:
type: string
example: 105, rue de Sevres
addressLine:
type:
- string
- 'null'
required:
- countryCode
- postalCode
- city
- street
contactPerson:
type: object
properties:
email:
type: string
example: etienne.guillou@roy.com
firstName:
type: string
example: Etienne
lastName:
type: string
example: Guillou
company:
type:
- string
- 'null'
phoneNumber:
type:
- string
- 'null'
required:
- email
- firstName
- lastName
required:
- shippingMethod
- shippingAddress
- contactPerson
tracking:
type:
- object
- 'null'
properties:
trackingNumber:
type: string
example: 1Z999AA10123456784
trackingLink:
type: string
example: https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784
status:
type: string
example: shipped
isDelivered:
type: boolean
example: false
required:
- trackingNumber
- trackingUrl
- status
- isDelivered
required:
- createdAt
- customerUuid
- items
- amounts
- shipping
- discountRate
required:
- type
- id
included:
type: array
items:
anyOf:
- title: PaymentResource
description: The resource of a payment object
type: object
properties:
type:
type: string
default: order-pay-payments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
orderUuid:
type: string
format: uuid
description: External order uuid
customerUuid:
type: string
format: uuid
description: OrderPay customer uuid (external)
brandUuid:
type: string
format: uuid
description: Brand uuid
createdAt:
type: string
format: date-time
description: Creation date of the payment
psp:
type: string
enum:
- stripe
description: The payment service provider selected for the payment
status:
type: string
description: Status of the payment
enum:
- pending
- succeeded
- cancelled
amount:
type: integer
currency:
type: string
description: ISO 3-Letter Currency Code
example: EUR
currencyRate:
type: number
format: float
paymentMethod:
type: string
enum:
- sepa_credit_transfer
- sepa_direct_debit
- card
- paypal
description: The payment method selected for the payment
fundedBy:
type:
- string
- 'null'
paymentTerms:
type:
- string
- 'null'
required:
- orderUuid
- customerUuid
- brandUuid
- createdAt
- psp
- status
- amount
- currency
- currencyRate
- paymentMethod
relationships:
type: object
properties:
transactions:
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
- title: TransactionResource
description: The resource of a transaction object
type: object
properties:
type:
type: string
default: order-pay-transactions
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
description: Creation date of the transaction
pspId:
type: string
description: The payment service provider transaction id
amount:
type: integer
currency:
type: string
type:
type: string
status:
type: string
pspData:
type:
- object
- 'null'
properties:
client_secret:
type: string
iban:
type:
- object
- 'null'
properties:
bic:
type: string
iban:
type: string
country:
type: string
reference:
type: string
required:
- createdAt
- pspId
- amount
- currency
- type
- status
required:
- type
- id
- attributes
required:
- jsonapi
- data
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id043
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: *id042
additionalProperties: false
required: &id044
- 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: *id043
required: *id044
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: *id043
required: *id044
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: *id043
required: *id044
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: *id043
required: *id044
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: *id043
required: *id044
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: *id043
required: *id044
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
/api/v1/order-pay/order-pay-orders/{id}/-actions/confirm:
post:
summary: Confirm an order
operationId: confirm-order-pay-order-by-brand
description: Allows brand to confirm order.
tags:
- OrderPay
parameters:
- name: Accept
in: header
description: application/vnd.api+json
schema:
type: string
default: application/vnd.api+json
- name: id
in: path
description: UUID of the requested resource
schema:
type: string
format: uuid
required: true
responses:
'200':
description: OrderPay ExternalOrder data
content:
application/vnd.api+json:
schema:
title: OrderSchema
type: object
properties:
jsonapi:
description: An object describing the server's implementation
type: object
properties: &id045
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: OrderResource
type: object
properties:
type:
type: string
default: order-pay-orders
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
relationships:
payment:
type: object
properties:
data:
$ref: ../../../v1.yaml#/components/schemas/relationshipToOne
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
example: '2024-07-01T13:00:50.000000Z'
customerUuid:
type: string
format: uuid
example: 2cef2271-11fd-4cfc-925f-d5ea761229c6
discountRate:
type: integer
example: 20
items:
type: array
description: List of items with their corresponding quantities and unit amounts.
items:
type: object
properties:
productVariantUuid:
type: string
format: uuid
description: Product variant UUID.
example: 1ef2e4f1-5a37-66c6-9399-c66dfcccaea9
productVariantName:
type: string
description: Product variant name.
example: Voluptas ut consequatur (1789457692, Jaune de Mars)
quantity:
type: integer
description: 'Quantity of bundles of the item (ex: 2 boxes of 6 bottles of wine each: `quantity = 2`)'
example: 7
multipliedQuantity:
type: integer
description: 'Total quantity of individual units of the item (ex: 2 boxes of 6 bottles of wine each: `multipliedQuantity = 12`)'
example: 7
amounts:
type: object
description: Total amounts of the order item.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandUnitPriceBeforeDiscount:
type: integer
example: 1700
brandUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
brandUnitPrice:
type: integer
example: 1360
brandUnitPriceFormatted:
type: string
example: €13.60
brandAmountBeforeDiscount:
type: integer
example: 11900
brandAmountBeforeDiscountFormatted:
type: string
example: €119.00
brandDiscountAmount:
type: integer
example: 2380
brandDiscountAmountFormatted:
type: string
example: €23.80
brandAmount:
type: integer
example: 9520
brandAmountFormatted:
type: string
example: €95.20
brandAmountVat:
type: integer
example: 1809
brandAmountVatFormatted:
type: string
example: €18.09
brandAmountWithVat:
type: integer
example: 11329
brandAmountWithVatFormatted:
type: string
example: €113.29
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerUnitPriceBeforeDiscount:
type: integer
example: 1700
customerUnitPriceBeforeDiscountFormatted:
type: string
example: €17.00
customerUnitPrice:
type: integer
example: 1360
customerUnitPriceFormatted:
type: string
example: €13.60
customerAmountBeforeDiscount:
type: integer
example: 11900
customerAmountBeforeDiscountFormatted:
type: string
example: €119.00
customerDiscountAmount:
type: integer
example: 2380
customerDiscountAmountFormatted:
type: string
example: €23.80
customerAmount:
type: integer
example: 9520
customerAmountFormatted:
type: string
example: €95.20
customerAmountVat:
type: integer
example: 1809
customerAmountVatFormatted:
type: string
example: €18.09
customerAmountWithVat:
type: integer
example: 11329
customerAmountWithVatFormatted:
type: string
example: €113.29
vatRate:
type: integer
example: 19
discountRate:
type: integer
example: 20
discountAmount:
type: integer
example: 100
discountAmountFormatted:
type: string
example: €1.00
required:
- brandCurrency
- brandCurrencyRate
- brandUnitPriceBeforeDiscount
- brandUnitPriceBeforeDiscountFormatted
- brandUnitPrice
- brandUnitPriceFormatted
- brandAmountBeforeDiscount
- brandAmountBeforeDiscountFormatted
- brandDiscountAmount
- brandDiscountAmountFormatted
- brandAmount
- brandAmountFormatted
- brandAmountVat
- brandAmountVatFormatted
- brandAmountWithVat
- brandAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerUnitPriceBeforeDiscount
- customerUnitPriceBeforeDiscountFormatted
- customerUnitPrice
- customerUnitPriceFormatted
- customerAmountBeforeDiscount
- customerAmountBeforeDiscountFormatted
- customerDiscountAmount
- customerDiscountAmountFormatted
- customerAmount
- customerAmountFormatted
- customerAmountVat
- customerAmountVatFormatted
- customerAmountWithVat
- customerAmountWithVatFormatted
- vatRate
- discountRate
- discountAmount
- discountAmountFormatted
required:
- productVariantUuid
- productVariantName
- quantity
- multipliedQuantity
- amounts
amounts:
type: object
description: Total amounts of the order.
properties:
shippingFeesAmount:
type: integer
description: Order shipping fee amount, in retailer's currency.
example: 500
required:
- brandUnitPrice
customItems:
type: array
description: 'A list of items representing custom charges to be applied to the invoice (e.g. shipping fees, excise duties, eco-taxes).
'
items:
type: object
description: An invoice item representing a custom charge.
properties:
type:
type: string
enum:
- shippingFees
- exciseDuties
- ecoTax
description: The type of item.
vatRate:
type: number
example: 12.5
description: 'The VAT rate applied to this item (expressed as a percentage).
'
readOnly: true
minimum: 0
maximum: 100
amount:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, excluding VAT and expressed in the customer''s currency.
'
minimum: 0
amountVat:
type: integer
description: The total amount of VAT to collect for this item, in cents.
readOnly: true
minimum: 0
amountWithVat:
type: integer
description: 'The integer amount in cents representing how much to charge for this custom item, including VAT and expressed in the customer''s currency (amount + amountVat).
'
readOnly: true
minimum: 0
minItems: 0
status:
type: string
enum:
- created
- brand_confirmed
- payment_confirmed
- waiting_shipping
- shipped
- received
- invoiced
- brand_paid
- cancelled
masterOrderReference:
type:
- string
- 'null'
example: EACN9214515
customReference:
description: 'A client-specified ID to associate an entity in another system with this order, such as the Shopify order ID if this is a Shopify order. This reference appears on the invoice issued to the customer.
'
type:
- string
- 'null'
maxLength: 64
amounts:
type: object
description: Total amounts of the order.
properties:
brandCurrency:
type: string
example: EUR
brandCurrencyRate:
type: number
example: 1
brandTotalAmountBeforeDiscount:
type: integer
example: 54620
brandTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
brandTotalDiscountAmount:
type: integer
example: 0
brandTotalDiscountAmountFormatted:
type: string
example: €0.00
brandTotalAmount:
type: integer
example: 54620
brandTotalAmountFormatted:
type: string
example: €546.20
brandTotalAmountVat:
type: integer
example: 12633
brandTotalAmountVatFormatted:
type: string
example: €126.33
brandTotalAmountWithVat:
type: integer
example: 67253
brandTotalAmountWithVatFormatted:
type: string
example: €672.53
customerCurrency:
type: string
example: EUR
customerCurrencyRate:
type: number
example: 1
customerTotalAmountBeforeDiscount:
type: integer
example: 54620
customerTotalAmountBeforeDiscountFormatted:
type: string
example: €546.20
customerTotalDiscountAmount:
type: integer
example: 54620
customerTotalDiscountAmountFormatted:
type: string
example: €0.00
customerTotalAmount:
type: integer
example: 54620
customerTotalAmountFormatted:
type: string
example: €546.20
customerTotalAmountVat:
type: integer
example: 12633
customerTotalAmountVatFormatted:
type: string
example: €126.33
customerTotalAmountWithVat:
type: integer
example: 67253
customerTotalAmountWithVatFormatted:
type: string
example: €672.53
shippingFeesAmount:
type: integer
example: 220
shippingFeesAmountFormatted:
type: string
example: €2.20
shippingFeesAmountVat:
type: integer
example: 44
shippingFeesAmountVatFormatted:
type: string
example: €0.44
shippingFeesAmountWithVat:
type: integer
example: 264
shippingFeesAmountWithVatFormatted:
type: string
example: €2.64
customerGrandTotalAmount:
type: integer
example: 54840
customerGrandTotalAmountFormatted:
type: string
example: €548.40
customerGrandTotalAmountVat:
type: integer
example: 12677
customerGrandTotalAmountVatFormatted:
type: string
example: €126.77
customerGrandTotalAmountWithVat:
type: integer
example: 67517
customerGrandTotalAmountWithVatFormatted:
type: string
example: €675.17
required:
- brandCurrency
- brandCurrencyRate
- brandTotalAmountBeforeDiscount
- brandTotalAmountBeforeDiscountFormatted
- brandTotalDiscountAmount
- brandTotalDiscountAmountFormatted
- brandTotalAmount
- brandTotalAmountFormatted
- brandTotalAmountVat
- brandTotalAmountVatFormatted
- brandTotalAmountWithVat
- brandTotalAmountWithVatFormatted
- customerCurrency
- customerCurrencyRate
- customerTotalAmountBeforeDiscount
- customerTotalAmountBeforeDiscountFormatted
- customerTotalDiscountAmount
- customerTotalDiscountAmountFormatted
- customerTotalAmount
- customerTotalAmountFormatted
- customerTotalAmountVat
- customerTotalAmountVatFormatted
- customerTotalAmountWithVat
- customerTotalAmountWithVatFormatted
- shippingFeesAmount
- shippingFeesAmountFormatted
- shippingFeesAmountVat
- shippingFeesAmountVatFormatted
- shippingFeesAmountWithVat
- shippingFeesAmountWithVatFormatted
- customerGrandTotalAmount
- customerGrandTotalAmountFormatted
- customerGrandTotalAmountVat
- customerGrandTotalAmountVatFormatted
- customerGrandTotalAmountWithVat
- customerGrandTotalAmountWithVatFormatted
shipping:
type: object
properties:
shippingMethod:
type: string
enum:
- custom
- fulfillment
example: fulfillment
x-enumDescriptions:
custom: The order is shipped via the brand's own carrier.
fulfillment: The order is fulfilled via the AnkorLogistics Fulfilment Centre.
shippingAddress:
type: object
properties:
countryCode:
type: string
example: FR
postalCode:
type: string
example: '92100'
city:
type: string
example: Boulogne-Billancourt
street:
type: string
example: 105, rue de Sevres
addressLine:
type:
- string
- 'null'
required:
- countryCode
- postalCode
- city
- street
contactPerson:
type: object
properties:
email:
type: string
example: etienne.guillou@roy.com
firstName:
type: string
example: Etienne
lastName:
type: string
example: Guillou
company:
type:
- string
- 'null'
phoneNumber:
type:
- string
- 'null'
required:
- email
- firstName
- lastName
required:
- shippingMethod
- shippingAddress
- contactPerson
tracking:
type:
- object
- 'null'
properties:
trackingNumber:
type: string
example: 1Z999AA10123456784
trackingLink:
type: string
example: https://www.ups.com/track?loc=en_US&tracknum=1Z999AA10123456784
status:
type: string
example: shipped
isDelivered:
type: boolean
example: false
required:
- trackingNumber
- trackingUrl
- status
- isDelivered
required:
- createdAt
- customerUuid
- items
- amounts
- shipping
- discountRate
required:
- type
- id
included:
type: array
items:
anyOf:
- title: PaymentResource
description: The resource of a payment object
type: object
properties:
type:
type: string
default: order-pay-payments
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
orderUuid:
type: string
format: uuid
description: External order uuid
customerUuid:
type: string
format: uuid
description: OrderPay customer uuid (external)
brandUuid:
type: string
format: uuid
description: Brand uuid
createdAt:
type: string
format: date-time
description: Creation date of the payment
psp:
type: string
enum:
- stripe
description: The payment service provider selected for the payment
status:
type: string
description: Status of the payment
enum:
- pending
- succeeded
- cancelled
amount:
type: integer
currency:
type: string
description: ISO 3-Letter Currency Code
example: EUR
currencyRate:
type: number
format: float
paymentMethod:
type: string
enum:
- sepa_credit_transfer
- sepa_direct_debit
- card
- paypal
description: The payment method selected for the payment
fundedBy:
type:
- string
- 'null'
paymentTerms:
type:
- string
- 'null'
required:
- orderUuid
- customerUuid
- brandUuid
- createdAt
- psp
- status
- amount
- currency
- currencyRate
- paymentMethod
relationships:
type: object
properties:
transactions:
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
- title: TransactionResource
description: The resource of a transaction object
type: object
properties:
type:
type: string
default: order-pay-transactions
id:
type: string
description: '[resource object identifier (uuid)](https://jsonapi.org/format/#document-resource-object-identification)'
format: uuid
attributes:
type: object
properties:
createdAt:
type: string
format: date-time
description: Creation date of the transaction
pspId:
type: string
description: The payment service provider transaction id
amount:
type: integer
currency:
type: string
type:
type: string
status:
type: string
pspData:
type:
- object
- 'null'
properties:
client_secret:
type: string
iban:
type:
- object
- 'null'
properties:
bic:
type: string
iban:
type: string
country:
type: string
reference:
type: string
required:
- createdAt
- pspId
- amount
- currency
- type
- status
required:
- type
- id
- attributes
required:
- jsonapi
- data
'400':
description: Bad request
content:
application/vnd.api+json:
schema:
type: object
additionalProperties: false
properties: &id046
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: *id045
additionalProperties: false
required: &id047
- 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: *id046
required: *id047
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: *id046
required: *id047
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: *id046
required: *id047
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: *id046
required: *id047
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: *id046
required: *id047
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: *id046
required: *id047
example:
jsonapi:
version: '1.0'
errors:
- detail: Server Error
status: '500'
components:
securitySchemes:
CookieKey:
type: apiKey
name: ankorstore_session
in: cookie