Service API (1.0.0)

Download OpenAPI specification:

Specification contains list of all services available through retail platform.

customer

Customer service

Get customer by id

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

query Parameters
siteKey
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Update customer profile by id

Update profile fields for a customer identified by ID

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string <uuid> ^[0-9a-fA-F-]{36}$

Customer ID

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

marketKey
required
string

The market key

Request Body schema: application/json
required

Partial profile update payload

title
string
firstName
string
lastName
string
dateOfBirth
string <date>
phoneNumber
string
email
string <email>

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "dateOfBirth": "2019-08-24",
  • "phoneNumber": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Update customer email by id

Update the email address for a customer identified by ID

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

query Parameters
siteKey
required
string

The site key

Request Body schema: application/json
required

Email update payload

email
required
string <email>

The new email address

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Add customer activity

Add an activity log entry for a customer (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

query Parameters
siteKey
required
string

The site key

header Parameters
idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

Activity payload

detail
required
string

Activity detail text

channel
string
Enum: "online" "instore" "customer-service"

The channel where the activity occurred

Responses

Request samples

Content type
application/json
{
  • "detail": "string",
  • "channel": "online"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Update customer payment method

Update a customer's payment method by ID (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

paymentMethodId
required
string

Payment method id

query Parameters
siteKey
required
string

The site key

header Parameters
idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

Payment method update payload

holderName
required
string

Cardholder name

object (1.0.0-customer_address-draft)

Responses

Request samples

Content type
application/json
{
  • "holderName": "string",
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Remove customer payment method

Remove a customer's payment method by ID (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

paymentMethodId
required
string

Payment method id

query Parameters
siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Add delivery address to customer

Add a delivery address to a customer (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string <uuid> ^[0-9a-fA-F-]{36}$

Customer ID

query Parameters
siteKey
required
string

The site key

header Parameters
idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

Delivery address payload

isDefault
required
boolean

Whether this should be the default delivery address

required
object (1.0.0-customer_address-draft)

Responses

Request samples

Content type
application/json
{
  • "isDefault": true,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Edit delivery address

Edit a customer's delivery address (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string <uuid> ^[0-9a-fA-F-]{36}$

Customer ID

addressId
required
string

Address id

query Parameters
siteKey
required
string

The site key

header Parameters
idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

Delivery address update payload

isDefault
required
boolean

Whether this should be the default delivery address

required
object (1.0.0-customer_address-draft)

Responses

Request samples

Content type
application/json
{
  • "isDefault": true,
  • "address": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Remove delivery address

Remove a customer's delivery address (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

addressId
required
string

Address id

query Parameters
siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Set default delivery address

Set a delivery address as the default for a customer (colleague route)

Authorizations:
1.0.0-customer_api_key
path Parameters
customerId
required
string

Customer ID

addressId
required
string

Address id

query Parameters
siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Returns customer for the given parameters

The customer details are returned matching the provided customer token and site key

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

header Parameters
specsavers-customer-auth
required
string

The customer token

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Updates the customer's profile

Update the current customer's profile fields

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

The payload schema describes the information required to update the customer's profile

title
string

The title being set

firstName
required
string

The first name being set

lastName
required
string

The last name being set

nationalHealthId
string

The national health ID being set

dateOfBirth
string

The data of birth being set

gender
string

The gender being set

phoneNumber
string

The telephone number being set

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "nationalHealthId": "string",
  • "dateOfBirth": "string",
  • "gender": "string",
  • "phoneNumber": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Add address for current customer

Add a new address to the current customer's profile

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

The payload schema describes the information required to add an address to the customer's profile

required
object (1.0.0-customer_address-draft)

The address being set

isBilling
boolean

Indicates the address should be used for billing

isDelivery
boolean

Indicates the address should be used for delivery

isDefaultBilling
boolean

Indicates the address should be used as the default for billing

isDefaultDelivery
boolean

Indicates the address should be used as the default for delivery

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "isBilling": true,
  • "isDelivery": true,
  • "isDefaultBilling": true,
  • "isDefaultDelivery": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Edit address for current customer

Edit an existing address in the current customer's profile

Authorizations:
1.0.0-customer_api_key
path Parameters
addressId
required
string

The ID of the address to edit

query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

The payload schema describes the information required to edit an address in the customer's profile

addressId
required
string

The ID of the address being edited

required
object (1.0.0-customer_address-draft)

The address being edited

isBilling
boolean

Indicates the address should be used for billing

isDelivery
boolean

Indicates the address should be used for delivery

isDefaultBilling
boolean

Indicates the address should be used as the default for billing

isDefaultDelivery
boolean

Indicates the address should be used as the default for delivery

Responses

Request samples

Content type
application/json
{
  • "addressId": "string",
  • "address": {
    },
  • "isBilling": true,
  • "isDelivery": true,
  • "isDefaultBilling": true,
  • "isDefaultDelivery": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Remove address for current customer

Remove an address from the current customer's profile

Authorizations:
1.0.0-customer_api_key
path Parameters
addressId
required
string

The ID of the address to remove

query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

isBilling
boolean

Remove as billing address

isDelivery
boolean

Remove as delivery address

header Parameters
specsavers-customer-auth
required
string

The customer token

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Set default address for current customer

Set an address as the default billing and/or delivery address

Authorizations:
1.0.0-customer_api_key
path Parameters
addressId
required
string

The ID of the address to set as default

query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

Default address options

isDefaultDelivery
boolean

Set as default delivery address

isDefaultBilling
boolean

Set as default billing address

Responses

Request samples

Content type
application/json
{
  • "isDefaultDelivery": true,
  • "isDefaultBilling": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Update last order id for current customer

Update the last glasses or contact lenses order ID for the customer

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

Last order id payload - at least one ID must be provided

lastContactLensesOrderId
string

ID of the last contact lenses order

lastGlassesOrderId
string

ID of the last glasses order

Responses

Request samples

Content type
application/json
{
  • "lastContactLensesOrderId": "string",
  • "lastGlassesOrderId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Add payment method for current customer

Add a new payment method to the current customer's wallet

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

Payment method payload

required
object (1.0.0-customer_address-draft)
adyenPaymentMethod
required
object

Adyen payment method details

object

Responses

Request samples

Content type
application/json
{
  • "address": {
    },
  • "adyenPaymentMethod": { },
  • "amount": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Update payment method for current customer

Update an existing payment method in the customer's wallet

Authorizations:
1.0.0-customer_api_key
path Parameters
paymentMethodId
required
string

The ID of the payment method to update

query Parameters
marketKey
required
string

The market key

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

Payment method update payload

holderName
string

Cardholder name

expiryMonth
integer

Expiry month (1-12)

expiryYear
integer

Expiry year

object (1.0.0-customer_address-draft)
lastUsedAt
string <date-time>

Last time the payment method was used

Responses

Request samples

Content type
application/json
{
  • "holderName": "string",
  • "expiryMonth": 0,
  • "expiryYear": 0,
  • "address": {
    },
  • "lastUsedAt": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Remove payment method for current customer

Remove a payment method from the customer's wallet

Authorizations:
1.0.0-customer_api_key
path Parameters
paymentMethodId
required
string

The ID of the payment method to remove

query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Set default payment method for current customer

Set a payment method as the default for the customer

Authorizations:
1.0.0-customer_api_key
path Parameters
paymentMethodId
required
string

The ID of the payment method to set as default

query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Updates the customer's email address

Update the current customer's email address

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

The payload schema describes the information required to update the customer's email address

email
required
string

The email address being set

Responses

Request samples

Content type
application/json
{
  • "email": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Sets the customer's default aftercare store

Sets the customer's default aftercare store

Authorizations:
1.0.0-customer_api_key
query Parameters
marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The customer token

Request Body schema: application/json
required

The payload schema describes the information required to update the customer's default aftercare store.

aftercareStoreId
string

The aftercare store id of the store to set as default on the customer's account

Responses

Request samples

Content type
application/json
{
  • "aftercareStoreId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Register partial customer

Register a new partial customer account

Authorizations:
1.0.0-customer_api_key
query Parameters
siteKey
required
string

The site key

Request Body schema: application/json
required

Customer registration payload

title
string
firstName
string
lastName
string
dateOfBirth
string <date>
phoneNumber
string
email
required
string <email>
marketingOptIn
boolean
Default: false
idpId
string

Identity provider ID

anonymousId
string

Anonymous session ID

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "dateOfBirth": "2019-08-24",
  • "phoneNumber": "string",
  • "email": "user@example.com",
  • "marketingOptIn": false,
  • "idpId": "string",
  • "anonymousId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Get cloud customer by id

Authorizations:
1.0.0-customer_api_key
path Parameters
id
required
string

Responses

Response samples

Content type
application/json
{ }

Trigger password reset

Handle password reset event from identity provider

Authorizations:
1.0.0-customer_api_key
query Parameters
siteKey
required
string

The site key

Request Body schema: application/json
required

Password reset event payload

token
required
string

Password reset token

commercetoolsId
string

Customer's Commercetools ID (optional)

email
required
string <email>

Customer's email address

Responses

Request samples

Content type
application/json
{
  • "token": "string",
  • "commercetoolsId": "string",
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Handle OTP event

Handle OTP verification event from identity provider

Authorizations:
1.0.0-customer_api_key
query Parameters
siteKey
required
string

The site key

Request Body schema: application/json
required

OTP event payload

commercetoolsId
string

Customer's commercetools ID (optional)

email
required
string <email>

Customer's email address

otpCode
required
string

One-time password code

Responses

Request samples

Content type
application/json
{
  • "commercetoolsId": "string",
  • "email": "user@example.com",
  • "otpCode": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Health check information for a service

The health endpoint.

Authorizations:
1.0.0-customer_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

delivery

Related to delivery service

Get delivery options by site and cart

Get the delivery options using the key of the site and id of cart supplied.

Authorizations:
1.0.0-delivery_api_key
path Parameters
siteKey
required
string

The key of the site for delivery options

cartId
string

The id of the cart

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Health check information for a service

The health endpoint.

Authorizations:
1.0.0-delivery_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

cart

Carts related operations

Get cart with given id

Returns the shopping cart.

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get current shopping cart

Return the cart that is associated with the JWT token

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Submit the order

Submit the order for the customer's current shopping cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

Get the cart for cart id

cartId
string

The id of the shopping cart that was submitted as an order

Responses

Request samples

Content type
application/json
{
  • "cartId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Adds address(es) to the cart

Adds one address to the cart and uses it as a billing address, shipping address or both

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

An object containing the addresses to add. Either delivery or billing address must be provided.

If billingSameAsDeliveryAddress is true then delivery address must be specified.

object (1.0.0-order_order-address)
object (1.0.0-order_order-address)
billingSameAsDeliveryAddress
boolean

Responses

Request samples

Content type
application/json
{
  • "deliveryAddress": {
    },
  • "billingAddress": {
    },
  • "billingSameAsDeliveryAddress": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Adds billing address to the cart

Adds a billing address to the cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

An object containing the billing address.

object (1.0.0-order_order-address)

Responses

Request samples

Content type
application/json
{
  • "billingAddress": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Remove billing address from cart

Remove a billing address from cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Adds delivery address to the cart

Adds a shipping/delivery address to the cart and optionally uses it as a billing address.

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

An object containing the delivery address.

If billingSameAsDeliveryAddress is true then delivery address also populates billing address.

object (1.0.0-order_order-address)
billingSameAsDeliveryAddress
boolean

Responses

Request samples

Content type
application/json
{
  • "deliveryAddress": {
    },
  • "billingSameAsDeliveryAddress": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Remove delivery address from cart

Remove a delivery address from cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Sets the delivery method for the current cart of a customer

Sets the delivery method for the current cart of a customer

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

The delivery method to add, containing the method and either the delivery, collection or digital delivery details.

deliveryMethod
required
string
Enum: "Home" "Collection" "Digital"
object (1.0.0-order_order-delivery-method)
object
object

Responses

Request samples

Content type
application/json
{
  • "deliveryMethod": "Home",
  • "homeDelivery": {
    },
  • "collection": {
    },
  • "digitalDelivery": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Adds a discount code to the cart

Adds a discount code (coupon code) to the cart and recalculates the price.

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

The discount code to add to the cart.

code
required
string

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Removes a discount code from the cart

Removes a discount code from the cart and recalculates the price.

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

The discount code to add to the cart.

code
required
string

Responses

Request samples

Content type
application/json
{
  • "code": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Remove group from cart

Remove a cart product group (frame, contact-lens or other)

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
groupId
number

Responses

Request samples

Content type
application/json
{
  • "groupId": 0
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Add contact lens product group to cart

Add left and right contact lens skus to the cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "contacts": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update contacts lens product group

Update the left and right skus within the cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "contacts": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Add frame product group to cart

Add frame group details to the cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json

Todo: Update frame object when details are known

frame
object
talonOneData
string
prescription
string

Responses

Request samples

Content type
application/json
{
  • "frame": { },
  • "talonOneData": "string",
  • "prescription": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update frame product group

Update the frame product group details within the cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json

Todo: Update frame object when details are known

frame
object
talonOneData
string
prescription
string

Responses

Request samples

Content type
application/json
{
  • "frame": { },
  • "talonOneData": "string",
  • "prescription": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Initiates a payment session with Adyen for the customer's current shopping cart

Initiates a payment session with Adyen for the customer's current shopping cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

The payment session parameter(s).

object (1.0.0-order_money)

Responses

Request samples

Content type
application/json
{
  • "amount": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "amount": {
    },
  • "sessionData": "string"
}

Creates an Adyen payment for the customer's current shopping cart

Creates an Adyen payment, returning the payment details required for integration with Adyen Web Components.

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

Payload for creating an Adyen payment.

required
object (1.0.0-order_money)
required
object

Payment method details as provided by Adyen.

required
object

Browser information required for the payment process.

Responses

Request samples

Content type
application/json
{
  • "amount": {
    },
  • "paymentMethod": { },
  • "browserInfo": { }
}

Response samples

Content type
application/json
{
  • "paymentId": "string",
  • "amount": {
    },
  • "resultCode": "AuthenticationFinished",
  • "action": {
    },
  • "paymentMethod": { }
}

Fetches the available payment methods Adyen provides for the customer's current shopping cart

Fetches the available payment methods Adyen provides for the customer's current shopping cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Responses

Response samples

Content type
application/json
{
  • "paymentMethods": [
    ],
  • "responseString": "string"
}

Initiates a payment session with HICAPS y for the customer's current shopping cart

Initiates a payment session with HICAPS for the customer's current shopping cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

The payment session parameter(s).

fund
required
string

The payment method to use

memberNumber
required
string

Responses

Request samples

Content type
application/json
{
  • "fund": "string",
  • "memberNumber": "string"
}

Response samples

Content type
application/json
{
  • "redirectUrl": "string"
}

Sets the aftercare store for the customer's current cart and updates the customer's default aftercare store

Sets the aftercare store for the customer's current cart and updates the customer's default aftercare store

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

marketKey
required
string

The market key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

The payload schema describes the information required to set the aftercare store on the customer's cart.

aftercareStoreId
required
string

The aftercare store id of the store to set on the customer's cart

Responses

Request samples

Content type
application/json
{
  • "aftercareStoreId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

order

Orders related operations

Cancel the active cart

Cancel the active cart

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Creates an express re-order cart

Creates an express re-order cart from a previous order

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

idempotency-key
required
string

Ensures idempotency

Request Body schema: application/json
required

The id of the order to be used for express re-order

orderId
string

Responses

Request samples

Content type
application/json
{
  • "orderId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Health check information for the carts service

Health check information for the carts service

Authorizations:
1.0.0-order_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get orders by ids

Get orders by ids

Authorizations:
1.0.0-order_api_key
query Parameters
ids
required
string

A comma-separated list of order IDs to retrieve

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get an order by id

Get an order by id

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Create a return

Create a new return for an order

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key for the order

locale
required
string

The locale for the request

header Parameters
idempotency-key
required
string

Idempotency key to ensure the request is processed only once

Request Body schema: application/json
required
required
object

The details of the items to return

Responses

Request samples

Content type
application/json
{
  • "returnDraft": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Create an appeasement

Creates an appeasement for an order. An appeasement is a refund without requiring physical items to be returned.

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key for the order

locale
required
string

The locale for the request

header Parameters
idempotency-key
required
string

Idempotency key to ensure the request is processed only once

Request Body schema: application/json
required
required
object (1.0.0-order_appeasement-calculation-input)
reasonCode
required
string

The reason code for the appeasement

additionalInfo
string

Optional additional information about the appeasement

Responses

Request samples

Content type
application/json
{
  • "input": {
    },
  • "reasonCode": "string",
  • "additionalInfo": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Create a replacement

Create a new replacement for an order

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
marketKey
required
string

The market key for the order

siteKey
required
string

The site key for the order

locale
required
string

The locale for the request

header Parameters
idempotency-key
required
string

Idempotency key to ensure the request is processed only once

Request Body schema: application/json
required
required
object

The details of the items to replacement

Responses

Request samples

Content type
application/json
{
  • "replacementDraft": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Generate a return summary

Generate a summary for creating a new return

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Price a return summary

Price a summary for creating a new return

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Request Body schema: application/json
required
required
object

The details of the items to price for a return refund

Responses

Request samples

Content type
application/json
{
  • "returnLineItemQuantities": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get appeasement summary

Get a summary for creating a new appeasement

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Request Body schema: application/json
type
required
string
Enum: "PERCENTAGE" "AMOUNT"
value
required
number
lineItemIds
required
Array of strings
includeShipping
required
boolean

Responses

Request samples

Content type
application/json
{
  • "type": "PERCENTAGE",
  • "value": 0,
  • "lineItemIds": [
    ],
  • "includeShipping": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Generate a replacement summary

Generate a summary for creating a new replacement

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Set a return as manually refunded

Sets a return as manually refunded by recording transaction details. This endpoint is used when a return has been refunded outside of the normal automated process and needs to be marked as such in the system.

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number

returnKey
required
string

The return key

query Parameters
siteKey
required
string

Site key

locale
required
string

Locale

Request Body schema: application/json
required
transactionRef
string

Optional reference to the external transaction

transactionNotes
required
string

Notes about the manual refund transaction

Responses

Request samples

Content type
application/json
{
  • "transactionRef": "string",
  • "transactionNotes": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get returns by order number

Retrieves all returns associated with a specific order number. This endpoint allows filtering and retrieving return information for a given order.

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number to get returns for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "context": {
    },
  • "metrics": {
    }
}

Get a specific return by order number and return key

Retrieves a specific return using the order number and return key. This endpoint provides detailed information about a single return associated with an order.

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number

returnKey
required
string

The return key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Cancel an order by id

Cancel an order by id

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

Request Body schema: application/json
required

Payload for cancelling an order by id

code
required
string

Reason code

detail
required
string

Details about the cancellation reason

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "detail": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get an order by order number

Get an order by order number

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get my orders

Get a collection of the customer's orders.

Authorizations:
1.0.0-order_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

page
required
string

The page of the orders to get starting from 0. Related to the page-size, for example with page-size set to 5, page 1 will get orders 6-10.

page-size
required
string

The page size of the returned data

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Health check information for the orders service

Health check information for the orders service

Authorizations:
1.0.0-order_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

return

Returns related operations

Create a return

Create a new return for an order

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key for the order

locale
required
string

The locale for the request

header Parameters
idempotency-key
required
string

Idempotency key to ensure the request is processed only once

Request Body schema: application/json
required
required
object

The details of the items to return

Responses

Request samples

Content type
application/json
{
  • "returnDraft": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Generate a return summary

Generate a summary for creating a new return

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Price a return summary

Price a summary for creating a new return

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Request Body schema: application/json
required
required
object

The details of the items to price for a return refund

Responses

Request samples

Content type
application/json
{
  • "returnLineItemQuantities": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Set a return as manually refunded

Sets a return as manually refunded by recording transaction details. This endpoint is used when a return has been refunded outside of the normal automated process and needs to be marked as such in the system.

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number

returnKey
required
string

The return key

query Parameters
siteKey
required
string

Site key

locale
required
string

Locale

Request Body schema: application/json
required
transactionRef
string

Optional reference to the external transaction

transactionNotes
required
string

Notes about the manual refund transaction

Responses

Request samples

Content type
application/json
{
  • "transactionRef": "string",
  • "transactionNotes": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get returns by order number

Retrieves all returns associated with a specific order number. This endpoint allows filtering and retrieving return information for a given order.

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number to get returns for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "context": {
    },
  • "metrics": {
    }
}

Get a specific return by order number and return key

Retrieves a specific return using the order number and return key. This endpoint provides detailed information about a single return associated with an order.

Authorizations:
1.0.0-order_api_key
path Parameters
orderNumber
required
string

The order number

returnKey
required
string

The return key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

replacement

Replacements related operations

Create a replacement

Create a new replacement for an order

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
marketKey
required
string

The market key for the order

siteKey
required
string

The site key for the order

locale
required
string

The locale for the request

header Parameters
idempotency-key
required
string

Idempotency key to ensure the request is processed only once

Request Body schema: application/json
required
required
object

The details of the items to replacement

Responses

Request samples

Content type
application/json
{
  • "replacementDraft": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Generate a replacement summary

Generate a summary for creating a new replacement

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

appeasement

Appeasements related operations

Create an appeasement

Creates an appeasement for an order. An appeasement is a refund without requiring physical items to be returned.

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

query Parameters
siteKey
required
string

The site key for the order

locale
required
string

The locale for the request

header Parameters
idempotency-key
required
string

Idempotency key to ensure the request is processed only once

Request Body schema: application/json
required
required
object (1.0.0-order_appeasement-calculation-input)
reasonCode
required
string

The reason code for the appeasement

additionalInfo
string

Optional additional information about the appeasement

Responses

Request samples

Content type
application/json
{
  • "input": {
    },
  • "reasonCode": "string",
  • "additionalInfo": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get appeasement summary

Get a summary for creating a new appeasement

Authorizations:
1.0.0-order_api_key
path Parameters
id
required
string

The resource id

Request Body schema: application/json
type
required
string
Enum: "PERCENTAGE" "AMOUNT"
value
required
number
lineItemIds
required
Array of strings
includeShipping
required
boolean

Responses

Request samples

Content type
application/json
{
  • "type": "PERCENTAGE",
  • "value": 0,
  • "lineItemIds": [
    ],
  • "includeShipping": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

subscription

Get a subscription by id

Get a subscription by id

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update the subscription cart's recurrence_policy

Update the subscription cart's recurrence_policy

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
subscriptionId
string
subscriptionPlanType
string
Enum: "POSTPAY" "PREPAY" "RECURRING"
recurrencePolicyId
string
nextOrderAt
string

Responses

Request samples

Content type
application/json
{
  • "subscriptionId": "string",
  • "subscriptionPlanType": "POSTPAY",
  • "recurrencePolicyId": "string",
  • "nextOrderAt": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Remove a group from a customer's subscription's template cart

Remove a group from a customer's subscription's template cart

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

groupId
required
string

The ID of a contact lens group in a cart

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Pause the subscription

Pause the subscription

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Resume the subscription

Resume the subscription

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Cancel the subscription

Cancel the subscription

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

Payload for cancelling a subscription by id.

code
required
string

Reason code

detail
required
string

Detail about the cancellation reason

paymentMethodId
string

Identifier of the payment method to settle outstanding balance

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "detail": "string",
  • "paymentMethodId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Retry the subscription payment

Retry the subscription payment

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get my subscription

Get my subscription

Authorizations:
1.0.0-order_api_key
query Parameters
customerId
required
string

The id of the customer

siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get my subscriptions

Get my subscriptions

Authorizations:
1.0.0-order_api_key
query Parameters
customerId
required
string

The id of the customer

siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "context": {
    },
  • "metrics": {
    }
}

Remove a group from a subscription's template cart

Remove a group from a subscription's template cart

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

groupId
required
string

The ID of a contact lens group in a cart

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Pause the subscription

Pause the subscription

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Resume the subscription

Resume the subscription

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Cancel the subscription

Cancel the subscription

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
required

Payload for cancelling a subscription by id.

code
required
string

Reason code

detail
required
string

Detail about the cancellation reason

paymentMethodId
string

Identifier of the payment method to settle outstanding balance

Responses

Request samples

Content type
application/json
{
  • "code": "string",
  • "detail": "string",
  • "paymentMethodId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Retry the subscription payment

Retry the subscription payment

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update subscription's payment method

Update subscription's payment method

Authorizations:
1.0.0-order_api_key
path Parameters
subscriptionId
required
string

The ID of the subscription

query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

header Parameters
specsavers-customer-auth
required
string

The JWT authorisation token known to commercetools for the customer session

Request Body schema: application/json
paymentMethodId
string

Responses

Request samples

Content type
application/json
{
  • "paymentMethodId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update upcoming orders

Update upcoming orders

Authorizations:
1.0.0-order_api_key

Responses

Health check information for the subscriptions service

Health check information for the subscriptions service

Authorizations:
1.0.0-order_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

inventory

Related to inventory service

Get inventory for specific skus

Retrieves inventory for a list of skus provided based on site and optionally delivery country. You can also specify whether to avoid the cache when retrieving inventory information.

Note that although this is a POST request, nothing is created on the server. The POST verb is used because the request body is large and the GET verb has a limit on the size of the request body.

Authorizations:
1.0.0-inventory_api_key
Request Body schema: application/json
required

The payload schema describes the information required to retrieve inventory.

required
Array of objects

List of skus to retrieve inventory information for.

siteKey
required
string

The id of the site to retrieve sku inventory for e.g. specsavers-gb

deliveryCountryCode
string

The code of the country the sku will be delivered to. e.g. FR

live
required
boolean

If true, retrieve inventory from source system, otherwise check for a cached value first

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "siteKey": "specsavers-gb",
  • "deliveryCountryCode": "GB",
  • "live": true
}

Response samples

Content type
application/json
{
  • "data": { }
}

Get inventory for all skus

Retrieves inventory for all skus. Optionally filtered by the query parameters siteKey or fulfilmentCountryCode

Results can be paged using the query parameter limit along with a cursor using before or after query parameter.

Authorizations:
1.0.0-inventory_api_key
query Parameters
siteKey
required
string

The site key

limit
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

before
string <= 10000

Cursor to retrieve results before.

after
string

Cursor to retrieve results after.

fulfilmentCountryCode
required
string

The code of the country the sku will be fulfilled from. e.g. GB

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get inventory for sku

Retrieves inventory for a single sku provided based on specified parameters. You can also specify whether to avoid the cache when retrieving inventory information.

Authorizations:
1.0.0-inventory_api_key
path Parameters
sku
required
string

The id of the sku to retrieve inventory information for.

query Parameters
siteKey
required
string

The site key

fulfilmentCountryCode
required
string

The code of the country the sku will be fulfilled from. e.g. GB

deliveryCountryCode
string

The code of the country the sku will be delivered to. e.g. FR

live
required
boolean

If true, retrieve inventory from source system, otherwise check for a cached value first

Responses

Response samples

Content type
application/json
{
  • "data": { }
}

Health check information for the inventory service

The health endpoint.

Authorizations:
1.0.0-inventory_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

urls

URL service related operations

Returns all URLs for the given site key and locale

Returns all URLs for the given site key and locale.

Results can be paged using the query parameter limit along with an optional cursor of before or after.

Authorizations:
1.0.0-url_api_key
query Parameters
siteKey
required
string

The site key

locale
required
string

The ISO locale code

limit
required
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

before
required
string <= 10000

Cursor to retrieve results before.

after
required
string

Cursor to retrieve results after.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Returns URL info for specific items

Returns URL info for specific items.

Note that although this is a POST request, nothing is created on the server. The POST verb is used because the request body is potentially large and the GET verb has a limit on the size of the request body.

Authorizations:
1.0.0-url_api_key
Request Body schema: application/json
required

The payload schema describes the information required to retrieve URL info for multiple items.

Array
type
required
string

The type of the asset being looked up

key
required
string

The key of the asset being looked up

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Returns all the assets data for the given asset type

Returns all the assets data for the given asset type

Results can be paged using the query parameter limit along with an optional cursor of before or after.

Authorizations:
1.0.0-url_api_key
path Parameters
type
required
string
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "health-fund-page" "health-page" "home-page" "offer-page" "product" "product-listing-page" "store"

The asset type to retrieve

query Parameters
limit
required
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

before
required
string <= 10000

Cursor to retrieve results before.

after
required
string

Cursor to retrieve results after.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Returns the asset data for the asset type and key

Returns the asset data for the asset type and key

Authorizations:
1.0.0-url_api_key
path Parameters
type
required
string
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "health-fund-page" "health-page" "home-page" "offer-page" "product" "product-listing-page" "store"

The asset type to retrieve

key
required
string

The resource key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Returns all the assets data for the given asset group type

Returns all the assets data for the given asset group type

Results can be paged using the query parameter limit along with an optional cursor of before or after.

Authorizations:
1.0.0-url_api_key
path Parameters
group-type
required
string
Enum: "content" "catalog"

The asset group type to retrieve

query Parameters
limit
required
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

before
required
string <= 10000

Cursor to retrieve results before.

after
required
string

Cursor to retrieve results after.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Returns the URL data for the given site and locale

Returns the URL data for the given site and locale

Authorizations:
1.0.0-url_api_key
path Parameters
siteKey
required
string

The key of the site for delivery options

locale
required
string

The ISO locale code

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Returns the URL data for the given site, locale and path

Returns the URL data for the given site, locale and path

Authorizations:
1.0.0-url_api_key
path Parameters
siteKey
required
string

The key of the site for delivery options

locale
required
string

The ISO locale code

*
string

The wildcard should be the path of page to retrieve

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Returns the list of valid asset types

Returns the list of valid asset types

Authorizations:
1.0.0-url_api_key

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "metrics": {
    },
  • "context": {
    }
}

Health check information for the URL service

Health check information for the URL service

Authorizations:
1.0.0-url_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Check if URLs already exists for asset

Checks whether URLs exist for the specified asset type and key

Checks the current and pending URLs for an Asset and determines if the pending URL is a duplicate

Authorizations:
1.0.0-url_api_key
path Parameters
type
required
string
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "health-fund-page" "health-page" "home-page" "offer-page" "product" "product-listing-page" "store"

The asset type to retrieve

key
required
string

The resource key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

catalog

Catalog related api

Get URL info by key for product or category

Return url info for a specific category or product.

Authorizations:
1.0.0-catalog_api_key
path Parameters
key
required
string

The resource key

assetType
required
string
Enum: "product" "category"

The type of the asset

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get all the url-infos

Return url info for all categories and products. Supports pagination

Authorizations:
1.0.0-catalog_api_key
query Parameters
limit
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

after
string

Cursor to retrieve results after.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get product by product key

Supports a number of views

Use locale to retrieve the product in a particular locale. If locale is not set it returns the product in all the supported locales.

Use siteKey to retrieve the product for a specific site, if the siteKey is not in the includedInStore property then 404 is returned.

Use projections to control the volume of data returned, multiple projections can be specified: summary - returns the product details (summary is always returned, but use this to only return the summary) skus - returns the variants of the product, can take longer for products with large numbers of variants matrix - returns a concisely formatted version of the variant information, use when volumes of potential skus is very high

Use filters to control filtering of products searchable, sellable and browsable. Multiple filters can be specified: isSearchable - limits to products defined as searchable in product data isSellableOnWeb - limits to products defined as sellable online in product data isBrowsable - limits to products defined as browsable in product data

Authorizations:
1.0.0-catalog_api_key
path Parameters
key
required
string

The resource key

query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

currencyCode
string

Used in retrieving sku prices, requested currency code

customerGroup
string

Used in retrieving sku prices, Customer group identiifier

customerId
string

Used in retrieving sku prices, Customer ID

filters
string
Example: filters='isBrowsable,isSearchable,isSellableOnWeb'

Comma separated string of filters to apply to the products, valid values are 'isBrowsable', 'isSellableOnWeb', 'isSearchable'

priceChannelKey
string

Used in retrieving sku prices,, Key of the price channel / site

projections
string
Example: projections='summary,skus,matrix'

Comma separated string containing product projections. Valid projections 'summary', 'matrix', 'skus', 'prices'

object

Nested projection attributes used to reduce the attributes returned for a projection. Note the projection specified in the key should match a projection specified in the projection query param. Example: projectionAttributes[skus]=sku,labcode&projectionAttributes[prices]=centAmount

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get product by a product sku

Supports a number of views

Use locale to retrieve the product in a particular locale. If locale is not set it returns the product in all the supported locales.

Use siteKey to retrieve the product for a specific site, if the siteKey is not in the includedInStore property then 404 is returned.

Use projections to control the volume of data returned, multiple projections can be specified: summary - returns the product details (summary is always returned, but use this to only return the summary) skus - returns the variants of the product, can take longer for products with large numbers of variants matrix - returns a concisely formatted version of the variant information, use when volumes of potential skus is very high

Use filters to control filtering of products searchable, sellable and browsable. Multiple filters can be specified: isSearchable - limits to products defined as searchable in product data isSellableOnWeb - limits to products defined as sellable online in product data isBrowsable - limits to products defined as browsable in product data

Authorizations:
1.0.0-catalog_api_key
path Parameters
key
required
string

The resource key

query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

currencyCode
string

Used in retrieving sku prices, requested currency code

customerGroup
string

Used in retrieving sku prices, Customer group identiifier

customerId
string

Used in retrieving sku prices, Customer ID

filters
string
Example: filters='isBrowsable,isSearchable,isSellableOnWeb'

Comma separated string of filters to apply to the products, valid values are 'isBrowsable', 'isSellableOnWeb', 'isSearchable'

priceChannelKey
string

Used in retrieving sku prices,, Key of the price channel / site

projections
string
Example: projections='summary,skus,matrix'

Comma separated string containing product projections. Valid projections 'summary', 'matrix', 'skus', 'prices'

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get product SKUS by product key

Supports a number of views

Use locale to retrieve the product skus in a particular locale. If locale is not set it returns the product in all the supported locales.

Use siteKey to retrieve the product skus for a specific site, if the siteKey is not in the includedInStore property then 404 is returned.

Authorizations:
1.0.0-catalog_api_key
path Parameters
productKey
required
string

The product key

query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

currencyCode
string

Used in retrieving sku prices, requested currency code

customerGroup
string

Used in retrieving sku prices, Customer group identiifier

customerId
string

Used in retrieving sku prices, Customer ID

filters
string
Example: filters='isBrowsable,isSearchable,isSellableOnWeb'

Comma separated string of filters to apply to the products, valid values are 'isBrowsable', 'isSellableOnWeb', 'isSearchable'

priceChannelKey
string

Used in retrieving sku prices,, Key of the price channel / site

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "context": {
    },
  • "metrics": {
    }
}

Get product sku by product and sku key

Supports a number of filters

Use locale to retrieve the product in a particular locale. If locale is not set it returns the product in all the supported locales.

Use siteKey to retrieve the product for a specific site, if the siteKey is not in the includedInStore property then 404 is returned.

Authorizations:
1.0.0-catalog_api_key
path Parameters
productKey
required
string

The product key

key
required
string

The resource key

query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

currencyCode
string

Used in retrieving sku prices, requested currency code

customerGroup
string

Used in retrieving sku prices, Customer group identiifier

customerId
string

Used in retrieving sku prices, Customer ID

filters
string
Example: filters='isBrowsable,isSearchable,isSellableOnWeb'

Comma separated string of filters to apply to the products, valid values are 'isBrowsable', 'isSellableOnWeb', 'isSearchable'

priceChannelKey
string

Used in retrieving sku prices,, Key of the price channel / site

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Retrieve products

Allows the retrieve of multiple products from the catalog. Utilizes pagination to allow results to be paged.

For performance reasons, if a projection is not specified a default abbreviated version of the product is returned.

Authorizations:
1.0.0-catalog_api_key
query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

limit
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

after
string

Cursor to retrieve results after.

filters
string
Example: filters='isBrowsable,isSearchable,isSellableOnWeb'

Comma separated string of filters to apply to the products, valid values are 'isBrowsable', 'isSellableOnWeb', 'isSearchable'

projections
string
Example: projections='summary,skus,matrix'

Comma separated string containing product projections. Valid projections 'summary', 'matrix', 'skus', 'prices'

type
string
Example: type='frame,accessory'

The product type to filter the products by

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get sku by key

Supports a number of filters

Use locale to retrieve the product in a particular locale. If locale is not set it returns the product in all the supported locales.

Use siteKey to retrieve the product for a specific site, if the siteKey is not in the includedInStore property then 404 is returned.

Authorizations:
1.0.0-catalog_api_key
path Parameters
key
required
string

The resource key

query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

currencyCode
string

Used in retrieving sku prices, requested currency code

customerGroup
string

Used in retrieving sku prices, Customer group identiifier

customerId
string

Used in retrieving sku prices, Customer ID

filters
string
Example: filters='isBrowsable,isSearchable,isSellableOnWeb'

Comma separated string of filters to apply to the products, valid values are 'isBrowsable', 'isSellableOnWeb', 'isSearchable'

priceChannelKey
string

Used in retrieving sku prices,, Key of the price channel / site

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get all category summaries

Get all the categories

Authorizations:
1.0.0-catalog_api_key
query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

limit
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

after
string

Cursor to retrieve results after.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get category by key

Retrieve the category using a key.

You can request a category for a specific locale and site/store.

Authorizations:
1.0.0-catalog_api_key
path Parameters
key
required
string

The resource key

query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

Responses

Response samples

Content type
application/json
Example
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Get product-type by key

Retrieve the product-type using a key.

Authorizations:
1.0.0-catalog_api_key
path Parameters
key
required
string

The resource key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get the frame configuration

Get the frame configuration

Authorizations:
1.0.0-catalog_api_key
query Parameters
locale
string

The ISO locale code

siteKey
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Health check information for the catalog service

Health check information for the catalog service

Authorizations:
1.0.0-catalog_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

content

Content related operations

Get component by id

Get the component for the given id

Authorizations:
1.0.0-content_api_key
path Parameters
id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Get page by site, type and key

Gets the page based on site, content type and key

Authorizations:
1.0.0-content_api_key
path Parameters
siteKey
required
string

The key of the site for delivery options

key
required
string

The resource key

pageType
required
string (PageType)
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "home-page" "health-fund-page" "health-page" "offer-page" "product-listing-page" "product" "site"

The content page type

query Parameters
locale
string

The ISO locale code

isPreview
boolean

If set to true, this is for preview environment

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get site content by site key

Get the site content for the site key specified

Authorizations:
1.0.0-content_api_key
path Parameters
siteKey
required
string

The key of the site for delivery options

query Parameters
locale
string

The ISO locale code

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Returns URL info objects for all URLs

Returns URL info objects for all URLs

Authorizations:
1.0.0-content_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Returns URL info for a given asset type

Returns URL info for a given asset type

Authorizations:
1.0.0-content_api_key
path Parameters
pageType
required
string (PageType)
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "home-page" "health-fund-page" "health-page" "offer-page" "product-listing-page" "product" "site"

The content page type

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Returns the URL info object for a specific asset

The type and key parameters must uniquely identify an asset

Authorizations:
1.0.0-content_api_key
path Parameters
pageType
required
string (PageType)
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "home-page" "health-fund-page" "health-page" "offer-page" "product-listing-page" "product" "site"

The content page type

key
required
string

The resource key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get page content search view by site, type and key

Gets the page view based on site, content type and key

Authorizations:
1.0.0-content_api_key
path Parameters
siteKey
required
string

The key of the site to retrieve content for

locale
required
string

The ISO locale code

key
required
string

The resource key

pageType
required
string (PageType)
Enum: "blog-news-page" "brand-page" "category-page" "collection-page" "content-page" "home-page" "health-fund-page" "health-page" "offer-page" "product-listing-page" "product" "site"

The content page type

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Health check information for the content service

The health endpoint.

Authorizations:
1.0.0-content_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Health check information for the Contentful webhook ingest service

The health endpoint.

Authorizations:
1.0.0-content_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

contentful

Handles a Contentful Webhook request

Handles a Contentful Webhook request

Authorizations:
1.0.0-content_api_key

Responses

Response samples

Content type
application/json
{
  • "context": {
    },
  • "metrics": {
    }
}

config

Retrieve system configuration information

Health check information for the config service

Health check information for the config service

Authorizations:
1.0.0-config_api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get site configuration by site key

Get the configuration for a site by site key

Authorizations:
1.0.0-config_api_key
path Parameters
siteKey
string

The key of the site for delivery options

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

auth-introspection

Introspect JWT tokens

Auth Introspect

Introspect the JWT token. Verify the token and return verified data.

Authorizations:
1.0.0-auth-introspection_api_key
Request Body schema: application/json

The JWT token to introspect

token
required
string

Responses

Request samples

Content type
application/json
{
  • "token": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

auth

All authentication related calls, such as login, register etc.

Health check information for the auth service

Health check information for the auth service

Authorizations:
1.0.0-auth_bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Login as an anonymous customer

Automatically generates a JWT for an anonymous customer

Authorizations:
1.0.0-auth_bearerAuth
query Parameters
siteKey
required
string

The site key

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Logout of authorisation

Logs the user out so no further authorised transactions can be performed with the provided token

Authorizations:
1.0.0-auth_bearerAuth
cookie Parameters
refreshToken
string

The JWT token to be refreshed

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "metrics": {
    },
  • "context": {
    }
}

Refresh token

Refreshes the token supplied in the request cookie. If successful the returned cookie will contain the refreshed token.

Authorizations:
1.0.0-auth_bearerAuth
cookie Parameters
refreshToken
required
string

The JWT token to be refreshed

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Register a new user

Register a user

Authorizations:
1.0.0-auth_x-api-secret
query Parameters
siteKey
required
string

The site key

header Parameters
anonymousId
string

The anonymousId of the customer before registering

Request Body schema: application/json
email
required
string
password
required
string
title
required
string
firstName
required
string
lastName
required
string
nationalHealthId
string
dateOfBirth
required
string
gender
required
string
phoneNumber
required
string
marketingOptIn
required
boolean

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "title": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "nationalHealthId": "string",
  • "dateOfBirth": "string",
  • "gender": "string",
  • "phoneNumber": "string",
  • "marketingOptIn": true
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Update the customer email

Update the customer email

Authorizations:
1.0.0-auth_x-api-secret
query Parameters
siteKey
required
string

The site key

Request Body schema: application/json
email
required
string
commercetoolsId
required
string

Responses

Request samples

Content type
application/json
{
  • "email": "string",
  • "commercetoolsId": "string"
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

precisely

Precisely Auth API

Health check information for the precisely service

Health check information for the precisely service

Authorizations:
1.0.0-precisely_bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Login to the precisely account

Login to the precisely account

Authorizations:
1.0.0-precisely_bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Health check information for the precisely service

Health check information for the precisely service

Authorizations:
1.0.0-precisely_bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Login to the precisely account

Login to the precisely account

Authorizations:
1.0.0-precisely_bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

rendergraph

Retrieve page and component data for rendering in the UI

Health check information for the Render Graph service

Health check information for the Render Graph service

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get a page by URL

Retrieve a render graph page for a give site, locale and URL

path Parameters
siteKey
required
string

The key of the site for delivery options

locale
required
string

The ISO locale code

url
required
string

The url of page to retrieve

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get a component by ID

Retrieve a component for a give site and locale by ID

path Parameters
siteKey
required
string

The key of the site for delivery options

locale
required
string

The ISO locale code

id
required
string

The resource id

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get a site asset

Retrieves a site asset for the given site key and locale

path Parameters
siteKey
required
string

The key of the site for delivery options

locale
required
string

The ISO locale code

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}

Get all site locale/key info

Retrieves the key and locales for all sites

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "context": {
    },
  • "metrics": {
    }
}

customer-service-config

Retrieve customer service config information

Health check information for the customer service config API

Health check information for the customer service config API

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Customer service configuration for a particular site and locale

Customer service configuration for a particular site and locale

path Parameters
siteKey
required
string

The key of the site for delivery options

locale
required
string

The ISO locale code

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "context": {
    },
  • "metrics": {
    }
}