Download OpenAPI specification:
Customer related service API
| customerId required | string Customer ID |
| siteKey | string The site key |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}A subset of customer info is returned based on a search query
| query required | string Search query string |
| siteKey required | string The site key |
| locale | string The ISO locale code |
{- "data": [
- {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "Mr",
- "firstName": "Test",
- "lastName": "Shopper",
- "dateOfBirth": "1980-01-04",
- "billingAddresses": [ ],
- "deliveryAddresses": [ ],
- "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb"
}, - {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a2",
- "email": "test2@shopper.com",
- "title": "Mr",
- "firstName": "Test",
- "lastName": "Shopper",
- "dateOfBirth": "1980-01-05",
- "billingAddresses": [ ],
- "deliveryAddresses": [ ],
- "createdAt": "2024-07-02T12:00:00Z",
- "registeredOnSite": "specsavers-gb"
}
], - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}A subset of customer info is returned based on exact field matching
| siteKey required | string The site key |
| marketKey required | string The market key |
| firstName | string The customer first name to search for |
| lastName | string The customer last name to search for |
| phoneNumber | string The customer phone number to search for |
string The customer email to search for | |
| dateOfBirth | string The customer date of birth to search for. Must be in YYYY-MM-DD format |
| postcode | string The customer postal code to search for |
| nationalHealthId | string The customer national health id to search for |
{- "data": [
- {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "Mr",
- "firstName": "Test",
- "lastName": "Shopper",
- "dateOfBirth": "1980-01-04",
- "billingAddresses": [ ],
- "deliveryAddresses": [ ],
- "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb"
}, - {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a2",
- "email": "test2@shopper.com",
- "title": "Mr",
- "firstName": "Test",
- "lastName": "Shopper",
- "dateOfBirth": "1980-01-05",
- "billingAddresses": [ ],
- "deliveryAddresses": [ ],
- "createdAt": "2024-07-02T12:00:00Z",
- "registeredOnSite": "specsavers-gb"
}
], - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update profile fields for a customer identified by ID
| customerId required | string <uuid> ^[0-9a-fA-F-]{36}$ Customer ID |
| siteKey required | string The site key |
| locale required | string The ISO locale code |
| marketKey required | string The market key |
Partial profile update payload
| title | string |
| firstName | string |
| lastName | string |
| dateOfBirth | string <date> |
| phoneNumber | string |
string <email> |
{- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "2019-08-24",
- "phoneNumber": "string",
- "email": "user@example.com"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update the email address for a customer identified by ID
| customerId required | string Customer ID |
| siteKey required | string The site key |
Email update payload
| email required | string <email> The new email address |
{- "email": "user@example.com"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Add an activity log entry for a customer (colleague route)
| customerId required | string Customer ID |
| siteKey required | string The site key |
| idempotency-key required | string Ensures idempotency |
Activity payload
| detail required | string Activity detail text |
| channel | string Enum: "online" "instore" "customer-service" The channel where the activity occurred |
{- "detail": "string",
- "channel": "online"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update a customer's payment method by ID (colleague route)
| customerId required | string Customer ID |
| paymentMethodId required | string Payment method id |
| siteKey required | string The site key |
| idempotency-key required | string Ensures idempotency |
Payment method update payload
| holderName required | string Cardholder name |
object (address-draft) |
{- "holderName": "string",
- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Remove a customer's payment method by ID (colleague route)
| customerId required | string Customer ID |
| paymentMethodId required | string Payment method id |
| siteKey required | string The site key |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Add a delivery address to a customer (colleague route)
| customerId required | string <uuid> ^[0-9a-fA-F-]{36}$ Customer ID |
| siteKey required | string The site key |
| idempotency-key required | string Ensures idempotency |
Delivery address payload
| isDefault required | boolean Whether this should be the default delivery address |
required | object (address-draft) |
{- "isDefault": true,
- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Edit a customer's delivery address (colleague route)
| customerId required | string <uuid> ^[0-9a-fA-F-]{36}$ Customer ID |
| addressId required | string Address id |
| siteKey required | string The site key |
| idempotency-key required | string Ensures idempotency |
Delivery address update payload
| isDefault required | boolean Whether this should be the default delivery address |
required | object (address-draft) |
{- "isDefault": true,
- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Remove a customer's delivery address (colleague route)
| customerId required | string Customer ID |
| addressId required | string Address id |
| siteKey required | string The site key |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Set a delivery address as the default for a customer (colleague route)
| customerId required | string Customer ID |
| addressId required | string Address id |
| siteKey required | string The site key |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}The customer details are returned matching the provided customer token and site key
| marketKey required | string The market key |
| specsavers-customer-auth required | string The customer token |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update the current customer's profile fields
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
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 |
{- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "nationalHealthId": "string",
- "dateOfBirth": "string",
- "gender": "string",
- "phoneNumber": "string"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Add a new address to the current customer's profile
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
| idempotency-key required | string Ensures idempotency |
The payload schema describes the information required to add an address to the customer's profile
required | object (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 |
{- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}, - "isBilling": true,
- "isDelivery": true,
- "isDefaultBilling": true,
- "isDefaultDelivery": true
}{- "data": {
- "customer": {
- "id": "string",
- "email": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "billingAddresses": [
- {
- "id": "string",
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}
], - "deliveryAddresses": [
- {
- "id": "string",
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "lastGlassesOrderId": "string",
- "lastContactLensesOrderId": "string",
- "defaultDeliveryAddressId": "string",
- "defaultBillingAddressId": "string",
- "nationalHealthId": "string",
- "gender": "string",
- "registeredOnSite": "string",
- "phoneNumber": "string",
- "dateOfBirth": "string",
- "storedPaymentMethods": [
- {
- "isVerified": true,
- "id": "string",
- "billingAddress": {
- "id": "string",
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}, - "type": "string",
- "name": "string",
- "brand": "string",
- "lastModifiedAt": "2019-08-24T14:15:22Z",
- "shopperEmail": "string",
- "shopperReference": "string",
- "isDefault": true,
- "supportsSubscriptions": true,
- "isLinkedToActiveSubscription": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUsedAt": "2019-08-24T14:15:22Z",
- "issuerName": "string",
- "lastFour": "string",
- "expiryMonth": 0,
- "expiryYear": 0,
- "holderName": "string",
- "isExpired": true,
- "state": "string",
- "nickname": "string",
- "token": "string"
}
], - "aftercareStore": {
- "id": "string",
- "name": "string",
- "slug": "string",
- "lineOfBusiness": "OPTICAL",
- "coordinates": {
- "latitude": "string",
- "longitude": "string"
}, - "contactInfo": {
- "phone": "string",
- "email": "string"
}, - "address": {
- "line1": "string",
- "line2": "string",
- "line3": "string",
- "city": "string",
- "region": "string",
- "postcode": "string",
- "country": "string",
- "formattedAddress": "string"
}
}
}, - "addressId": "string"
}, - "context": {
- "siteKey": "specsavers-gb",
- "build": {
- "env": "dev",
- "releaseId": "911",
- "commitId": "3d13f3c6c4f017d66d2a9c16c566ffb11f05f32c"
}
}, - "metrics": {
- "durationMs": 0
}
}Edit an existing address in the current customer's profile
| addressId required | string The ID of the address to edit |
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
| idempotency-key required | string Ensures idempotency |
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 (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 |
{- "addressId": "string",
- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}, - "isBilling": true,
- "isDelivery": true,
- "isDefaultBilling": true,
- "isDefaultDelivery": true
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Remove an address from the current customer's profile
| addressId required | string The ID of the address to remove |
| 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 |
| specsavers-customer-auth required | string The customer token |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Set an address as the default billing and/or delivery address
| addressId required | string The ID of the address to set as default |
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
Default address options
| isDefaultDelivery | boolean Set as default delivery address |
| isDefaultBilling | boolean Set as default billing address |
{- "isDefaultDelivery": true,
- "isDefaultBilling": true
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update the last glasses or contact lenses order ID for the customer
| marketKey required | string The market key |
| specsavers-customer-auth required | string The customer token |
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 |
{- "lastContactLensesOrderId": "string",
- "lastGlassesOrderId": "string"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Add a new payment method to the current customer's wallet
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
Payment method payload
required | object (address-draft) |
| adyenPaymentMethod required | object Adyen payment method details |
object |
{- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}, - "adyenPaymentMethod": { },
- "amount": {
- "centAmount": 0,
- "currencyCode": "string",
- "fractionDigits": 0
}
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update an existing payment method in the customer's wallet
| paymentMethodId required | string The ID of the payment method to update |
| marketKey required | string The market key |
| specsavers-customer-auth required | string The customer token |
Payment method update payload
| holderName | string Cardholder name |
| expiryMonth | integer Expiry month (1-12) |
| expiryYear | integer Expiry year |
object (address-draft) | |
| lastUsedAt | string <date-time> Last time the payment method was used |
{- "holderName": "string",
- "expiryMonth": 0,
- "expiryYear": 0,
- "address": {
- "key": "string",
- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "addressLine1": "string",
- "addressLine2": "string",
- "addressLine3": "string",
- "county": "string",
- "city": "string",
- "postcode": "string",
- "country": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "lastUpdatedAt": "2019-08-24T14:15:22Z"
}, - "lastUsedAt": "2019-08-24T14:15:22Z"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Remove a payment method from the customer's wallet
| paymentMethodId required | string The ID of the payment method to remove |
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Set a payment method as the default for the customer
| paymentMethodId required | string The ID of the payment method to set as default |
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Update the current customer's email address
| marketKey required | string The market key |
| specsavers-customer-auth required | string The customer token |
The payload schema describes the information required to update the customer's email address
| email required | string The email address being set |
{- "email": "string"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Sets the customer's default aftercare store
| marketKey required | string The market key |
| locale required | string The ISO locale code |
| specsavers-customer-auth required | string The customer token |
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 |
{- "aftercareStoreId": "string"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Register a new partial customer account
| siteKey required | string The site key |
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 |
{- "title": "string",
- "firstName": "string",
- "lastName": "string",
- "dateOfBirth": "2019-08-24",
- "phoneNumber": "string",
- "email": "user@example.com",
- "marketingOptIn": false,
- "idpId": "string",
- "anonymousId": "string"
}{- "data": {
- "id": "27272a51-3825-4c41-8dc9-d956870fd7a1",
- "email": "test1@shopper.com",
- "title": "",
- "firstName": "Test",
- "lastName": "Shopper",
- "billingAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "deliveryAddresses": [
- {
- "id": "VEacUDED",
- "key": "1721398689806",
- "title": "Ms",
- "firstName": "Test",
- "lastName": "Shopper",
- "phone": "",
- "email": "",
- "addressLine1": "The Beeches, 16 Lakes Lane",
- "addressLine2": "",
- "addressLine3": "",
- "locality": "",
- "city": "Newport Pagnell",
- "postcode": "MK16 8HP",
- "county": "ABE",
- "country": "GB",
- "isDefault": false
}
], - "createdAt": "2024-07-01T12:00:00Z",
- "registeredOnSite": "specsavers-gb",
- "storedPaymentMethods": [
- {
- "id": "324f74b7-69e8-47bd-9d41-bd83db71b05a",
- "brand": "visa",
- "expiryMonth": 3,
- "expiryYear": 2030,
- "holderName": "visa credit",
- "isDefault": true,
- "lastFour": "6746",
- "nickname": "",
- "billingAddress": {
- "id": "RGPTK1gm",
- "title": "Mr",
- "firstName": "credit",
- "lastName": "visa",
- "addressLine1": "19 East Circular Road",
- "addressLine2": "",
- "addressLine3": "",
- "postcode": "OX25 2BJ",
- "city": "Bicester",
- "county": "",
- "country": "GB"
}
}
]
}, - "metrics": {
- "durationMs": 810.24
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Handle password reset event from identity provider
| siteKey required | string The site key |
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 |
{- "token": "string",
- "commercetoolsId": "string",
- "email": "user@example.com"
}{- "data": {
- "message": "Validation failed",
- "code": "ValidationFailed",
- "errors": [
- "body.address.city is a required field",
- "body.address field has unspecified keys: email"
]
}, - "metrics": {
- "durationMs": 292.11
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}Handle OTP verification event from identity provider
| siteKey required | string The site key |
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 |
{- "commercetoolsId": "string",
- "email": "user@example.com",
- "otpCode": "string"
}{- "data": {
- "message": "Validation failed",
- "code": "ValidationFailed",
- "errors": [
- "body.address.city is a required field",
- "body.address field has unspecified keys: email"
]
}, - "metrics": {
- "durationMs": 292.11
}, - "context": {
- "build": {
- "env": "dev",
- "releaseId": "409",
- "commitId": "aca0a2aa4af5a63f8f2f401792e26f59e7c1fa78"
}
}
}{- "data": {
- "status": "pass",
- "version": "1.0",
- "releaseId": "1234567890",
- "service": "inventory",
- "details": {
- "time": "2023-11-15T12:19:05.737Z",
- "env": "dev",
- "commitId": "368de0fbdff3a5634895d69f8b17cbdfd5e77bfb"
}
}
}