Specsavers Online GraphQL API

This is the GraphQL API for the Specsavers Online application.

Authentication

This API uses either an anonymous JWT Bearer token created via the Auth API, or a JWT Bearer token created by ForgeRock.

API Endpoints
https://api-emea.qa3.rtp.ssdgws.co.uk/online/graphql
Version

1.0.0

Queries

adyenPaymentMethods

Description

Get available payment methods to pay with Adyen The payment object returned will contain a property that defines the available Adyen payment methods data. This can then be used along with the Adyen Web components to start present different Adyen payment Web Components If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns an AdyenPaymentMethods

Arguments
Name Description
browserInfo - AdyenBrowserInfoInput

Example

Query
query adyenPaymentMethods($browserInfo: AdyenBrowserInfoInput) {
  adyenPaymentMethods(browserInfo: $browserInfo) {
    paymentMethods {
      ...AdyenPaymentMethodFragment
    }
    responseString
    storedPaymentMethods {
      ...AdyenStoredPaymentMethodFragment
    }
  }
}
Variables
{"browserInfo": AdyenBrowserInfoInput}
Response
{
  "data": {
    "adyenPaymentMethods": {
      "paymentMethods": [AdyenPaymentMethod],
      "responseString": "xyz789",
      "storedPaymentMethods": [AdyenStoredPaymentMethod]
    }
  }
}

cart

Description

Retrieves the cart for the current customer If the customer hasn't previously added something to their cart (which is the point at which we create the cart), then this will return null. Otherwise, the customer's cart will be returned. If the customer has previously added something to their cart and then removed that item, then a Cart object will be returned, but the lineItems array will be empty. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned.

Response

Returns a Cart

Example

Query
query cart {
  cart {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "cart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

contactLensSubscriptionPrice

Description

Retrieves the subscription prices for a contact lens Product and recurrence policy ID for the Subscribe and Save option. Provide leftEyeQuantity and rightEyeQuantity.

Response

Returns a ContactLensesSubscriptionPrice

Arguments
Name Description
leftEyeQuantity - Int The quantity of boxes for the left eye.
productKey - String! The Product key for the contact lens SKU.
recurrencePolicyId - String The ID of the recurrence policy. This is what drives the frequency of the subscription. Not required for postpay
rightEyeQuantity - Int The quantity of boxes for the right eye.
subscriptionPlanType - String! The subscription plan type (POSTPAY, RECURRING, ...)

Example

Query
query contactLensSubscriptionPrice(
  $leftEyeQuantity: Int,
  $productKey: String!,
  $recurrencePolicyId: String,
  $rightEyeQuantity: Int,
  $subscriptionPlanType: String!
) {
  contactLensSubscriptionPrice(
    leftEyeQuantity: $leftEyeQuantity,
    productKey: $productKey,
    recurrencePolicyId: $recurrencePolicyId,
    rightEyeQuantity: $rightEyeQuantity,
    subscriptionPlanType: $subscriptionPlanType
  ) {
    instalmentPrice {
      ...MoneyFragment
    }
    totalListPrice {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    totalQuantity
  }
}
Variables
{
  "leftEyeQuantity": 987,
  "productKey": "xyz789",
  "recurrencePolicyId": "abc123",
  "rightEyeQuantity": 123,
  "subscriptionPlanType": "xyz789"
}
Response
{
  "data": {
    "contactLensSubscriptionPrice": {
      "instalmentPrice": Money,
      "totalListPrice": Money,
      "totalPrice": Money,
      "totalQuantity": 987
    }
  }
}

facetValues

Description

Retrieves map of facet values to translations.

Response

Returns an Object!

Example

Query
query facetValues {
  facetValues
}
Response
{"data": {"facetValues": Object}}

frameConfiguration

Description

Retrieves the FrameConfiguration object that defines the frame basket builder options.

Response

Returns a FrameConfiguration!

Arguments
Name Description
isSunglasses - Boolean If the frame configuration request is for sunglasses or not. Default = false

Example

Query
query frameConfiguration($isSunglasses: Boolean) {
  frameConfiguration(isSunglasses: $isSunglasses) {
    lensElementsAndTreatments {
      ...LensElementOrTreatmentFragment
    }
  }
}
Variables
{"isSunglasses": false}
Response
{
  "data": {
    "frameConfiguration": {
      "lensElementsAndTreatments": [
        LensElementOrTreatment
      ]
    }
  }
}

healthFundsForCart

Description

Gets the health funds available for the customer's active cart.

Response

Returns [HealthFundPolicies!]

Example

Query
query healthFundsForCart {
  healthFundsForCart {
    key
    policies
  }
}
Response
{
  "data": {
    "healthFundsForCart": [
      {
        "key": "abc123",
        "policies": ["xyz789"]
      }
    ]
  }
}

lastOrderPrescription

Description

Retrieves a Glasses Prescription object on the last order for a given customer id. A null value will be returned if the order or prescription cannot be found. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned.

Response

Returns a LastOrderGlassPrescription

Example

Query
query lastOrderPrescription {
  lastOrderPrescription {
    orderDate
    orderNumber
    prescription {
      ...GlassesPrescriptionFragment
    }
  }
}
Response
{
  "data": {
    "lastOrderPrescription": {
      "orderDate": "xyz789",
      "orderNumber": "xyz789",
      "prescription": GlassesPrescription
    }
  }
}

me

Description

Retrieves the Customer object representing the current account customer Note that this will be null if the customer is an anonymous customer. A Customer object will only be returned for a logged in account customer. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned.

Response

Returns a Customer!

Example

Query
query me {
  me {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Response
{
  "data": {
    "me": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "abc123",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "xyz789",
      "id": "xyz789",
      "lastName": "xyz789",
      "marketingOptIn": true,
      "nationalHealthId": "xyz789",
      "phoneNumber": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

myAnnualOverview

Description

Retrieves the Annual Overview report for the current account customer for a specific year If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned.

Response

Returns a CustomerMyAnnualOverview!

Arguments
Name Description
year - Int!

Example

Query
query myAnnualOverview($year: Int!) {
  myAnnualOverview(year: $year) {
    customer {
      ...CustomerFragment
    }
    overview {
      ...MyAnnualOverviewFragment
    }
  }
}
Variables
{"year": 123}
Response
{
  "data": {
    "myAnnualOverview": {
      "customer": Customer,
      "overview": MyAnnualOverview
    }
  }
}

myAppointments

Description

Retrieves the logged in customer's Appointments

Response

Returns a PagedAppointments

Arguments
Name Description
cursor - Cursor
limit - Int

Example

Query
query myAppointments(
  $cursor: Cursor,
  $limit: Int
) {
  myAppointments(
    cursor: $cursor,
    limit: $limit
  ) {
    items {
      ...AppointmentFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{"cursor": Cursor, "limit": 987}
Response
{
  "data": {
    "myAppointments": {
      "items": [Appointment],
      "pageInfo": PageInfo
    }
  }
}

mySubscription

Description

Retrieves the logged in customer's Subscription object Anull` value will be returned if the subscription cannot be found.

Response

Returns a Subscription

Example

Query
query mySubscription {
  mySubscription {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Response
{
  "data": {
    "mySubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": false,
      "id": "xyz789",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

mySubscriptions

Description

Retrieves the logged in customer's Subscription objects` An empty object will be returned if subscriptions cannot be found.

Response

Returns [Subscription!]

Example

Query
query mySubscriptions {
  mySubscriptions {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Response
{
  "data": {
    "mySubscriptions": [
      {
        "cancellationInfo": SubscriptionCancellationInfo,
        "cart": Cart,
        "createdAt": "2007-12-03T10:15:30Z",
        "customerEmail": "xyz789",
        "customerId": "xyz789",
        "hasFailedPayment": true,
        "id": "abc123",
        "isPausable": true,
        "isReactivatable": false,
        "lastModifiedAt": "2007-12-03T10:15:30Z",
        "lastOrder": Order,
        "nextOrderAt": "2007-12-03T10:15:30Z",
        "originOrderId": "abc123",
        "pausedAt": "abc123",
        "paymentClientStatus": "xyz789",
        "paymentMethod": StoredPaymentMethod,
        "recurringOrderState": "Active",
        "replacementFrequency": "DLY",
        "standardScheduleUnits": "Days",
        "standardScheduleValue": 987,
        "startsAt": "2007-12-03T10:15:30Z"
      }
    ]
  }
}

order

Description

Retrieves an Order object for a given order id A null value will be returned if the order cannot be found. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned.

Response

Returns an Order

Arguments
Name Description
id - String!

Example

Query
query order($id: String!) {
  order(id: $id) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNotesFragment
    }
    customerEmail
    customerId
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isExpressReorderEnabled
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    orderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    workflowState
  }
}
Variables
{"id": "abc123"}
Response
{
  "data": {
    "order": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNotes],
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isExpressReorderEnabled": true,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "orderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money,
      "workflowState": "order_back_ordered"
    }
  }
}

orders

Description

Retrieves a PagedOrders object for the current account customer If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned.

Response

Returns an OrderPagedOrders!

Arguments
Name Description
cursor - String
limit - Int

Example

Query
query orders(
  $cursor: String,
  $limit: Int
) {
  orders(
    cursor: $cursor,
    limit: $limit
  ) {
    items {
      ...OrderFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{"cursor": "abc123", "limit": 123}
Response
{
  "data": {
    "orders": {
      "items": [Order],
      "pageInfo": PageInfo
    }
  }
}

productSelectionOptions

Description

Retrieves the product options for the specified product key

Response

Returns a ProductSelectionOptions

Arguments
Name Description
key - String!

Example

Query
query productSelectionOptions($key: String!) {
  productSelectionOptions(key: $key) {
    allAttributeOptions {
      ...AttributeOptionsFragment
    }
    image {
      ...CatalogImageFragment
    }
    name
    price {
      ...MoneyFragment
    }
    productGroup
    productKey
    productUrl
    variantAttributes {
      ...VariantAttributeFragment
    }
  }
}
Variables
{"key": "xyz789"}
Response
{
  "data": {
    "productSelectionOptions": {
      "allAttributeOptions": [AttributeOptions],
      "image": CatalogImage,
      "name": "xyz789",
      "price": Money,
      "productGroup": "xyz789",
      "productKey": "abc123",
      "productUrl": "abc123",
      "variantAttributes": [VariantAttribute]
    }
  }
}

productVariantOptions

Description

Retrieves the product variant options for the specified product key If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned.

Response

Returns a ProductVariantOptions

Arguments
Name Description
key - String!

Example

Query
query productVariantOptions($key: String!) {
  productVariantOptions(key: $key) {
    allAttributeOptions {
      ...AttributeOptionsFragment
    }
    variantAttributes {
      ...VariantAttributeFragment
    }
  }
}
Variables
{"key": "abc123"}
Response
{
  "data": {
    "productVariantOptions": {
      "allAttributeOptions": [AttributeOptions],
      "variantAttributes": [VariantAttribute]
    }
  }
}

subscription

Description

Retrieves an Subscription object for a given subscription id. A null value will be returned if the subscription cannot be found.

Response

Returns a Subscription

Arguments
Name Description
id - String!

Example

Query
query subscription($id: String!) {
  subscription(id: $id) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"id": "xyz789"}
Response
{
  "data": {
    "subscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "abc123",
      "hasFailedPayment": true,
      "id": "abc123",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "xyz789",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

subscriptionOrders

Description

Retrieves the n latest Orders from aSubscription with given subscription id.

Response

Returns an OrderPagedOrders!

Arguments
Name Description
cursor - String
limit - Int
subscriptionId - String!

Example

Query
query subscriptionOrders(
  $cursor: String,
  $limit: Int,
  $subscriptionId: String!
) {
  subscriptionOrders(
    cursor: $cursor,
    limit: $limit,
    subscriptionId: $subscriptionId
  ) {
    items {
      ...OrderFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "cursor": "xyz789",
  "limit": 123,
  "subscriptionId": "abc123"
}
Response
{
  "data": {
    "subscriptionOrders": {
      "items": [Order],
      "pageInfo": PageInfo
    }
  }
}

Mutations

addAddress

Description

Adds an address to the customer's account One or both of isBilling and isDelivery must be set to true, otherwise a BAD_REQUEST error code will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - AddAddressInput!

Example

Query
mutation addAddress($input: AddAddressInput!) {
  addAddress(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": AddAddressInput}
Response
{
  "data": {
    "addAddress": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "xyz789",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "xyz789",
      "id": "xyz789",
      "lastName": "xyz789",
      "marketingOptIn": true,
      "nationalHealthId": "xyz789",
      "phoneNumber": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

addCard

Description

Add a card to the customer's wallet. If the amount is 0, the card will be tokenised with Adyen, otherwise that step will be skipped (supporting the checkout flow). If the token is invalid, a standard INVALID_INPUT error will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns an AdyenPaymentsResponse

Arguments
Name Description
input - AddCardInput!

Example

Query
mutation addCard($input: AddCardInput!) {
  addCard(input: $input) {
    action {
      ...AdyenActionFragment
    }
    amount {
      ...AdyenMoneyFragment
    }
    paymentId
    resultCode
  }
}
Variables
{"input": AddCardInput}
Response
{
  "data": {
    "addCard": {
      "action": AdyenAction,
      "amount": AdyenMoney,
      "paymentId": "xyz789",
      "resultCode": "xyz789"
    }
  }
}

addContactLensToCart

Description

Add contact lenses to cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - AddContactLensToCartInput!

Example

Query
mutation addContactLensToCart($input: AddContactLensToCartInput!) {
  addContactLensToCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": AddContactLensToCartInput}
Response
{
  "data": {
    "addContactLensToCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

addContactLensToSubscription

Description

Add contact lenses to subscription This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - AddContactLensToSubscriptionInput!

Example

Query
mutation addContactLensToSubscription($input: AddContactLensToSubscriptionInput!) {
  addContactLensToSubscription(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": AddContactLensToSubscriptionInput}
Response
{
  "data": {
    "addContactLensToSubscription": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

addDiscountCodeToCart

Description

Add a discount code to the cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If the discount code is not valid, an INVALID_INPUT error code will be returned. If the discount code is already present in the cart, an DISCOUNT_CODE_ALREADY_APPLIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - AddDiscountCodeToCartInput!

Example

Query
mutation addDiscountCodeToCart($input: AddDiscountCodeToCartInput!) {
  addDiscountCodeToCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": AddDiscountCodeToCartInput}
Response
{
  "data": {
    "addDiscountCodeToCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": true,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

addGlassesToCart

Description

Add glasses to cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - AddGlassesToCartInput!

Example

Query
mutation addGlassesToCart($input: AddGlassesToCartInput!) {
  addGlassesToCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": AddGlassesToCartInput}
Response
{
  "data": {
    "addGlassesToCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": true,
      "isExpressReorder": true,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

addHealthFundToCart

Description

Add a health fund to the cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If the health fund params (healthFund, healthFundPolicy) is not available, an INVALID_INPUT error code will be returned. Also null value is allowed to reset policy If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - AddHealthFundToCartInput!

Example

Query
mutation addHealthFundToCart($input: AddHealthFundToCartInput!) {
  addHealthFundToCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": AddHealthFundToCartInput}
Response
{
  "data": {
    "addHealthFundToCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

adyenAdditionalPaymentDetails

Description

Provide Adyen Payment Details on a payment in the active cart If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Arguments
Name Description
input - AdyenAdditionalPaymentDetailsInput!

Example

Query
mutation adyenAdditionalPaymentDetails($input: AdyenAdditionalPaymentDetailsInput!) {
  adyenAdditionalPaymentDetails(input: $input) {
    action {
      ...AdyenActionFragment
    }
    paymentId
    resultCode
  }
}
Variables
{"input": AdyenAdditionalPaymentDetailsInput}
Response
{
  "data": {
    "adyenAdditionalPaymentDetails": {
      "action": AdyenAction,
      "paymentId": "abc123",
      "resultCode": "abc123"
    }
  }
}

cancelAppointment

Description

Cancels a customer's appointment

Response

Returns an AppointmentCancelled!

Arguments
Name Description
input - CancelAppointmentInput!

Example

Query
mutation cancelAppointment($input: CancelAppointmentInput!) {
  cancelAppointment(input: $input) {
    id
  }
}
Variables
{"input": CancelAppointmentInput}
Response
{
  "data": {
    "cancelAppointment": {"id": "abc123"}
  }
}

cancelCart

Description

Cancel the active cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Example

Query
mutation cancelCart {
  cancelCart {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "cancelCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

cancelMyOrder

Description

Cancels an existing order for the authenticated customer.

The order must be in a Remorse or Pending RX validation state. Once cancelled, no further processing will take place.

If no or invalid JWT is passed in, an ACCESS_DENIED error code will be returned.

When the order cannot be found, you'll receive a NOT_FOUND error code.

When the order cannot be cancelled due to its current state, you'll receive a BAD_REQUEST error code.

If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR error code.

Response

Returns an Order

Arguments
Name Description
input - CancelOrderInput!

Example

Query
mutation cancelMyOrder($input: CancelOrderInput!) {
  cancelMyOrder(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNotesFragment
    }
    customerEmail
    customerId
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isExpressReorderEnabled
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    orderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    workflowState
  }
}
Variables
{"input": CancelOrderInput}
Response
{
  "data": {
    "cancelMyOrder": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNotes],
      "customerEmail": "xyz789",
      "customerId": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isExpressReorderEnabled": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "orderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money,
      "workflowState": "order_back_ordered"
    }
  }
}

cancelSubscription

Description

Cancel the subscription This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If the subscription is canceled already, an INVALID_INPUT error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a SubscriptionWithAdyenResponse!

Arguments
Name Description
input - CancelSubscriptionInput!

Example

Query
mutation cancelSubscription($input: CancelSubscriptionInput!) {
  cancelSubscription(input: $input) {
    adyenResponse {
      ...AdyenPaymentsResponseFragment
    }
    subscription {
      ...SubscriptionFragment
    }
  }
}
Variables
{"input": CancelSubscriptionInput}
Response
{
  "data": {
    "cancelSubscription": {
      "adyenResponse": AdyenPaymentsResponse,
      "subscription": Subscription
    }
  }
}

clearNotifications

Description

Clears the notiications from the active cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Example

Query
mutation clearNotifications {
  clearNotifications {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "clearNotifications": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

completeOrder

Description

Convert the active cart in to an order If successful, the new order will be returned and the active cart will be deleted. If an attempt is made to create a payment when an active cart doesn't exist, then you'll receive a NO_ACTIVE_CART error code. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns an Order!

Arguments
Name Description
input - CompleteOrderInput!

Example

Query
mutation completeOrder($input: CompleteOrderInput!) {
  completeOrder(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNotesFragment
    }
    customerEmail
    customerId
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isExpressReorderEnabled
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    orderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    workflowState
  }
}
Variables
{"input": CompleteOrderInput}
Response
{
  "data": {
    "completeOrder": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNotes],
      "customerEmail": "abc123",
      "customerId": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isExpressReorderEnabled": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "orderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money,
      "workflowState": "order_back_ordered"
    }
  }
}

createAdyenPayment

Description

Create an Adyen Payment on the active cart If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns an AdyenPaymentsResponse!

Arguments
Name Description
input - CreateAdyenPaymentInput!

Example

Query
mutation createAdyenPayment($input: CreateAdyenPaymentInput!) {
  createAdyenPayment(input: $input) {
    action {
      ...AdyenActionFragment
    }
    amount {
      ...AdyenMoneyFragment
    }
    paymentId
    resultCode
  }
}
Variables
{"input": CreateAdyenPaymentInput}
Response
{
  "data": {
    "createAdyenPayment": {
      "action": AdyenAction,
      "amount": AdyenMoney,
      "paymentId": "abc123",
      "resultCode": "abc123"
    }
  }
}

createHICAPSPayment

Description

Create a payment object to pay with HICAPS

Response

Returns a HicapsPaymentSession!

Arguments
Name Description
input - CreateHICAPSPaymentInput!

Example

Query
mutation createHICAPSPayment($input: CreateHICAPSPaymentInput!) {
  createHICAPSPayment(input: $input) {
    redirectUrl
  }
}
Variables
{"input": CreateHICAPSPaymentInput}
Response
{
  "data": {
    "createHICAPSPayment": {
      "redirectUrl": "xyz789"
    }
  }
}

editAddress

Description

Edits an existing address on the customer's account If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - EditAddressInput!

Example

Query
mutation editAddress($input: EditAddressInput!) {
  editAddress(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": EditAddressInput}
Response
{
  "data": {
    "editAddress": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "abc123",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "abc123",
      "gender": "abc123",
      "id": "xyz789",
      "lastName": "xyz789",
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

expressReorder

Description

Creates a new shopping cart from an order.

Retains products (unless they are discontinued) and will populate the addresses for the cart. Any payment method information or deliveries from the order are not copied over, but the preferred payment method will (#TODO Future sprint)

If no or invalid JWT is passed in, an ACCESS_DENIED error code will be returned.

When the order cannot be found, you'll receive an NOT_FOUND code.

When the order has items that are not supported by an express re-order, you'll receive an BAD_REQUEST code.

If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart

Arguments
Name Description
input - ExpressReorderInput!

Example

Query
mutation expressReorder($input: ExpressReorderInput!) {
  expressReorder(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": ExpressReorderInput}
Response
{
  "data": {
    "expressReorder": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

pauseSubscription

Description

Pause the subscription This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If the subscription is paused already, an INVALID_INPUT error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Subscription!

Arguments
Name Description
input - PauseSubscriptionInput!

Example

Query
mutation pauseSubscription($input: PauseSubscriptionInput!) {
  pauseSubscription(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": PauseSubscriptionInput}
Response
{
  "data": {
    "pauseSubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": false,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "abc123",
      "pausedAt": "abc123",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

postponeSubscriptionOrder

Description

Postpone the subscription's next order This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Subscription!

Arguments
Name Description
input - PostponeSubscriptionOrderInput!

Example

Query
mutation postponeSubscriptionOrder($input: PostponeSubscriptionOrderInput!) {
  postponeSubscriptionOrder(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": PostponeSubscriptionOrderInput}
Response
{
  "data": {
    "postponeSubscriptionOrder": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "abc123",
      "hasFailedPayment": false,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

prescriptionUploadInitiated

Description

Indicates that a customer's prescription upload is being added to active cart If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - PrescriptionUploadInitiatedInput!

Example

Query
mutation prescriptionUploadInitiated($input: PrescriptionUploadInitiatedInput!) {
  prescriptionUploadInitiated(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": PrescriptionUploadInitiatedInput}
Response
{
  "data": {
    "prescriptionUploadInitiated": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

removeAddress

Description

Removes an address from the customer's account One or both of isBilling and isDelivery must be set to true, otherwise a BAD_REQUEST error code will be returned. If addressId is blank a BAD_REQUEST error code will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - RemoveAddressInput!

Example

Query
mutation removeAddress($input: RemoveAddressInput!) {
  removeAddress(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": RemoveAddressInput}
Response
{
  "data": {
    "removeAddress": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "xyz789",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "abc123",
      "firstName": "xyz789",
      "gender": "xyz789",
      "id": "abc123",
      "lastName": "abc123",
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

removeBillingAddressFromCart

Description

Remove the billing address from the cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Example

Query
mutation removeBillingAddressFromCart {
  removeBillingAddressFromCart {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "removeBillingAddressFromCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

removeDeliveryAddressFromCart

Description

Remove the delivery address from the cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Example

Query
mutation removeDeliveryAddressFromCart {
  removeDeliveryAddressFromCart {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "removeDeliveryAddressFromCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

removeDiscountCodeFromCart

Description

Remove a discount code from the cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - RemoveDiscountCodeFromCartInput!

Example

Query
mutation removeDiscountCodeFromCart($input: RemoveDiscountCodeFromCartInput!) {
  removeDiscountCodeFromCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": RemoveDiscountCodeFromCartInput}
Response
{
  "data": {
    "removeDiscountCodeFromCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

removePrescriptionUpload

Description

Remove a customer's prescription upload from active cart. If the ID is invalid, a standard INVALID_INPUT error will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - RemovePrescriptionUploadInput!

Example

Query
mutation removePrescriptionUpload($input: RemovePrescriptionUploadInput!) {
  removePrescriptionUpload(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": RemovePrescriptionUploadInput}
Response
{
  "data": {
    "removePrescriptionUpload": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

removeStoredPaymentMethod

Description

Removes the specified stored payment method from the wallet. Requires customer authentication (JWT). Returns ACCESS_DENIED if unauthenticated or unauthorized. Returns UNEXPECTED_ERROR if anything else fails.

Response

Returns a Customer!

Arguments
Name Description
input - RemoveStoredPaymentMethodInput!

Example

Query
mutation removeStoredPaymentMethod($input: RemoveStoredPaymentMethodInput!) {
  removeStoredPaymentMethod(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": RemoveStoredPaymentMethodInput}
Response
{
  "data": {
    "removeStoredPaymentMethod": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "xyz789",
      "defaultBillingAddressId": "abc123",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "xyz789",
      "id": "xyz789",
      "lastName": "xyz789",
      "marketingOptIn": true,
      "nationalHealthId": "abc123",
      "phoneNumber": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

removeSubscriptionCartContactLensGroup

Description

Remove a contact lens group from the subscription's template cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If the site does not support the specified subscription plan type, an INVALID_INPUT error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Subscription!

Arguments
Name Description
input - RemoveSubscriptionCartContactLensGroupInput!

Example

Query
mutation removeSubscriptionCartContactLensGroup($input: RemoveSubscriptionCartContactLensGroupInput!) {
  removeSubscriptionCartContactLensGroup(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": RemoveSubscriptionCartContactLensGroupInput}
Response
{
  "data": {
    "removeSubscriptionCartContactLensGroup": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

resumeSubscription

Description

Resume the paused subscription This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If the subscription is active already, an INVALID_INPUT error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Subscription!

Arguments
Name Description
input - ResumeSubscriptionInput!

Example

Query
mutation resumeSubscription($input: ResumeSubscriptionInput!) {
  resumeSubscription(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": ResumeSubscriptionInput}
Response
{
  "data": {
    "resumeSubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "hasFailedPayment": false,
      "id": "abc123",
      "isPausable": false,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

retrySubscriptionPayment

Description

Retry the subscription's last order payment that failed. Will include the total amount outstanding on any missed instalments. Uses the currently active payment method This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a SubscriptionWithAdyenResponse!

Arguments
Name Description
input - RetryPaymentInput!

Example

Query
mutation retrySubscriptionPayment($input: RetryPaymentInput!) {
  retrySubscriptionPayment(input: $input) {
    adyenResponse {
      ...AdyenPaymentsResponseFragment
    }
    subscription {
      ...SubscriptionFragment
    }
  }
}
Variables
{"input": RetryPaymentInput}
Response
{
  "data": {
    "retrySubscriptionPayment": {
      "adyenResponse": AdyenPaymentsResponse,
      "subscription": Subscription
    }
  }
}

setAftercareStore

Description

Sets the customer's aftercare store choice If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - SetAftercareStoreInput!

Example

Query
mutation setAftercareStore($input: SetAftercareStoreInput!) {
  setAftercareStore(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": SetAftercareStoreInput}
Response
{
  "data": {
    "setAftercareStore": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "abc123",
      "firstName": "abc123",
      "gender": "abc123",
      "id": "xyz789",
      "lastName": "xyz789",
      "marketingOptIn": true,
      "nationalHealthId": "abc123",
      "phoneNumber": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

setAftercareStoreOnCart

Description

Sets the chosen aftercare store on the customer's cart (and also profile) If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - SetAftercareStoreOnCartInput!

Example

Query
mutation setAftercareStoreOnCart($input: SetAftercareStoreOnCartInput!) {
  setAftercareStoreOnCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": SetAftercareStoreOnCartInput}
Response
{
  "data": {
    "setAftercareStoreOnCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

setBillingAddressId

Description

Set the billing address using the id from an address in the customer's address book If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - SetBillingAddressIdInput!

Example

Query
mutation setBillingAddressId($input: SetBillingAddressIdInput!) {
  setBillingAddressId(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": SetBillingAddressIdInput}
Response
{
  "data": {
    "setBillingAddressId": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": true,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

setBillingAddressOnCart

Description

Sets the billing address on the cart and optionally the billing address on the customer's account.

If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned.

If any unexpected errors occur, you'll receive a UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - SetBillingAddressOnCartInput!

Example

Query
mutation setBillingAddressOnCart($input: SetBillingAddressOnCartInput!) {
  setBillingAddressOnCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": SetBillingAddressOnCartInput}
Response
{
  "data": {
    "setBillingAddressOnCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

setDefaultAddress

Description

Sets the default address If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - SetDefaultAddressInput!

Example

Query
mutation setDefaultAddress($input: SetDefaultAddressInput!) {
  setDefaultAddress(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": SetDefaultAddressInput}
Response
{
  "data": {
    "setDefaultAddress": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "abc123",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "abc123",
      "gender": "xyz789",
      "id": "abc123",
      "lastName": "abc123",
      "marketingOptIn": true,
      "nationalHealthId": "abc123",
      "phoneNumber": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

setDeliveryAddressId

Description

Set the delivery address using the id from an address in the customer's address book If billingSameAsDeliveryAddress is true, then the address is used to populate billing address on cart too. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - SetDeliveryAddressIdInput!

Example

Query
mutation setDeliveryAddressId($input: SetDeliveryAddressIdInput!) {
  setDeliveryAddressId(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": SetDeliveryAddressIdInput}
Response
{
  "data": {
    "setDeliveryAddressId": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

setDeliveryAddressIdOnSubscription

Description

Set the delivery address on a subscription using the id from an address in the customer's address book. If billingSameAsDeliveryAddress is true, then the address is used to populate billing address on cart too. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Subscription!

Arguments
Name Description
input - SetDeliveryAddressIdOnSubscriptionInput!

Example

Query
mutation setDeliveryAddressIdOnSubscription($input: SetDeliveryAddressIdOnSubscriptionInput!) {
  setDeliveryAddressIdOnSubscription(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": SetDeliveryAddressIdOnSubscriptionInput}
Response
{
  "data": {
    "setDeliveryAddressIdOnSubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": false,
      "id": "abc123",
      "isPausable": true,
      "isReactivatable": false,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

setDeliveryAddressOnCart

Description

Sets the delivery address on the cart and optionally the billing address on the customer's account.

If billingSameAsDeliveryAddress is true, then delivery is used to populate billing address on cart too.

If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned.

If any unexpected errors occur, you'll receive a UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - SetDeliveryAddressOnCartInput!

Example

Query
mutation setDeliveryAddressOnCart($input: SetDeliveryAddressOnCartInput!) {
  setDeliveryAddressOnCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": SetDeliveryAddressOnCartInput}
Response
{
  "data": {
    "setDeliveryAddressOnCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

setDeliveryAddressOnSubscription

Description

Sets the delivery address on the subscription's cart and optionally the billing address on the customer's account.

If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned.

If any unexpected errors occur, you'll receive a UNEXPECTED_ERROR code.

Response

Returns a Subscription!

Arguments
Name Description
input - SetDeliveryAddressOnSubscriptionInput!

Example

Query
mutation setDeliveryAddressOnSubscription($input: SetDeliveryAddressOnSubscriptionInput!) {
  setDeliveryAddressOnSubscription(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": SetDeliveryAddressOnSubscriptionInput}
Response
{
  "data": {
    "setDeliveryAddressOnSubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

setDeliveryOption

Description

Set the delivery option for the active cart The key passed in must be one retrieved from deliveryOptionsForCart query. If the delivery option doesn't exist, you'll receive a NOT_FOUND error code. If you try and run this mutation without having added something to the cart, you'll receive a NO_ACTIVE_CART error code. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart

Arguments
Name Description
key - String!

Example

Query
mutation setDeliveryOption($key: String!) {
  setDeliveryOption(key: $key) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"key": "xyz789"}
Response
{
  "data": {
    "setDeliveryOption": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

updateCartDeleteGroup

Description

Deletes a group of line items from the cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart

Arguments
Name Description
input - UpdateCartDeleteGroupInput!

Example

Query
mutation updateCartDeleteGroup($input: UpdateCartDeleteGroupInput!) {
  updateCartDeleteGroup(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": UpdateCartDeleteGroupInput}
Response
{
  "data": {
    "updateCartDeleteGroup": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": false,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

updateCartSubscription

Description

Update the cart subscription and one-off modes This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If the subscription plan type is RECURRING, POSTPAY or PREPAY and no recurrencePolicyId is provided, an INVALID_INPUT error code will be returned. If the recurrencePolicyId is invalid, an INVALID_INPUT error code will be returned. If the cart contains non-subscribable items, a INVALID_INPUT error code will be returned. If the site does not support the specified subscription plan type, an INVALID_INPUT error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - UpdateCartSubscriptionInput!

Example

Query
mutation updateCartSubscription($input: UpdateCartSubscriptionInput!) {
  updateCartSubscription(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": UpdateCartSubscriptionInput}
Response
{
  "data": {
    "updateCartSubscription": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "abc123",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

updateContactLensToCart

Description

Update contact lenses in cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart

Arguments
Name Description
input - UpdateContactLensToCartInput!

Example

Query
mutation updateContactLensToCart($input: UpdateContactLensToCartInput!) {
  updateContactLensToCart(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": UpdateContactLensToCartInput}
Response
{
  "data": {
    "updateContactLensToCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": false,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

updateEmail

Description

Update the customer's email address If the email is invalid, a standard INVALID_INPUT error will be returned. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - UpdateEmailInput!

Example

Query
mutation updateEmail($input: UpdateEmailInput!) {
  updateEmail(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": UpdateEmailInput}
Response
{
  "data": {
    "updateEmail": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "xyz789",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "abc123",
      "gender": "abc123",
      "id": "xyz789",
      "lastName": "abc123",
      "marketingOptIn": false,
      "nationalHealthId": "abc123",
      "phoneNumber": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

updatePaymentMethod

Description

Updates the specified stored payment method in the customer wallet. Editable fields include cardholder name, expiry date, expiry year and billing address. Requires customer authentication (JWT). Returns ACCESS_DENIED if the customer is not authenticated. Returns NOT_FOUND if the specified payment method does not exist. Returns VALIDATION_ERROR for invalid input fields. Returns UNEXPECTED_ERROR if the update fails unexpectedly.

Response

Returns a Customer

Arguments
Name Description
input - UpdatePaymentMethodInput!

Example

Query
mutation updatePaymentMethod($input: UpdatePaymentMethodInput!) {
  updatePaymentMethod(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": UpdatePaymentMethodInput}
Response
{
  "data": {
    "updatePaymentMethod": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "abc123",
      "firstName": "xyz789",
      "gender": "abc123",
      "id": "abc123",
      "lastName": "abc123",
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

updatePersonalDetails

Description

Update the customer's personal details If any of the fields are invalid, a standard INVALID_INPUT error will be returned along with error messages identifying the fields that are invalid. If a JWT is passed in (via the Authorization header) that does not represent a logged in customer, or if the JWT is missing, an ACCESS_DENIED error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Customer!

Arguments
Name Description
input - UpdatePersonalDetailsInput!

Example

Query
mutation updatePersonalDetails($input: UpdatePersonalDetailsInput!) {
  updatePersonalDetails(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    marketingOptIn
    nationalHealthId
    phoneNumber
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptionCancellationDate
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": UpdatePersonalDetailsInput}
Response
{
  "data": {
    "updatePersonalDetails": {
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "abc123",
      "id": "abc123",
      "lastName": "xyz789",
      "marketingOptIn": true,
      "nationalHealthId": "xyz789",
      "phoneNumber": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

updateSubscription

Description

Update the subscription.

Response

Returns a Subscription!

Arguments
Name Description
input - UpdateSubscriptionInput!

Example

Query
mutation updateSubscription($input: UpdateSubscriptionInput!) {
  updateSubscription(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": UpdateSubscriptionInput}
Response
{
  "data": {
    "updateSubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "abc123",
      "pausedAt": "abc123",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

updateSubscriptionCartContactLensGroup

Description

Update the subscription's template cart contact lens group This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If the site does not support the specified subscription plan type, an INVALID_INPUT error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Arguments
Name Description
input - UpdateSubscriptionCartContactLensGroupInput!

Example

Query
mutation updateSubscriptionCartContactLensGroup($input: UpdateSubscriptionCartContactLensGroupInput!) {
  updateSubscriptionCartContactLensGroup(input: $input) {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": UpdateSubscriptionCartContactLensGroupInput}
Response
{
  "data": {
    "updateSubscriptionCartContactLensGroup": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": true,
      "isTaxInclusive": true,
      "isValid": false,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

updateSubscriptionPaymentMethod

Description

Update the subscription's payment method.

Response

Returns a Subscription!

Arguments
Name Description
input - UpdateSubscriptionPaymentMethodInput!

Example

Query
mutation updateSubscriptionPaymentMethod($input: UpdateSubscriptionPaymentMethodInput!) {
  updateSubscriptionPaymentMethod(input: $input) {
    cancellationInfo {
      ...SubscriptionCancellationInfoFragment
    }
    cart {
      ...CartFragment
    }
    createdAt
    customerEmail
    customerId
    hasFailedPayment
    id
    isPausable
    isReactivatable
    lastModifiedAt
    lastOrder {
      ...OrderFragment
    }
    nextOrderAt
    originOrderId
    pausedAt
    paymentClientStatus
    paymentMethod {
      ...StoredPaymentMethodFragment
    }
    recurringOrderState
    replacementFrequency
    standardScheduleUnits
    standardScheduleValue
    startsAt
  }
}
Variables
{"input": UpdateSubscriptionPaymentMethodInput}
Response
{
  "data": {
    "updateSubscriptionPaymentMethod": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "hasFailedPayment": false,
      "id": "abc123",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "2007-12-03T10:15:30Z",
      "lastOrder": Order,
      "nextOrderAt": "2007-12-03T10:15:30Z",
      "originOrderId": "xyz789",
      "pausedAt": "xyz789",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "2007-12-03T10:15:30Z"
    }
  }
}

validateCart

Description

Validate a cart This mutation requires that the user has a valid customer token. If a customer token is not provided, then a CUSTOMER_TOKEN_REQUIRED error will be returned and the data property will be null. If no JWT is passed in (via the Authorization header), an ACCESS_DENIED error code will be returned. If no active cart exists for the customer, a NO_ACTIVE_CART error code will be returned. If any unexpected errors occur, you'll receive an UNEXPECTED_ERROR code.

Response

Returns a Cart!

Example

Query
mutation validateCart {
  validateCart {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "validateCart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "abc123",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

Subscriptions

cancellationInfo

Description

Information about the subscription cancellation

Response

Returns a SubscriptionCancellationInfo

Example

Query
subscription cancellationInfo {
  cancellationInfo {
    cancelledAt
    cancelledBy {
      ...SubscriptionCancellationUserFragment
    }
    code
    detail
    id
    key
  }
}
Response
{
  "data": {
    "cancellationInfo": {
      "cancelledAt": "xyz789",
      "cancelledBy": SubscriptionCancellationUser,
      "code": "xyz789",
      "detail": "xyz789",
      "id": "xyz789",
      "key": "abc123"
    }
  }
}

cart

Description

The template cart associated with the subscription

Response

Returns a Cart

Example

Query
subscription cart {
  cart {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "cart": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isCollectionAvailable": false,
      "isDeliveryAvailable": false,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["abc123"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

createdAt

Description

Date and time the subscription was created

Response

Returns a DateTime!

Example

Query
subscription createdAt {
  createdAt
}
Response
{
  "data": {
    "createdAt": "2007-12-03T10:15:30Z"
  }
}

customerEmail

Description

The email of the customer having this subscription

Response

Returns a String

Example

Query
subscription customerEmail {
  customerEmail
}
Response
{"data": {"customerEmail": "xyz789"}}

customerId

Description

The identifier of the customer having this subscription

Response

Returns a String

Example

Query
subscription customerId {
  customerId
}
Response
{"data": {"customerId": "abc123"}}

hasFailedPayment

Description

Has the subscription had a failed payment

Response

Returns a Boolean!

Example

Query
subscription hasFailedPayment {
  hasFailedPayment
}
Response
{"data": {"hasFailedPayment": true}}

id

Description

Unique subscription identifier

Response

Returns a String!

Example

Query
subscription id {
  id
}
Response
{"data": {"id": "abc123"}}

isPausable

Description

Can the subscription be paused by the customer

Response

Returns a Boolean!

Example

Query
subscription isPausable {
  isPausable
}
Response
{"data": {"isPausable": true}}

isReactivatable

Description

Can the subscription be activated by the customer

Response

Returns a Boolean!

Example

Query
subscription isReactivatable {
  isReactivatable
}
Response
{"data": {"isReactivatable": true}}

lastModifiedAt

Description

Date and time the subscription was last modified

Response

Returns a DateTime!

Example

Query
subscription lastModifiedAt {
  lastModifiedAt
}
Response
{
  "data": {
    "lastModifiedAt": "2007-12-03T10:15:30Z"
  }
}

lastOrder

Description

The subscription's latest orders

Response

Returns an Order

Example

Query
subscription lastOrder {
  lastOrder {
    aftercareStore {
      ...AftercareStoreFragment
    }
    amountDue {
      ...MoneyFragment
    }
    billingAddress {
      ...AddressFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNotesFragment
    }
    customerEmail
    customerId
    dataLayer {
      ...DataLayerInterfaceFragment
    }
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isBillingSameAsDeliveryAddress
    isCollectionAvailable
    isDeliveryAvailable
    isExpressReorder
    isExpressReorderEnabled
    isSubscriptionCompatible
    isTaxInclusive
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    notifications {
      ...NotificationFragment
    }
    orderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    prescription {
      ...OrderPrescriptionFragment
    }
    promotionalTags
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    workflowState
  }
}
Response
{
  "data": {
    "lastOrder": {
      "aftercareStore": AftercareStore,
      "amountDue": Money,
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNotes],
      "customerEmail": "abc123",
      "customerId": "abc123",
      "dataLayer": DataLayerInterface,
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["xyz789"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isBillingSameAsDeliveryAddress": false,
      "isCollectionAvailable": true,
      "isDeliveryAvailable": true,
      "isExpressReorder": false,
      "isExpressReorderEnabled": false,
      "isSubscriptionCompatible": false,
      "isTaxInclusive": true,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "notifications": [Notification],
      "orderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "prescription": OrderPrescription,
      "promotionalTags": ["xyz789"],
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "xyz789",
      "subtotal": Money,
      "totalPrice": Money,
      "workflowState": "order_back_ordered"
    }
  }
}

nextOrderAt

Description

Date and time the next order will be created for the subscription

Response

Returns a DateTime

Example

Query
subscription nextOrderAt {
  nextOrderAt
}
Response
{
  "data": {
    "nextOrderAt": "2007-12-03T10:15:30Z"
  }
}

originOrderId

Description

The identifier of the origin order for this subscription

Response

Returns a String

Example

Query
subscription originOrderId {
  originOrderId
}
Response
{"data": {"originOrderId": "xyz789"}}

pausedAt

Description

The date/time the subscription was paused

Response

Returns a String

Example

Query
subscription pausedAt {
  pausedAt
}
Response
{"data": {"pausedAt": "abc123"}}

paymentClientStatus

Description

The payment system status for the subscription

Response

Returns a String!

Example

Query
subscription paymentClientStatus {
  paymentClientStatus
}
Response
{"data": {"paymentClientStatus": "abc123"}}

paymentMethod

Description

The payment method for the subscription

Response

Returns a StoredPaymentMethod

Example

Query
subscription paymentMethod {
  paymentMethod {
    billingAddress {
      ...AddressFragment
    }
    brand
    createdAt
    expiryMonth
    expiryYear
    holderName
    id
    isExpired
    isLinkedToActiveSubscription
    isVerified
    lastFour
    lastUsedAt
    nickname
    supportsSubscriptions
    token
  }
}
Response
{
  "data": {
    "paymentMethod": {
      "billingAddress": Address,
      "brand": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "expiryMonth": 123,
      "expiryYear": 987,
      "holderName": "xyz789",
      "id": "xyz789",
      "isExpired": true,
      "isLinkedToActiveSubscription": true,
      "isVerified": false,
      "lastFour": "abc123",
      "lastUsedAt": "2007-12-03T10:15:30Z",
      "nickname": "abc123",
      "supportsSubscriptions": false,
      "token": "xyz789"
    }
  }
}

recurringOrderState

Description

The state of the subscription

Response

Returns a RecurringOrderState!

Example

Query
subscription recurringOrderState {
  recurringOrderState
}
Response
{"data": {"recurringOrderState": "Active"}}

replacementFrequency

Response

Returns a ReplacementFrequency

Example

Query
subscription replacementFrequency {
  replacementFrequency
}
Response
{"data": {"replacementFrequency": "DLY"}}

standardScheduleUnits

Description

The schedule units for the subscription

Response

Returns a StandardScheduleUnits!

Example

Query
subscription standardScheduleUnits {
  standardScheduleUnits
}
Response
{"data": {"standardScheduleUnits": "Days"}}

standardScheduleValue

Description

The schedule value for the subscription

Response

Returns an Int!

Example

Query
subscription standardScheduleValue {
  standardScheduleValue
}
Response
{"data": {"standardScheduleValue": 123}}

startsAt

Description

Date and time the subscription starts

Response

Returns a DateTime!

Example

Query
subscription startsAt {
  startsAt
}
Response
{
  "data": {
    "startsAt": "2007-12-03T10:15:30Z"
  }
}

Types

AddAddressInput

Fields
Input Field Description
address - AddressInput!
isBilling - Boolean
isDefaultBilling - Boolean
isDefaultDelivery - Boolean
isDelivery - Boolean
Example
{
  "address": AddressInput,
  "isBilling": false,
  "isDefaultBilling": false,
  "isDefaultDelivery": true,
  "isDelivery": false
}

AddCardInput

Fields
Input Field Description
address - AddressInput!
amount - MoneyInput
browserInfo - Object
paymentMethod - Object!
Example
{
  "address": AddressInput,
  "amount": MoneyInput,
  "browserInfo": Object,
  "paymentMethod": Object
}

AddContactLensToCartInput

Fields
Input Field Description
leftEye - EyeInput
prescription - ContactLensPrescriptionInput
productKey - String!
recurrencePolicyId - String
rightEye - EyeInput
subscriptionPlanType - String
Example
{
  "leftEye": EyeInput,
  "prescription": ContactLensPrescriptionInput,
  "productKey": "abc123",
  "recurrencePolicyId": "xyz789",
  "rightEye": EyeInput,
  "subscriptionPlanType": "abc123"
}

AddContactLensToSubscriptionInput

Fields
Input Field Description
leftEye - EyeInput
productKey - String!
recurrencePolicyId - String
rightEye - EyeInput
subscriptionId - String!
subscriptionPlanType - String
Example
{
  "leftEye": EyeInput,
  "productKey": "xyz789",
  "recurrencePolicyId": "abc123",
  "rightEye": EyeInput,
  "subscriptionId": "xyz789",
  "subscriptionPlanType": "xyz789"
}

AddDiscountCodeToCartInput

Fields
Input Field Description
code - String!
Example
{"code": "xyz789"}

AddGlassesToCartInput

Fields
Input Field Description
glasses - GlassesInput!
prescription - PrescriptionInput
Example
{
  "glasses": GlassesInput,
  "prescription": PrescriptionInput
}

AddHealthFundToCartInput

Fields
Input Field Description
healthFund - String
healthFundPolicy - String
Example
{
  "healthFund": "xyz789",
  "healthFundPolicy": "abc123"
}

Address

Fields
Field Name Description
addressLine1 - String! The first line of the address
addressLine2 - String The second line of the address
addressLine3 - String The third line of the address
city - String The city of the address
country - String! The country of the address
county - String The county of the address
firstName - String! The first name of the addressee
id - String! The ID of the address
key - String The key of the address
lastName - String! The last name of the addressee
postcode - String! The postal code of the address
title - String The title of the addressee
Example
{
  "addressLine1": "abc123",
  "addressLine2": "abc123",
  "addressLine3": "abc123",
  "city": "abc123",
  "country": "xyz789",
  "county": "abc123",
  "firstName": "abc123",
  "id": "xyz789",
  "key": "xyz789",
  "lastName": "xyz789",
  "postcode": "abc123",
  "title": "xyz789"
}

AddressInput

Fields
Input Field Description
addressLine1 - String!
addressLine2 - String
addressLine3 - String
city - String
country - String!
county - String
firstName - String!
id - String
key - String
lastName - String!
postcode - String!
title - String
Example
{
  "addressLine1": "abc123",
  "addressLine2": "xyz789",
  "addressLine3": "xyz789",
  "city": "xyz789",
  "country": "abc123",
  "county": "xyz789",
  "firstName": "abc123",
  "id": "xyz789",
  "key": "xyz789",
  "lastName": "abc123",
  "postcode": "abc123",
  "title": "xyz789"
}

AdyenAction

Fields
Field Name Description
method - String
paymentData - String
paymentMethodType - String
sdkData - AdyenSdkData
type - String!
url - String
Example
{
  "method": "xyz789",
  "paymentData": "abc123",
  "paymentMethodType": "xyz789",
  "sdkData": AdyenSdkData,
  "type": "xyz789",
  "url": "abc123"
}

AdyenAdditionalPaymentDetailsInput

Fields
Input Field Description
additionalPaymentDetails - String!
paymentId - String!
Example
{
  "additionalPaymentDetails": "abc123",
  "paymentId": "xyz789"
}

AdyenAdditionalPaymentDetailsResponse

Fields
Field Name Description
action - AdyenAction Additional action required to complete the payment
paymentId - String!
resultCode - String!
Example
{
  "action": AdyenAction,
  "paymentId": "xyz789",
  "resultCode": "abc123"
}

AdyenBrowserInfoInput

Fields
Input Field Description
acceptHeader - String
colorDepth - Int
javaEnabled - Boolean
language - String
screenHeight - Int
screenWidth - Int
timeZoneOffset - Int
userAgent - String
Example
{
  "acceptHeader": "xyz789",
  "colorDepth": 123,
  "javaEnabled": true,
  "language": "abc123",
  "screenHeight": 987,
  "screenWidth": 987,
  "timeZoneOffset": 987,
  "userAgent": "abc123"
}

AdyenIssuer

Fields
Field Name Description
disabled - Boolean
id - String
name - String
Example
{
  "disabled": false,
  "id": "abc123",
  "name": "xyz789"
}

AdyenMoney

Fields
Field Name Description
currency - String Currency code
value - Int Cent amount
Example
{"currency": "abc123", "value": 987}

AdyenPaymentApp

Fields
Field Name Description
id - String
name - String
Example
{
  "id": "abc123",
  "name": "xyz789"
}

AdyenPaymentMethod

Fields
Field Name Description
apps - [AdyenPaymentApp!]
brands - [String!]
group - AdyenPaymentMethodGroup
issuers - [AdyenIssuer!]
name - String!
type - String!
Example
{
  "apps": [AdyenPaymentApp],
  "brands": ["xyz789"],
  "group": AdyenPaymentMethodGroup,
  "issuers": [AdyenIssuer],
  "name": "xyz789",
  "type": "xyz789"
}

AdyenPaymentMethodGroup

Fields
Field Name Description
name - String
paymentMethodData - String
type - String
Example
{
  "name": "xyz789",
  "paymentMethodData": "xyz789",
  "type": "xyz789"
}

AdyenPaymentMethods

Fields
Field Name Description
paymentMethods - [AdyenPaymentMethod!] List of available payment methods
responseString - String!
storedPaymentMethods - [AdyenStoredPaymentMethod!]! List of stored payment methods
Example
{
  "paymentMethods": [AdyenPaymentMethod],
  "responseString": "abc123",
  "storedPaymentMethods": [AdyenStoredPaymentMethod]
}

AdyenPaymentsResponse

Fields
Field Name Description
action - AdyenAction Additional action required to complete the payment
amount - AdyenMoney! The amount involved in the transaction
paymentId - String
resultCode - String!
Example
{
  "action": AdyenAction,
  "amount": AdyenMoney,
  "paymentId": "xyz789",
  "resultCode": "xyz789"
}

AdyenSdkData

Fields
Field Name Description
token - String
Example
{"token": "abc123"}

AdyenStoredPaymentMethod

Fields
Field Name Description
bankAccountNumber - String
bankLocationIdstring - String
brand - String
expiryMonth - String
expiryYear - String
holderName - String
iban - String
id - String
label - String
lastFour - String
name - String
networkTxReference - String
ownerName - String
shopperEmail - String
supportedRecurringProcessingModels - [String!]
supportedShopperInteractions - [String!]
type - String!
Example
{
  "bankAccountNumber": "xyz789",
  "bankLocationIdstring": "abc123",
  "brand": "xyz789",
  "expiryMonth": "abc123",
  "expiryYear": "abc123",
  "holderName": "xyz789",
  "iban": "abc123",
  "id": "abc123",
  "label": "abc123",
  "lastFour": "abc123",
  "name": "abc123",
  "networkTxReference": "abc123",
  "ownerName": "xyz789",
  "shopperEmail": "abc123",
  "supportedRecurringProcessingModels": [
    "xyz789"
  ],
  "supportedShopperInteractions": [
    "xyz789"
  ],
  "type": "xyz789"
}

AftercareStore

Fields
Field Name Description
address - AftercareStoreAddress! Address of the aftercare store
contactInfo - AftercareStoreContactInfo! Contact information for the aftercare store
coordinates - AftercareStoreCoordinates! Longitude and latitude of the aftercare store
id - String! Unique identifier of the aftercare store
lineOfBusiness - AftercareStoreLineOfBusiness! Line of business for the aftercare store
name - String! Name of the aftercare store
slug - String! Slug of the aftercare store, used in URLs
Example
{
  "address": AftercareStoreAddress,
  "contactInfo": AftercareStoreContactInfo,
  "coordinates": AftercareStoreCoordinates,
  "id": "xyz789",
  "lineOfBusiness": "AUDIOLOGY",
  "name": "xyz789",
  "slug": "xyz789"
}

AftercareStoreAddress

Fields
Field Name Description
city - String! City of the aftercare store
country - String! Country of the aftercare store
formattedAddress - String! Formatted address of the aftercare store
line1 - String! Address line 1 of the aftercare store
line2 - String! Address line 2 of the aftercare store
line3 - String! Address line 3 of the aftercare store
postcode - String! Postcode of the aftercare store
region - String! Region of the aftercare store
Example
{
  "city": "abc123",
  "country": "xyz789",
  "formattedAddress": "abc123",
  "line1": "xyz789",
  "line2": "xyz789",
  "line3": "abc123",
  "postcode": "xyz789",
  "region": "abc123"
}

AftercareStoreContactInfo

Fields
Field Name Description
email - String! Phone number for the aftercare store
phone - String! Email address of the aftercare store
Example
{
  "email": "abc123",
  "phone": "abc123"
}

AftercareStoreCoordinates

Fields
Field Name Description
latitude - String! Latitude of the aftercare store
longitude - String! Longitude of the aftercare store
Example
{
  "latitude": "xyz789",
  "longitude": "xyz789"
}

AftercareStoreLineOfBusiness

Values
Enum Value Description

AUDIOLOGY

OPTICAL

Example
"AUDIOLOGY"

Alphanumeric

Example
Alphanumeric

AnnualOverviewEye

Fields
Field Name Description
add - String Add
addType - String Add type
axis - Int Axis
baseCurve - String Base Curve
cylinder - String Cylinder
diameter - String Diameter
sphere - String Sphere
Example
{
  "add": "xyz789",
  "addType": "xyz789",
  "axis": 987,
  "baseCurve": "xyz789",
  "cylinder": "abc123",
  "diameter": "abc123",
  "sphere": "abc123"
}

AnnualOverviewOrder

Description

Annual Overview Order

Fields
Field Name Description
date - String! Order creation date
id - String! Unique order ID
items - [AnnualOverviewOrderItem!]! The orders for the year
orderNumber - String Unique order number
Example
{
  "date": "abc123",
  "id": "abc123",
  "items": [AnnualOverviewOrderItem],
  "orderNumber": "abc123"
}

AnnualOverviewOrderItem

Description

Annual Overview Order Item

Fields
Field Name Description
leftEye - AnnualOverviewEye Left eye prescription
rightEye - AnnualOverviewEye Right eye prescription
title - String! Title
Example
{
  "leftEye": AnnualOverviewEye,
  "rightEye": AnnualOverviewEye,
  "title": "xyz789"
}

Appointment

Description

Appointment

Fields
Field Name Description
amendUrl - String URL to amend the appointment
customer - AppointmentCustomer!
dateTime - String! Date and time of the appointment
id - String! Unique appointment identifier
isAmendable - Boolean! Can the appointment be amended
isCancellable - Boolean! Can the appointment be cancelled
lineOfBusiness - AppointmentLineOfBusiness! Line of business for the appointment
store - AppointmentStore!
type - AppointmentType! Appointment Type
Example
{
  "amendUrl": "xyz789",
  "customer": AppointmentCustomer,
  "dateTime": "abc123",
  "id": "abc123",
  "isAmendable": true,
  "isCancellable": true,
  "lineOfBusiness": "AUDIOLOGY",
  "store": AppointmentStore,
  "type": "ADULT_EYE_TEST"
}

AppointmentCancelled

Description

Appointment Cancelled

Fields
Field Name Description
id - String! Unique appointment identifier
Example
{"id": "xyz789"}

AppointmentCustomer

Description

Appointment Customer

Fields
Field Name Description
dateOfBirth - String The date of birth of the customer
email - String The email of the customer
firstName - String! The fist name of the customer
lastName - String! The last name of the customer
phoneNumber - String The phone number of the customer
postcode - String The postal code of the address
title - String The title of the customer
Example
{
  "dateOfBirth": "abc123",
  "email": "xyz789",
  "firstName": "xyz789",
  "lastName": "abc123",
  "phoneNumber": "abc123",
  "postcode": "abc123",
  "title": "xyz789"
}

AppointmentLineOfBusiness

Values
Enum Value Description

AUDIOLOGY

OPTICAL

Example
"AUDIOLOGY"

AppointmentStore

Description

Appointment Store

Fields
Field Name Description
address - AppointmentStoreAddress!
contactInfo - AppointmentStoreContactInfo!
coordinates - AppointmentStoreCoordinates!
id - String! The store identifier
name - String! The store name
shortName - String! The store short name
Example
{
  "address": AppointmentStoreAddress,
  "contactInfo": AppointmentStoreContactInfo,
  "coordinates": AppointmentStoreCoordinates,
  "id": "abc123",
  "name": "xyz789",
  "shortName": "xyz789"
}

AppointmentStoreAddress

Description

Appointment Store Address

Fields
Field Name Description
city - String! City
countryCode - String! Country Code
line1 - String! Line 1
line2 - String Line 2
line3 - String Line 3
name - String! The store name
postcode - String! PostCode
region - String Region
Example
{
  "city": "abc123",
  "countryCode": "abc123",
  "line1": "xyz789",
  "line2": "abc123",
  "line3": "abc123",
  "name": "abc123",
  "postcode": "xyz789",
  "region": "abc123"
}

AppointmentStoreContactInfo

Description

Appointment Store Contact Info

Fields
Field Name Description
email - String The store phone number
mobile - String The store mobile number
phone - String The store phone number
Example
{
  "email": "abc123",
  "mobile": "xyz789",
  "phone": "abc123"
}

AppointmentStoreCoordinates

Description

Appointment Store Coordinates

Fields
Field Name Description
latitude - Float! Latitude
longitude - Float! Longitude
Example
{"latitude": 123.45, "longitude": 123.45}

AppointmentType

Values
Enum Value Description

ADULT_EYE_TEST

CHILD_EYE_TEST

COLLECTION

CONTACT_LENS_AFTERCARE_CHECK_UP

CONTACT_LENS_ASSESSMENT_OR_TRIAL

DISPENSE

DRIVERS_REPORT

EAR_WAX_REMOVAL

EYE_TEST_AND_CONTACT_LENS_ASSESSMENT

EYE_TEST_AND_CONTACT_LENS_CHECK

HEARING_AID_CHECK_UP

HEARING_AID_MAINTENANCE_OR_REPAIR

HEARING_PROTECTION_CONSULTATION

HEARING_TEST

HEARING_TEST_AND_HEARING_AID_CONSULTATION

OCT_SCAN

OFFLINE_APPOINTMENT_UNKNOWN

OVER_60S_ADULT_EYE_TEST

OVER_60S_OCT_SCAN

PREMIUM_EYE_TEST

TELEHEALTH_CONSULTATION

Example
"ADULT_EYE_TEST"

Attribute

Fields
Field Name Description
name - String! Attribute name
value - Json Attribute value
Example
{
  "name": "xyz789",
  "value": Json
}

AttributeOptions

Fields
Field Name Description
name - String! Attribute options name
options - [Alphanumeric!]! Options
Example
{
  "name": "xyz789",
  "options": [Alphanumeric]
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

CancelAppointmentInput

Fields
Input Field Description
id - String!
Example
{"id": "abc123"}

CancelOrderInput

Fields
Input Field Description
orderId - String!
Example
{"orderId": "abc123"}

CancelSubscriptionInput

Fields
Input Field Description
amount - MoneyInput
browserInfo - Object
code - String! The reason code for the cancellation
detail - String! Additional notes or comments for the cancellation request
lastFour - String
paymentMethod - Object
subscriptionId - String! The subscription ID to be canceled
Example
{
  "amount": MoneyInput,
  "browserInfo": Object,
  "code": "xyz789",
  "detail": "abc123",
  "lastFour": "abc123",
  "paymentMethod": Object,
  "subscriptionId": "abc123"
}

Cart

Description

Cart

Fields
Field Name Description
aftercareStore - AftercareStore The data layer for the cart
amountDue - Money The amount due (with the discounts applied and reduced by the gift cards authorised for this shopping cart)
billingAddress - Address Billing address details
createdAt - DateTime Date and time the cart was created
customerEmail - String Customer email address
dataLayer - DataLayerInterface The data layer for the cart
deliveryAddress - Address Delivery address details
deliveryMethod - DeliveryMethod The delivery details including method and price
deliveryOptions - [DeliveryOption!] The available delivery options
discountCodes - [String!] Discount codes applied to the cart
healthFund - String Health fund provider applied to cart
healthFundPolicy - String Health fund policy applied to cart
id - String Unique order ID
instalmentsInfo - InstalmentsInfo Instalments on Cart or Order (Post Pay orders only)
isBillingSameAsDeliveryAddress - Boolean Is the billing address the same as the delivery address?
isCollectionAvailable - Boolean Can the contents of the cart be collected?
isDeliveryAvailable - Boolean Can the contents of the cart be delivered?
isExpressReorder - Boolean Is this cart an express re-order?
isSubscriptionCompatible - Boolean Whether the cart is compatible with a subscription
isTaxInclusive - Boolean Whether or not tax is included in the prices
isValid - Boolean Flag to indicate whether or not the cart is in a valid state.
itemCount - Int Count of the number of items in the cart/order
lastOrderedAt - String Date and time the previous (express re-)order was placed
lineItemGroups - [LineItemGroup!] Grouping of items relating to a frames, contact lenses or other product group
notifications - [Notification!] Notifications on the cart
paymentInfo - OrderPaymentInfo Payment information
prescription - OrderPrescription The prescription upload / store for the cart
promotionalTags - [String!] Promotional tags applicable to the cart
promotions - [OrderBasePromotion!]! The promotions applied to the cart/order
recurrencePolicies - [OrderRecurrencePolicy!] Recurrence policies applicable to the cart
replacementFrequency - ReplacementFrequency
selectedRecurrencePolicy - OrderRecurrencePolicy The currently active recurrence policy
subscriptionId - String The id of the subscription
subscriptionPaymentInfo - SubscriptionPaymentInfo Payment Information for the subscription order
subscriptionPlanType - String The type of subscription plan applied to the cart
subtotal - Money The price of all of the line items (without discounts applied)
totalPrice - Money The total price (with discounts applied)
Example
{
  "aftercareStore": AftercareStore,
  "amountDue": Money,
  "billingAddress": Address,
  "createdAt": "2007-12-03T10:15:30Z",
  "customerEmail": "abc123",
  "dataLayer": DataLayerInterface,
  "deliveryAddress": Address,
  "deliveryMethod": DeliveryMethod,
  "deliveryOptions": [DeliveryOption],
  "discountCodes": ["xyz789"],
  "healthFund": "abc123",
  "healthFundPolicy": "xyz789",
  "id": "abc123",
  "instalmentsInfo": InstalmentsInfo,
  "isBillingSameAsDeliveryAddress": false,
  "isCollectionAvailable": false,
  "isDeliveryAvailable": true,
  "isExpressReorder": true,
  "isSubscriptionCompatible": false,
  "isTaxInclusive": true,
  "isValid": false,
  "itemCount": 123,
  "lastOrderedAt": "abc123",
  "lineItemGroups": [LineItemGroupContacts],
  "notifications": [Notification],
  "paymentInfo": OrderPaymentInfo,
  "prescription": OrderPrescription,
  "promotionalTags": ["xyz789"],
  "promotions": [OrderBasePromotion],
  "recurrencePolicies": [OrderRecurrencePolicy],
  "replacementFrequency": "DLY",
  "selectedRecurrencePolicy": OrderRecurrencePolicy,
  "subscriptionId": "xyz789",
  "subscriptionPaymentInfo": SubscriptionPaymentInfo,
  "subscriptionPlanType": "abc123",
  "subtotal": Money,
  "totalPrice": Money
}

CatalogImage

Fields
Field Name Description
label - String Image label text
url - String! Image URL
viewType - String! viewType
Example
{
  "label": "abc123",
  "url": "xyz789",
  "viewType": "abc123"
}

CompleteOrderInput

Fields
Input Field Description
cartId - String!
Example
{"cartId": "xyz789"}

ContactLensEyePrescription

Fields
Field Name Description
add - String Add
addType - String Add type
axis - Int Axis
baseCurve - String Base Curve
colour - String Colour
cylinder - String Cylinder
diameter - String Diameter
sphere - String Sphere
Example
{
  "add": "abc123",
  "addType": "xyz789",
  "axis": 123,
  "baseCurve": "abc123",
  "colour": "abc123",
  "cylinder": "xyz789",
  "diameter": "abc123",
  "sphere": "xyz789"
}

ContactLensPrescription

Fields
Field Name Description
date - String The date of the prescription
leftEye - ContactLensEyePrescription
rightEye - ContactLensEyePrescription
source - PrescriptionSource Prescription source
store - PrescriptionStore
validFrom - String The date from which the prescription is valid
validUntil - String The expiry date for the prescription
Example
{
  "date": "xyz789",
  "leftEye": ContactLensEyePrescription,
  "rightEye": ContactLensEyePrescription,
  "source": "EXTERNAL",
  "store": PrescriptionStore,
  "validFrom": "xyz789",
  "validUntil": "xyz789"
}

ContactLensPrescriptionInput

Fields
Input Field Description
date - String
source - PrescriptionSourceType
storeId - String
validUntil - String
Example
{
  "date": "abc123",
  "source": "EXTERNAL",
  "storeId": "xyz789",
  "validUntil": "abc123"
}

ContactLensPrescriptionInterface

Fields
Field Name Description
date - String The date of the prescription
leftEye - ContactLensEyePrescription
rightEye - ContactLensEyePrescription
source - PrescriptionSource Prescription source
store - PrescriptionStore
validFrom - String The date from which the prescription is valid
validUntil - String The expiry date for the prescription
Possible Types
ContactLensPrescriptionInterface Types

ContactLensPrescription

Example
{
  "date": "abc123",
  "leftEye": ContactLensEyePrescription,
  "rightEye": ContactLensEyePrescription,
  "source": "EXTERNAL",
  "store": PrescriptionStore,
  "validFrom": "xyz789",
  "validUntil": "xyz789"
}

ContactLensesSubscriptionPrice

Description

Pricing details for a contact lens subscription

Fields
Field Name Description
instalmentPrice - Money Total instalment price for both eyes (unitPrice × totalQuantity / 3).
totalListPrice - Money Total list price for both eyes (unitPrice × totalQuantity).
totalPrice - Money Total subscription price for both eyes (subscription unitPrice × totalQuantity).
totalQuantity - Int Combined quantity for both eyes.
Example
{
  "instalmentPrice": Money,
  "totalListPrice": Money,
  "totalPrice": Money,
  "totalQuantity": 123
}

ContactsInput

Fields
Input Field Description
leftEye - EyeInput
rightEye - EyeInput
Example
{
  "leftEye": EyeInput,
  "rightEye": EyeInput
}

CreateAdyenPaymentInput

Fields
Input Field Description
amount - MoneyInput!
browserInfo - Object!
lastFour - String
paymentMethod - Object!
storePaymentMethod - Boolean
Example
{
  "amount": MoneyInput,
  "browserInfo": Object,
  "lastFour": "xyz789",
  "paymentMethod": Object,
  "storePaymentMethod": true
}

CreateHICAPSPaymentInput

Fields
Input Field Description
fund - String!
memberNumber - String!
Example
{
  "fund": "abc123",
  "memberNumber": "abc123"
}

Cursor

Fields
Input Field Description
direction - Direction!
value - String!
Example
{"direction": "NEXT", "value": "abc123"}

Customer

Fields
Field Name Description
aftercareStore - AftercareStore The aftercare store associated with the customer
billingAddresses - [Address!] The billing addresses of the customer
createdAt - DateTime! Date and time the customer was created
dateOfBirth - String! The date of birth of the customer
defaultBillingAddressId - String The default billing address of the customer
defaultDeliveryAddressId - String The default delivery address of the customer
deliveryAddresses - [Address!] The delivery addresses of the customer
email - String! The email of the customer
firstName - String! The fist name of the customer
gender - String! The gender of the customer
id - String! The ID of the customer
lastName - String! The last name of the customer
marketingOptIn - Boolean! The marketing preferences of the customer
nationalHealthId - String The customer's national health ID
phoneNumber - String! The phone number of the customer
storedPaymentMethods - [StoredPaymentMethod!]! List of stored payment methods for the customer
subscriptionCancellationDate - DateTime Cancellation date of the customers subscription if it has been cancelled. If the customers subscription is still active, or has not been created, this will be null.
subscriptions - [Subscription!] The customer's subscriptions (if any)
title - String The title of the customer
Example
{
  "aftercareStore": AftercareStore,
  "billingAddresses": [Address],
  "createdAt": "2007-12-03T10:15:30Z",
  "dateOfBirth": "xyz789",
  "defaultBillingAddressId": "xyz789",
  "defaultDeliveryAddressId": "abc123",
  "deliveryAddresses": [Address],
  "email": "xyz789",
  "firstName": "xyz789",
  "gender": "xyz789",
  "id": "abc123",
  "lastName": "abc123",
  "marketingOptIn": true,
  "nationalHealthId": "abc123",
  "phoneNumber": "xyz789",
  "storedPaymentMethods": [StoredPaymentMethod],
  "subscriptionCancellationDate": "2007-12-03T10:15:30Z",
  "subscriptions": [Subscription],
  "title": "abc123"
}

CustomerMyAnnualOverview

Description

My Annual Overview

Fields
Field Name Description
customer - Customer! The customer
overview - MyAnnualOverview! The overview
Example
{
  "customer": Customer,
  "overview": MyAnnualOverview
}

DataLayerInterface

Fields
Field Name Description
currency - String The currency code for the order
items - [LineItemDataLayerInterface!] The items in the order
value - Float! The value of the order
Example
{
  "currency": "xyz789",
  "items": [LineItemDataLayerInterface],
  "value": 987.65
}

DateTime

Example
"2007-12-03T10:15:30Z"

DeliveryMethod

Fields
Field Name Description
businessDays - Int Delivery option business days
key - String Delivery option key
price - Money Delivery option price
serviceType - ServiceType Delivery option service type
Example
{
  "businessDays": 987,
  "key": "xyz789",
  "price": Money,
  "serviceType": "EXPRESS"
}

DeliveryOption

Fields
Field Name Description
businessDays - Int Delivery option business days
key - String! Delivery option key
price - Money! Delivery option price
serviceType - ServiceType! Delivery option service type
Example
{
  "businessDays": 123,
  "key": "xyz789",
  "price": Money,
  "serviceType": "EXPRESS"
}

DeliveryOptionInterface

Fields
Field Name Description
businessDays - Int Delivery option business days
key - String! Delivery option key
price - Money! Delivery option price
serviceType - ServiceType! Delivery option service type
Possible Types
DeliveryOptionInterface Types

DeliveryOption

Example
{
  "businessDays": 987,
  "key": "xyz789",
  "price": Money,
  "serviceType": "EXPRESS"
}

Direction

Values
Enum Value Description

NEXT

PREV

Example
"NEXT"

EditAddressInput

Fields
Input Field Description
address - AddressInput!
id - String!
isBilling - Boolean
isDefaultBilling - Boolean
isDefaultDelivery - Boolean
isDelivery - Boolean
Example
{
  "address": AddressInput,
  "id": "xyz789",
  "isBilling": true,
  "isDefaultBilling": true,
  "isDefaultDelivery": false,
  "isDelivery": true
}

ElementsAndTreatmentsInput

Fields
Input Field Description
productKey - String!
sku - String!
Example
{
  "productKey": "xyz789",
  "sku": "abc123"
}

ExpressReorderInput

Fields
Input Field Description
orderId - String!
Example
{"orderId": "xyz789"}

ExternalPrescriptionUploadStatus

Values
Enum Value Description

UPLOAD_INITIATED

UPLOAD_REMOVED

UPLOAD_SCAN_FAILED

UPLOAD_SCAN_PASSED

Example
"UPLOAD_INITIATED"

EyeInput

Fields
Input Field Description
quantity - Int!
sku - String!
Example
{"quantity": 987, "sku": "xyz789"}

EyePrescriptionInput

Fields
Input Field Description
add - String
adjustedPupillaryDistance - Float Either adjusted Inter-pupillary distance, the distance between the pupils of both eyes (same value >40 on both eyes) or a value for Dual or monocular pupillary distance between the bridge of the nose nose and the pupil of left/right eye
axis - Int
cylinder - String
diameter - String
originalPupillaryDistance - Float Either Inter-pupillary distance, the distance between the pupils of both eyes (same value >40 on both eyes) or a value for Dual or monocular pupillary distance between the bridge of the nose nose and the pupil of left/right eye
sphere - String
Example
{
  "add": "abc123",
  "adjustedPupillaryDistance": 987.65,
  "axis": 123,
  "cylinder": "xyz789",
  "diameter": "abc123",
  "originalPupillaryDistance": 123.45,
  "sphere": "xyz789"
}

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

FrameConfiguration

Fields
Field Name Description
lensElementsAndTreatments - [LensElementOrTreatment!]! The lens elements and treatments that are available
Example
{"lensElementsAndTreatments": [LensElementOrTreatment]}

FrameInput

Fields
Input Field Description
productKey - String!
sku - String!
Example
{
  "productKey": "abc123",
  "sku": "abc123"
}

FrameLineItem

Fields
Field Name Description
name - String
oneOffUnitPrice - Money
packDescription - String
packQuantity - Int
primaryColor - String
productKey - String
quantity - Int
quantityLimits - QuantityLimits
replacementFrequency - ReplacementFrequency
size - String
sku - String
totalPrice - Money
Example
{
  "name": "xyz789",
  "oneOffUnitPrice": Money,
  "packDescription": "xyz789",
  "packQuantity": 987,
  "primaryColor": "abc123",
  "productKey": "xyz789",
  "quantity": 987,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "size": "abc123",
  "sku": "xyz789",
  "totalPrice": Money
}

Gender

Values
Enum Value Description

FEMALE

MALE

NON_BINARY

RATHER_NOT_SAY

Example
"FEMALE"

GlassesEyePrescription

Fields
Field Name Description
add - String The addition value of the lens
adjustedPupillaryDistance - Float The adjusted pupillary distance
axis - Int The axis value of the lens
cylinder - String The cylinder value of the lens
originalPupillaryDistance - Float The original pupillary distance
sphere - String The sphere value of the lens
Example
{
  "add": "abc123",
  "adjustedPupillaryDistance": 987.65,
  "axis": 987,
  "cylinder": "xyz789",
  "originalPupillaryDistance": 987.65,
  "sphere": "abc123"
}

GlassesFunction

Values
Enum Value Description

DISTANCE

NO_PRESCRIPTION

READING

Example
"DISTANCE"

GlassesInput

Fields
Input Field Description
frame - FrameInput!
lens - LensInput!
lensOptions - LensOptionsInput!
Example
{
  "frame": FrameInput,
  "lens": LensInput,
  "lensOptions": LensOptionsInput
}

GlassesPrescription

Description

Glasses prescription

Fields
Field Name Description
confirmValid - Boolean Whether the prescription has been confirmed valid
date - String The date of the prescription
glassesFunction - GlassesFunction! The function of the glasses
leftEye - GlassesEyePrescription The prescription for the left eye
rightEye - GlassesEyePrescription The prescription for the right eye
source - PrescriptionSource Prescription source
store - GlassesPrescriptionStore The store that issued the prescription
Example
{
  "confirmValid": false,
  "date": "abc123",
  "glassesFunction": "DISTANCE",
  "leftEye": GlassesEyePrescription,
  "rightEye": GlassesEyePrescription,
  "source": "EXTERNAL",
  "store": GlassesPrescriptionStore
}

GlassesPrescriptionStore

Description

Glasses prescription store

Fields
Field Name Description
id - String! The ID of the store
name - String! The name of the store
Example
{
  "id": "xyz789",
  "name": "abc123"
}

HealthFundPolicies

Fields
Field Name Description
key - String! The health fund provider key
policies - [String!]! A list of health fund policies for the provider
Example
{
  "key": "xyz789",
  "policies": ["xyz789"]
}

HicapsPaymentSession

Fields
Field Name Description
redirectUrl - String! The redirect URL for the HICAPS payment session
Example
{"redirectUrl": "xyz789"}

Image

Fields
Field Name Description
label - String! Image label text
url - String Image URL
Example
{
  "label": "abc123",
  "url": "abc123"
}

Instalment

Fields
Field Name Description
amount - Money! The amount of the instalment
attempts - [InstalmentAttempt!] Payment attempts
dueDate - String! The due date of the instalment
paidDate - String The date the instalment was paid
state - OrderInstalmentState! The state of the instalment
success - Boolean Was the payment successful (null means not attempted yet)
Example
{
  "amount": Money,
  "attempts": [InstalmentAttempt],
  "dueDate": "abc123",
  "paidDate": "xyz789",
  "state": "due",
  "success": false
}

InstalmentAttempt

Fields
Field Name Description
date - String! The date of the attempt to charge the instalment
isFinalAttempt - Boolean! Will another attempt be made to charge the payment?
isRetry - Boolean! Is this a retry on the payment?
lastFour - String The last four digits of the payment attempt method
method - PaymentAttemptMethod The payment method used for the attempt
origin - String! The origin of the payment attempt
paymentMethod - String The payment method of the attempt
state - String! The state of the transaction
success - Boolean! Was the attempt to charge the instalment successful
Example
{
  "date": "xyz789",
  "isFinalAttempt": false,
  "isRetry": true,
  "lastFour": "xyz789",
  "method": PaymentAttemptMethod,
  "origin": "xyz789",
  "paymentMethod": "xyz789",
  "state": "xyz789",
  "success": true
}

InstalmentsInfo

Fields
Field Name Description
cancellationAmount - Money! Amount to be paid for cancellation (sum of all outstanding instalments plus future instalments)
instalments - [Instalment!] The instalments for the payment of the order
instalmentsPaidCount - Int! The number of instalments that were successfully paid
outstanding - Money! Amount remaining to be paid (sum of all outstanding instalments)
paidSoFar - Money! Amount paid so far
total - Money! The total amount of the instalments (may be slightly less than order total, due to rounding of single instalments)
Example
{
  "cancellationAmount": Money,
  "instalments": [Instalment],
  "instalmentsPaidCount": 123,
  "outstanding": Money,
  "paidSoFar": Money,
  "total": Money
}

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

Json

Example
Json

LastOrderGlassPrescription

Description

Last Order Glasses prescription

Fields
Field Name Description
orderDate - String! The date of the order
orderNumber - String The order number
prescription - GlassesPrescription! The prescription on the order
Example
{
  "orderDate": "xyz789",
  "orderNumber": "abc123",
  "prescription": GlassesPrescription
}

LensElementOrTreatment

Fields
Field Name Description
description - [String!] The description of the product
elementType - String For lens elements products, the element type
group - String The group
isIncluded - Boolean Whether the lens element or treatment is included
isSunProtection - Boolean Whether sun protection is included
name - String! The name of the product
price - Money! The price of the lens element or treatment
primaryColour - String The colour
primaryColourHexCode - String The colour hex code
productKey - String! The key of the product
sku - String! The SKU of the product variant
Example
{
  "description": ["abc123"],
  "elementType": "xyz789",
  "group": "abc123",
  "isIncluded": true,
  "isSunProtection": false,
  "name": "abc123",
  "price": Money,
  "primaryColour": "abc123",
  "primaryColourHexCode": "xyz789",
  "productKey": "xyz789",
  "sku": "abc123"
}

LensInput

Fields
Input Field Description
elementsAndTreatments - [ElementsAndTreatmentsInput!]!
extrasOverrides - [String!]
productKey - String!
sku - String!
Example
{
  "elementsAndTreatments": [ElementsAndTreatmentsInput],
  "extrasOverrides": ["abc123"],
  "productKey": "xyz789",
  "sku": "abc123"
}

LensLineItem

Fields
Field Name Description
elementsAndTreatments - [LineItem!]
elementsAndTreatmentsGroups - [LineItemElementsAndTreatmentsGrouping!]
name - String
oneOffUnitPrice - Money
packDescription - String
packQuantity - Int
packageDiscountedPrice - Money
packagePrice - Money
productKey - String
quantity - Int
quantityLimits - QuantityLimits
replacementFrequency - ReplacementFrequency
sku - String
totalPrice - Money
Example
{
  "elementsAndTreatments": [LineItem],
  "elementsAndTreatmentsGroups": [
    LineItemElementsAndTreatmentsGrouping
  ],
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "packDescription": "xyz789",
  "packQuantity": 987,
  "packageDiscountedPrice": Money,
  "packagePrice": Money,
  "productKey": "abc123",
  "quantity": 987,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "sku": "abc123",
  "totalPrice": Money
}

LensOptionsInput

Fields
Input Field Description
productKey - String!
sku - String!
Example
{
  "productKey": "abc123",
  "sku": "abc123"
}

LineItem

Fields
Field Name Description
name - String
oneOffUnitPrice - Money
packDescription - String
packQuantity - Int
productKey - String
quantity - Int
quantityLimits - QuantityLimits
replacementFrequency - ReplacementFrequency
sku - String
totalPrice - Money
Example
{
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "packDescription": "xyz789",
  "packQuantity": 987,
  "productKey": "abc123",
  "quantity": 123,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "sku": "abc123",
  "totalPrice": Money
}

LineItemDataLayerInterface

Fields
Field Name Description
coupon - String The coupon of the product
currency - String! The currency of the line item
discount - Float The discount of the product
item_brand - String The name of the product
item_category - String! The name of the product
item_category2 - String The name of the product
item_category3 - String The name of the product
item_category4 - String The name of the product
item_id - String! The ID of the product
item_name - String! The name of the product
item_variant - String The name of the product
price - Float The name of the product
quantity - Int! The name of the product
value - Float! The total value of the line item
Example
{
  "coupon": "abc123",
  "currency": "xyz789",
  "discount": 123.45,
  "item_brand": "xyz789",
  "item_category": "abc123",
  "item_category2": "xyz789",
  "item_category3": "xyz789",
  "item_category4": "abc123",
  "item_id": "abc123",
  "item_name": "xyz789",
  "item_variant": "xyz789",
  "price": 123.45,
  "quantity": 123,
  "value": 987.65
}

LineItemElementsAndTreatmentsGrouping

Fields
Field Name Description
discountedPrice - Money
elementsAndTreatments - [LineItem!]
key - String
price - Money
Example
{
  "discountedPrice": Money,
  "elementsAndTreatments": [LineItem],
  "key": "abc123",
  "price": Money
}

LineItemGroup

Example
LineItemGroupContacts

LineItemGroupContacts

Fields
Field Name Description
brandName - String
dataLayer - DataLayerInterface The data layer for analytics
groupId - Int
groupType - String
image - Image
leftEye - LineItem Left eye line item
name - String!
oneOffUnitPrice - Money One off unit price (non-subscription unit price)
prescription - ContactLensPrescription! Contact lens Prescription
productKey - String
productStatus - String
recurrencePolicyId - String Recurrence policy ID for the contact lens group
rightEye - LineItem Right eye line item
shortDescription - String
subscriptionDiscountPercentage - Float Discount percentage for subscription-based line items
subscriptionSubtotal - Money Subtotal for subscription-based line items
subscriptionUnitPrice - Money Unit price for subscription-based line item
subtotal - Money
totalPrice - Money
url - String
Example
{
  "brandName": "abc123",
  "dataLayer": DataLayerInterface,
  "groupId": 123,
  "groupType": "xyz789",
  "image": Image,
  "leftEye": LineItem,
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "prescription": ContactLensPrescription,
  "productKey": "xyz789",
  "productStatus": "abc123",
  "recurrencePolicyId": "abc123",
  "rightEye": LineItem,
  "shortDescription": "xyz789",
  "subscriptionDiscountPercentage": 123.45,
  "subscriptionSubtotal": Money,
  "subscriptionUnitPrice": Money,
  "subtotal": Money,
  "totalPrice": Money,
  "url": "abc123"
}

LineItemGroupGlasses

Fields
Field Name Description
brandName - String
dataLayer - DataLayerInterface The data layer for analytics
discountedPrice - Money
frame - FrameLineItem Frame
groupId - Int
groupType - String
image - Image
lens - LensLineItem Lens
lensOptions - LineItem Lens Options
name - String!
oneOffUnitPrice - Money One off unit price (non-subscription unit price)
prescription - GlassesPrescription! Line Item Group Prescription
productKey - String
shortDescription - String
subtotal - Money
totalPrice - Money
unitPrice - Money
url - String
Example
{
  "brandName": "abc123",
  "dataLayer": DataLayerInterface,
  "discountedPrice": Money,
  "frame": FrameLineItem,
  "groupId": 987,
  "groupType": "xyz789",
  "image": Image,
  "lens": LensLineItem,
  "lensOptions": LineItem,
  "name": "xyz789",
  "oneOffUnitPrice": Money,
  "prescription": GlassesPrescription,
  "productKey": "abc123",
  "shortDescription": "xyz789",
  "subtotal": Money,
  "totalPrice": Money,
  "unitPrice": Money,
  "url": "xyz789"
}

LineItemGroupInterface

Fields
Field Name Description
brandName - String
dataLayer - DataLayerInterface The data layer for analytics
groupId - Int
groupType - String
image - Image
name - String!
oneOffUnitPrice - Money One off unit price (non-subscription unit price)
productKey - String
shortDescription - String
subtotal - Money
totalPrice - Money
url - String
Possible Types
LineItemGroupInterface Types

LineItemGroupContacts

LineItemGroupGlasses

LineItemGroupOther

Example
{
  "brandName": "abc123",
  "dataLayer": DataLayerInterface,
  "groupId": 987,
  "groupType": "xyz789",
  "image": Image,
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "productKey": "xyz789",
  "shortDescription": "xyz789",
  "subtotal": Money,
  "totalPrice": Money,
  "url": "abc123"
}

LineItemGroupOther

Fields
Field Name Description
brandName - String
dataLayer - DataLayerInterface The data layer for analytics
groupId - Int
groupType - String
image - Image
name - String!
oneOffUnitPrice - Money One off unit price (non-subscription unit price)
productKey - String
shortDescription - String
subtotal - Money
totalPrice - Money
url - String
Example
{
  "brandName": "abc123",
  "dataLayer": DataLayerInterface,
  "groupId": 987,
  "groupType": "abc123",
  "image": Image,
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "productKey": "xyz789",
  "shortDescription": "abc123",
  "subtotal": Money,
  "totalPrice": Money,
  "url": "abc123"
}

LineItemInterface

Fields
Field Name Description
name - String
oneOffUnitPrice - Money
packDescription - String
packQuantity - Int
productKey - String
quantity - Int
quantityLimits - QuantityLimits
replacementFrequency - ReplacementFrequency
sku - String
totalPrice - Money
Possible Types
LineItemInterface Types

FrameLineItem

LensLineItem

LineItem

Example
{
  "name": "xyz789",
  "oneOffUnitPrice": Money,
  "packDescription": "xyz789",
  "packQuantity": 123,
  "productKey": "xyz789",
  "quantity": 123,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "sku": "xyz789",
  "totalPrice": Money
}

Money

Fields
Field Name Description
centAmount - Int Cent amount
currencyCode - String Currency code
fractionDigits - Int Number of digits that are fractions
Example
{
  "centAmount": 987,
  "currencyCode": "xyz789",
  "fractionDigits": 987
}

MoneyInput

Fields
Input Field Description
centAmount - Int!
currencyCode - String!
fractionDigits - Int!
Example
{
  "centAmount": 123,
  "currencyCode": "abc123",
  "fractionDigits": 987
}

MyAnnualOverview

Description

Annual Overview

Fields
Field Name Description
orders - [AnnualOverviewOrder!]! The orders for the year
total - Money! The total amount for the year
year - Int! The year of this overview
Example
{
  "orders": [AnnualOverviewOrder],
  "total": Money,
  "year": 123
}

Notification

Fields
Field Name Description
code - String! code
lifetime - NotificationLifetime! lifetime
message - String! message
params - Object params
type - NotificationType! type
Example
{
  "code": "abc123",
  "lifetime": "EPHEMERAL",
  "message": "abc123",
  "params": Object,
  "type": "error"
}

NotificationLifetime

Values
Enum Value Description

EPHEMERAL

PERSISTENT

Example
"EPHEMERAL"

NotificationType

Values
Enum Value Description

error

info

warning

Example
"error"

Object

Example
Object

Order

Description

Order

Fields
Field Name Description
aftercareStore - AftercareStore The data layer for the cart
amountDue - Money The amount due (with the discounts applied and reduced by the gift cards authorised for this shopping cart)
billingAddress - Address Billing address details
createdAt - DateTime Date and time the cart was created
creditNotes - [OrderCreditNotes!] Credit notes applied to the order
customerEmail - String! Customer email address
customerId - String! Unique customer ID
dataLayer - DataLayerInterface The data layer for the cart
deliveryAddress - Address! Delivery address details
deliveryMethod - DeliveryMethod The delivery details including method and price
discountCodes - [String!] Discount codes applied to the cart
healthFund - String Health fund provider applied to cart
healthFundPolicy - String Health fund policy applied to cart
id - String Unique order ID
instalmentsInfo - InstalmentsInfo Instalments on Cart or Order (Post Pay orders only)
invoice - OrderInvoice
isBillingSameAsDeliveryAddress - Boolean Is the billing address the same as the delivery address?
isCollectionAvailable - Boolean Can the contents of the cart be collected?
isDeliveryAvailable - Boolean Can the contents of the cart be delivered?
isExpressReorder - Boolean Is this cart an express re-order?
isExpressReorderEnabled - Boolean
isSubscriptionCompatible - Boolean Whether the order is compatible with subscription services
isTaxInclusive - Boolean Whether or not tax is included in the prices
isValid - Boolean Flag to indicate whether or not the cart is in a valid state.
itemCount - Int Count of the number of items in the cart/order
lastOrderedAt - String Date and time the previous (express re-)order was placed
lineItemGroups - [LineItemGroup!] Grouping of items relating to a frames, contact lenses or other product group
notifications - [Notification!] Notifications on the cart
orderNumber - String Unique order number
paymentInfo - OrderPaymentInfo Payment information
prescription - OrderPrescription The prescription upload / store for the cart
promotionalTags - [String!] Promotional tags applicable to the cart
promotions - [OrderBasePromotion!]! The promotions applied to the cart/order
recurrencePolicies - [OrderRecurrencePolicy!] Recurrence policies applicable to the cart
replacementFrequency - ReplacementFrequency
selectedRecurrencePolicy - OrderRecurrencePolicy The currently active recurrence policy
subscriptionId - String The id of the subscription
subscriptionPaymentInfo - SubscriptionPaymentInfo Payment Information for the subscription order
subscriptionPlanType - String The type of subscription plan applied to the cart
subtotal - Money The price of all of the line items (without discounts applied)
totalPrice - Money The total price (with discounts applied)
workflowState - OrderWorkflowState! The state of the order
Example
{
  "aftercareStore": AftercareStore,
  "amountDue": Money,
  "billingAddress": Address,
  "createdAt": "2007-12-03T10:15:30Z",
  "creditNotes": [OrderCreditNotes],
  "customerEmail": "abc123",
  "customerId": "abc123",
  "dataLayer": DataLayerInterface,
  "deliveryAddress": Address,
  "deliveryMethod": DeliveryMethod,
  "discountCodes": ["abc123"],
  "healthFund": "xyz789",
  "healthFundPolicy": "abc123",
  "id": "xyz789",
  "instalmentsInfo": InstalmentsInfo,
  "invoice": OrderInvoice,
  "isBillingSameAsDeliveryAddress": true,
  "isCollectionAvailable": true,
  "isDeliveryAvailable": true,
  "isExpressReorder": false,
  "isExpressReorderEnabled": false,
  "isSubscriptionCompatible": true,
  "isTaxInclusive": false,
  "isValid": false,
  "itemCount": 987,
  "lastOrderedAt": "abc123",
  "lineItemGroups": [LineItemGroupContacts],
  "notifications": [Notification],
  "orderNumber": "xyz789",
  "paymentInfo": OrderPaymentInfo,
  "prescription": OrderPrescription,
  "promotionalTags": ["abc123"],
  "promotions": [OrderBasePromotion],
  "recurrencePolicies": [OrderRecurrencePolicy],
  "replacementFrequency": "DLY",
  "selectedRecurrencePolicy": OrderRecurrencePolicy,
  "subscriptionId": "abc123",
  "subscriptionPaymentInfo": SubscriptionPaymentInfo,
  "subscriptionPlanType": "xyz789",
  "subtotal": Money,
  "totalPrice": Money,
  "workflowState": "order_back_ordered"
}

OrderBaseInterface

Fields
Field Name Description
aftercareStore - AftercareStore The data layer for the cart
amountDue - Money The amount due (with the discounts applied and reduced by the gift cards authorised for this shopping cart)
billingAddress - Address Billing address details
createdAt - DateTime Date and time the cart was created
customerEmail - String Customer email address
dataLayer - DataLayerInterface The data layer for the cart
deliveryAddress - Address Delivery address details
deliveryMethod - DeliveryMethod The delivery details including method and price
discountCodes - [String!] Discount codes applied to the cart
healthFund - String Health fund provider applied to cart
healthFundPolicy - String Health fund policy applied to cart
id - String Unique order ID
instalmentsInfo - InstalmentsInfo Instalments on Cart or Order (Post Pay orders only)
isBillingSameAsDeliveryAddress - Boolean Is the billing address the same as the delivery address?
isCollectionAvailable - Boolean Can the contents of the cart be collected?
isDeliveryAvailable - Boolean Can the contents of the cart be delivered?
isExpressReorder - Boolean Is this cart an express re-order?
isSubscriptionCompatible - Boolean Whether the order is compatible with subscription services
isTaxInclusive - Boolean Whether or not tax is included in the prices
isValid - Boolean Flag to indicate whether or not the cart is in a valid state.
itemCount - Int Count of the number of items in the cart/order
lastOrderedAt - String Date and time the previous (express re-)order was placed
lineItemGroups - [LineItemGroup!] Grouping of items relating to a frames, contact lenses or other product group
notifications - [Notification!] Notifications on the cart
paymentInfo - OrderPaymentInfo Payment information
prescription - OrderPrescription The prescription upload / store for the cart
promotionalTags - [String!] Promotional tags applicable to the cart
promotions - [OrderBasePromotion!]! The promotions applied to the cart/order
recurrencePolicies - [OrderRecurrencePolicy!] Recurrence policies applicable to the cart
replacementFrequency - ReplacementFrequency
selectedRecurrencePolicy - OrderRecurrencePolicy The currently active recurrence policy
subscriptionId - String The id of the subscription
subscriptionPaymentInfo - SubscriptionPaymentInfo Payment Information for the subscription order
subscriptionPlanType - String The type of subscription plan applied to the cart
subtotal - Money The price of all of the line items (without discounts applied)
totalPrice - Money The total price (with discounts applied)
Possible Types
OrderBaseInterface Types

Cart

Order

Example
{
  "aftercareStore": AftercareStore,
  "amountDue": Money,
  "billingAddress": Address,
  "createdAt": "2007-12-03T10:15:30Z",
  "customerEmail": "abc123",
  "dataLayer": DataLayerInterface,
  "deliveryAddress": Address,
  "deliveryMethod": DeliveryMethod,
  "discountCodes": ["abc123"],
  "healthFund": "abc123",
  "healthFundPolicy": "abc123",
  "id": "abc123",
  "instalmentsInfo": InstalmentsInfo,
  "isBillingSameAsDeliveryAddress": true,
  "isCollectionAvailable": false,
  "isDeliveryAvailable": true,
  "isExpressReorder": true,
  "isSubscriptionCompatible": false,
  "isTaxInclusive": false,
  "isValid": false,
  "itemCount": 123,
  "lastOrderedAt": "xyz789",
  "lineItemGroups": [LineItemGroupContacts],
  "notifications": [Notification],
  "paymentInfo": OrderPaymentInfo,
  "prescription": OrderPrescription,
  "promotionalTags": ["xyz789"],
  "promotions": [OrderBasePromotion],
  "recurrencePolicies": [OrderRecurrencePolicy],
  "replacementFrequency": "DLY",
  "selectedRecurrencePolicy": OrderRecurrencePolicy,
  "subscriptionId": "abc123",
  "subscriptionPaymentInfo": SubscriptionPaymentInfo,
  "subscriptionPlanType": "xyz789",
  "subtotal": Money,
  "totalPrice": Money
}

OrderBasePromotion

Fields
Field Name Description
code - String Promotion code
label - String Label for the promotion
saving - Money Monetary saving of the promotion
type - OrderPromotionType! Promotion type
Example
{
  "code": "abc123",
  "label": "abc123",
  "saving": Money,
  "type": "auto"
}

OrderCreditNotes

Description

Refund credit note

Fields
Field Name Description
fileName - String! File name of the credit note PDF
urlPath - String! Storage path for the credit note PDF
Example
{
  "fileName": "abc123",
  "urlPath": "abc123"
}

OrderExistingPrescriptionUpload

Fields
Field Name Description
fileName - String! File name of the existing prescription upload
id - String! Unique identifier of the existing prescription upload
status - ExternalPrescriptionUploadStatus! Status of the external prescription upload
Example
{
  "fileName": "xyz789",
  "id": "abc123",
  "status": "UPLOAD_INITIATED"
}

OrderInstalmentState

Values
Enum Value Description

due

failed

future

outstanding

paid

pending

system_error

Example
"due"

OrderInvoice

Description

Sales invoice

Fields
Field Name Description
urlPath - String! Storage path for the invoice PDF
Example
{"urlPath": "abc123"}

OrderPagedOrders

Fields
Field Name Description
items - [Order!]! Orders for the current page
pageInfo - PageInfo! page Info
Example
{
  "items": [Order],
  "pageInfo": PageInfo
}

OrderPayment

Fields
Field Name Description
amountPlanned - Money! Amount
brand - String Brand
expiryMonth - String Expiry month of payment card
expiryYear - String Expiry year of payment card
id - String ID
key - String Key
lastFour - String End digits of payment card
method - String! Method
status - String! Status
transactions - [Transaction!] Transactions
Example
{
  "amountPlanned": Money,
  "brand": "abc123",
  "expiryMonth": "xyz789",
  "expiryYear": "abc123",
  "id": "abc123",
  "key": "xyz789",
  "lastFour": "abc123",
  "method": "xyz789",
  "status": "abc123",
  "transactions": [Transaction]
}

OrderPaymentInfo

Fields
Field Name Description
payments - [OrderPayment!] Grouping of payments on the order
Example
{"payments": [OrderPayment]}

OrderPrescription

Fields
Field Name Description
store - OrderPrescriptionStore Prescription issuing store
upload - OrderPrescriptionUpload Prescription upload details
Example
{
  "store": OrderPrescriptionStore,
  "upload": OrderPrescriptionUpload
}

OrderPrescriptionStore

Fields
Field Name Description
existing - PrescriptionStore Existing prescription issuing store
isRequired - Boolean! Indicates if the prescription store is required
Example
{"existing": PrescriptionStore, "isRequired": false}

OrderPrescriptionUpload

Fields
Field Name Description
existing - OrderExistingPrescriptionUpload Existing prescription upload
isRequired - Boolean! Indicates if the prescription upload is required
Example
{
  "existing": OrderExistingPrescriptionUpload,
  "isRequired": false
}

OrderPromotionType

Values
Enum Value Description

auto

code

Example
"auto"

OrderRecurrencePolicy

Fields
Field Name Description
id - String! Unique identifier of the recurrence policy
intervalUnit - StandardScheduleUnits! The interval unit for the subscription (e.g., Days, Weeks, Months)
value - Int! Number of intervals between orders
Example
{
  "id": "abc123",
  "intervalUnit": "Days",
  "value": 987
}

OrderWorkflowState

Values
Enum Value Description

order_back_ordered

order_cancelled

order_collected

order_complete

order_confirmed

order_open

order_pending_cancellation

order_pending_rx_validation

order_processing

order_remorse

order_shipped

Example
"order_back_ordered"

PageInfo

Fields
Field Name Description
endCursor - String End cursor
hasNextPage - Boolean! Is there next page?
hasPreviousPage - Boolean! Is there previous page?
limit - Int Limit of items to return
startCursor - String Start cursor
Example
{
  "endCursor": "xyz789",
  "hasNextPage": false,
  "hasPreviousPage": false,
  "limit": 987,
  "startCursor": "xyz789"
}

PagedAppointments

Fields
Field Name Description
items - [Appointment!]! Appointments for the current page
pageInfo - PageInfo! page Info
Example
{
  "items": [Appointment],
  "pageInfo": PageInfo
}

PauseSubscriptionInput

Fields
Input Field Description
subscriptionId - String! The subscription ID
Example
{"subscriptionId": "xyz789"}

PaymentAttempt

Fields
Field Name Description
amount - Money! Attempted payment amount
date - String! Attempt date as ISO string
isFinalAttempt - Boolean! Will another attempt be made to charge the payment?
isRetry - Boolean! Is this a retry on the payment?
method - PaymentMethod!
origin - String! The origin of the payment attempt
state - String! The state of the transaction
Example
{
  "amount": Money,
  "date": "abc123",
  "isFinalAttempt": false,
  "isRetry": false,
  "method": PaymentMethod,
  "origin": "abc123",
  "state": "xyz789"
}

PaymentAttemptMethod

Fields
Field Name Description
brand - String The brand of the payment attempt method
lastFour - String The last four digits of the payment attempt method
Example
{
  "brand": "abc123",
  "lastFour": "abc123"
}

PaymentMethod

Fields
Field Name Description
brand - String Card brand
lastFour - String Last four digits of card
Example
{
  "brand": "xyz789",
  "lastFour": "xyz789"
}

PostponeSubscriptionOrderInput

Fields
Input Field Description
postponeNextOrderAt - String! The date/time of the next order for the subscription (must be after current nextOrderAt)
subscriptionId - String! The subscription plan ID
Example
{
  "postponeNextOrderAt": "abc123",
  "subscriptionId": "xyz789"
}

PrescriptionInput

Fields
Input Field Description
confirmValid - Boolean Flag indicating that the prescription has been confirmed as valid by user
date - String The date the prescription was created
glassesFunction - GlassesFunction!
leftEye - EyePrescriptionInput
rightEye - EyePrescriptionInput
source - PrescriptionSource
storeId - String The ID of the store where the prescription was issued
Example
{
  "confirmValid": true,
  "date": "xyz789",
  "glassesFunction": "DISTANCE",
  "leftEye": EyePrescriptionInput,
  "rightEye": EyePrescriptionInput,
  "source": "EXTERNAL",
  "storeId": "xyz789"
}

PrescriptionSource

Values
Enum Value Description

EXTERNAL

INTERNAL

Example
"EXTERNAL"

PrescriptionSourceType

Values
Enum Value Description

EXTERNAL

INTERNAL

Example
"EXTERNAL"

PrescriptionStore

Fields
Field Name Description
id - String! Unique identifier of the existing prescription issuing store
name - String! Name of the existing prescription issuing store
Example
{
  "id": "xyz789",
  "name": "xyz789"
}

PrescriptionUploadInitiatedInput

Fields
Input Field Description
extension - String!
fileName - String!
id - String!
Example
{
  "extension": "abc123",
  "fileName": "abc123",
  "id": "xyz789"
}

ProductSelectionOptions

Fields
Field Name Description
allAttributeOptions - [AttributeOptions!]! All attribute options
image - CatalogImage image
name - String name
price - Money Product price
productGroup - String! productGroup
productKey - String! productKey
productUrl - String
variantAttributes - [VariantAttribute!]! Variant attributes
Example
{
  "allAttributeOptions": [AttributeOptions],
  "image": CatalogImage,
  "name": "abc123",
  "price": Money,
  "productGroup": "xyz789",
  "productKey": "abc123",
  "productUrl": "xyz789",
  "variantAttributes": [VariantAttribute]
}

ProductVariantOptions

Fields
Field Name Description
allAttributeOptions - [AttributeOptions!]! All attribute options
variantAttributes - [VariantAttribute!]! Variant attributes
Example
{
  "allAttributeOptions": [AttributeOptions],
  "variantAttributes": [VariantAttribute]
}

QuantityLimits

Fields
Field Name Description
max - Int Maximum quantity limit
min - Int Minimum quantity limit
Example
{"max": 987, "min": 123}

RecurringOrderState

Values
Enum Value Description

Active

Cancelled

Expired

Failed

Frozen

Paused

PendingCancellation

Example
"Active"

RemoveAddressInput

Fields
Input Field Description
addressId - String!
isBilling - Boolean
isDelivery - Boolean
Example
{
  "addressId": "xyz789",
  "isBilling": false,
  "isDelivery": true
}

RemoveDiscountCodeFromCartInput

Fields
Input Field Description
code - String!
Example
{"code": "xyz789"}

RemovePrescriptionUploadInput

Fields
Input Field Description
id - String!
Example
{"id": "xyz789"}

RemoveStoredPaymentMethodInput

Fields
Input Field Description
paymentMethodId - String!
Example
{"paymentMethodId": "xyz789"}

RemoveSubscriptionCartContactLensGroupInput

Fields
Input Field Description
groupId - Int! The contact lens group ID
subscriptionId - String! The subscription ID
Example
{"groupId": 123, "subscriptionId": "abc123"}

ReplacementFrequency

Values
Enum Value Description

DLY

MLY

TMLY

Example
"DLY"

ResumeSubscriptionInput

Fields
Input Field Description
subscriptionId - String! The subscription ID
Example
{"subscriptionId": "xyz789"}

RetryPaymentInput

Fields
Input Field Description
amount - MoneyInput!
browserInfo - Object!
lastFour - String!
paymentMethod - Object!
paymentMethodId - String! The payment method ID to use for the payment retry
subscriptionId - String! The subscription ID
Example
{
  "amount": MoneyInput,
  "browserInfo": Object,
  "lastFour": "abc123",
  "paymentMethod": Object,
  "paymentMethodId": "abc123",
  "subscriptionId": "xyz789"
}

ServiceType

Values
Enum Value Description

EXPRESS

STANDARD

Example
"EXPRESS"

SetAftercareStoreInput

Fields
Input Field Description
aftercareStoreId - String!
Example
{"aftercareStoreId": "abc123"}

SetAftercareStoreOnCartInput

Fields
Input Field Description
aftercareStoreId - String!
Example
{"aftercareStoreId": "xyz789"}

SetBillingAddressIdInput

Fields
Input Field Description
addressId - String
Example
{"addressId": "abc123"}

SetBillingAddressOnCartAddressTypeInput

Fields
Input Field Description
addToAccount - Boolean
addToAccountAsDefault - Boolean
address - AddressInput!
Example
{
  "addToAccount": false,
  "addToAccountAsDefault": false,
  "address": AddressInput
}

SetBillingAddressOnCartInput

Fields
Input Field Description
billing - SetBillingAddressOnCartAddressTypeInput!
Example
{"billing": SetBillingAddressOnCartAddressTypeInput}

SetDefaultAddressInput

Fields
Input Field Description
id - String!
isDefaultBilling - Boolean
isDefaultDelivery - Boolean
Example
{
  "id": "xyz789",
  "isDefaultBilling": false,
  "isDefaultDelivery": false
}

SetDeliveryAddressIdInput

Fields
Input Field Description
addressId - String
billingSameAsDeliveryAddress - Boolean
Example
{
  "addressId": "xyz789",
  "billingSameAsDeliveryAddress": true
}

SetDeliveryAddressIdOnSubscriptionInput

Fields
Input Field Description
addressId - String! The id of the address in the customer' address book
billingSameAsDeliveryAddress - Boolean Should the address also be used as the billing address on the subscription
subscriptionId - String! The id of the subscription to add the delivery address to
Example
{
  "addressId": "xyz789",
  "billingSameAsDeliveryAddress": false,
  "subscriptionId": "xyz789"
}

SetDeliveryAddressOnCartAddressTypeInput

Fields
Input Field Description
addToAccount - Boolean
addToAccountAsDefault - Boolean
address - AddressInput!
Example
{
  "addToAccount": false,
  "addToAccountAsDefault": false,
  "address": AddressInput
}

SetDeliveryAddressOnCartInput

Fields
Input Field Description
billingSameAsDeliveryAddress - Boolean
delivery - SetDeliveryAddressOnCartAddressTypeInput!
Example
{
  "billingSameAsDeliveryAddress": false,
  "delivery": SetDeliveryAddressOnCartAddressTypeInput
}

SetDeliveryAddressOnSubscriptionAddressTypeInput

Fields
Input Field Description
addToAccount - Boolean
addToAccountAsDefault - Boolean
address - AddressInput!
Example
{
  "addToAccount": true,
  "addToAccountAsDefault": true,
  "address": AddressInput
}

SetDeliveryAddressOnSubscriptionInput

Fields
Input Field Description
billingSameAsDeliveryAddress - Boolean
delivery - SetDeliveryAddressOnSubscriptionAddressTypeInput!
subscriptionId - String! The id of the subscription to add the delivery address to
Example
{
  "billingSameAsDeliveryAddress": true,
  "delivery": SetDeliveryAddressOnSubscriptionAddressTypeInput,
  "subscriptionId": "abc123"
}

StandardScheduleUnits

Values
Enum Value Description

Days

Months

Weeks

Example
"Days"

StoredPaymentMethod

Fields
Field Name Description
billingAddress - Address! The billing address associated with this payment method
brand - String The brand of the card or payment method (e.g. Visa, PayPal)
createdAt - DateTime! Date and time the payment method was stored
expiryMonth - Int! The expiry month of the card, if applicable
expiryYear - Int! The expiry year of the card, if applicable
holderName - String! The full name of the card or account holder
id - String! The unique identifier of the stored payment method
isExpired - Boolean! Indicates if this payment method is expired or not
isLinkedToActiveSubscription - Boolean! Indicates if this payment method is currently linked to an active subscription. Payment methods linked to active subscriptions cannot be deleted.
isVerified - Boolean! Indicates if this payment method is still valid (not expired or revoked)
lastFour - String! The last four digits of the card number, if applicable
lastUsedAt - DateTime Date and time the payment method was last used
nickname - String An optional nickname given to the stored payment method
supportsSubscriptions - Boolean! Indicates if this payment method supports subscriptions
token - String!
Example
{
  "billingAddress": Address,
  "brand": "xyz789",
  "createdAt": "2007-12-03T10:15:30Z",
  "expiryMonth": 123,
  "expiryYear": 987,
  "holderName": "xyz789",
  "id": "xyz789",
  "isExpired": true,
  "isLinkedToActiveSubscription": true,
  "isVerified": false,
  "lastFour": "xyz789",
  "lastUsedAt": "2007-12-03T10:15:30Z",
  "nickname": "xyz789",
  "supportsSubscriptions": false,
  "token": "xyz789"
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

SubscriptionCancellationInfo

Fields
Field Name Description
cancelledAt - String! The ISO date the subscription was cancelled
cancelledBy - SubscriptionCancellationUser! The user who cancelled the subscription
code - String! The cancellation code
detail - String! The cancellation detail
id - String! The unique ID of the cancellation
key - String! The key of the cancellation
Example
{
  "cancelledAt": "abc123",
  "cancelledBy": SubscriptionCancellationUser,
  "code": "xyz789",
  "detail": "xyz789",
  "id": "xyz789",
  "key": "xyz789"
}

SubscriptionCancellationUser

Fields
Field Name Description
email - String The user email
id - String! The user ID
name - String The user name
userType - String! The type of user (e.g. COLLEAGUE, CUSTOMER)
Example
{
  "email": "abc123",
  "id": "xyz789",
  "name": "xyz789",
  "userType": "xyz789"
}

SubscriptionPaymentInfo

Fields
Field Name Description
attempts - [PaymentAttempt!]! List of payment attempts
state - String The state of the most recent payment attempt
Example
{
  "attempts": [PaymentAttempt],
  "state": "abc123"
}

SubscriptionWithAdyenResponse

Description

Subscription with an Adyen response for a payment on that subscription (cancellation, re-activate)

Fields
Field Name Description
adyenResponse - AdyenPaymentsResponse The Adyen response for the payment attempt
subscription - Subscription! The updated subscription
Example
{
  "adyenResponse": AdyenPaymentsResponse,
  "subscription": Subscription
}

Transaction

Fields
Field Name Description
amount - Money! The amount
state - String! The state of the transaction
timestamp - String! The timestamp of the transaction
type - String! The type of the transaction
Example
{
  "amount": Money,
  "state": "xyz789",
  "timestamp": "abc123",
  "type": "xyz789"
}

UpdateCartDeleteGroupInput

Fields
Input Field Description
groupId - Int!
Example
{"groupId": 987}

UpdateCartSubscriptionInput

Fields
Input Field Description
recurrencePolicyId - String The recurrence policy ID, or null for one-off
subscriptionPlanType - String The subscription plan type (e.g., RECURRING) or null for one-off
Example
{
  "recurrencePolicyId": "xyz789",
  "subscriptionPlanType": "xyz789"
}

UpdateContactLensToCartInput

Fields
Input Field Description
groupId - Int!
leftEye - EyeInput
rightEye - EyeInput
Example
{
  "groupId": 123,
  "leftEye": EyeInput,
  "rightEye": EyeInput
}

UpdateEmailInput

Fields
Input Field Description
email - String!
Example
{"email": "xyz789"}

UpdatePaymentMethodInput

Fields
Input Field Description
address - AddressInput
expiryMonth - Int
expiryYear - Int
holderName - String
paymentMethodId - String!
Example
{
  "address": AddressInput,
  "expiryMonth": 123,
  "expiryYear": 123,
  "holderName": "abc123",
  "paymentMethodId": "abc123"
}

UpdatePersonalDetailsInput

Fields
Input Field Description
dateOfBirth - String
firstName - String
gender - Gender
lastName - String
marketingOptIn - Boolean
nationalHealthId - String
phoneNumber - String
title - String
Example
{
  "dateOfBirth": "abc123",
  "firstName": "abc123",
  "gender": "FEMALE",
  "lastName": "abc123",
  "marketingOptIn": false,
  "nationalHealthId": "xyz789",
  "phoneNumber": "abc123",
  "title": "abc123"
}

UpdateSubscriptionCartContactLensGroupInput

Fields
Input Field Description
contacts - ContactsInput! The contact lens group content
groupId - Int! The contact lens group ID
subscriptionId - String! The subscription ID
Example
{
  "contacts": ContactsInput,
  "groupId": 987,
  "subscriptionId": "abc123"
}

UpdateSubscriptionInput

Fields
Input Field Description
nextOrderAt - String The desired next order at date for the subscription
recurrencePolicyId - String The recurrence policy ID
subscriptionId - String! The subscription ID
Example
{
  "nextOrderAt": "abc123",
  "recurrencePolicyId": "xyz789",
  "subscriptionId": "xyz789"
}

UpdateSubscriptionPaymentMethodInput

Fields
Input Field Description
amount - MoneyInput!
browserInfo - Object!
lastFour - String!
paymentMethod - Object!
paymentMethodId - String! The payment method ID
subscriptionId - String! The subscription ID
Example
{
  "amount": MoneyInput,
  "browserInfo": Object,
  "lastFour": "xyz789",
  "paymentMethod": Object,
  "paymentMethodId": "abc123",
  "subscriptionId": "xyz789"
}

VariantAttribute

Fields
Field Name Description
attributes - [Attribute!]! Attributes
key - String! Variant attribute key
Example
{
  "attributes": [Attribute],
  "key": "xyz789"
}