Specsavers Customer Service GraphQL API

This is the GraphQL API for the Specsavers Customer Service application.

Authentication

This API uses Entra JWT Bearer tokens for authentication.

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

1.0.0

Queries

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": 123,
  "productKey": "xyz789",
  "recurrencePolicyId": "abc123",
  "rightEyeQuantity": 987,
  "subscriptionPlanType": "xyz789"
}
Response
{
  "data": {
    "contactLensSubscriptionPrice": {
      "instalmentPrice": Money,
      "totalListPrice": Money,
      "totalPrice": Money,
      "totalQuantity": 123
    }
  }
}

customerAnnualOverview

Description

Retrieves the Annual Overview report for a customer by ID for a specific year

Response

Returns a CustomerAnnualOverview!

Arguments
Name Description
customerId - String!
year - Int!

Example

Query
query customerAnnualOverview(
  $customerId: String!,
  $year: Int!
) {
  customerAnnualOverview(
    customerId: $customerId,
    year: $year
  ) {
    customer {
      ...CustomerFragment
    }
    overview {
      ...AnnualOverviewFragment
    }
  }
}
Variables
{"customerId": "abc123", "year": 123}
Response
{
  "data": {
    "customerAnnualOverview": {
      "customer": Customer,
      "overview": AnnualOverview
    }
  }
}

customerById

Description

Get a customer by customer id and siteKey

Response

Returns a Customer

Arguments
Name Description
id - String! The customer ID to search for

Example

Query
query customerById($id: String!) {
  customerById(id: $id) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"id": "abc123"}
Response
{
  "data": {
    "customerById": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "abc123",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "abc123",
      "firstName": "abc123",
      "gender": "abc123",
      "id": "abc123",
      "lastName": "abc123",
      "lastOrder": Order,
      "marketingOptIn": true,
      "nationalHealthId": "abc123",
      "phoneNumber": "xyz789",
      "registeredOnSite": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

customerOrders

Description

Query for customer orders

Response

Returns an OrderQueryResults

Arguments
Name Description
endCursor - String
id - String! The customer ID to search for
limit - Int The number of orders to retrieve at a time
sort - String Order sort criteria - if unspecified orders are sorted by descending creation data
startCursor - String When paging through results, use this to indicate where next page should start

Example

Query
query customerOrders(
  $endCursor: String,
  $id: String!,
  $limit: Int,
  $sort: String,
  $startCursor: String
) {
  customerOrders(
    endCursor: $endCursor,
    id: $id,
    limit: $limit,
    sort: $sort,
    startCursor: $startCursor
  ) {
    items {
      ...OrderFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "endCursor": "abc123",
  "id": "xyz789",
  "limit": 987,
  "sort": "abc123",
  "startCursor": "abc123"
}
Response
{
  "data": {
    "customerOrders": {
      "items": [Order],
      "pageInfo": PageInfo,
      "totalCount": 987
    }
  }
}

exactCustomersSearch

Description

Search for customers

Response

Returns an ExactCustomerSearchResults

Arguments
Name Description
cursor - Cursor
limit - Int
query - ExactSearchQuery!

Example

Query
query exactCustomersSearch(
  $cursor: Cursor,
  $limit: Int,
  $query: ExactSearchQuery!
) {
  exactCustomersSearch(
    cursor: $cursor,
    limit: $limit,
    query: $query
  ) {
    items {
      ... on ExactCustomersSearchFullResultItem {
        ...ExactCustomersSearchFullResultItemFragment
      }
      ... on ExactCustomersSearchPartialResultItem {
        ...ExactCustomersSearchPartialResultItemFragment
      }
    }
  }
}
Variables
{
  "cursor": Cursor,
  "limit": 987,
  "query": ExactSearchQuery
}
Response
{
  "data": {
    "exactCustomersSearch": {
      "items": [ExactCustomersSearchFullResultItem]
    }
  }
}

generateReplacementSummary

Description

Generates a Replacement Summary object for a given order id

Response

Returns a ReplacementSummary

Arguments
Name Description
orderId - String!

Example

Query
query generateReplacementSummary($orderId: String!) {
  generateReplacementSummary(orderId: $orderId) {
    deliveryAddress {
      ...AddressFragment
    }
    lineItems {
      ... on ReplacementSummaryLineItemContactLens {
        ...ReplacementSummaryLineItemContactLensFragment
      }
      ... on ReplacementSummaryLineItemGlasses {
        ...ReplacementSummaryLineItemGlassesFragment
      }
      ... on ReplacementSummaryLineItemOther {
        ...ReplacementSummaryLineItemOtherFragment
      }
    }
    orderId
  }
}
Variables
{"orderId": "xyz789"}
Response
{
  "data": {
    "generateReplacementSummary": {
      "deliveryAddress": Address,
      "lineItems": [
        ReplacementSummaryLineItemContactLens
      ],
      "orderId": "abc123"
    }
  }
}

generateReturnSummary

Description

Generates a Return Summary object for a given order id

Response

Returns a ReturnSummary

Arguments
Name Description
orderId - String!

Example

Query
query generateReturnSummary($orderId: String!) {
  generateReturnSummary(orderId: $orderId) {
    availableToRefund {
      ...MoneyFragment
    }
    itemsRefund {
      ...MoneyFragment
    }
    lineItems {
      ... on ReturnSummaryLineItemContactLens {
        ...ReturnSummaryLineItemContactLensFragment
      }
      ... on ReturnSummaryLineItemGlasses {
        ...ReturnSummaryLineItemGlassesFragment
      }
      ... on ReturnSummaryLineItemOther {
        ...ReturnSummaryLineItemOtherFragment
      }
    }
    orderId
    previouslyRefunded {
      ...MoneyFragment
    }
    shipping {
      ...ReturnSummaryShippingFragment
    }
    shippingRefund {
      ...MoneyFragment
    }
    totalRefund {
      ...MoneyFragment
    }
  }
}
Variables
{"orderId": "xyz789"}
Response
{
  "data": {
    "generateReturnSummary": {
      "availableToRefund": Money,
      "itemsRefund": Money,
      "lineItems": [ReturnSummaryLineItemContactLens],
      "orderId": "xyz789",
      "previouslyRefunded": Money,
      "shipping": ReturnSummaryShipping,
      "shippingRefund": Money,
      "totalRefund": Money
    }
  }
}

getAppeasementSummary

Description

Generates an AppeasementSummary object for a given order id. If AppeasementCalculationInput is provided the summary will change based on the resulting calculations.

Response

Returns an AppeasementSummary!

Arguments
Name Description
input - AppeasementCalculationInput
orderId - String!

Example

Query
query getAppeasementSummary(
  $input: AppeasementCalculationInput,
  $orderId: String!
) {
  getAppeasementSummary(
    input: $input,
    orderId: $orderId
  ) {
    availableToRefund {
      ...MoneyFragment
    }
    itemsRefund {
      ...MoneyFragment
    }
    lineItems {
      ... on AppeasementSummaryLineItemContactLens {
        ...AppeasementSummaryLineItemContactLensFragment
      }
      ... on AppeasementSummaryLineItemGlasses {
        ...AppeasementSummaryLineItemGlassesFragment
      }
      ... on AppeasementSummaryLineItemOther {
        ...AppeasementSummaryLineItemOtherFragment
      }
    }
    orderId
    shipping {
      ...AppeasementSummaryShippingFragment
    }
    shippingRefund {
      ...MoneyFragment
    }
    totalRefund {
      ...MoneyFragment
    }
  }
}
Variables
{
  "input": AppeasementCalculationInput,
  "orderId": "abc123"
}
Response
{
  "data": {
    "getAppeasementSummary": {
      "availableToRefund": Money,
      "itemsRefund": Money,
      "lineItems": [
        AppeasementSummaryLineItemContactLens
      ],
      "orderId": "xyz789",
      "shipping": AppeasementSummaryShipping,
      "shippingRefund": Money,
      "totalRefund": Money
    }
  }
}

getAppointments

Description

Retrieves the customer's appointments

Response

Returns a PagedAppointments

Arguments
Name Description
cursor - Cursor
handle - String The customer handle to search for
id - String The customer ID to search for
limit - Int

Example

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

getReturn

Description

Gets a Return object for a given order number

Response

Returns a Return

Arguments
Name Description
orderNumber - String!
returnKey - String!

Example

Query
query getReturn(
  $orderNumber: String!,
  $returnKey: String!
) {
  getReturn(
    orderNumber: $orderNumber,
    returnKey: $returnKey
  ) {
    createdAt
    createdBy {
      ...OrderUserActionInfoFragment
    }
    creditNote {
      ...OrderCreditNoteFragment
    }
    includeShipping
    itemsRefund {
      ...MoneyFragment
    }
    itemsReturned
    key
    lastModifiedAt
    lastModifiedBy {
      ...OrderUserActionInfoFragment
    }
    lineItems {
      ... on ReturnLineItemContactLens {
        ...ReturnLineItemContactLensFragment
      }
      ... on ReturnLineItemGlasses {
        ...ReturnLineItemGlassesFragment
      }
      ... on ReturnLineItemOther {
        ...ReturnLineItemOtherFragment
      }
    }
    originalOrderNumber
    refundMethods
    refundStatus
    returnStatus
    returnType
    shippingRefund {
      ...MoneyFragment
    }
    shippingReturnAdditionalInfo
    shippingReturnReason
    shippingReturnReasonCode
    totalRefund {
      ...MoneyFragment
    }
  }
}
Variables
{
  "orderNumber": "abc123",
  "returnKey": "abc123"
}
Response
{
  "data": {
    "getReturn": {
      "createdAt": "abc123",
      "createdBy": OrderUserActionInfo,
      "creditNote": OrderCreditNote,
      "includeShipping": true,
      "itemsRefund": Money,
      "itemsReturned": true,
      "key": "abc123",
      "lastModifiedAt": "abc123",
      "lastModifiedBy": OrderUserActionInfo,
      "lineItems": [ReturnLineItemContactLens],
      "originalOrderNumber": "abc123",
      "refundMethods": ["xyz789"],
      "refundStatus": "FAILED",
      "returnStatus": "COMPLETE",
      "returnType": "APPEASEMENT",
      "shippingRefund": Money,
      "shippingReturnAdditionalInfo": "xyz789",
      "shippingReturnReason": "xyz789",
      "shippingReturnReasonCode": "abc123",
      "totalRefund": Money
    }
  }
}

getReturns

Description

Lists Return objects for a given order number

Response

Returns [Return!]

Arguments
Name Description
orderNumber - String!

Example

Query
query getReturns($orderNumber: String!) {
  getReturns(orderNumber: $orderNumber) {
    createdAt
    createdBy {
      ...OrderUserActionInfoFragment
    }
    creditNote {
      ...OrderCreditNoteFragment
    }
    includeShipping
    itemsRefund {
      ...MoneyFragment
    }
    itemsReturned
    key
    lastModifiedAt
    lastModifiedBy {
      ...OrderUserActionInfoFragment
    }
    lineItems {
      ... on ReturnLineItemContactLens {
        ...ReturnLineItemContactLensFragment
      }
      ... on ReturnLineItemGlasses {
        ...ReturnLineItemGlassesFragment
      }
      ... on ReturnLineItemOther {
        ...ReturnLineItemOtherFragment
      }
    }
    originalOrderNumber
    refundMethods
    refundStatus
    returnStatus
    returnType
    shippingRefund {
      ...MoneyFragment
    }
    shippingReturnAdditionalInfo
    shippingReturnReason
    shippingReturnReasonCode
    totalRefund {
      ...MoneyFragment
    }
  }
}
Variables
{"orderNumber": "abc123"}
Response
{
  "data": {
    "getReturns": [
      {
        "createdAt": "xyz789",
        "createdBy": OrderUserActionInfo,
        "creditNote": OrderCreditNote,
        "includeShipping": true,
        "itemsRefund": Money,
        "itemsReturned": false,
        "key": "xyz789",
        "lastModifiedAt": "xyz789",
        "lastModifiedBy": OrderUserActionInfo,
        "lineItems": [ReturnLineItemContactLens],
        "originalOrderNumber": "abc123",
        "refundMethods": ["abc123"],
        "refundStatus": "FAILED",
        "returnStatus": "COMPLETE",
        "returnType": "APPEASEMENT",
        "shippingRefund": Money,
        "shippingReturnAdditionalInfo": "xyz789",
        "shippingReturnReason": "xyz789",
        "shippingReturnReasonCode": "xyz789",
        "totalRefund": Money
      }
    ]
  }
}

orderByNumber

Description

Get an order by order number

Response

Returns an Order

Arguments
Name Description
orderNumber - String!

Example

Query
query orderByNumber($orderNumber: String!) {
  orderByNumber(orderNumber: $orderNumber) {
    activity {
      ... on OrderActivityPayment {
        ...OrderActivityPaymentFragment
      }
      ... on OrderActivityStatusChange {
        ...OrderActivityStatusChangeFragment
      }
    }
    billingAddress {
      ...AddressFragment
    }
    cancellationInfo {
      ...OrderCancellationInfoFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNoteFragment
    }
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isAppeaseable
    isBillingSameAsDeliveryAddress
    isCancellable
    isExpressReorder
    isReplaceable
    isReplacementOrder
    isReturnable
    isSubscriptionOrder
    isSubscriptionPostpay
    isSubscriptionPrepay
    isSubscriptionRecurring
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    orderNumber
    originalOrderId
    originalOrderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
    replacementOrderIds
    returns {
      ...ReturnFragment
    }
    returnsAndAppeasements {
      ...ReturnsAndAppeasementsFragment
    }
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    type
    workflowState
  }
}
Variables
{"orderNumber": "abc123"}
Response
{
  "data": {
    "orderByNumber": {
      "activity": [OrderActivityPayment],
      "billingAddress": Address,
      "cancellationInfo": OrderCancellationInfo,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNote],
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isAppeaseable": true,
      "isBillingSameAsDeliveryAddress": true,
      "isCancellable": true,
      "isExpressReorder": true,
      "isReplaceable": true,
      "isReplacementOrder": false,
      "isReturnable": true,
      "isSubscriptionOrder": true,
      "isSubscriptionPostpay": true,
      "isSubscriptionPrepay": true,
      "isSubscriptionRecurring": true,
      "isValid": true,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "orderNumber": "xyz789",
      "originalOrderId": "abc123",
      "originalOrderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "replacementInfo": OrderReplacementInfo,
      "replacementOrderIds": ["xyz789"],
      "returns": [Return],
      "returnsAndAppeasements": [ReturnsAndAppeasements],
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money,
      "type": "RECURRING",
      "workflowState": "order_back_ordered"
    }
  }
}

ordersByIds

Description

Retrieves the orders for a given list of ids

Response

Returns [OrderSelection]!

Arguments
Name Description
ids - [String!]!

Example

Query
query ordersByIds($ids: [String!]!) {
  ordersByIds(ids: $ids) {
    createdAt
    id
    lastModifiedAt
    orderNumber
    orderState
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
  }
}
Variables
{"ids": ["abc123"]}
Response
{
  "data": {
    "ordersByIds": [
      {
        "createdAt": "abc123",
        "id": "abc123",
        "lastModifiedAt": "xyz789",
        "orderNumber": "xyz789",
        "orderState": "xyz789",
        "replacementInfo": OrderReplacementInfo
      }
    ]
  }
}

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!
recurrencePolicyId - String! The ID of the recurrence policy.
subscriptionPlanType - String! The subscription plan type (POSTPAY, RECURRING, ...)

Example

Query
query productVariantOptions(
  $key: String!,
  $recurrencePolicyId: String!,
  $subscriptionPlanType: String!
) {
  productVariantOptions(
    key: $key,
    recurrencePolicyId: $recurrencePolicyId,
    subscriptionPlanType: $subscriptionPlanType
  ) {
    allAttributeOptions {
      ...AttributeOptionsFragment
    }
    defaultQuantity
    maxQuantity
    minQuantity
    variantAttributes {
      ...VariantAttributeFragment
    }
  }
}
Variables
{
  "key": "xyz789",
  "recurrencePolicyId": "abc123",
  "subscriptionPlanType": "abc123"
}
Response
{
  "data": {
    "productVariantOptions": {
      "allAttributeOptions": [AttributeOptions],
      "defaultQuantity": 987,
      "maxQuantity": 987,
      "minQuantity": 123,
      "variantAttributes": [VariantAttribute]
    }
  }
}

searchOrders

Description

Search for orders

Response

Returns an OrderSearchResults

Arguments
Name Description
cursor - Cursor
limit - Int
query - String!

Example

Query
query searchOrders(
  $cursor: Cursor,
  $limit: Int,
  $query: String!
) {
  searchOrders(
    cursor: $cursor,
    limit: $limit,
    query: $query
  ) {
    items {
      ...OrderSearchResultItemFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "cursor": Cursor,
  "limit": 123,
  "query": "xyz789"
}
Response
{
  "data": {
    "searchOrders": {
      "items": [OrderSearchResultItem],
      "pageInfo": PageInfo
    }
  }
}

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! The subscription ID to search for

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": "xyz789",
      "customerEmail": "abc123",
      "customerId": "abc123",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": false,
      "lastModifiedAt": "abc123",
      "lastOrder": Order,
      "nextOrderAt": "abc123",
      "originOrderId": "xyz789",
      "pausedAt": "xyz789",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "xyz789"
    }
  }
}

Mutations

addContactLensToSubscription

Description

Add contact lenses to subscription

Response

Returns a Cart!

Arguments
Name Description
input - AddContactLensToSubscriptionInput!

Example

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

addCustomerNote

Description

Adds a customer note activity to the customer activity log

Response

Returns a Customer!

Arguments
Name Description
input - AddCustomerNoteInput!

Example

Query
mutation addCustomerNote($input: AddCustomerNoteInput!) {
  addCustomerNote(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": AddCustomerNoteInput}
Response
{
  "data": {
    "addCustomerNote": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "xyz789",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "abc123",
      "id": "abc123",
      "lastName": "xyz789",
      "lastOrder": Order,
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "registeredOnSite": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

addDeliveryAddress

Description

Adds a delivery address to the customer's account

Response

Returns a Customer!

Arguments
Name Description
input - AddAddressInput!

Example

Query
mutation addDeliveryAddress($input: AddAddressInput!) {
  addDeliveryAddress(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": AddAddressInput}
Response
{
  "data": {
    "addDeliveryAddress": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "xyz789",
      "id": "xyz789",
      "lastName": "xyz789",
      "lastOrder": Order,
      "marketingOptIn": false,
      "nationalHealthId": "abc123",
      "phoneNumber": "xyz789",
      "registeredOnSite": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

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"}
  }
}

cancelSubscription

Description

Cancel the subscription

Response

Returns a Subscription!

Arguments
Name Description
input - CancelSubscriptionInput!

Example

Query
mutation cancelSubscription($input: CancelSubscriptionInput!) {
  cancelSubscription(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": CancelSubscriptionInput}
Response
{
  "data": {
    "cancelSubscription": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "abc123",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "abc123",
      "lastOrder": Order,
      "nextOrderAt": "xyz789",
      "originOrderId": "abc123",
      "pausedAt": "xyz789",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "abc123"
    }
  }
}

createAppeasement

Description

Creates an Appeasement for a given order id

Response

Returns an Order!

Arguments
Name Description
additionalInfo - String
input - AppeasementCalculationInput!
orderId - String!
reasonCode - String!

Example

Query
mutation createAppeasement(
  $additionalInfo: String,
  $input: AppeasementCalculationInput!,
  $orderId: String!,
  $reasonCode: String!
) {
  createAppeasement(
    additionalInfo: $additionalInfo,
    input: $input,
    orderId: $orderId,
    reasonCode: $reasonCode
  ) {
    activity {
      ... on OrderActivityPayment {
        ...OrderActivityPaymentFragment
      }
      ... on OrderActivityStatusChange {
        ...OrderActivityStatusChangeFragment
      }
    }
    billingAddress {
      ...AddressFragment
    }
    cancellationInfo {
      ...OrderCancellationInfoFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNoteFragment
    }
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isAppeaseable
    isBillingSameAsDeliveryAddress
    isCancellable
    isExpressReorder
    isReplaceable
    isReplacementOrder
    isReturnable
    isSubscriptionOrder
    isSubscriptionPostpay
    isSubscriptionPrepay
    isSubscriptionRecurring
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    orderNumber
    originalOrderId
    originalOrderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
    replacementOrderIds
    returns {
      ...ReturnFragment
    }
    returnsAndAppeasements {
      ...ReturnsAndAppeasementsFragment
    }
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    type
    workflowState
  }
}
Variables
{
  "additionalInfo": "xyz789",
  "input": AppeasementCalculationInput,
  "orderId": "xyz789",
  "reasonCode": "abc123"
}
Response
{
  "data": {
    "createAppeasement": {
      "activity": [OrderActivityPayment],
      "billingAddress": Address,
      "cancellationInfo": OrderCancellationInfo,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNote],
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isAppeaseable": true,
      "isBillingSameAsDeliveryAddress": true,
      "isCancellable": true,
      "isExpressReorder": true,
      "isReplaceable": false,
      "isReplacementOrder": true,
      "isReturnable": false,
      "isSubscriptionOrder": true,
      "isSubscriptionPostpay": false,
      "isSubscriptionPrepay": false,
      "isSubscriptionRecurring": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "orderNumber": "xyz789",
      "originalOrderId": "abc123",
      "originalOrderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "replacementInfo": OrderReplacementInfo,
      "replacementOrderIds": ["abc123"],
      "returns": [Return],
      "returnsAndAppeasements": [ReturnsAndAppeasements],
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money,
      "type": "RECURRING",
      "workflowState": "order_back_ordered"
    }
  }
}

createReplacement

Description

Creates a Replacement for a given order id

Response

Returns an Order!

Arguments
Name Description
orderId - String!
replacementDraft - ReplacementDraft!

Example

Query
mutation createReplacement(
  $orderId: String!,
  $replacementDraft: ReplacementDraft!
) {
  createReplacement(
    orderId: $orderId,
    replacementDraft: $replacementDraft
  ) {
    activity {
      ... on OrderActivityPayment {
        ...OrderActivityPaymentFragment
      }
      ... on OrderActivityStatusChange {
        ...OrderActivityStatusChangeFragment
      }
    }
    billingAddress {
      ...AddressFragment
    }
    cancellationInfo {
      ...OrderCancellationInfoFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNoteFragment
    }
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isAppeaseable
    isBillingSameAsDeliveryAddress
    isCancellable
    isExpressReorder
    isReplaceable
    isReplacementOrder
    isReturnable
    isSubscriptionOrder
    isSubscriptionPostpay
    isSubscriptionPrepay
    isSubscriptionRecurring
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    orderNumber
    originalOrderId
    originalOrderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
    replacementOrderIds
    returns {
      ...ReturnFragment
    }
    returnsAndAppeasements {
      ...ReturnsAndAppeasementsFragment
    }
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    type
    workflowState
  }
}
Variables
{
  "orderId": "abc123",
  "replacementDraft": ReplacementDraft
}
Response
{
  "data": {
    "createReplacement": {
      "activity": [OrderActivityPayment],
      "billingAddress": Address,
      "cancellationInfo": OrderCancellationInfo,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNote],
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["xyz789"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isAppeaseable": true,
      "isBillingSameAsDeliveryAddress": false,
      "isCancellable": true,
      "isExpressReorder": false,
      "isReplaceable": false,
      "isReplacementOrder": false,
      "isReturnable": false,
      "isSubscriptionOrder": true,
      "isSubscriptionPostpay": false,
      "isSubscriptionPrepay": true,
      "isSubscriptionRecurring": true,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "orderNumber": "abc123",
      "originalOrderId": "xyz789",
      "originalOrderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "replacementInfo": OrderReplacementInfo,
      "replacementOrderIds": ["xyz789"],
      "returns": [Return],
      "returnsAndAppeasements": [ReturnsAndAppeasements],
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money,
      "type": "RECURRING",
      "workflowState": "order_back_ordered"
    }
  }
}

createReturn

Description

Creates a Return for a given order id

Response

Returns an Order!

Arguments
Name Description
orderId - String!
returnDraft - ReturnDraft!

Example

Query
mutation createReturn(
  $orderId: String!,
  $returnDraft: ReturnDraft!
) {
  createReturn(
    orderId: $orderId,
    returnDraft: $returnDraft
  ) {
    activity {
      ... on OrderActivityPayment {
        ...OrderActivityPaymentFragment
      }
      ... on OrderActivityStatusChange {
        ...OrderActivityStatusChangeFragment
      }
    }
    billingAddress {
      ...AddressFragment
    }
    cancellationInfo {
      ...OrderCancellationInfoFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNoteFragment
    }
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isAppeaseable
    isBillingSameAsDeliveryAddress
    isCancellable
    isExpressReorder
    isReplaceable
    isReplacementOrder
    isReturnable
    isSubscriptionOrder
    isSubscriptionPostpay
    isSubscriptionPrepay
    isSubscriptionRecurring
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    orderNumber
    originalOrderId
    originalOrderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
    replacementOrderIds
    returns {
      ...ReturnFragment
    }
    returnsAndAppeasements {
      ...ReturnsAndAppeasementsFragment
    }
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    type
    workflowState
  }
}
Variables
{
  "orderId": "abc123",
  "returnDraft": ReturnDraft
}
Response
{
  "data": {
    "createReturn": {
      "activity": [OrderActivityPayment],
      "billingAddress": Address,
      "cancellationInfo": OrderCancellationInfo,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNote],
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["xyz789"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isAppeaseable": false,
      "isBillingSameAsDeliveryAddress": false,
      "isCancellable": false,
      "isExpressReorder": false,
      "isReplaceable": true,
      "isReplacementOrder": false,
      "isReturnable": false,
      "isSubscriptionOrder": false,
      "isSubscriptionPostpay": true,
      "isSubscriptionPrepay": false,
      "isSubscriptionRecurring": false,
      "isValid": false,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "orderNumber": "xyz789",
      "originalOrderId": "xyz789",
      "originalOrderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "replacementInfo": OrderReplacementInfo,
      "replacementOrderIds": ["xyz789"],
      "returns": [Return],
      "returnsAndAppeasements": [ReturnsAndAppeasements],
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money,
      "type": "RECURRING",
      "workflowState": "order_back_ordered"
    }
  }
}

editDeliveryAddress

Description

Update a delivery address on the customer's account

Response

Returns a Customer!

Arguments
Name Description
input - EditAddressInput!

Example

Query
mutation editDeliveryAddress($input: EditAddressInput!) {
  editDeliveryAddress(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": EditAddressInput}
Response
{
  "data": {
    "editDeliveryAddress": {
      "activity": [ActivityMarketing],
      "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": "xyz789",
      "lastName": "xyz789",
      "lastOrder": Order,
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "registeredOnSite": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

pauseSubscription

Description

Pause the active subscription

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": "abc123",
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "hasFailedPayment": false,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": true,
      "lastModifiedAt": "abc123",
      "lastOrder": Order,
      "nextOrderAt": "abc123",
      "originOrderId": "xyz789",
      "pausedAt": "xyz789",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "abc123"
    }
  }
}

priceReturnSummary

Description

Prices a Return Summary object for a given order id

Response

Returns a ReturnSummary!

Arguments
Name Description
includeShipping - Boolean
orderId - String!
returnLineItemQuantities - [ReturnLineItemQuantities!]!

Example

Query
mutation priceReturnSummary(
  $includeShipping: Boolean,
  $orderId: String!,
  $returnLineItemQuantities: [ReturnLineItemQuantities!]!
) {
  priceReturnSummary(
    includeShipping: $includeShipping,
    orderId: $orderId,
    returnLineItemQuantities: $returnLineItemQuantities
  ) {
    availableToRefund {
      ...MoneyFragment
    }
    itemsRefund {
      ...MoneyFragment
    }
    lineItems {
      ... on ReturnSummaryLineItemContactLens {
        ...ReturnSummaryLineItemContactLensFragment
      }
      ... on ReturnSummaryLineItemGlasses {
        ...ReturnSummaryLineItemGlassesFragment
      }
      ... on ReturnSummaryLineItemOther {
        ...ReturnSummaryLineItemOtherFragment
      }
    }
    orderId
    previouslyRefunded {
      ...MoneyFragment
    }
    shipping {
      ...ReturnSummaryShippingFragment
    }
    shippingRefund {
      ...MoneyFragment
    }
    totalRefund {
      ...MoneyFragment
    }
  }
}
Variables
{
  "includeShipping": false,
  "orderId": "abc123",
  "returnLineItemQuantities": [ReturnLineItemQuantities]
}
Response
{
  "data": {
    "priceReturnSummary": {
      "availableToRefund": Money,
      "itemsRefund": Money,
      "lineItems": [ReturnSummaryLineItemContactLens],
      "orderId": "xyz789",
      "previouslyRefunded": Money,
      "shipping": ReturnSummaryShipping,
      "shippingRefund": Money,
      "totalRefund": Money
    }
  }
}

removeDeliveryAddress

Description

Remove a delivery address from the customer's account

Response

Returns a Customer!

Arguments
Name Description
input - RemoveAddressInput!

Example

Query
mutation removeDeliveryAddress($input: RemoveAddressInput!) {
  removeDeliveryAddress(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": RemoveAddressInput}
Response
{
  "data": {
    "removeDeliveryAddress": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "abc123",
      "defaultDeliveryAddressId": "abc123",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "xyz789",
      "gender": "abc123",
      "id": "xyz789",
      "lastName": "abc123",
      "lastOrder": Order,
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "registeredOnSite": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

removePaymentMethod

Description

Removes the specified stored payment method from the customer wallet. Returns an error if the payment method is linked to an active subscription.

Response

Returns a Customer!

Arguments
Name Description
input - RemovePaymentMethodInput!

Example

Query
mutation removePaymentMethod($input: RemovePaymentMethodInput!) {
  removePaymentMethod(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": RemovePaymentMethodInput}
Response
{
  "data": {
    "removePaymentMethod": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "abc123",
      "gender": "xyz789",
      "id": "xyz789",
      "lastName": "xyz789",
      "lastOrder": Order,
      "marketingOptIn": true,
      "nationalHealthId": "abc123",
      "phoneNumber": "abc123",
      "registeredOnSite": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

removeSubscriptionCartContactLensGroup

Description

Remove a contact lens group from the subscription's template cart

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": "xyz789",
      "customerEmail": "xyz789",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "abc123",
      "isPausable": false,
      "isReactivatable": false,
      "lastModifiedAt": "xyz789",
      "lastOrder": Order,
      "nextOrderAt": "abc123",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "xyz789"
    }
  }
}

requestOrderCancellation

Description

Request the cancellation of an order

Response

Returns an Order!

Arguments
Name Description
code - String! The reason code for the cancellation
detail - String Additional notes or comments for the cancellation request
orderId - String! The ID of the order to cancel

Example

Query
mutation requestOrderCancellation(
  $code: String!,
  $detail: String,
  $orderId: String!
) {
  requestOrderCancellation(
    code: $code,
    detail: $detail,
    orderId: $orderId
  ) {
    activity {
      ... on OrderActivityPayment {
        ...OrderActivityPaymentFragment
      }
      ... on OrderActivityStatusChange {
        ...OrderActivityStatusChangeFragment
      }
    }
    billingAddress {
      ...AddressFragment
    }
    cancellationInfo {
      ...OrderCancellationInfoFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNoteFragment
    }
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isAppeaseable
    isBillingSameAsDeliveryAddress
    isCancellable
    isExpressReorder
    isReplaceable
    isReplacementOrder
    isReturnable
    isSubscriptionOrder
    isSubscriptionPostpay
    isSubscriptionPrepay
    isSubscriptionRecurring
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    orderNumber
    originalOrderId
    originalOrderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
    replacementOrderIds
    returns {
      ...ReturnFragment
    }
    returnsAndAppeasements {
      ...ReturnsAndAppeasementsFragment
    }
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    type
    workflowState
  }
}
Variables
{
  "code": "xyz789",
  "detail": "abc123",
  "orderId": "abc123"
}
Response
{
  "data": {
    "requestOrderCancellation": {
      "activity": [OrderActivityPayment],
      "billingAddress": Address,
      "cancellationInfo": OrderCancellationInfo,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNote],
      "customerEmail": "abc123",
      "customerId": "abc123",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["abc123"],
      "healthFund": "abc123",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isAppeaseable": false,
      "isBillingSameAsDeliveryAddress": true,
      "isCancellable": false,
      "isExpressReorder": true,
      "isReplaceable": true,
      "isReplacementOrder": true,
      "isReturnable": true,
      "isSubscriptionOrder": true,
      "isSubscriptionPostpay": false,
      "isSubscriptionPrepay": true,
      "isSubscriptionRecurring": true,
      "isValid": false,
      "itemCount": 987,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "orderNumber": "abc123",
      "originalOrderId": "abc123",
      "originalOrderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "replacementInfo": OrderReplacementInfo,
      "replacementOrderIds": ["xyz789"],
      "returns": [Return],
      "returnsAndAppeasements": [ReturnsAndAppeasements],
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money,
      "type": "RECURRING",
      "workflowState": "order_back_ordered"
    }
  }
}

resumeSubscription

Description

Resume the paused subscription

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": "xyz789",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "abc123",
      "lastOrder": Order,
      "nextOrderAt": "xyz789",
      "originOrderId": "abc123",
      "pausedAt": "xyz789",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 987,
      "startsAt": "xyz789"
    }
  }
}

retrySubscriptionPayment

Description

Retry the last subscription payment that failed. Will include the total amount outstanding on any missed instalments. Uses the currently active payment method.

Response

Returns a Subscription!

Arguments
Name Description
input - RetryPaymentInput!

Example

Query
mutation retrySubscriptionPayment($input: RetryPaymentInput!) {
  retrySubscriptionPayment(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": RetryPaymentInput}
Response
{
  "data": {
    "retrySubscriptionPayment": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "xyz789",
      "customerEmail": "xyz789",
      "customerId": "xyz789",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": true,
      "isReactivatable": true,
      "lastModifiedAt": "xyz789",
      "lastOrder": Order,
      "nextOrderAt": "xyz789",
      "originOrderId": "abc123",
      "pausedAt": "xyz789",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "abc123"
    }
  }
}

setDefaultDeliveryAddress

Description

Set delivery address as default

Response

Returns a Customer!

Arguments
Name Description
input - SetDefaultAddressInput!

Example

Query
mutation setDefaultDeliveryAddress($input: SetDefaultAddressInput!) {
  setDefaultDeliveryAddress(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": SetDefaultAddressInput}
Response
{
  "data": {
    "setDefaultDeliveryAddress": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "abc123",
      "gender": "xyz789",
      "id": "xyz789",
      "lastName": "abc123",
      "lastOrder": Order,
      "marketingOptIn": true,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "registeredOnSite": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "xyz789"
    }
  }
}

setDeliveryAddressOnSubscription

Description

Sets the delivery address on the subscription's cart

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": "xyz789",
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "hasFailedPayment": true,
      "id": "xyz789",
      "isPausable": false,
      "isReactivatable": false,
      "lastModifiedAt": "xyz789",
      "lastOrder": Order,
      "nextOrderAt": "abc123",
      "originOrderId": "abc123",
      "pausedAt": "abc123",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "xyz789"
    }
  }
}

setReturnAsManuallyRefunded

Description

Marks a return as manually refunded

Response

Returns a Return!

Arguments
Name Description
input - SetReturnAsManuallyRefundedInput!

Example

Query
mutation setReturnAsManuallyRefunded($input: SetReturnAsManuallyRefundedInput!) {
  setReturnAsManuallyRefunded(input: $input) {
    createdAt
    createdBy {
      ...OrderUserActionInfoFragment
    }
    creditNote {
      ...OrderCreditNoteFragment
    }
    includeShipping
    itemsRefund {
      ...MoneyFragment
    }
    itemsReturned
    key
    lastModifiedAt
    lastModifiedBy {
      ...OrderUserActionInfoFragment
    }
    lineItems {
      ... on ReturnLineItemContactLens {
        ...ReturnLineItemContactLensFragment
      }
      ... on ReturnLineItemGlasses {
        ...ReturnLineItemGlassesFragment
      }
      ... on ReturnLineItemOther {
        ...ReturnLineItemOtherFragment
      }
    }
    originalOrderNumber
    refundMethods
    refundStatus
    returnStatus
    returnType
    shippingRefund {
      ...MoneyFragment
    }
    shippingReturnAdditionalInfo
    shippingReturnReason
    shippingReturnReasonCode
    totalRefund {
      ...MoneyFragment
    }
  }
}
Variables
{"input": SetReturnAsManuallyRefundedInput}
Response
{
  "data": {
    "setReturnAsManuallyRefunded": {
      "createdAt": "xyz789",
      "createdBy": OrderUserActionInfo,
      "creditNote": OrderCreditNote,
      "includeShipping": true,
      "itemsRefund": Money,
      "itemsReturned": true,
      "key": "xyz789",
      "lastModifiedAt": "abc123",
      "lastModifiedBy": OrderUserActionInfo,
      "lineItems": [ReturnLineItemContactLens],
      "originalOrderNumber": "abc123",
      "refundMethods": ["xyz789"],
      "refundStatus": "FAILED",
      "returnStatus": "COMPLETE",
      "returnType": "APPEASEMENT",
      "shippingRefund": Money,
      "shippingReturnAdditionalInfo": "abc123",
      "shippingReturnReason": "abc123",
      "shippingReturnReasonCode": "xyz789",
      "totalRefund": Money
    }
  }
}

updateContactLensGroupInSubscription

Description

Update the subscription's template cart contact lens group

Response

Returns a Cart!

Arguments
Name Description
input - UpdateContactLensGroupInSubscriptionInput!

Example

Query
mutation updateContactLensGroupInSubscription($input: UpdateContactLensGroupInSubscriptionInput!) {
  updateContactLensGroupInSubscription(input: $input) {
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isExpressReorder
    isSubscriptionCompatible
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Variables
{"input": UpdateContactLensGroupInSubscriptionInput}
Response
{
  "data": {
    "updateContactLensGroupInSubscription": {
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "xyz789",
      "customerId": "abc123",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "abc123",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": false,
      "isExpressReorder": false,
      "isSubscriptionCompatible": false,
      "isValid": true,
      "itemCount": 123,
      "lastOrderedAt": "xyz789",
      "lineItemGroups": [LineItemGroupContacts],
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

updateCustomer

Description

Update customer information

Response

Returns a Customer!

Arguments
Name Description
aftercareStoreId - String The ID of the customer's new aftercare store
dateOfBirth - String The new date of birth of the customer
email - String The new email address of the customer
firstName - String The new first name of the customer
id - String! The ID of the customer to update
lastName - String The new last name of the customer
marketingOptIn - Boolean Whether the customer has opted in for marketing communications
nationalHealthId - String The customer's new national health ID
phoneNumber - String The new phone number of the customer
title - String The new title of the customer

Example

Query
mutation updateCustomer(
  $aftercareStoreId: String,
  $dateOfBirth: String,
  $email: String,
  $firstName: String,
  $id: String!,
  $lastName: String,
  $marketingOptIn: Boolean,
  $nationalHealthId: String,
  $phoneNumber: String,
  $title: String
) {
  updateCustomer(
    aftercareStoreId: $aftercareStoreId,
    dateOfBirth: $dateOfBirth,
    email: $email,
    firstName: $firstName,
    id: $id,
    lastName: $lastName,
    marketingOptIn: $marketingOptIn,
    nationalHealthId: $nationalHealthId,
    phoneNumber: $phoneNumber,
    title: $title
  ) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{
  "aftercareStoreId": "xyz789",
  "dateOfBirth": "abc123",
  "email": "xyz789",
  "firstName": "abc123",
  "id": "xyz789",
  "lastName": "abc123",
  "marketingOptIn": false,
  "nationalHealthId": "xyz789",
  "phoneNumber": "abc123",
  "title": "abc123"
}
Response
{
  "data": {
    "updateCustomer": {
      "activity": [ActivityMarketing],
      "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",
      "lastOrder": Order,
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "registeredOnSite": "abc123",
      "storedPaymentMethods": [StoredPaymentMethod],
      "subscriptions": [Subscription],
      "title": "abc123"
    }
  }
}

updatePaymentMethod

Description

Updates the specified stored payment method in the customer wallet.

Response

Returns a Customer!

Arguments
Name Description
input - UpdatePaymentMethodInput!

Example

Query
mutation updatePaymentMethod($input: UpdatePaymentMethodInput!) {
  updatePaymentMethod(input: $input) {
    activity {
      ... on ActivityMarketing {
        ...ActivityMarketingFragment
      }
      ... on ActivityNote {
        ...ActivityNoteFragment
      }
      ... on ActivityPaymentEvent {
        ...ActivityPaymentEventFragment
      }
    }
    aftercareStore {
      ...AftercareStoreFragment
    }
    billingAddresses {
      ...AddressFragment
    }
    createdAt
    dateOfBirth
    defaultBillingAddressId
    defaultDeliveryAddressId
    deliveryAddresses {
      ...AddressFragment
    }
    email
    firstName
    gender
    id
    lastName
    lastOrder {
      ...OrderFragment
    }
    marketingOptIn
    nationalHealthId
    phoneNumber
    registeredOnSite
    storedPaymentMethods {
      ...StoredPaymentMethodFragment
    }
    subscriptions {
      ...SubscriptionFragment
    }
    title
  }
}
Variables
{"input": UpdatePaymentMethodInput}
Response
{
  "data": {
    "updatePaymentMethod": {
      "activity": [ActivityMarketing],
      "aftercareStore": AftercareStore,
      "billingAddresses": [Address],
      "createdAt": "2007-12-03T10:15:30Z",
      "dateOfBirth": "abc123",
      "defaultBillingAddressId": "xyz789",
      "defaultDeliveryAddressId": "xyz789",
      "deliveryAddresses": [Address],
      "email": "xyz789",
      "firstName": "abc123",
      "gender": "abc123",
      "id": "abc123",
      "lastName": "abc123",
      "lastOrder": Order,
      "marketingOptIn": false,
      "nationalHealthId": "xyz789",
      "phoneNumber": "abc123",
      "registeredOnSite": "xyz789",
      "storedPaymentMethods": [StoredPaymentMethod],
      "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": "abc123",
      "customerEmail": "xyz789",
      "customerId": "xyz789",
      "hasFailedPayment": false,
      "id": "abc123",
      "isPausable": false,
      "isReactivatable": true,
      "lastModifiedAt": "abc123",
      "lastOrder": Order,
      "nextOrderAt": "abc123",
      "originOrderId": "xyz789",
      "pausedAt": "abc123",
      "paymentClientStatus": "xyz789",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "xyz789"
    }
  }
}

updateSubscriptionNextOrderAt

Description

Update the subscription's nextOrderAt property

Response

Returns a Subscription!

Arguments
Name Description
input - UpdateSubscriptionNextOrderAtInput!

Example

Query
mutation updateSubscriptionNextOrderAt($input: UpdateSubscriptionNextOrderAtInput!) {
  updateSubscriptionNextOrderAt(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": UpdateSubscriptionNextOrderAtInput}
Response
{
  "data": {
    "updateSubscriptionNextOrderAt": {
      "cancellationInfo": SubscriptionCancellationInfo,
      "cart": Cart,
      "createdAt": "xyz789",
      "customerEmail": "abc123",
      "customerId": "xyz789",
      "hasFailedPayment": false,
      "id": "abc123",
      "isPausable": false,
      "isReactivatable": false,
      "lastModifiedAt": "abc123",
      "lastOrder": Order,
      "nextOrderAt": "abc123",
      "originOrderId": "abc123",
      "pausedAt": "abc123",
      "paymentClientStatus": "abc123",
      "paymentMethod": StoredPaymentMethod,
      "recurringOrderState": "Active",
      "replacementFrequency": "DLY",
      "standardScheduleUnits": "Days",
      "standardScheduleValue": 123,
      "startsAt": "xyz789"
    }
  }
}

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": "abc123",
      "cancelledBy": SubscriptionCancellationUser,
      "code": "abc123",
      "detail": "abc123",
      "id": "xyz789",
      "key": "abc123"
    }
  }
}

cart

Description

The template cart associated with the subscription

Response

Returns a Cart

Example

Query
subscription cart {
  cart {
    billingAddress {
      ...AddressFragment
    }
    createdAt
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    deliveryOptions {
      ...DeliveryOptionFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    isBillingSameAsDeliveryAddress
    isExpressReorder
    isSubscriptionCompatible
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
  }
}
Response
{
  "data": {
    "cart": {
      "billingAddress": Address,
      "createdAt": "2007-12-03T10:15:30Z",
      "customerEmail": "abc123",
      "customerId": "abc123",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "deliveryOptions": [DeliveryOption],
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "abc123",
      "instalmentsInfo": InstalmentsInfo,
      "isBillingSameAsDeliveryAddress": true,
      "isExpressReorder": true,
      "isSubscriptionCompatible": false,
      "isValid": false,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "xyz789",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money
    }
  }
}

createdAt

Description

Subscription created at date

Response

Returns a String!

Example

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

customerEmail

Description

The customer email associated with the subscription

Response

Returns a String

Example

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

customerId

Description

The customer ID associated with the subscription

Response

Returns a String

Example

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

hasFailedPayment

Description

Has the subscription had a failed payment

Response

Returns a Boolean!

Example

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

id

Description

Subscription ID

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": false}}

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

Subscription last modified at date

Response

Returns a String!

Example

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

lastOrder

Description

The subscription's latest orders

Response

Returns an Order

Example

Query
subscription lastOrder {
  lastOrder {
    activity {
      ... on OrderActivityPayment {
        ...OrderActivityPaymentFragment
      }
      ... on OrderActivityStatusChange {
        ...OrderActivityStatusChangeFragment
      }
    }
    billingAddress {
      ...AddressFragment
    }
    cancellationInfo {
      ...OrderCancellationInfoFragment
    }
    createdAt
    creditNotes {
      ...OrderCreditNoteFragment
    }
    customerEmail
    customerId
    deliveryAddress {
      ...AddressFragment
    }
    deliveryMethod {
      ...DeliveryMethodFragment
    }
    discountCodes
    healthFund
    healthFundPolicy
    id
    instalmentsInfo {
      ...InstalmentsInfoFragment
    }
    invoice {
      ...OrderInvoiceFragment
    }
    isAppeaseable
    isBillingSameAsDeliveryAddress
    isCancellable
    isExpressReorder
    isReplaceable
    isReplacementOrder
    isReturnable
    isSubscriptionOrder
    isSubscriptionPostpay
    isSubscriptionPrepay
    isSubscriptionRecurring
    isValid
    itemCount
    lastOrderedAt
    lineItemGroups {
      ... on LineItemGroupContacts {
        ...LineItemGroupContactsFragment
      }
      ... on LineItemGroupGlasses {
        ...LineItemGroupGlassesFragment
      }
      ... on LineItemGroupOther {
        ...LineItemGroupOtherFragment
      }
    }
    orderNumber
    originalOrderId
    originalOrderNumber
    paymentInfo {
      ...OrderPaymentInfoFragment
    }
    promotions {
      ...OrderBasePromotionFragment
    }
    recurrencePolicies {
      ...OrderRecurrencePolicyFragment
    }
    replacementFrequency
    replacementInfo {
      ...OrderReplacementInfoFragment
    }
    replacementOrderIds
    returns {
      ...ReturnFragment
    }
    returnsAndAppeasements {
      ...ReturnsAndAppeasementsFragment
    }
    selectedRecurrencePolicy {
      ...OrderRecurrencePolicyFragment
    }
    subscriptionId
    subscriptionPaymentInfo {
      ...SubscriptionPaymentInfoFragment
    }
    subscriptionPlanType
    subtotal {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    type
    workflowState
  }
}
Response
{
  "data": {
    "lastOrder": {
      "activity": [OrderActivityPayment],
      "billingAddress": Address,
      "cancellationInfo": OrderCancellationInfo,
      "createdAt": "2007-12-03T10:15:30Z",
      "creditNotes": [OrderCreditNote],
      "customerEmail": "xyz789",
      "customerId": "xyz789",
      "deliveryAddress": Address,
      "deliveryMethod": DeliveryMethod,
      "discountCodes": ["abc123"],
      "healthFund": "xyz789",
      "healthFundPolicy": "xyz789",
      "id": "xyz789",
      "instalmentsInfo": InstalmentsInfo,
      "invoice": OrderInvoice,
      "isAppeaseable": true,
      "isBillingSameAsDeliveryAddress": false,
      "isCancellable": true,
      "isExpressReorder": true,
      "isReplaceable": true,
      "isReplacementOrder": true,
      "isReturnable": false,
      "isSubscriptionOrder": true,
      "isSubscriptionPostpay": true,
      "isSubscriptionPrepay": true,
      "isSubscriptionRecurring": true,
      "isValid": false,
      "itemCount": 123,
      "lastOrderedAt": "abc123",
      "lineItemGroups": [LineItemGroupContacts],
      "orderNumber": "xyz789",
      "originalOrderId": "abc123",
      "originalOrderNumber": "abc123",
      "paymentInfo": OrderPaymentInfo,
      "promotions": [OrderBasePromotion],
      "recurrencePolicies": [OrderRecurrencePolicy],
      "replacementFrequency": "DLY",
      "replacementInfo": OrderReplacementInfo,
      "replacementOrderIds": ["xyz789"],
      "returns": [Return],
      "returnsAndAppeasements": [ReturnsAndAppeasements],
      "selectedRecurrencePolicy": OrderRecurrencePolicy,
      "subscriptionId": "abc123",
      "subscriptionPaymentInfo": SubscriptionPaymentInfo,
      "subscriptionPlanType": "POSTPAY",
      "subtotal": Money,
      "totalPrice": Money,
      "type": "RECURRING",
      "workflowState": "order_back_ordered"
    }
  }
}

nextOrderAt

Description

The date at which the next order will be created for the subscription

Response

Returns a String

Example

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

originOrderId

Description

The ID of the order that created the subscription

Response

Returns a String

Example

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

pausedAt

Description

The date/time the subscription was paused

Response

Returns a String

Example

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

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
  }
}
Response
{
  "data": {
    "paymentMethod": {
      "billingAddress": Address,
      "brand": "abc123",
      "createdAt": "2007-12-03T10:15:30Z",
      "expiryMonth": 123,
      "expiryYear": 123,
      "holderName": "xyz789",
      "id": "abc123",
      "isExpired": false,
      "isLinkedToActiveSubscription": false,
      "isVerified": false,
      "lastFour": "xyz789",
      "lastUsedAt": "2007-12-03T10:15:30Z",
      "nickname": "xyz789",
      "supportsSubscriptions": false
    }
  }
}

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

Subscription schedule units

Response

Returns a StandardScheduleUnits!

Example

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

standardScheduleValue

Description

Subscription schedule value

Response

Returns an Int!

Example

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

startsAt

Description

The date at which the subscription starts

Response

Returns a String!

Example

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

Types

Activity

Example
ActivityMarketing

ActivityCode

Description

Activity code used for display/translation in the UI

Values
Enum Value Description

A001

A002

A003

A004

A005

A101

A102

A103

A104

A301

A302

A303

Example
"A001"

ActivityCreatedBy

Fields
Field Name Description
name - String
type - ActivityUser!
Example
{
  "name": "xyz789",
  "type": "ANONYMOUS_CUSTOMER"
}

ActivityMarketing

Description

Customer activity record (marketing consent)

Fields
Field Name Description
code - ActivityCode!
createdAt - String!
createdBy - ActivityCreatedBy!
id - String!
type - ActivityType!
Example
{
  "code": "A001",
  "createdAt": "xyz789",
  "createdBy": ActivityCreatedBy,
  "id": "abc123",
  "type": "APPEASEMENT_EVENT"
}

ActivityNote

Description

Customer activity record (note)

Fields
Field Name Description
code - ActivityCode!
createdAt - String!
createdBy - ActivityCreatedBy!
detail - String!
id - String!
type - ActivityType!
Example
{
  "code": "A001",
  "createdAt": "xyz789",
  "createdBy": ActivityCreatedBy,
  "detail": "abc123",
  "id": "xyz789",
  "type": "APPEASEMENT_EVENT"
}

ActivityPaymentEvent

Description

Customer activity record (payment event)

Fields
Field Name Description
channel - String Channel where the payment event occurred
code - ActivityCode!
createdAt - String!
createdBy - ActivityCreatedBy!
id - String!
interactionId - String! Payment interaction ID (e.g., Stripe payment intent ID)
orderNumber - String! Order number associated with the payment event
type - ActivityType!
Example
{
  "channel": "abc123",
  "code": "A001",
  "createdAt": "xyz789",
  "createdBy": ActivityCreatedBy,
  "id": "abc123",
  "interactionId": "xyz789",
  "orderNumber": "abc123",
  "type": "APPEASEMENT_EVENT"
}

ActivityType

Description

Type of activity

Values
Enum Value Description

APPEASEMENT_EVENT

CUSTOMER_NOTE

MARKETING_CONSENT

ORDER_EVENT

PAYMENT_EVENT

RETURN_EVENT

Example
"APPEASEMENT_EVENT"

ActivityUser

Description

Who created the activity

Values
Enum Value Description

ANONYMOUS_CUSTOMER

COLLEAGUE

CUSTOMER

PARTIAL_CUSTOMER

SYSTEM

Example
"ANONYMOUS_CUSTOMER"

AddAddressInput

Fields
Input Field Description
address - AddressInput!
customerId - String!
isDefault - Boolean!
Example
{
  "address": AddressInput,
  "customerId": "xyz789",
  "isDefault": true
}

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"
}

AddCustomerNoteInput

Fields
Input Field Description
customerId - String! The ID of the customer to attach the note to
detail - String! The note text
Example
{
  "customerId": "abc123",
  "detail": "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": "xyz789",
  "addressLine3": "xyz789",
  "city": "xyz789",
  "country": "xyz789",
  "county": "xyz789",
  "firstName": "abc123",
  "id": "abc123",
  "key": "abc123",
  "lastName": "abc123",
  "postcode": "xyz789",
  "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": "abc123",
  "country": "xyz789",
  "county": "xyz789",
  "firstName": "abc123",
  "id": "xyz789",
  "key": "abc123",
  "lastName": "abc123",
  "postcode": "abc123",
  "title": "abc123"
}

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": "abc123",
  "lineOfBusiness": "AUDIOLOGY",
  "name": "xyz789",
  "slug": "abc123"
}

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": "xyz789",
  "country": "abc123",
  "formattedAddress": "xyz789",
  "line1": "abc123",
  "line2": "xyz789",
  "line3": "abc123",
  "postcode": "abc123",
  "region": "xyz789"
}

AftercareStoreContactInfo

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

AftercareStoreCoordinates

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

AftercareStoreLineOfBusiness

Values
Enum Value Description

AUDIOLOGY

OPTICAL

Example
"AUDIOLOGY"

Alphanumeric

Example
Alphanumeric

AnnualOverview

Description

Annual Overview

Fields
Field Name Description
createdAt - DateTime! Date and time the overview was generated
orders - [AnnualOverviewOrder!]! The orders for the year
total - Money! The total amount for the year
year - Int! The year of this overview
Example
{
  "createdAt": "2007-12-03T10:15:30Z",
  "orders": [AnnualOverviewOrder],
  "total": Money,
  "year": 123
}

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": 123,
  "baseCurve": "abc123",
  "cylinder": "xyz789",
  "diameter": "xyz789",
  "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": "xyz789",
  "id": "abc123",
  "items": [AnnualOverviewOrderItem],
  "orderNumber": "xyz789"
}

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"
}

AppeasementCalculationInput

Fields
Input Field Description
includeShipping - Boolean!
lineItemIds - [String!]!
type - AppeasementValueType!
value - Int! Percentage eg: 10 or Amount eg: 2550 (centAmount)
Example
{
  "includeShipping": false,
  "lineItemIds": ["xyz789"],
  "type": "AMOUNT",
  "value": 123
}

AppeasementSummary

Fields
Field Name Description
availableToRefund - Money! The total amount available to refund for this order
itemsRefund - Money! The refund amount for the items
lineItems - [AppeasementSummaryLineItem!]! The appeasement summary line items that make up the order
orderId - String! Unique order ID
shipping - AppeasementSummaryShipping! The shipping details for the original order
shippingRefund - Money! The refund amount for shipping
totalRefund - Money! The refund amount for the items and shipping
Example
{
  "availableToRefund": Money,
  "itemsRefund": Money,
  "lineItems": [AppeasementSummaryLineItemContactLens],
  "orderId": "abc123",
  "shipping": AppeasementSummaryShipping,
  "shippingRefund": Money,
  "totalRefund": Money
}

AppeasementSummaryLineItem

Example
AppeasementSummaryLineItemContactLens

AppeasementSummaryLineItemBase

Fields
Field Name Description
availableToRefundAmount - Money!
brandName - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
groupType - String!
lineItemId - String!
name - String!
previouslyRefundedAmount - Money!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
sku - String!
unitPrice - Money!
Example
{
  "availableToRefundAmount": Money,
  "brandName": "abc123",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "groupType": "abc123",
  "lineItemId": "xyz789",
  "name": "abc123",
  "previouslyRefundedAmount": Money,
  "previouslyReturnedQuantity": 123,
  "quantity": 987,
  "refundAmount": Money,
  "sku": "xyz789",
  "unitPrice": Money
}

AppeasementSummaryLineItemContactLens

Fields
Field Name Description
availableToRefundAmount - Money!
brandName - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
eye - ContactLensEye!
groupType - String!
lineItemId - String!
name - String!
packQuantity - Int
previouslyRefundedAmount - Money!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
replacementFrequency - ReplacementFrequency
sku - String!
unitPrice - Money!
Example
{
  "availableToRefundAmount": Money,
  "brandName": "abc123",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "eye": "left",
  "groupType": "xyz789",
  "lineItemId": "abc123",
  "name": "xyz789",
  "packQuantity": 987,
  "previouslyRefundedAmount": Money,
  "previouslyReturnedQuantity": 123,
  "quantity": 123,
  "refundAmount": Money,
  "replacementFrequency": "DLY",
  "sku": "xyz789",
  "unitPrice": Money
}

AppeasementSummaryLineItemGlasses

Fields
Field Name Description
availableToRefundAmount - Money!
brandName - String
color - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
frame - ReturnLineItemFrame!
groupType - String!
lensPackage - ReturnLensPackage!
lineItemId - String!
name - String!
previouslyRefundedAmount - Money!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
size - String
sku - String!
unitPrice - Money!
Example
{
  "availableToRefundAmount": Money,
  "brandName": "abc123",
  "color": "abc123",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "frame": ReturnLineItemFrame,
  "groupType": "xyz789",
  "lensPackage": ReturnLensPackage,
  "lineItemId": "abc123",
  "name": "abc123",
  "previouslyRefundedAmount": Money,
  "previouslyReturnedQuantity": 987,
  "quantity": 987,
  "refundAmount": Money,
  "size": "abc123",
  "sku": "xyz789",
  "unitPrice": Money
}

AppeasementSummaryLineItemOther

Fields
Field Name Description
availableToRefundAmount - Money!
brandName - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
groupType - String!
lineItemId - String!
name - String!
previouslyRefundedAmount - Money!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
sku - String!
unitPrice - Money!
Example
{
  "availableToRefundAmount": Money,
  "brandName": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "groupType": "abc123",
  "lineItemId": "abc123",
  "name": "xyz789",
  "previouslyRefundedAmount": Money,
  "previouslyReturnedQuantity": 123,
  "quantity": 123,
  "refundAmount": Money,
  "sku": "abc123",
  "unitPrice": Money
}

AppeasementSummaryShipping

Fields
Field Name Description
availableToRefundAmount - Money! The amount available to refund for shipping
discountedPrice - Money! The amount for shipping
discounts - [OrderDiscount!]! The discounts applied to the shipping
previouslyRefundedAmount - Money! The total amount refunded for shipping
unitPrice - Money! The amount for shipping
Example
{
  "availableToRefundAmount": Money,
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "previouslyRefundedAmount": Money,
  "unitPrice": Money
}

AppeasementValueType

Values
Enum Value Description

AMOUNT

PERCENTAGE

Example
"AMOUNT"

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": false,
  "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": "xyz789",
  "email": "xyz789",
  "firstName": "xyz789",
  "lastName": "xyz789",
  "phoneNumber": "abc123",
  "postcode": "xyz789",
  "title": "abc123"
}

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": "xyz789",
  "countryCode": "xyz789",
  "line1": "xyz789",
  "line2": "abc123",
  "line3": "xyz789",
  "name": "abc123",
  "postcode": "abc123",
  "region": "xyz789"
}

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": "xyz789",
  "mobile": "abc123",
  "phone": "xyz789"
}

AppointmentStoreCoordinates

Description

Appointment Store Coordinates

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

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]
}

BaseCustomerActivity

Fields
Field Name Description
code - ActivityCode!
createdAt - String!
createdBy - ActivityCreatedBy!
id - String!
type - ActivityType!
Possible Types
BaseCustomerActivity Types

ActivityMarketing

ActivityNote

ActivityPaymentEvent

Example
{
  "code": "A001",
  "createdAt": "xyz789",
  "createdBy": ActivityCreatedBy,
  "id": "abc123",
  "type": "APPEASEMENT_EVENT"
}

BaseOrderActivity

Fields
Field Name Description
code - ActivityCode!
createdAt - String! Date and time when the activity was recorded
createdBy - ActivityCreatedBy!
detail - String Additional details/notes
id - String! Unique identifier for the activity entry
type - ActivityType!
Possible Types
BaseOrderActivity Types

OrderActivityPayment

OrderActivityStatusChange

Example
{
  "code": "A001",
  "createdAt": "abc123",
  "createdBy": ActivityCreatedBy,
  "detail": "xyz789",
  "id": "abc123",
  "type": "APPEASEMENT_EVENT"
}

Boolean

Description

The Boolean scalar type represents true or false.

CancelAppointmentInput

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

CancelSubscriptionInput

Fields
Input Field Description
code - String! The reason code for the cancellation
detail - String! Additional notes or comments for the cancellation request
paymentMethodId - String Payment method to use for any outstanding balance on the last order of the subscription
subscriptionId - String! The subscription ID to be canceled
Example
{
  "code": "abc123",
  "detail": "abc123",
  "paymentMethodId": "xyz789",
  "subscriptionId": "xyz789"
}

Cart

Description

Cart

Fields
Field Name Description
billingAddress - Address Billing address details
createdAt - DateTime! Date and time the cart was created
customerEmail - String Customer email address
customerId - String Unique customer ID
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?
isExpressReorder - Boolean! Is this cart an express re-order?
isSubscriptionCompatible - Boolean Is compatible with a subscription
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
paymentInfo - OrderPaymentInfo Payment information
promotions - [OrderBasePromotion!]! The promotions applied to the cart/order
recurrencePolicies - [OrderRecurrencePolicy!] Recurrence policies applicable
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 - SubscriptionPlanType The subscription plan type for the order (if applicable)
subtotal - Money! The price of all of the line items (without discounts applied)
totalPrice - Money! The total price (with discounts applied)
Example
{
  "billingAddress": Address,
  "createdAt": "2007-12-03T10:15:30Z",
  "customerEmail": "xyz789",
  "customerId": "xyz789",
  "deliveryAddress": Address,
  "deliveryMethod": DeliveryMethod,
  "deliveryOptions": [DeliveryOption],
  "discountCodes": ["abc123"],
  "healthFund": "abc123",
  "healthFundPolicy": "xyz789",
  "id": "xyz789",
  "instalmentsInfo": InstalmentsInfo,
  "isBillingSameAsDeliveryAddress": false,
  "isExpressReorder": true,
  "isSubscriptionCompatible": false,
  "isValid": false,
  "itemCount": 987,
  "lastOrderedAt": "xyz789",
  "lineItemGroups": [LineItemGroupContacts],
  "paymentInfo": OrderPaymentInfo,
  "promotions": [OrderBasePromotion],
  "recurrencePolicies": [OrderRecurrencePolicy],
  "replacementFrequency": "DLY",
  "selectedRecurrencePolicy": OrderRecurrencePolicy,
  "subscriptionId": "xyz789",
  "subscriptionPaymentInfo": SubscriptionPaymentInfo,
  "subscriptionPlanType": "POSTPAY",
  "subtotal": Money,
  "totalPrice": Money
}

ContactLensEye

Values
Enum Value Description

left

right

Example
"left"

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": "abc123",
  "axis": 123,
  "baseCurve": "xyz789",
  "colour": "xyz789",
  "cylinder": "abc123",
  "diameter": "xyz789",
  "sphere": "abc123"
}

ContactLensPrescription

Fields
Field Name Description
date - String The date of the prescription
leftEye - ContactLensEyePrescription
rightEye - ContactLensEyePrescription
validFrom - String The date from which the prescription is valid
Example
{
  "date": "abc123",
  "leftEye": ContactLensEyePrescription,
  "rightEye": ContactLensEyePrescription,
  "validFrom": "abc123"
}

ContactLensPrescriptionInterface

Fields
Field Name Description
date - String The date of the prescription
leftEye - ContactLensEyePrescription
rightEye - ContactLensEyePrescription
validFrom - String The date from which the prescription is valid
Possible Types
ContactLensPrescriptionInterface Types

ContactLensPrescription

Example
{
  "date": "abc123",
  "leftEye": ContactLensEyePrescription,
  "rightEye": ContactLensEyePrescription,
  "validFrom": "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": 987
}

ContactsInput

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

ContactsOrderGroupStatus

Values
Enum Value Description

AWAITING_STOCK

BACK_ORDERED

PENDING_CANCELLATION

PICK_AND_PACK

SHIPPED

STOCK_RECEIVED

Example
"AWAITING_STOCK"

Cursor

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

Customer

Fields
Field Name Description
activity - [Activity!]! Activity log notes for the customer
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
lastOrder - Order The last order for 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
registeredOnSite - String! The site the customer registered on
storedPaymentMethods - [StoredPaymentMethod!]! List of stored payment methods for the customer
subscriptions - [Subscription!]! The customer's subscriptions (if any)
title - String The title of the customer
Example
{
  "activity": [ActivityMarketing],
  "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": "xyz789",
  "lastOrder": Order,
  "marketingOptIn": false,
  "nationalHealthId": "xyz789",
  "phoneNumber": "abc123",
  "registeredOnSite": "xyz789",
  "storedPaymentMethods": [StoredPaymentMethod],
  "subscriptions": [Subscription],
  "title": "abc123"
}

CustomerAnnualOverview

Description

Customer Annual Overview

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

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": "abc123",
  "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": 987,
  "key": "abc123",
  "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": 123,
  "key": "xyz789",
  "price": Money,
  "serviceType": "EXPRESS"
}

Direction

Values
Enum Value Description

NEXT

PREV

Example
"NEXT"

EditAddressInput

Fields
Input Field Description
address - AddressInput!
addressId - String!
customerId - String!
isDefault - Boolean!
Example
{
  "address": AddressInput,
  "addressId": "abc123",
  "customerId": "abc123",
  "isDefault": false
}

ExactCustomerSearchBaseResultItem

Fields
Field Name Description
dateOfBirth - String The date of birth of the customer
email - String The email address of the customer
firstName - String The first name of the customer
lastName - String The last name of the customer
phoneNumber - String The phone number of the customer
title - String The title of the customer
Possible Types
ExactCustomerSearchBaseResultItem Types

ExactCustomersSearchFullResultItem

ExactCustomersSearchPartialResultItem

Example
{
  "dateOfBirth": "xyz789",
  "email": "abc123",
  "firstName": "xyz789",
  "lastName": "abc123",
  "phoneNumber": "abc123",
  "title": "abc123"
}

ExactCustomerSearchResultItem

Example
ExactCustomersSearchFullResultItem

ExactCustomerSearchResults

Fields
Field Name Description
items - [ExactCustomerSearchResultItem!]! Result items
Example
{"items": [ExactCustomersSearchFullResultItem]}

ExactCustomersSearchFullResultItem

Fields
Field Name Description
address - Address The default delivery address of the customer
dateOfBirth - String The date of birth of the customer
email - String The email address of the customer
firstName - String The first name of the customer
id - String! The ID of the customer
lastName - String The last name of the customer
nationalHealthId - String The national health ID of the customer
phoneNumber - String The phone number of the customer
title - String The title of the customer
Example
{
  "address": Address,
  "dateOfBirth": "abc123",
  "email": "xyz789",
  "firstName": "xyz789",
  "id": "abc123",
  "lastName": "xyz789",
  "nationalHealthId": "abc123",
  "phoneNumber": "abc123",
  "title": "xyz789"
}

ExactCustomersSearchPartialResultItem

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

ExactSearchQuery

Fields
Input Field Description
dateOfBirth - String
email - String
firstName - String
lastName - String
nationalHealthId - String
phoneNumber - String
postcode - String
Example
{
  "dateOfBirth": "abc123",
  "email": "xyz789",
  "firstName": "xyz789",
  "lastName": "abc123",
  "nationalHealthId": "xyz789",
  "phoneNumber": "abc123",
  "postcode": "abc123"
}

EyeInput

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

Float

Description

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

Example
123.45

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": "abc123",
  "oneOffUnitPrice": Money,
  "packDescription": "abc123",
  "packQuantity": 987,
  "primaryColor": "xyz789",
  "productKey": "abc123",
  "quantity": 123,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "size": "abc123",
  "sku": "xyz789",
  "totalPrice": Money
}

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": 123,
  "cylinder": "abc123",
  "originalPupillaryDistance": 123.45,
  "sphere": "abc123"
}

GlassesFunction

Values
Enum Value Description

DISTANCE

NO_PRESCRIPTION

READING

Example
"DISTANCE"

GlassesOrderGroupStatus

Values
Enum Value Description

AWAITING_GLAZING

AWAITING_PROCESSING

AWAITING_SURFACING

ERROR

IN_COATING

IN_GLAZING

IN_SURFACING

PENDING_CANCELLATION

SHIPPED

TBC

Example
"AWAITING_GLAZING"

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
Example
{
  "confirmValid": false,
  "date": "abc123",
  "glassesFunction": "DISTANCE",
  "leftEye": GlassesEyePrescription,
  "rightEye": GlassesEyePrescription,
  "source": "EXTERNAL"
}

Image

Fields
Field Name Description
label - String! Image label text
url - String! Image URL
Example
{
  "label": "xyz789",
  "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": "abc123",
  "state": "due",
  "success": true
}

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?
method - PaymentAttemptMethod!
origin - String! The origin of the payment attempt
state - String! The state of the transaction
success - Boolean! Was the attempt to charge the instalment successful
Example
{
  "date": "abc123",
  "isFinalAttempt": true,
  "isRetry": true,
  "method": PaymentAttemptMethod,
  "origin": "xyz789",
  "state": "abc123",
  "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
nextInstalmentPrice - Money The price of the next instalment to be paid (null means all 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)
Example
{
  "cancellationAmount": Money,
  "instalments": [Instalment],
  "instalmentsPaidCount": 123,
  "nextInstalmentPrice": Money,
  "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

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": "xyz789",
  "oneOffUnitPrice": Money,
  "packDescription": "xyz789",
  "packQuantity": 987,
  "packageDiscountedPrice": Money,
  "packagePrice": Money,
  "productKey": "abc123",
  "quantity": 123,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "sku": "abc123",
  "totalPrice": Money
}

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": "xyz789",
  "quantity": 123,
  "quantityLimits": QuantityLimits,
  "replacementFrequency": "DLY",
  "sku": "xyz789",
  "totalPrice": Money
}

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 Brand name of the line item group
groupId - Int! Unique identifier for the line item group
groupType - String! Type of the line item group
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 Short description of the line item group
status - ContactsOrderGroupStatus Status of the contacts line item group
statusLastModifiedAt - String The date and time when the status was last modified
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! Subtotal of the line item group
totalPrice - Money! Total price of the line item group
url - String
Example
{
  "brandName": "xyz789",
  "groupId": 123,
  "groupType": "abc123",
  "image": Image,
  "leftEye": LineItem,
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "prescription": ContactLensPrescription,
  "productKey": "abc123",
  "productStatus": "abc123",
  "recurrencePolicyId": "xyz789",
  "rightEye": LineItem,
  "shortDescription": "xyz789",
  "status": "AWAITING_STOCK",
  "statusLastModifiedAt": "xyz789",
  "subscriptionDiscountPercentage": 123.45,
  "subscriptionSubtotal": Money,
  "subscriptionUnitPrice": Money,
  "subtotal": Money,
  "totalPrice": Money,
  "url": "xyz789"
}

LineItemGroupGlasses

Fields
Field Name Description
brandName - String Brand name of the line item group
discountedPrice - Money!
frame - FrameLineItem! Frame
groupId - Int! Unique identifier for the line item group
groupType - String! Type of the line item group
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! Product key of the line item group
shortDescription - String Short description of the line item group
status - GlassesOrderGroupStatus Status of the glasses line item group
statusLastModifiedAt - String The date and time when the status was last modified
subtotal - Money! Subtotal of the line item group
totalPrice - Money! Total price of the line item group
unitPrice - Money!
url - String
Example
{
  "brandName": "xyz789",
  "discountedPrice": Money,
  "frame": FrameLineItem,
  "groupId": 123,
  "groupType": "abc123",
  "image": Image,
  "lens": LensLineItem,
  "lensOptions": LineItem,
  "name": "abc123",
  "oneOffUnitPrice": Money,
  "prescription": GlassesPrescription,
  "productKey": "abc123",
  "shortDescription": "xyz789",
  "status": "AWAITING_GLAZING",
  "statusLastModifiedAt": "xyz789",
  "subtotal": Money,
  "totalPrice": Money,
  "unitPrice": Money,
  "url": "xyz789"
}

LineItemGroupInterface

Fields
Field Name Description
brandName - String Brand name of the line item group
groupId - Int! Unique identifier for the line item group
groupType - String! Type of the line item group
image - Image
name - String!
oneOffUnitPrice - Money One off unit price (non-subscription unit price)
productKey - String! Product key of the line item group
shortDescription - String Short description of the line item group
subtotal - Money! Subtotal of the line item group
totalPrice - Money! Total price of the line item group
url - String
Possible Types
LineItemGroupInterface Types

LineItemGroupContacts

LineItemGroupGlasses

LineItemGroupOther

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

LineItemGroupOther

Fields
Field Name Description
brandName - String Brand name of the line item group
groupId - Int! Unique identifier for the line item group
groupType - String! Type of the line item group
image - Image
name - String!
oneOffUnitPrice - Money One off unit price (non-subscription unit price)
productKey - String! Product key of the line item group
shortDescription - String Short description of the line item group
subtotal - Money! Subtotal of the line item group
totalPrice - Money! Total price of the line item group
url - String
Example
{
  "brandName": "abc123",
  "groupId": 987,
  "groupType": "abc123",
  "image": Image,
  "name": "xyz789",
  "oneOffUnitPrice": Money,
  "productKey": "abc123",
  "shortDescription": "xyz789",
  "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": "abc123",
  "packQuantity": 123,
  "productKey": "abc123",
  "quantity": 987,
  "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": 123,
  "currencyCode": "xyz789",
  "fractionDigits": 123
}

Order

Description

Order

Fields
Field Name Description
activity - [OrderActivity!]! Order activity log
billingAddress - Address Billing address details
cancellationInfo - OrderCancellationInfo Information related to the cancellation of the order
createdAt - DateTime! Date and time the cart was created
creditNotes - [OrderCreditNote!] Credit notes related to the order
customerEmail - String! Customer email address
customerId - String! Unique customer ID
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 URL to the invoice for the order
isAppeaseable - Boolean! Whether the order is in an appeaseable state
isBillingSameAsDeliveryAddress - Boolean! Is the billing address the same as the delivery address?
isCancellable - Boolean! Whether the order is in a cancellable state
isExpressReorder - Boolean! Is this cart an express re-order?
isReplaceable - Boolean! Whether the order is in a replaceable state
isReplacementOrder - Boolean! Whether the order is a replacement order
isReturnable - Boolean! Whether the order is in a returnable state
isSubscriptionOrder - Boolean! Whether the order is a subscription order
isSubscriptionPostpay - Boolean!
isSubscriptionPrepay - Boolean!
isSubscriptionRecurring - Boolean!
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
orderNumber - String Unique order number
originalOrderId - String The ID of the original order, if this is a replacement order
originalOrderNumber - String The number of the original order, if this is a replacement order
paymentInfo - OrderPaymentInfo Payment information
promotions - [OrderBasePromotion!]! The promotions applied to the cart/order
recurrencePolicies - [OrderRecurrencePolicy!] Recurrence policies applicable
replacementFrequency - ReplacementFrequency
replacementInfo - OrderReplacementInfo Information related to the replacement of the order
replacementOrderIds - [String!] The list of IDs for orders that have been created as replacements for this order
returns - [Return!]! Return details
returnsAndAppeasements - [ReturnsAndAppeasements!]! Returns and Appeasements details
selectedRecurrencePolicy - OrderRecurrencePolicy The currently active recurrence policy
subscriptionId - String The id of the subscription
subscriptionPaymentInfo - SubscriptionPaymentInfo Payment Information for the subscription order
subscriptionPlanType - SubscriptionPlanType The subscription plan type for the order (if applicable)
subtotal - Money! The price of all of the line items (without discounts applied)
totalPrice - Money! The total price (with discounts applied)
type - OrderType! The type of the order
workflowState - OrderWorkflowState! The state of the order
Example
{
  "activity": [OrderActivityPayment],
  "billingAddress": Address,
  "cancellationInfo": OrderCancellationInfo,
  "createdAt": "2007-12-03T10:15:30Z",
  "creditNotes": [OrderCreditNote],
  "customerEmail": "abc123",
  "customerId": "xyz789",
  "deliveryAddress": Address,
  "deliveryMethod": DeliveryMethod,
  "discountCodes": ["abc123"],
  "healthFund": "xyz789",
  "healthFundPolicy": "xyz789",
  "id": "abc123",
  "instalmentsInfo": InstalmentsInfo,
  "invoice": OrderInvoice,
  "isAppeaseable": false,
  "isBillingSameAsDeliveryAddress": false,
  "isCancellable": false,
  "isExpressReorder": true,
  "isReplaceable": true,
  "isReplacementOrder": false,
  "isReturnable": true,
  "isSubscriptionOrder": false,
  "isSubscriptionPostpay": false,
  "isSubscriptionPrepay": true,
  "isSubscriptionRecurring": false,
  "isValid": true,
  "itemCount": 123,
  "lastOrderedAt": "xyz789",
  "lineItemGroups": [LineItemGroupContacts],
  "orderNumber": "xyz789",
  "originalOrderId": "xyz789",
  "originalOrderNumber": "xyz789",
  "paymentInfo": OrderPaymentInfo,
  "promotions": [OrderBasePromotion],
  "recurrencePolicies": [OrderRecurrencePolicy],
  "replacementFrequency": "DLY",
  "replacementInfo": OrderReplacementInfo,
  "replacementOrderIds": ["xyz789"],
  "returns": [Return],
  "returnsAndAppeasements": [ReturnsAndAppeasements],
  "selectedRecurrencePolicy": OrderRecurrencePolicy,
  "subscriptionId": "abc123",
  "subscriptionPaymentInfo": SubscriptionPaymentInfo,
  "subscriptionPlanType": "POSTPAY",
  "subtotal": Money,
  "totalPrice": Money,
  "type": "RECURRING",
  "workflowState": "order_back_ordered"
}

OrderActivity

Example
OrderActivityPayment

OrderActivityPayment

Fields
Field Name Description
code - ActivityCode!
createdAt - String! Date and time when the activity was recorded
createdBy - ActivityCreatedBy!
detail - String Additional details/notes
id - String! Unique identifier for the activity entry
interactionId - String! Payment transaction interaction ID
type - ActivityType!
Example
{
  "code": "A001",
  "createdAt": "xyz789",
  "createdBy": ActivityCreatedBy,
  "detail": "xyz789",
  "id": "abc123",
  "interactionId": "abc123",
  "type": "APPEASEMENT_EVENT"
}

OrderActivityStatusChange

Fields
Field Name Description
cancellationReasonCode - String Cancellation reason code
code - ActivityCode!
createdAt - String! Date and time when the activity was recorded
createdBy - ActivityCreatedBy!
detail - String Activity detail
id - String! Unique identifier for the activity entry
status - OrderStatuses! Order workflow state at the time of the activity (e.g., order_open, order_confirmed)
type - ActivityType!
Example
{
  "cancellationReasonCode": "abc123",
  "code": "A001",
  "createdAt": "xyz789",
  "createdBy": ActivityCreatedBy,
  "detail": "abc123",
  "id": "abc123",
  "status": "BACK_ORDERED",
  "type": "APPEASEMENT_EVENT"
}

OrderBaseInterface

Fields
Field Name Description
billingAddress - Address Billing address details
createdAt - DateTime! Date and time the cart was created
customerEmail - String Customer email address
customerId - String Unique customer ID
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?
isExpressReorder - Boolean! Is this cart an express re-order?
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
paymentInfo - OrderPaymentInfo Payment information
promotions - [OrderBasePromotion!]! The promotions applied to the cart/order
recurrencePolicies - [OrderRecurrencePolicy!] Recurrence policies applicable
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 - SubscriptionPlanType The subscription plan type for the order (if applicable)
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
{
  "billingAddress": Address,
  "createdAt": "2007-12-03T10:15:30Z",
  "customerEmail": "abc123",
  "customerId": "xyz789",
  "deliveryAddress": Address,
  "deliveryMethod": DeliveryMethod,
  "discountCodes": ["xyz789"],
  "healthFund": "xyz789",
  "healthFundPolicy": "xyz789",
  "id": "xyz789",
  "instalmentsInfo": InstalmentsInfo,
  "isBillingSameAsDeliveryAddress": false,
  "isExpressReorder": true,
  "isValid": true,
  "itemCount": 987,
  "lastOrderedAt": "xyz789",
  "lineItemGroups": [LineItemGroupContacts],
  "paymentInfo": OrderPaymentInfo,
  "promotions": [OrderBasePromotion],
  "recurrencePolicies": [OrderRecurrencePolicy],
  "replacementFrequency": "DLY",
  "selectedRecurrencePolicy": OrderRecurrencePolicy,
  "subscriptionId": "xyz789",
  "subscriptionPaymentInfo": SubscriptionPaymentInfo,
  "subscriptionPlanType": "POSTPAY",
  "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": "xyz789",
  "saving": Money,
  "type": "auto"
}

OrderCancellationInfo

Fields
Field Name Description
cancelledAt - String! Date and time when the order was cancelled
cancelledBy - OrderUserActionInfo! Date and time when the order was cancelled
code - String! Reason code
description - String! Reason description
detail - String! Additional details/notes
id - String! Reason ID
key - String Reason key
Example
{
  "cancelledAt": "xyz789",
  "cancelledBy": OrderUserActionInfo,
  "code": "abc123",
  "description": "abc123",
  "detail": "abc123",
  "id": "abc123",
  "key": "abc123"
}

OrderCreditNote

Description

Refund credit note

Fields
Field Name Description
urlPath - String! Storage path for the credit note PDF
Example
{"urlPath": "xyz789"}

OrderDiscount

Fields
Field Name Description
amount - Money! The amount of the discount
name - String! The name of the discount
Example
{
  "amount": Money,
  "name": "xyz789"
}

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"}

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
instalments - [Instalment!] Instalments (Pre- and Post-Pay orders only)
key - String Key
lastFour - String End digits of payment card
method - String! Method
status - String! Status
transactions - [Transaction!] Transactions
Example
{
  "amountPlanned": Money,
  "brand": "xyz789",
  "expiryMonth": "xyz789",
  "expiryYear": "abc123",
  "id": "xyz789",
  "instalments": [Instalment],
  "key": "xyz789",
  "lastFour": "abc123",
  "method": "abc123",
  "status": "abc123",
  "transactions": [Transaction]
}

OrderPaymentInfo

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

OrderPromotionType

Values
Enum Value Description

auto

code

Example
"auto"

OrderQueryResults

Fields
Field Name Description
items - [Order!]! Result items
pageInfo - PageInfo!
totalCount - Int The total count of orders
Example
{
  "items": [Order],
  "pageInfo": PageInfo,
  "totalCount": 987
}

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
}

OrderRefundType

Values
Enum Value Description

APPEASEMENT

RETURN

Example
"APPEASEMENT"

OrderReplacementInfo

Fields
Field Name Description
reasons - [OrderReplacementInfoReason!]! Reasons for replacing the order
replacedAt - String! Date and time when the order was replaced
replacedBy - OrderUserActionInfo! User who replaced the order
Example
{
  "reasons": [OrderReplacementInfoReason],
  "replacedAt": "xyz789",
  "replacedBy": OrderUserActionInfo
}

OrderReplacementInfoReason

Fields
Field Name Description
additionalInfo - String Additional information for the item being replaced
lineItemId - String! The line item id of the replaced item
quantity - Int! The quantity of the replaced item
reason - String! The reason description for the item being replaced
reasonCode - String! The reason code for the item being replaced
sku - String! The sku of the replaced item
Example
{
  "additionalInfo": "abc123",
  "lineItemId": "abc123",
  "quantity": 123,
  "reason": "abc123",
  "reasonCode": "xyz789",
  "sku": "xyz789"
}

OrderReturnPaymentState

Values
Enum Value Description

FAILED

PENDING

REFUNDED

Example
"FAILED"

OrderReturnState

Values
Enum Value Description

COMPLETE

INITIATED

Example
"COMPLETE"

OrderReturnType

Values
Enum Value Description

APPEASEMENT

NON_RECEIPTED

RECEIPTED

Example
"APPEASEMENT"

OrderSearchResultItem

Fields
Field Name Description
createdAt - DateTime! Date and time the cart was created
customerEmail - String! Customer email address
customerName - String! Customer first and last name
healthFund - String Health fund provider applied to cart
healthFundPolicy - String Health fund policy applied to cart
id - String! The ID of the customer
orderNumber - String The order number of the order
totalPrice - Money! The total price (with discounts applied)
workflowState - OrderWorkflowState! The state of the order
Example
{
  "createdAt": "2007-12-03T10:15:30Z",
  "customerEmail": "abc123",
  "customerName": "abc123",
  "healthFund": "xyz789",
  "healthFundPolicy": "abc123",
  "id": "abc123",
  "orderNumber": "abc123",
  "totalPrice": Money,
  "workflowState": "order_back_ordered"
}

OrderSearchResults

Fields
Field Name Description
items - [OrderSearchResultItem!]! Result items
pageInfo - PageInfo!
Example
{
  "items": [OrderSearchResultItem],
  "pageInfo": PageInfo
}

OrderSelection

Fields
Field Name Description
createdAt - String! The order creation date
id - String! The ID of the order
lastModifiedAt - String! The order last modified date
orderNumber - String! The order number
orderState - String The current order state of the order
replacementInfo - OrderReplacementInfo
Example
{
  "createdAt": "xyz789",
  "id": "abc123",
  "lastModifiedAt": "xyz789",
  "orderNumber": "abc123",
  "orderState": "abc123",
  "replacementInfo": OrderReplacementInfo
}

OrderStatuses

Values
Enum Value Description

BACK_ORDERED

CANCELLED

COLLECTED

COMPLETE

CONFIRMED

OPEN

PENDING_CANCELLATION

PENDING_RX_VALIDATION

PROCESSING

REMORSE

SHIPPED

Example
"BACK_ORDERED"

OrderType

Values
Enum Value Description

RECURRING

REMAKE

REPAIR

REPLACEMENT

STANDARD

Example
"RECURRING"

OrderUserActionInfo

Fields
Field Name Description
email - String Email address of the user who performed the action
id - String! Unique identifier for the user who performed the action
name - String Name of the user who performed the action
userType - UserType! Type of user that performed the action
Example
{
  "email": "abc123",
  "id": "xyz789",
  "name": "abc123",
  "userType": "ANONYMOUS_CUSTOMER"
}

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": "xyz789",
  "isFinalAttempt": false,
  "isRetry": true,
  "method": PaymentMethod,
  "origin": "xyz789",
  "state": "abc123"
}

PaymentAttemptMethod

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

PaymentMethod

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

PrescriptionSource

Values
Enum Value Description

EXTERNAL

INTERNAL

Example
"EXTERNAL"

ProductVariantOptions

Fields
Field Name Description
allAttributeOptions - [AttributeOptions!]! All attribute options
defaultQuantity - Int The default quantity
maxQuantity - Int The maximum quantity
minQuantity - Int The minimum quantity
variantAttributes - [VariantAttribute!]! Variant attributes
Example
{
  "allAttributeOptions": [AttributeOptions],
  "defaultQuantity": 123,
  "maxQuantity": 123,
  "minQuantity": 123,
  "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!
customerId - String!
Example
{
  "addressId": "abc123",
  "customerId": "xyz789"
}

RemovePaymentMethodInput

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

RemoveSubscriptionCartContactLensGroupInput

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

ReplacementDiscount

Fields
Field Name Description
amount - Money! The amount of the discount
name - String! The name of the discount
Example
{
  "amount": Money,
  "name": "abc123"
}

ReplacementDraft

Fields
Input Field Description
deliveryAddressId - String!
lineItems - [ReplacementDraftItem!]!
Example
{
  "deliveryAddressId": "xyz789",
  "lineItems": [ReplacementDraftItem]
}

ReplacementDraftItem

Fields
Input Field Description
additionalInfo - String
comment - String
lineItemId - String!
quantity - Int!
reason - String!
reasonCode - String!
Example
{
  "additionalInfo": "abc123",
  "comment": "xyz789",
  "lineItemId": "xyz789",
  "quantity": 987,
  "reason": "abc123",
  "reasonCode": "abc123"
}

ReplacementElementsAndTreatmentsGroup

Fields
Field Name Description
discountedPrice - Money!
elementsAndTreatmentsNames - [String!]!
key - String!
unitPrice - Money!
Example
{
  "discountedPrice": Money,
  "elementsAndTreatmentsNames": ["abc123"],
  "key": "abc123",
  "unitPrice": Money
}

ReplacementFrequency

Values
Enum Value Description

DLY

MLY

TMLY

Example
"DLY"

ReplacementSummary

Fields
Field Name Description
deliveryAddress - Address! The original orders delivery address
lineItems - [ReplacementSummaryLineItem!]! The return summary groups that make up the order
orderId - String! Unique order ID
Example
{
  "deliveryAddress": Address,
  "lineItems": [ReplacementSummaryLineItemContactLens],
  "orderId": "xyz789"
}

ReplacementSummaryLensPackage

Fields
Field Name Description
discountedPrice - Money!
elementsAndTreatmentsGroups - [ReplacementElementsAndTreatmentsGroup!]
unitPrice - Money!
Example
{
  "discountedPrice": Money,
  "elementsAndTreatmentsGroups": [
    ReplacementElementsAndTreatmentsGroup
  ],
  "unitPrice": Money
}

ReplacementSummaryLineItem

Example
ReplacementSummaryLineItemContactLens

ReplacementSummaryLineItemBase

Fields
Field Name Description
availableToReplaceQuantity - Int!
brandName - String
discountedPrice - Money!
discounts - [ReplacementDiscount!]! The discounts applied to the line item
groupType - String!
lineItemId - String!
name - String!
previouslyReturnedQuantity - Int!
quantity - Int!
sku - String!
unitPrice - Money!
Example
{
  "availableToReplaceQuantity": 987,
  "brandName": "xyz789",
  "discountedPrice": Money,
  "discounts": [ReplacementDiscount],
  "groupType": "abc123",
  "lineItemId": "xyz789",
  "name": "xyz789",
  "previouslyReturnedQuantity": 987,
  "quantity": 987,
  "sku": "abc123",
  "unitPrice": Money
}

ReplacementSummaryLineItemContactLens

Fields
Field Name Description
availableToReplaceQuantity - Int!
brandName - String
discountedPrice - Money!
discounts - [ReplacementDiscount!]! The discounts applied to the line item
eye - ContactLensEye
groupType - String!
lineItemId - String!
name - String!
packQuantity - Int
previouslyReturnedQuantity - Int!
quantity - Int!
replacementFrequency - ReplacementFrequency
sku - String!
unitPrice - Money!
Example
{
  "availableToReplaceQuantity": 123,
  "brandName": "abc123",
  "discountedPrice": Money,
  "discounts": [ReplacementDiscount],
  "eye": "left",
  "groupType": "xyz789",
  "lineItemId": "abc123",
  "name": "abc123",
  "packQuantity": 987,
  "previouslyReturnedQuantity": 987,
  "quantity": 123,
  "replacementFrequency": "DLY",
  "sku": "xyz789",
  "unitPrice": Money
}

ReplacementSummaryLineItemFrame

Fields
Field Name Description
discountedPrice - Money!
unitPrice - Money!
Example
{
  "discountedPrice": Money,
  "unitPrice": Money
}

ReplacementSummaryLineItemGlasses

Fields
Field Name Description
availableToReplaceQuantity - Int!
brandName - String
color - String
discountedPrice - Money!
discounts - [ReplacementDiscount!]! The discounts applied to the line item
frame - ReplacementSummaryLineItemFrame!
groupType - String!
lensPackage - ReplacementSummaryLensPackage!
lineItemId - String!
name - String!
previouslyReturnedQuantity - Int!
quantity - Int!
size - String
sku - String!
unitPrice - Money!
Example
{
  "availableToReplaceQuantity": 123,
  "brandName": "abc123",
  "color": "xyz789",
  "discountedPrice": Money,
  "discounts": [ReplacementDiscount],
  "frame": ReplacementSummaryLineItemFrame,
  "groupType": "abc123",
  "lensPackage": ReplacementSummaryLensPackage,
  "lineItemId": "abc123",
  "name": "abc123",
  "previouslyReturnedQuantity": 123,
  "quantity": 123,
  "size": "xyz789",
  "sku": "xyz789",
  "unitPrice": Money
}

ReplacementSummaryLineItemOther

Fields
Field Name Description
availableToReplaceQuantity - Int!
brandName - String
discountedPrice - Money!
discounts - [ReplacementDiscount!]! The discounts applied to the line item
groupType - String!
lineItemId - String!
name - String!
previouslyReturnedQuantity - Int!
quantity - Int!
sku - String!
unitPrice - Money!
Example
{
  "availableToReplaceQuantity": 123,
  "brandName": "abc123",
  "discountedPrice": Money,
  "discounts": [ReplacementDiscount],
  "groupType": "xyz789",
  "lineItemId": "xyz789",
  "name": "abc123",
  "previouslyReturnedQuantity": 123,
  "quantity": 987,
  "sku": "abc123",
  "unitPrice": Money
}

ResumeSubscriptionInput

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

RetryPaymentInput

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

Return

Fields
Field Name Description
createdAt - String! The date the return item was created
createdBy - OrderUserActionInfo! The details of the person who created the return
creditNote - OrderCreditNote Credit notes related to the order
includeShipping - Boolean! If the shipping has been refunded in this return.
itemsRefund - Money!
itemsReturned - Boolean! If the items have been physically received eg: in case of RECEIPTED returnType
key - String! Unique key to identify the return
lastModifiedAt - String! The date the return item was last modified
lastModifiedBy - OrderUserActionInfo! The details of the person who last edited the return
lineItems - [ReturnLineItem!]! The return items that make up the return
originalOrderNumber - String! The number of the original order the return is based on
refundMethods - [String!]!
refundStatus - OrderReturnPaymentState!
returnStatus - OrderReturnState!
returnType - OrderReturnType! The type of return RECEIPTED | NON_RECEIPTED | APPEASEMENT
shippingRefund - Money!
shippingReturnAdditionalInfo - String If includeShipping is true, and the reason was 'Other', the additional information entered
shippingReturnReason - String If includeShipping is true, the reason description for shipping being returned
shippingReturnReasonCode - String If includeShipping is true, the reason code for shipping being returned
totalRefund - Money!
Example
{
  "createdAt": "abc123",
  "createdBy": OrderUserActionInfo,
  "creditNote": OrderCreditNote,
  "includeShipping": false,
  "itemsRefund": Money,
  "itemsReturned": false,
  "key": "xyz789",
  "lastModifiedAt": "abc123",
  "lastModifiedBy": OrderUserActionInfo,
  "lineItems": [ReturnLineItemContactLens],
  "originalOrderNumber": "xyz789",
  "refundMethods": ["abc123"],
  "refundStatus": "FAILED",
  "returnStatus": "COMPLETE",
  "returnType": "APPEASEMENT",
  "shippingRefund": Money,
  "shippingReturnAdditionalInfo": "abc123",
  "shippingReturnReason": "xyz789",
  "shippingReturnReasonCode": "xyz789",
  "totalRefund": Money
}

ReturnDraft

Fields
Input Field Description
includeShipping - Boolean!
itemsReturned - Boolean!
lineItems - [ReturnDraftItem!]
shippingReturnAdditionalInfo - String
shippingReturnReason - String
shippingReturnReasonCode - String
Example
{
  "includeShipping": false,
  "itemsReturned": false,
  "lineItems": [ReturnDraftItem],
  "shippingReturnAdditionalInfo": "xyz789",
  "shippingReturnReason": "abc123",
  "shippingReturnReasonCode": "xyz789"
}

ReturnDraftItem

Fields
Input Field Description
additionalInfo - String
comment - String
lineItemId - String!
quantity - Int!
reason - String!
reasonCode - String!
Example
{
  "additionalInfo": "abc123",
  "comment": "xyz789",
  "lineItemId": "abc123",
  "quantity": 987,
  "reason": "xyz789",
  "reasonCode": "xyz789"
}

ReturnElementsAndTreatmentsGroup

Fields
Field Name Description
discountedPrice - Money!
elementsAndTreatmentsNames - [String!]!
key - String!
unitPrice - Money!
Example
{
  "discountedPrice": Money,
  "elementsAndTreatmentsNames": ["xyz789"],
  "key": "abc123",
  "unitPrice": Money
}

ReturnLensPackage

Fields
Field Name Description
discountedPrice - Money!
elementsAndTreatmentsGroups - [ReturnElementsAndTreatmentsGroup!]
unitPrice - Money!
Example
{
  "discountedPrice": Money,
  "elementsAndTreatmentsGroups": [
    ReturnElementsAndTreatmentsGroup
  ],
  "unitPrice": Money
}

ReturnLineItem

Example
ReturnLineItemContactLens

ReturnLineItemBase

Fields
Field Name Description
brandName - String
comment - String The optional comment for the return
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
groupType - String!
id - String! The unique id of the return item
lineItemId - String! The id of the line item being returned
name - String!
reasons - [ReturnReason!]! The reason description for the item being returned
refundAmount - Money!
returnQuantity - Int! The number of the items being returned
sku - String!
unitPrice - Money!
Possible Types
ReturnLineItemBase Types

ReturnLineItemContactLens

ReturnLineItemGlasses

ReturnLineItemOther

Example
{
  "brandName": "xyz789",
  "comment": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "groupType": "xyz789",
  "id": "abc123",
  "lineItemId": "abc123",
  "name": "abc123",
  "reasons": [ReturnReason],
  "refundAmount": Money,
  "returnQuantity": 987,
  "sku": "xyz789",
  "unitPrice": Money
}

ReturnLineItemContactLens

Fields
Field Name Description
brandName - String
comment - String The optional comment for the return
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
eye - ContactLensEye!
groupType - String!
id - String! The unique id of the return item
lineItemId - String! The id of the line item being returned
name - String!
packQuantity - Int
reasons - [ReturnReason!]! The reason description for the item being returned
refundAmount - Money!
replacementFrequency - ReplacementFrequency
returnQuantity - Int! The number of the items being returned
sku - String!
unitPrice - Money!
Example
{
  "brandName": "abc123",
  "comment": "abc123",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "eye": "left",
  "groupType": "xyz789",
  "id": "xyz789",
  "lineItemId": "xyz789",
  "name": "abc123",
  "packQuantity": 987,
  "reasons": [ReturnReason],
  "refundAmount": Money,
  "replacementFrequency": "DLY",
  "returnQuantity": 123,
  "sku": "abc123",
  "unitPrice": Money
}

ReturnLineItemFrame

Fields
Field Name Description
discountedPrice - Money!
unitPrice - Money!
Example
{
  "discountedPrice": Money,
  "unitPrice": Money
}

ReturnLineItemGlasses

Fields
Field Name Description
brandName - String
color - String
comment - String The optional comment for the return
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
frame - ReturnLineItemFrame!
groupType - String!
id - String! The unique id of the return item
lensPackage - ReturnLensPackage!
lineItemId - String! The id of the line item being returned
name - String!
reasons - [ReturnReason!]! The reason description for the item being returned
refundAmount - Money!
returnQuantity - Int! The number of the items being returned
size - String
sku - String!
unitPrice - Money!
Example
{
  "brandName": "xyz789",
  "color": "xyz789",
  "comment": "abc123",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "frame": ReturnLineItemFrame,
  "groupType": "xyz789",
  "id": "xyz789",
  "lensPackage": ReturnLensPackage,
  "lineItemId": "abc123",
  "name": "xyz789",
  "reasons": [ReturnReason],
  "refundAmount": Money,
  "returnQuantity": 987,
  "size": "abc123",
  "sku": "abc123",
  "unitPrice": Money
}

ReturnLineItemOther

Fields
Field Name Description
brandName - String
comment - String The optional comment for the return
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
groupType - String!
id - String! The unique id of the return item
lineItemId - String! The id of the line item being returned
name - String!
reasons - [ReturnReason!]! The reason description for the item being returned
refundAmount - Money!
returnQuantity - Int! The number of the items being returned
sku - String!
unitPrice - Money!
Example
{
  "brandName": "xyz789",
  "comment": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "groupType": "abc123",
  "id": "abc123",
  "lineItemId": "abc123",
  "name": "abc123",
  "reasons": [ReturnReason],
  "refundAmount": Money,
  "returnQuantity": 987,
  "sku": "abc123",
  "unitPrice": Money
}

ReturnLineItemQuantities

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

ReturnReason

Fields
Field Name Description
additionalInfo - String Additional information provided for the return reason
quantity - Int! The quantity being returned for this reason
reason - String! The reason description for the item being returned
reasonCode - String! The reason code for the item being returned
Example
{
  "additionalInfo": "abc123",
  "quantity": 123,
  "reason": "abc123",
  "reasonCode": "xyz789"
}

ReturnSummary

Fields
Field Name Description
availableToRefund - Money! The total amount available to refund for this order
itemsRefund - Money! The refund amount for the items
lineItems - [ReturnSummaryLineItem!]! The return summary groups that make up the order
orderId - String! Unique order ID
previouslyRefunded - Money! The amount previously refunded for this order
shipping - ReturnSummaryShipping! The shipping details for the original order
shippingRefund - Money! The refund amount for shipping
totalRefund - Money! The refund amount for the items and shipping
Example
{
  "availableToRefund": Money,
  "itemsRefund": Money,
  "lineItems": [ReturnSummaryLineItemContactLens],
  "orderId": "xyz789",
  "previouslyRefunded": Money,
  "shipping": ReturnSummaryShipping,
  "shippingRefund": Money,
  "totalRefund": Money
}

ReturnSummaryLineItem

Example
ReturnSummaryLineItemContactLens

ReturnSummaryLineItemBase

Fields
Field Name Description
availableToReturnQuantity - Int!
brandName - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
groupType - String!
lineItemId - String!
name - String!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
returnQuantity - Int
sku - String!
unitPrice - Money!
Example
{
  "availableToReturnQuantity": 123,
  "brandName": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "groupType": "xyz789",
  "lineItemId": "xyz789",
  "name": "abc123",
  "previouslyReturnedQuantity": 123,
  "quantity": 987,
  "refundAmount": Money,
  "returnQuantity": 987,
  "sku": "xyz789",
  "unitPrice": Money
}

ReturnSummaryLineItemContactLens

Fields
Field Name Description
availableToReturnQuantity - Int!
brandName - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
eye - ContactLensEye
groupType - String!
lineItemId - String!
name - String!
packQuantity - Int
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
replacementFrequency - ReplacementFrequency
returnQuantity - Int
sku - String!
unitPrice - Money!
Example
{
  "availableToReturnQuantity": 987,
  "brandName": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "eye": "left",
  "groupType": "abc123",
  "lineItemId": "abc123",
  "name": "xyz789",
  "packQuantity": 987,
  "previouslyReturnedQuantity": 123,
  "quantity": 987,
  "refundAmount": Money,
  "replacementFrequency": "DLY",
  "returnQuantity": 987,
  "sku": "abc123",
  "unitPrice": Money
}

ReturnSummaryLineItemGlasses

Fields
Field Name Description
availableToReturnQuantity - Int!
brandName - String
color - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
frame - ReturnLineItemFrame!
groupType - String!
lensPackage - ReturnLensPackage!
lineItemId - String!
name - String!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
returnQuantity - Int
size - String
sku - String!
unitPrice - Money!
Example
{
  "availableToReturnQuantity": 987,
  "brandName": "xyz789",
  "color": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "frame": ReturnLineItemFrame,
  "groupType": "abc123",
  "lensPackage": ReturnLensPackage,
  "lineItemId": "abc123",
  "name": "xyz789",
  "previouslyReturnedQuantity": 123,
  "quantity": 123,
  "refundAmount": Money,
  "returnQuantity": 123,
  "size": "xyz789",
  "sku": "abc123",
  "unitPrice": Money
}

ReturnSummaryLineItemOther

Fields
Field Name Description
availableToReturnQuantity - Int!
brandName - String
discountedPrice - Money!
discounts - [OrderDiscount!]! The discounts applied to the line item
groupType - String!
lineItemId - String!
name - String!
previouslyReturnedQuantity - Int!
quantity - Int!
refundAmount - Money!
returnQuantity - Int
sku - String!
unitPrice - Money!
Example
{
  "availableToReturnQuantity": 123,
  "brandName": "xyz789",
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "groupType": "xyz789",
  "lineItemId": "xyz789",
  "name": "xyz789",
  "previouslyReturnedQuantity": 123,
  "quantity": 123,
  "refundAmount": Money,
  "returnQuantity": 987,
  "sku": "abc123",
  "unitPrice": Money
}

ReturnSummaryShipping

Fields
Field Name Description
availableToRefundAmount - Money! The amount available to refund for shipping
availableToReturnQuantity - Int! Will be 1 if the shipping can be refunded, 0 if not.
discountedPrice - Money! The amount for shipping
discounts - [OrderDiscount!]! The discounts applied to the shipping
unitPrice - Money! The amount for shipping
Example
{
  "availableToRefundAmount": Money,
  "availableToReturnQuantity": 123,
  "discountedPrice": Money,
  "discounts": [OrderDiscount],
  "unitPrice": Money
}

ReturnsAndAppeasements

Fields
Field Name Description
createdAt - String! The date the return item was created
createdBy - OrderUserActionInfo! The details of the person who created the return
includeShipping - Boolean! If the shipping has been refunded in this return.
itemsRefund - Money!
itemsReturned - Boolean! If the items have been physically received eg: in case of RECEIPTED returnType
key - String! Unique key to identify the return
lastModifiedAt - String! The date the return item was last modified
lastModifiedBy - OrderUserActionInfo! The details of the person who last edited the return
lineItems - [ReturnLineItem!]! The return items that make up the return
originalOrderNumber - String! The number of the original order the return is based on
refundMethods - [String!]!
refundStatus - OrderReturnPaymentState!
returnStatus - OrderReturnState!
returnType - OrderReturnType! The type of return RECEIPTED | NON_RECEIPTED | APPEASEMENT
shippingRefund - Money!
shippingReturnReason - String If includeShipping is true, the reason description for shipping being returned
shippingReturnReasonCode - String If includeShipping is true, the reason code for shipping being returned
totalRefund - Money!
type - OrderRefundType! The type of refund RETURN | APPEASEMENT
Example
{
  "createdAt": "abc123",
  "createdBy": OrderUserActionInfo,
  "includeShipping": true,
  "itemsRefund": Money,
  "itemsReturned": false,
  "key": "xyz789",
  "lastModifiedAt": "abc123",
  "lastModifiedBy": OrderUserActionInfo,
  "lineItems": [ReturnLineItemContactLens],
  "originalOrderNumber": "abc123",
  "refundMethods": ["abc123"],
  "refundStatus": "FAILED",
  "returnStatus": "COMPLETE",
  "returnType": "APPEASEMENT",
  "shippingRefund": Money,
  "shippingReturnReason": "abc123",
  "shippingReturnReasonCode": "xyz789",
  "totalRefund": Money,
  "type": "APPEASEMENT"
}

ServiceType

Values
Enum Value Description

EXPRESS

STANDARD

Example
"EXPRESS"

SetDefaultAddressInput

Fields
Input Field Description
addressId - String!
customerId - String!
Example
{
  "addressId": "xyz789",
  "customerId": "abc123"
}

SetDeliveryAddressOnSubscriptionAddressTypeInput

Fields
Input Field Description
addToAccount - Boolean
addToAccountAsDefault - Boolean
address - AddressInput!
Example
{
  "addToAccount": true,
  "addToAccountAsDefault": false,
  "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": false,
  "delivery": SetDeliveryAddressOnSubscriptionAddressTypeInput,
  "subscriptionId": "xyz789"
}

SetReturnAsManuallyRefundedInput

Fields
Input Field Description
orderNumber - String!
returnKey - String!
transactionNotes - String!
transactionRef - String
Example
{
  "orderNumber": "abc123",
  "returnKey": "xyz789",
  "transactionNotes": "abc123",
  "transactionRef": "xyz789"
}

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
Example
{
  "billingAddress": Address,
  "brand": "abc123",
  "createdAt": "2007-12-03T10:15:30Z",
  "expiryMonth": 987,
  "expiryYear": 123,
  "holderName": "abc123",
  "id": "xyz789",
  "isExpired": true,
  "isLinkedToActiveSubscription": true,
  "isVerified": true,
  "lastFour": "abc123",
  "lastUsedAt": "2007-12-03T10:15:30Z",
  "nickname": "abc123",
  "supportsSubscriptions": false
}

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
"abc123"

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": "abc123",
  "detail": "abc123",
  "id": "abc123",
  "key": "abc123"
}

SubscriptionCancellationUser

Fields
Field Name Description
email - String The user email
id - String! The user ID
name - String The user name
userType - UserTypeForAction! The type of user who performed the action
Example
{
  "email": "abc123",
  "id": "xyz789",
  "name": "abc123",
  "userType": "ANONYMOUS_CUSTOMER"
}

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"
}

SubscriptionPlanType

Values
Enum Value Description

POSTPAY

PREPAY

RECURRING

Example
"POSTPAY"

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"
}

UpdateContactLensGroupInSubscriptionInput

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": 123,
  "subscriptionId": "abc123"
}

UpdatePaymentMethodInput

Fields
Input Field Description
address - AddressInput!
customerId - String!
holderName - String!
paymentMethodId - String!
Example
{
  "address": AddressInput,
  "customerId": "xyz789",
  "holderName": "abc123",
  "paymentMethodId": "xyz789"
}

UpdateSubscriptionInput

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

UpdateSubscriptionNextOrderAtInput

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

UserType

Values
Enum Value Description

ANONYMOUS_CUSTOMER

COLLEAGUE

CUSTOMER

PARTIAL_CUSTOMER

SYSTEM

Example
"ANONYMOUS_CUSTOMER"

UserTypeForAction

Description

The type of user who performed the action

Values
Enum Value Description

ANONYMOUS_CUSTOMER

COLLEAGUE

CUSTOMER

PARTIAL_CUSTOMER

SYSTEM

Example
"ANONYMOUS_CUSTOMER"

VariantAttribute

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