GraphQL API Reference

Welcome to the Submarine Platform GraphQL API reference. This reference includes the complete set of GraphQL types, queries, mutations, and their parameters for interacting with the Submarine eco-system.

For more general Submarine platform documentation, please check out our platform overview.

Learn how to authenticate to the API in the Getting Started guide.

Platform help desk∶ https://help.getsubmarine.com/portal/sign_in

Platform API Status∶ https://health.getsubmarine.com

Contact

API Support

hello@discolabs.com

API Endpoints
# Production:
https://api.getsubmarine.com/graphql
Headers
# You will need your API Token, these are environment specific
Authorization: Bearer <YOUR_PLATFORM_TOKEN_HERE>

Channels

Queries

channel

Description

Find a channel by ID, or return the current channel.

Response

Returns a Channel

Arguments
Name Description
id - SharedGlobalID The channel's ID.

Example

Query
query channel($id: SharedGlobalID) {
  channel(id: $id) {
    channelType
    config {
      ...PlatformConfigFragment
    }
    createdAt
    externalId
    id
    identifier
    organisation {
      ...OrganisationFragment
    }
    sharedSecret
    status
    updatedAt
  }
}
Variables
{"id": SharedGlobalID}
Response
{
  "data": {
    "channel": {
      "channelType": "SHOPIFY",
      "config": PlatformConfig,
      "createdAt": ISO8601DateTime,
      "externalId": 4,
      "id": GlobalID,
      "identifier": "xyz789",
      "organisation": Organisation,
      "sharedSecret": "xyz789",
      "status": "ACTIVE",
      "updatedAt": ISO8601DateTime
    }
  }
}

channels

Description

List all channels.

Response

Returns a ChannelConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query channels(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  channels(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...ChannelEdgeFragment
    }
    nodes {
      ...ChannelFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "after": "abc123",
  "before": "abc123",
  "first": 987,
  "last": 123
}
Response
{
  "data": {
    "channels": {
      "edges": [ChannelEdge],
      "nodes": [Channel],
      "pageInfo": PageInfo
    }
  }
}

Objects

Channel

Description

A sales channel.

Fields
Field Name Description
channelType - ChannelType! The type of sales channel (eg. Shopify).
config - PlatformConfig! The channel's Submarine configuration.
createdAt - ISO8601DateTime! The time the channel was created
externalId - ID! The channel's external ID.
id - GlobalID! The channel's ID.
identifier - String! The channel's identifier
organisation - Organisation! The channel's owner.
sharedSecret - String! The shared secret to be used when decoding Submarine notifications.
status - ChannelStatus! The channel's status (eg. active).
updatedAt - ISO8601DateTime! The time the channel was last updated
Example
{
  "channelType": "SHOPIFY",
  "config": PlatformConfig,
  "createdAt": ISO8601DateTime,
  "externalId": 4,
  "id": GlobalID,
  "identifier": "abc123",
  "organisation": Organisation,
  "sharedSecret": "xyz789",
  "status": "ACTIVE",
  "updatedAt": ISO8601DateTime
}

Organisations

Queries

organisation

Description

Find an organisation by ID, or return the current organisation

Response

Returns an Organisation

Arguments
Name Description
id - GlobalID The organisation's ID.

Example

Query
query organisation($id: GlobalID) {
  organisation(id: $id) {
    address {
      ...MailingAddressFragment
    }
    channels {
      ...ChannelConnectionFragment
    }
    createdAt
    email
    id
    name
    status
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "organisation": {
      "address": MailingAddress,
      "channels": ChannelConnection,
      "createdAt": "xyz789",
      "email": "abc123",
      "id": GlobalID,
      "name": "abc123",
      "status": "ACTIVE",
      "updatedAt": "xyz789"
    }
  }
}

organisations

Description

List all organisations.

Response

Returns an OrganisationConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query organisations(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  organisations(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...OrganisationEdgeFragment
    }
    nodes {
      ...OrganisationFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "after": "xyz789",
  "before": "abc123",
  "first": 987,
  "last": 987
}
Response
{
  "data": {
    "organisations": {
      "edges": [OrganisationEdge],
      "nodes": [Organisation],
      "pageInfo": PageInfo
    }
  }
}

Mutations

organisationCreate

Description

Create a new organisation.

Response

Returns an OrganisationCreatePayload

Arguments
Name Description
input - OrganisationCreateInput! Input for creating an organisation.

Example

Query
mutation organisationCreate($input: OrganisationCreateInput!) {
  organisationCreate(input: $input) {
    organisation {
      ...OrganisationFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": OrganisationCreateInput}
Response
{
  "data": {
    "organisationCreate": {
      "organisation": Organisation,
      "userErrors": [UserError]
    }
  }
}

Objects

Organisation

Description

An organisation using the Submarine Platform.

Fields
Field Name Description
address - MailingAddress The organisation's mailing address.
channels - ChannelConnection! The organisation's channels.
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

createdAt - String! The time the organisation was created
email - String! The organisation's email address.
id - GlobalID! The organisation's ID.
name - String! The organisation's name.
status - OrganisationStatus! The organisation's status (eg. active).
updatedAt - String! The time the organisation was last updated
Example
{
  "address": MailingAddress,
  "channels": ChannelConnection,
  "createdAt": "abc123",
  "email": "xyz789",
  "id": GlobalID,
  "name": "xyz789",
  "status": "ACTIVE",
  "updatedAt": "abc123"
}

Products

Queries

product

Description

Find a product by ID.

Response

Returns a Product

Arguments
Name Description
id - SharedGlobalID! The product's ID.

Example

Query
query product($id: SharedGlobalID!) {
  product(id: $id) {
    channel {
      ...ChannelFragment
    }
    externalId
    id
    imageUrl
    productVariants {
      ...ProductVariantFragment
    }
    status
    title
  }
}
Variables
{"id": SharedGlobalID}
Response
{
  "data": {
    "product": {
      "channel": Channel,
      "externalId": "abc123",
      "id": GlobalID,
      "imageUrl": "abc123",
      "productVariants": [ProductVariant],
      "status": "DELETED",
      "title": "xyz789"
    }
  }
}

products

Description

List all products.

Response

Returns a ProductConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query products(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  products(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...ProductEdgeFragment
    }
    nodes {
      ...ProductFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "after": "xyz789",
  "before": "abc123",
  "first": 123,
  "last": 987
}
Response
{
  "data": {
    "products": {
      "edges": [ProductEdge],
      "nodes": [Product],
      "pageInfo": PageInfo
    }
  }
}

Mutations

productCreate

Description

Create a new product.

Response

Returns a ProductCreatePayload

Arguments
Name Description
input - ProductCreateInput! Input for creating a product.

Example

Query
mutation productCreate($input: ProductCreateInput!) {
  productCreate(input: $input) {
    product {
      ...ProductFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ProductCreateInput}
Response
{
  "data": {
    "productCreate": {
      "product": Product,
      "userErrors": [UserError]
    }
  }
}

productDelete

Description

Delete a product.

Response

Returns a ProductDeletePayload

Arguments
Name Description
input - ProductDeleteInput! Input for deleting a product.

Example

Query
mutation productDelete($input: ProductDeleteInput!) {
  productDelete(input: $input) {
    deletedProductId
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ProductDeleteInput}
Response
{
  "data": {
    "productDelete": {
      "deletedProductId": GlobalID,
      "userErrors": [UserError]
    }
  }
}

productUpdate

Description

Update a product.

Response

Returns a ProductUpdatePayload

Arguments
Name Description
input - ProductUpdateInput! Input for updating a product.

Example

Query
mutation productUpdate($input: ProductUpdateInput!) {
  productUpdate(input: $input) {
    product {
      ...ProductFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ProductUpdateInput}
Response
{
  "data": {
    "productUpdate": {
      "product": Product,
      "userErrors": [UserError]
    }
  }
}

Objects

Product

Description

A product.

Fields
Field Name Description
channel - Channel! The product's channel.
externalId - String! The product's external ID.
id - GlobalID! The product's ID.
imageUrl - String The product's image url.
productVariants - [ProductVariant!]! The product's variants.
status - ProductStatus! The product's status.
title - String The product's title.
Example
{
  "channel": Channel,
  "externalId": "abc123",
  "id": GlobalID,
  "imageUrl": "xyz789",
  "productVariants": [ProductVariant],
  "status": "DELETED",
  "title": "abc123"
}

Product Variants

Queries

productVariant

Description

Find a product variant by ID.

Response

Returns a ProductVariant

Arguments
Name Description
id - SharedGlobalID! The product variant's ID.

Example

Query
query productVariant($id: SharedGlobalID!) {
  productVariant(id: $id) {
    externalId
    id
    imageUrl
    product {
      ...ProductFragment
    }
    sku
    status
    title
  }
}
Variables
{"id": SharedGlobalID}
Response
{
  "data": {
    "productVariant": {
      "externalId": "abc123",
      "id": GlobalID,
      "imageUrl": "abc123",
      "product": Product,
      "sku": "xyz789",
      "status": "DELETED",
      "title": "abc123"
    }
  }
}

productVariants

Description

List all product variants.

Response

Returns a ProductVariantConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query productVariants(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  productVariants(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...ProductVariantEdgeFragment
    }
    nodes {
      ...ProductVariantFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "after": "xyz789",
  "before": "abc123",
  "first": 987,
  "last": 987
}
Response
{
  "data": {
    "productVariants": {
      "edges": [ProductVariantEdge],
      "nodes": [ProductVariant],
      "pageInfo": PageInfo
    }
  }
}

Mutations

productVariantCreate

Description

Create a new product variant.

Response

Returns a ProductVariantCreatePayload

Arguments
Name Description
input - ProductVariantCreateInput! Input for creating a product variant.

Example

Query
mutation productVariantCreate($input: ProductVariantCreateInput!) {
  productVariantCreate(input: $input) {
    productVariant {
      ...ProductVariantFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ProductVariantCreateInput}
Response
{
  "data": {
    "productVariantCreate": {
      "productVariant": ProductVariant,
      "userErrors": [UserError]
    }
  }
}

productVariantDelete

Description

Delete a product variant.

Response

Returns a ProductVariantDeletePayload

Arguments
Name Description
input - ProductVariantDeleteInput! Input for deleting a product variant.

Example

Query
mutation productVariantDelete($input: ProductVariantDeleteInput!) {
  productVariantDelete(input: $input) {
    deletedProductVariantId
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ProductVariantDeleteInput}
Response
{
  "data": {
    "productVariantDelete": {
      "deletedProductVariantId": GlobalID,
      "userErrors": [UserError]
    }
  }
}

productVariantUpdate

Description

Update a product variant.

Response

Returns a ProductVariantUpdatePayload

Arguments
Name Description
input - ProductVariantUpdateInput! Input for updating a product variant.

Example

Query
mutation productVariantUpdate($input: ProductVariantUpdateInput!) {
  productVariantUpdate(input: $input) {
    productVariant {
      ...ProductVariantFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ProductVariantUpdateInput}
Response
{
  "data": {
    "productVariantUpdate": {
      "productVariant": ProductVariant,
      "userErrors": [UserError]
    }
  }
}

Objects

ProductVariant

Description

A product variant.

Fields
Field Name Description
externalId - String! The product variant's external ID.
id - GlobalID! The product variant's ID.
imageUrl - String The product variant's image url.
product - Product! The product this variant belongs to.
sku - String The product variant's SKU.
status - ProductVariantStatus! The product variant's status (eg. published).
title - String The product variant's title.
Example
{
  "externalId": "abc123",
  "id": GlobalID,
  "imageUrl": "abc123",
  "product": Product,
  "sku": "xyz789",
  "status": "DELETED",
  "title": "xyz789"
}

Webhooks

Queries

webhook

Description

Find a webhook by ID.

Response

Returns a Webhook

Arguments
Name Description
id - GlobalID! The webhook's ID.

Example

Query
query webhook($id: GlobalID!) {
  webhook(id: $id) {
    channel {
      ...ChannelFragment
    }
    createdAt
    id
    status
    topic
    updatedAt
    url
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "webhook": {
      "channel": Channel,
      "createdAt": ISO8601DateTime,
      "id": GlobalID,
      "status": "ACTIVE",
      "topic": "CAMPAIGN_ORDER_CANCELLED",
      "updatedAt": ISO8601DateTime,
      "url": Url
    }
  }
}

webhooks

Description

List all webhooks.

Response

Returns a WebhookConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query webhooks(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  webhooks(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...WebhookEdgeFragment
    }
    nodes {
      ...WebhookFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
  }
}
Variables
{
  "after": "xyz789",
  "before": "xyz789",
  "first": 123,
  "last": 123
}
Response
{
  "data": {
    "webhooks": {
      "edges": [WebhookEdge],
      "nodes": [Webhook],
      "pageInfo": PageInfo
    }
  }
}

Mutations

webhookCreate

Description

Creates a webhook subscription.

Response

Returns a WebhookCreatePayload

Arguments
Name Description
input - WebhookCreateInput! Input for creating a webhook subscription.

Example

Query
mutation webhookCreate($input: WebhookCreateInput!) {
  webhookCreate(input: $input) {
    userErrors {
      ...UserErrorFragment
    }
    webhook {
      ...WebhookFragment
    }
  }
}
Variables
{"input": WebhookCreateInput}
Response
{
  "data": {
    "webhookCreate": {
      "userErrors": [UserError],
      "webhook": Webhook
    }
  }
}

webhookDelete

Description

Deletes a webhook subscription.

Response

Returns a WebhookDeletePayload

Arguments
Name Description
input - WebhookDeleteInput! Input for deleting a Webhook Subscription.

Example

Query
mutation webhookDelete($input: WebhookDeleteInput!) {
  webhookDelete(input: $input) {
    deletedWebhookId
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": WebhookDeleteInput}
Response
{
  "data": {
    "webhookDelete": {
      "deletedWebhookId": GlobalID,
      "userErrors": [UserError]
    }
  }
}

webhookUpdate

Description

Updates a webhook subscription.

Response

Returns a WebhookUpdatePayload

Arguments
Name Description
input - WebhookUpdateInput! Input for updating the webhook.

Example

Query
mutation webhookUpdate($input: WebhookUpdateInput!) {
  webhookUpdate(input: $input) {
    userErrors {
      ...UserErrorFragment
    }
    webhook {
      ...WebhookFragment
    }
  }
}
Variables
{"input": WebhookUpdateInput}
Response
{
  "data": {
    "webhookUpdate": {
      "userErrors": [UserError],
      "webhook": Webhook
    }
  }
}

Objects

Webhook

Description

A webhook.

Fields
Field Name Description
channel - Channel! The webhooks's channel
createdAt - ISO8601DateTime! The time the webhook was created
id - GlobalID! The webhooks's ID.
status - WebhookStatus! The webhooks's status (eg. ACTIVE).
topic - WebhookTopic! The webhooks's topic (eg. CHARGE_FAILED).
updatedAt - ISO8601DateTime! The time the webhook was last updated
url - Url! The webhooks url path
Example
{
  "channel": Channel,
  "createdAt": ISO8601DateTime,
  "id": GlobalID,
  "status": "ACTIVE",
  "topic": "CAMPAIGN_ORDER_CANCELLED",
  "updatedAt": ISO8601DateTime,
  "url": Url
}

Charges

Queries

charge

Description

Find a Charge by ID.

Response

Returns a Charge

Arguments
Name Description
id - GlobalID! The charge's ID.

Example

Query
query charge($id: GlobalID!) {
  charge(id: $id) {
    amount {
      ...MoneyFragment
    }
    chargeType
    createdAt
    customer {
      ...CustomerFragment
    }
    description
    externalId
    failureCode
    failureMessage
    id
    metadata
    paymentIntent {
      ...PaymentIntentFragment
    }
    recordStatus
    source
    status
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "charge": {
      "amount": Money,
      "chargeType": "AUTHORISE",
      "createdAt": ISO8601DateTime,
      "customer": Customer,
      "description": "abc123",
      "externalId": "xyz789",
      "failureCode": "API_ERROR",
      "failureMessage": "abc123",
      "id": GlobalID,
      "metadata": Metadata,
      "paymentIntent": PaymentIntent,
      "recordStatus": "PROCESSED",
      "source": "SHOPIFY",
      "status": "FAILED",
      "updatedAt": ISO8601DateTime
    }
  }
}

charges

Description

List all charges.

Response

Returns a ChargeConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query charges(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  charges(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...ChargeEdgeFragment
    }
    nodes {
      ...ChargeFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "after": "abc123",
  "before": "abc123",
  "first": 987,
  "last": 123
}
Response
{
  "data": {
    "charges": {
      "edges": [ChargeEdge],
      "nodes": [Charge],
      "pageInfo": PageInfo,
      "totalCount": 987
    }
  }
}

Objects

Charge

Description

A Charge

Fields
Field Name Description
amount - Money The amount the charge is for.
chargeType - ChargeType The type of charge.
createdAt - ISO8601DateTime! The time the charge was created.
customer - Customer! The customer associated with the charge.
description - String The charge's description.
externalId - String The external ID of the charge.
failureCode - ChargeFailureCode The type of failure.
failureMessage - String The failure message.
id - GlobalID! The ID of the charge.
metadata - Metadata Unstructured key/value pairs.
paymentIntent - PaymentIntent! The associated payment intent.
recordStatus - RecordStatus The record status of charge.
source - ChargeSource The source of the charge.
status - ChargeStatus The charge's status.
updatedAt - ISO8601DateTime The time the charge was last updated.
Example
{
  "amount": Money,
  "chargeType": "AUTHORISE",
  "createdAt": ISO8601DateTime,
  "customer": Customer,
  "description": "abc123",
  "externalId": "abc123",
  "failureCode": "API_ERROR",
  "failureMessage": "xyz789",
  "id": GlobalID,
  "metadata": Metadata,
  "paymentIntent": PaymentIntent,
  "recordStatus": "PROCESSED",
  "source": "SHOPIFY",
  "status": "FAILED",
  "updatedAt": ISO8601DateTime
}

Payment Intents

Queries

paymentIntent

Description

Find a Payment Intent by ID.

Response

Returns a PaymentIntent

Arguments
Name Description
id - GlobalID! The payment intent's ID.

Example

Query
query paymentIntent($id: GlobalID!) {
  paymentIntent(id: $id) {
    adjustments {
      ...PaymentIntentAdjustmentFragment
    }
    amount {
      ...MoneyFragment
    }
    amountPaid {
      ...MoneyFragment
    }
    amountRefunded {
      ...MoneyFragment
    }
    balanceOwing {
      ...MoneyFragment
    }
    charges {
      ...ChargeFragment
    }
    createdAt
    customer {
      ...CustomerFragment
    }
    id
    metadata
    paymentMethod {
      ...PaymentMethodFragment
    }
    refunds {
      ...RefundFragment
    }
    status
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "paymentIntent": {
      "adjustments": [PaymentIntentAdjustment],
      "amount": Money,
      "amountPaid": Money,
      "amountRefunded": Money,
      "balanceOwing": Money,
      "charges": [Charge],
      "createdAt": ISO8601DateTime,
      "customer": Customer,
      "id": GlobalID,
      "metadata": Metadata,
      "paymentMethod": PaymentMethod,
      "refunds": [Refund],
      "status": "CANCELLED",
      "updatedAt": ISO8601DateTime
    }
  }
}

Mutations

paymentIntentCancel

Description

Cancels a payment intent.

Response

Returns a PaymentIntentCancelPayload

Arguments
Name Description
input - PaymentIntentCancelInput! Input for cancelling a payment intent.

Example

Query
mutation paymentIntentCancel($input: PaymentIntentCancelInput!) {
  paymentIntentCancel(input: $input) {
    paymentIntent {
      ...PaymentIntentFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PaymentIntentCancelInput}
Response
{
  "data": {
    "paymentIntentCancel": {
      "paymentIntent": PaymentIntent,
      "userErrors": [UserError]
    }
  }
}

paymentIntentCreate

Description

Creates a payment intent.

Response

Returns a PaymentIntentCreatePayload

Arguments
Name Description
input - PaymentIntentCreateInput! Input for creating a payment intent.

Example

Query
mutation paymentIntentCreate($input: PaymentIntentCreateInput!) {
  paymentIntentCreate(input: $input) {
    paymentIntent {
      ...PaymentIntentFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PaymentIntentCreateInput}
Response
{
  "data": {
    "paymentIntentCreate": {
      "paymentIntent": PaymentIntent,
      "userErrors": [UserError]
    }
  }
}

paymentIntentUpdate

Description

Updates a payment intent.

Response

Returns a PaymentIntentUpdatePayload

Arguments
Name Description
input - PaymentIntentUpdateInput! Input for updating a payment intent.

Example

Query
mutation paymentIntentUpdate($input: PaymentIntentUpdateInput!) {
  paymentIntentUpdate(input: $input) {
    paymentIntent {
      ...PaymentIntentFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PaymentIntentUpdateInput}
Response
{
  "data": {
    "paymentIntentUpdate": {
      "paymentIntent": PaymentIntent,
      "userErrors": [UserError]
    }
  }
}

Objects

PaymentIntent

Description

A Payment Intent

Fields
Field Name Description
adjustments - [PaymentIntentAdjustment!] The adjustments made against this payment intent.
amount - Money The payment intent money amount
amountPaid - Money The payment intent money amount
amountRefunded - Money The payment intent money amount
balanceOwing - Money The payment intent money amount
charges - [Charge!] The charges made against this payment intent.
createdAt - ISO8601DateTime! PaymentIntent creation time
customer - Customer! The customer
id - GlobalID! The PaymentIntent ID
metadata - Metadata Unstructured key/value pairs
paymentMethod - PaymentMethod! The associated payment method
refunds - [Refund!] The refunds made against this payment intent.
status - PaymentIntentStatus Status of the payment intent
updatedAt - ISO8601DateTime PaymentIntent last updated at
Example
{
  "adjustments": [PaymentIntentAdjustment],
  "amount": Money,
  "amountPaid": Money,
  "amountRefunded": Money,
  "balanceOwing": Money,
  "charges": [Charge],
  "createdAt": ISO8601DateTime,
  "customer": Customer,
  "id": GlobalID,
  "metadata": Metadata,
  "paymentMethod": PaymentMethod,
  "refunds": [Refund],
  "status": "CANCELLED",
  "updatedAt": ISO8601DateTime
}

Payment Methods

Queries

paymentMethod

Description

Find a Payment Method by ID.

Response

Returns a PaymentMethod

Arguments
Name Description
id - GlobalID! The payment method's ID.

Example

Query
query paymentMethod($id: GlobalID!) {
  paymentMethod(id: $id) {
    activePaymentInstrument {
      ...PaymentInstrumentFragment
    }
    channel {
      ...ChannelFragment
    }
    createdAt
    customer {
      ...CustomerFragment
    }
    externalId
    id
    metadata
    paymentInstruments {
      ...PaymentInstrumentFragment
    }
    paymentIntents {
      ...PaymentIntentConnectionFragment
    }
    status
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "paymentMethod": {
      "activePaymentInstrument": PaymentInstrument,
      "channel": Channel,
      "createdAt": ISO8601DateTime,
      "customer": Customer,
      "externalId": "xyz789",
      "id": GlobalID,
      "metadata": Metadata,
      "paymentInstruments": [PaymentInstrument],
      "paymentIntents": PaymentIntentConnection,
      "status": "ACTIVE",
      "updatedAt": ISO8601DateTime
    }
  }
}

paymentMethods

Description

List all payment methods.

Response

Returns a PaymentMethodConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query paymentMethods(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  paymentMethods(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...PaymentMethodEdgeFragment
    }
    nodes {
      ...PaymentMethodFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "after": "xyz789",
  "before": "abc123",
  "first": 987,
  "last": 123
}
Response
{
  "data": {
    "paymentMethods": {
      "edges": [PaymentMethodEdge],
      "nodes": [PaymentMethod],
      "pageInfo": PageInfo,
      "totalCount": 123
    }
  }
}

Mutations

paymentMethodCancel

Description

Cancels a payment method.

Response

Returns a PaymentMethodCancelPayload

Arguments
Name Description
input - PaymentMethodCancelInput! Input for cancelling a payment method.

Example

Query
mutation paymentMethodCancel($input: PaymentMethodCancelInput!) {
  paymentMethodCancel(input: $input) {
    paymentMethod {
      ...PaymentMethodFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PaymentMethodCancelInput}
Response
{
  "data": {
    "paymentMethodCancel": {
      "paymentMethod": PaymentMethod,
      "userErrors": [UserError]
    }
  }
}

paymentMethodCreate

Description

Creates a payment method.

Response

Returns a PaymentMethodCreatePayload

Arguments
Name Description
input - PaymentMethodCreateInput! Input for creating a payment method.

Example

Query
mutation paymentMethodCreate($input: PaymentMethodCreateInput!) {
  paymentMethodCreate(input: $input) {
    paymentMethod {
      ...PaymentMethodFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PaymentMethodCreateInput}
Response
{
  "data": {
    "paymentMethodCreate": {
      "paymentMethod": PaymentMethod,
      "userErrors": [UserError]
    }
  }
}

Objects

PaymentMethod

Description

A customer payment method.

Fields
Field Name Description
activePaymentInstrument - PaymentInstrument!
channel - Channel! The payment method's channel.
createdAt - ISO8601DateTime! The date and time when the payment method was created.
customer - Customer! The payment method's customer.
externalId - String The (optional) external ID of the payment method.
id - GlobalID! The ID of the payment method.
metadata - Metadata Unstructured key/value pairs.
paymentInstruments - [PaymentInstrument!] The payment instruments associated to this payment method.
paymentIntents - PaymentIntentConnection The payment intents associated with this payment method.
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

status - PaymentMethodStatus The status of the payment method.
updatedAt - ISO8601DateTime The date and time when the payment method was last updated.
Example
{
  "activePaymentInstrument": PaymentInstrument,
  "channel": Channel,
  "createdAt": ISO8601DateTime,
  "customer": Customer,
  "externalId": "xyz789",
  "id": GlobalID,
  "metadata": Metadata,
  "paymentInstruments": [PaymentInstrument],
  "paymentIntents": PaymentIntentConnection,
  "status": "ACTIVE",
  "updatedAt": ISO8601DateTime
}

Refunds

Queries

refund

Description

Find a Refund by ID.

Response

Returns a Refund

Arguments
Name Description
id - GlobalID! The refund's ID.

Example

Query
query refund($id: GlobalID!) {
  refund(id: $id) {
    amount {
      ...MoneyFragment
    }
    createdAt
    customer {
      ...CustomerFragment
    }
    description
    externalId
    id
    metadata
    paymentIntent {
      ...PaymentIntentFragment
    }
    recordStatus
    source
    status
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "refund": {
      "amount": Money,
      "createdAt": ISO8601DateTime,
      "customer": Customer,
      "description": "abc123",
      "externalId": "abc123",
      "id": GlobalID,
      "metadata": Metadata,
      "paymentIntent": PaymentIntent,
      "recordStatus": "PROCESSED",
      "source": "SHOPIFY",
      "status": "FAILED",
      "updatedAt": ISO8601DateTime
    }
  }
}

refunds

Description

List all refunds.

Response

Returns a RefundConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query refunds(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  refunds(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...RefundEdgeFragment
    }
    nodes {
      ...RefundFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "after": "xyz789",
  "before": "xyz789",
  "first": 123,
  "last": 987
}
Response
{
  "data": {
    "refunds": {
      "edges": [RefundEdge],
      "nodes": [Refund],
      "pageInfo": PageInfo,
      "totalCount": 123
    }
  }
}

Objects

Refund

Description

A Refund

Fields
Field Name Description
amount - Money The amount the refund if for.
createdAt - ISO8601DateTime! The time the refund was created.
customer - Customer! The customer associated with the refund.
description - String The refund's description.
externalId - String The external ID of the refund.
id - GlobalID! The ID of the refund.
metadata - Metadata Unstructured key/value pairs/
paymentIntent - PaymentIntent! The associated payment intent.
recordStatus - RecordStatus The record status of refund.
source - ChargeSource The source of the refund.
status - RefundStatus The refund's status.
updatedAt - ISO8601DateTime The time the refund was last updated.
Example
{
  "amount": Money,
  "createdAt": ISO8601DateTime,
  "customer": Customer,
  "description": "abc123",
  "externalId": "xyz789",
  "id": GlobalID,
  "metadata": Metadata,
  "paymentIntent": PaymentIntent,
  "recordStatus": "PROCESSED",
  "source": "SHOPIFY",
  "status": "FAILED",
  "updatedAt": ISO8601DateTime
}

Shopify Credentials

Mutations

shopifyCredentialsCreate

Description

Creates a set of Shopify credentials.

Response

Returns a ShopifyCredentialsCreatePayload

Arguments
Name Description
input - ShopifyCredentialsCreateInput! Input for creating shopify credentials.

Example

Query
mutation shopifyCredentialsCreate($input: ShopifyCredentialsCreateInput!) {
  shopifyCredentialsCreate(input: $input) {
    shopifyCredentials {
      ...ShopifyCredentialsFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": ShopifyCredentialsCreateInput}
Response
{
  "data": {
    "shopifyCredentialsCreate": {
      "shopifyCredentials": ShopifyCredentials,
      "userErrors": [UserError]
    }
  }
}

Campaign Orders

Queries

campaignOrder

Description

Find an campaign order by ID.

Response

Returns a CampaignOrder

Arguments
Name Description
id - GlobalID! The campaign order's ID.

Example

Query
query campaignOrder($id: GlobalID!) {
  campaignOrder(id: $id) {
    allocatedAt
    allocatedQuantity
    campaign {
      ... on CrowdfundingCampaign {
        ...CrowdfundingCampaignFragment
      }
      ... on PresaleCampaign {
        ...PresaleCampaignFragment
      }
    }
    campaignInventoryItem {
      ...CampaignInventoryItemFragment
    }
    campaignItem {
      ...CampaignItemFragment
    }
    campaignOrderGroup {
      ...CampaignOrderGroupFragment
    }
    cancelReason
    cancelledAt
    cancelledBy
    completedAt
    createdAt
    currency
    currentSubtotalPrice {
      ...MoneyFragment
    }
    currentTotalDiscounts {
      ...MoneyFragment
    }
    currentTotalPrice {
      ...MoneyFragment
    }
    currentTotalTax {
      ...MoneyFragment
    }
    customer {
      ...CustomerFragment
    }
    dueAt
    fulfilmentAllocatedAt
    fulfilmentFailedAt
    fulfilmentFulfilledAt
    fulfilmentHeldAt
    fulfilmentOpenedAt
    fulfilmentReturnedAt
    fulfilmentStatus
    fulfilmentSubmittedAt
    id
    identifier
    itemPrice {
      ...MoneyFragment
    }
    originalQuantity
    paidAt
    paymentIntent {
      ...PaymentIntentFragment
    }
    paymentIntentFailedAt
    paymentIntentPaidAt
    paymentIntentPartiallyRefundedAt
    paymentIntentRefundedAt
    paymentIntentSubmittedAt
    paymentMethod {
      ...PaymentMethodFragment
    }
    paymentStatus
    product {
      ...ProductFragment
    }
    productVariant {
      ...ProductVariantFragment
    }
    quantity
    refundedAmount {
      ...MoneyFragment
    }
    retryPaymentAt
    sequentialId
    status
    subtotalPrice {
      ...MoneyFragment
    }
    totalDeposit {
      ...MoneyFragment
    }
    totalDiscounts {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    totalShipping {
      ...MoneyFragment
    }
    totalTax {
      ...MoneyFragment
    }
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "campaignOrder": {
      "allocatedAt": ISO8601DateTime,
      "allocatedQuantity": 987,
      "campaign": CrowdfundingCampaign,
      "campaignInventoryItem": CampaignInventoryItem,
      "campaignItem": CampaignItem,
      "campaignOrderGroup": CampaignOrderGroup,
      "cancelReason": "xyz789",
      "cancelledAt": ISO8601DateTime,
      "cancelledBy": "CUSTOMER",
      "completedAt": ISO8601DateTime,
      "createdAt": ISO8601DateTime,
      "currency": "AED",
      "currentSubtotalPrice": Money,
      "currentTotalDiscounts": Money,
      "currentTotalPrice": Money,
      "currentTotalTax": Money,
      "customer": Customer,
      "dueAt": ISO8601DateTime,
      "fulfilmentAllocatedAt": ISO8601DateTime,
      "fulfilmentFailedAt": ISO8601DateTime,
      "fulfilmentFulfilledAt": ISO8601DateTime,
      "fulfilmentHeldAt": ISO8601DateTime,
      "fulfilmentOpenedAt": ISO8601DateTime,
      "fulfilmentReturnedAt": ISO8601DateTime,
      "fulfilmentStatus": "ALLOCATED",
      "fulfilmentSubmittedAt": ISO8601DateTime,
      "id": GlobalID,
      "identifier": "xyz789",
      "itemPrice": Money,
      "originalQuantity": 987,
      "paidAt": ISO8601DateTime,
      "paymentIntent": PaymentIntent,
      "paymentIntentFailedAt": ISO8601DateTime,
      "paymentIntentPaidAt": ISO8601DateTime,
      "paymentIntentPartiallyRefundedAt": ISO8601DateTime,
      "paymentIntentRefundedAt": ISO8601DateTime,
      "paymentIntentSubmittedAt": ISO8601DateTime,
      "paymentMethod": PaymentMethod,
      "paymentStatus": "FAILED",
      "product": Product,
      "productVariant": ProductVariant,
      "quantity": 123,
      "refundedAmount": Money,
      "retryPaymentAt": ISO8601DateTime,
      "sequentialId": 123,
      "status": "ALLOCATED",
      "subtotalPrice": Money,
      "totalDeposit": Money,
      "totalDiscounts": Money,
      "totalPrice": Money,
      "totalShipping": Money,
      "totalTax": Money,
      "updatedAt": ISO8601DateTime
    }
  }
}

campaignOrderPagination

Description

Next and previous campaign orders

Response

Returns a PaginationResult

Arguments
Name Description
campaignId - GlobalID Return only campaign orders belonging to this campaign.
customerId - [SharedIdInput!] Return only campaign orders belonging to these customers.
fulfilmentStatus - [CampaignOrderFulfilmentStatus!] The campaign order's fulfilment status.
paymentStatus - [CampaignOrderPaymentStatus!] The campaign order's payment status.
productVariantId - [SharedIdInput!] Return only campaign orders for these variants.
query - String A query string.
sortDirection - SortDirection The sort direction.
sortKey - CampaignOrderSortKey The key used to sort campaign orders.
status - [CampaignOrderStatus!] The campaign order's status.

Example

Query
query campaignOrderPagination(
  $campaignId: GlobalID,
  $customerId: [SharedIdInput!],
  $fulfilmentStatus: [CampaignOrderFulfilmentStatus!],
  $paymentStatus: [CampaignOrderPaymentStatus!],
  $productVariantId: [SharedIdInput!],
  $query: String,
  $sortDirection: SortDirection,
  $sortKey: CampaignOrderSortKey,
  $status: [CampaignOrderStatus!]
) {
  campaignOrderPagination(
    campaignId: $campaignId,
    customerId: $customerId,
    fulfilmentStatus: $fulfilmentStatus,
    paymentStatus: $paymentStatus,
    productVariantId: $productVariantId,
    query: $query,
    sortDirection: $sortDirection,
    sortKey: $sortKey,
    status: $status
  ) {
    queryArguments
    nextCampaignOrders {
      ...CampaignOrderConnectionFragment
    }
    nextPresaleCampaigns {
      ...PresaleCampaignConnectionFragment
    }
    previousCampaignOrders {
      ...CampaignOrderConnectionFragment
    }
    previousPresaleCampaigns {
      ...PresaleCampaignConnectionFragment
    }
  }
}
Variables
{
  "campaignId": GlobalID,
  "customerId": [SharedIdInput],
  "fulfilmentStatus": ["ALLOCATED"],
  "paymentStatus": ["FAILED"],
  "productVariantId": [SharedIdInput],
  "query": "abc123",
  "sortDirection": "ASC",
  "sortKey": "ID",
  "status": ["ALLOCATED"]
}
Response
{
  "data": {
    "campaignOrderPagination": {
      "queryArguments": "xyz789",
      "nextCampaignOrders": CampaignOrderConnection,
      "nextPresaleCampaigns": PresaleCampaignConnection,
      "previousCampaignOrders": CampaignOrderConnection,
      "previousPresaleCampaigns": PresaleCampaignConnection
    }
  }
}

campaignOrders

Description

List all campaign orders.

Response

Returns a CampaignOrderConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query campaignOrders(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  campaignOrders(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...CampaignOrderEdgeFragment
    }
    nodes {
      ...CampaignOrderFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "after": "xyz789",
  "before": "abc123",
  "first": 987,
  "last": 123
}
Response
{
  "data": {
    "campaignOrders": {
      "edges": [CampaignOrderEdge],
      "nodes": [CampaignOrder],
      "pageInfo": PageInfo,
      "totalCount": 123
    }
  }
}

searchCampaignOrders

Description

Search campaign orders

Response

Returns a SearchResult

Arguments
Name Description
campaignId - GlobalID Return only campaign orders belonging to this campaign.
customerId - [SharedIdInput!] Return only campaign orders belonging to these customers.
fulfilmentStatus - [CampaignOrderFulfilmentStatus!] The campaign order's fulfilment status.
paymentStatus - [CampaignOrderPaymentStatus!] The campaign order's payment status.
productVariantId - [SharedIdInput!] Return only campaign orders for these variants.
query - String A query string.
sortDirection - SortDirection The sort direction.
sortKey - CampaignOrderSortKey The key used to sort campaign orders.
status - [CampaignOrderStatus!] The campaign order's status.

Example

Query
query searchCampaignOrders(
  $campaignId: GlobalID,
  $customerId: [SharedIdInput!],
  $fulfilmentStatus: [CampaignOrderFulfilmentStatus!],
  $paymentStatus: [CampaignOrderPaymentStatus!],
  $productVariantId: [SharedIdInput!],
  $query: String,
  $sortDirection: SortDirection,
  $sortKey: CampaignOrderSortKey,
  $status: [CampaignOrderStatus!]
) {
  searchCampaignOrders(
    campaignId: $campaignId,
    customerId: $customerId,
    fulfilmentStatus: $fulfilmentStatus,
    paymentStatus: $paymentStatus,
    productVariantId: $productVariantId,
    query: $query,
    sortDirection: $sortDirection,
    sortKey: $sortKey,
    status: $status
  ) {
    queryArguments
    campaignOrders {
      ...CampaignOrderConnectionFragment
    }
    presaleCampaigns {
      ...PresaleCampaignConnectionFragment
    }
  }
}
Variables
{
  "campaignId": GlobalID,
  "customerId": [SharedIdInput],
  "fulfilmentStatus": ["ALLOCATED"],
  "paymentStatus": ["FAILED"],
  "productVariantId": [SharedIdInput],
  "query": "abc123",
  "sortDirection": "ASC",
  "sortKey": "ID",
  "status": ["ALLOCATED"]
}
Response
{
  "data": {
    "searchCampaignOrders": {
      "queryArguments": "xyz789",
      "campaignOrders": CampaignOrderConnection,
      "presaleCampaigns": PresaleCampaignConnection
    }
  }
}

Mutations

campaignOrderCancel

Description

Cancels a campaign order.

Response

Returns a CampaignOrderCancelPayload

Arguments
Name Description
input - CampaignOrderCancelInput! Input for canceling the campaign order.

Example

Query
mutation campaignOrderCancel($input: CampaignOrderCancelInput!) {
  campaignOrderCancel(input: $input) {
    campaignOrder {
      ...CampaignOrderFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": CampaignOrderCancelInput}
Response
{
  "data": {
    "campaignOrderCancel": {
      "campaignOrder": CampaignOrder,
      "userErrors": [UserError]
    }
  }
}

campaignOrderCreate

Description

Creates a campaign order.

Response

Returns a CampaignOrderCreatePayload

Arguments
Name Description
input - CampaignOrderCreateInput! Input for creating a campaign order.

Example

Query
mutation campaignOrderCreate($input: CampaignOrderCreateInput!) {
  campaignOrderCreate(input: $input) {
    campaignOrder {
      ...CampaignOrderFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": CampaignOrderCreateInput}
Response
{
  "data": {
    "campaignOrderCreate": {
      "campaignOrder": CampaignOrder,
      "userErrors": [UserError]
    }
  }
}

campaignOrderDecreaseQuantity

Description

Decreases quantity on a campaign order.

Arguments
Name Description
input - CampaignOrderDecreaseQuantityInput! Input for updating the campaign order.

Example

Query
mutation campaignOrderDecreaseQuantity($input: CampaignOrderDecreaseQuantityInput!) {
  campaignOrderDecreaseQuantity(input: $input) {
    campaignOrder {
      ...CampaignOrderFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": CampaignOrderDecreaseQuantityInput}
Response
{
  "data": {
    "campaignOrderDecreaseQuantity": {
      "campaignOrder": CampaignOrder,
      "userErrors": [UserError]
    }
  }
}

Objects

CampaignOrder

Description

The order of a Campaign Order Group

Fields
Field Name Description
allocatedAt - ISO8601DateTime The date the campaign order was allocated.
allocatedQuantity - Int! The allocated quantity.
campaign - Campaign! The parent campaign.
campaignInventoryItem - CampaignInventoryItem The inventory item.
campaignItem - CampaignItem The campaign item.
campaignOrderGroup - CampaignOrderGroup! The campaign order's group.
cancelReason - String The reason for cancellation.
cancelledAt - ISO8601DateTime The date the campaign order was cancelled.
cancelledBy - Persona The originator of the cancellation.
completedAt - ISO8601DateTime The date the campaign order was completed.
createdAt - ISO8601DateTime! The date the campaign order was created.
currency - CurrencyCode! The campaign order's currency code.
currentSubtotalPrice - Money Current subtotal price.
currentTotalDiscounts - Money Current total discounts amount.
currentTotalPrice - Money Current total price.
currentTotalTax - Money Current total tax cost.
customer - Customer! The campaign order's customer.
dueAt - ISO8601DateTime The date the campaign order is due.
fulfilmentAllocatedAt - ISO8601DateTime The date the campaign order's fulfilment was allocated.
fulfilmentFailedAt - ISO8601DateTime The date the campaign order's fulfilment failed.
fulfilmentFulfilledAt - ISO8601DateTime The date the campaign order's fulfilment succeeded.
fulfilmentHeldAt - ISO8601DateTime The date the campaign order's fulfilment was held.
fulfilmentOpenedAt - ISO8601DateTime The date the campaign order's fulfilment was opened.
fulfilmentReturnedAt - ISO8601DateTime The date the campaign order's fulfilment was returned.
fulfilmentStatus - CampaignOrderFulfilmentStatus! The fulfilment status of the order
fulfilmentSubmittedAt - ISO8601DateTime The date the campaign order's fulfilment was submitted.
id - GlobalID! The ID of the campaign order
identifier - String! The campaign order's identifier
itemPrice - Money! The price of the campaign order's product
originalQuantity - Int! Original quantity of product in this order
paidAt - ISO8601DateTime The date the campaign order was paid.
paymentIntent - PaymentIntent The payment intent of the campaign order.
paymentIntentFailedAt - ISO8601DateTime The date the campaign order's payment intent failed.
paymentIntentPaidAt - ISO8601DateTime The date the campaign order's payment intent was paid.
paymentIntentPartiallyRefundedAt - ISO8601DateTime The date the campaign order's payment intent was partially refunded.
paymentIntentRefundedAt - ISO8601DateTime The date the campaign order's payment intent was refunded.
paymentIntentSubmittedAt - ISO8601DateTime The date the campaign order's payment intent was submitted.
paymentMethod - PaymentMethod The payment method of the campaign order.
paymentStatus - CampaignOrderPaymentStatus The payment status of the campaign order.
product - Product! The product
productVariant - ProductVariant! The product variant
quantity - Int! Quantity of product in this order
refundedAmount - Money! The refunded amount of the campaign order.
retryPaymentAt - ISO8601DateTime The date to retry the campaign order's payment.
sequentialId - Int! The ordered ID of the campaign order.
status - CampaignOrderStatus! The status of the campaign order.
subtotalPrice - Money! Subtotal price.
totalDeposit - Money! Total deposit amount.
totalDiscounts - Money! Total discounts amount.
totalPrice - Money! The total price of the campaign order.
totalShipping - Money! The shipping price of the campaign order.
totalTax - Money! The tax total price of the campaign order.
updatedAt - ISO8601DateTime! The date the campaign order was last updated.
Example
{
  "allocatedAt": ISO8601DateTime,
  "allocatedQuantity": 123,
  "campaign": CrowdfundingCampaign,
  "campaignInventoryItem": CampaignInventoryItem,
  "campaignItem": CampaignItem,
  "campaignOrderGroup": CampaignOrderGroup,
  "cancelReason": "abc123",
  "cancelledAt": ISO8601DateTime,
  "cancelledBy": "CUSTOMER",
  "completedAt": ISO8601DateTime,
  "createdAt": ISO8601DateTime,
  "currency": "AED",
  "currentSubtotalPrice": Money,
  "currentTotalDiscounts": Money,
  "currentTotalPrice": Money,
  "currentTotalTax": Money,
  "customer": Customer,
  "dueAt": ISO8601DateTime,
  "fulfilmentAllocatedAt": ISO8601DateTime,
  "fulfilmentFailedAt": ISO8601DateTime,
  "fulfilmentFulfilledAt": ISO8601DateTime,
  "fulfilmentHeldAt": ISO8601DateTime,
  "fulfilmentOpenedAt": ISO8601DateTime,
  "fulfilmentReturnedAt": ISO8601DateTime,
  "fulfilmentStatus": "ALLOCATED",
  "fulfilmentSubmittedAt": ISO8601DateTime,
  "id": GlobalID,
  "identifier": "abc123",
  "itemPrice": Money,
  "originalQuantity": 123,
  "paidAt": ISO8601DateTime,
  "paymentIntent": PaymentIntent,
  "paymentIntentFailedAt": ISO8601DateTime,
  "paymentIntentPaidAt": ISO8601DateTime,
  "paymentIntentPartiallyRefundedAt": ISO8601DateTime,
  "paymentIntentRefundedAt": ISO8601DateTime,
  "paymentIntentSubmittedAt": ISO8601DateTime,
  "paymentMethod": PaymentMethod,
  "paymentStatus": "FAILED",
  "product": Product,
  "productVariant": ProductVariant,
  "quantity": 987,
  "refundedAmount": Money,
  "retryPaymentAt": ISO8601DateTime,
  "sequentialId": 123,
  "status": "ALLOCATED",
  "subtotalPrice": Money,
  "totalDeposit": Money,
  "totalDiscounts": Money,
  "totalPrice": Money,
  "totalShipping": Money,
  "totalTax": Money,
  "updatedAt": ISO8601DateTime
}

PaginationResult

Description

The previous and next objects in a connection.

Fields
Field Name Description
queryArguments - String! The query arguments as a JSON string
nextCampaignOrders - CampaignOrderConnection The next campaign orders
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

nextPresaleCampaigns - PresaleCampaignConnection The next presale campaigns
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

previousCampaignOrders - CampaignOrderConnection The previous campaign orders
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

previousPresaleCampaigns - PresaleCampaignConnection The previous presale campaigns
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

Example
{
  "queryArguments": "xyz789",
  "nextCampaignOrders": CampaignOrderConnection,
  "nextPresaleCampaigns": PresaleCampaignConnection,
  "previousCampaignOrders": CampaignOrderConnection,
  "previousPresaleCampaigns": PresaleCampaignConnection
}

SearchResult

Description

A search result.

Fields
Field Name Description
queryArguments - String! The query arguments as a JSON string
campaignOrders - CampaignOrderConnection The matching campaign orders
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

presaleCampaigns - PresaleCampaignConnection The matching presale campaigns
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

Example
{
  "queryArguments": "xyz789",
  "campaignOrders": CampaignOrderConnection,
  "presaleCampaigns": PresaleCampaignConnection
}

Campaign Order Groups

Queries

campaignOrderGroup

Description

Find an campaign order group by ID

Response

Returns a CampaignOrderGroup

Arguments
Name Description
id - SharedGlobalID! The campaign order group's ID

Example

Query
query campaignOrderGroup($id: SharedGlobalID!) {
  campaignOrderGroup(id: $id) {
    balanceOwing {
      ...MoneyFragment
    }
    campaignOrders {
      ...CampaignOrderFragment
    }
    createdAt
    currency
    currentBalanceOwing {
      ...MoneyFragment
    }
    currentSubtotalPrice {
      ...MoneyFragment
    }
    currentTotalDiscounts {
      ...MoneyFragment
    }
    currentTotalLineItemsPrice {
      ...MoneyFragment
    }
    currentTotalPrice {
      ...MoneyFragment
    }
    currentTotalTax {
      ...MoneyFragment
    }
    customer {
      ...CustomerFragment
    }
    dueAt
    externalId
    id
    identifier
    lineItemsCount
    paidAtCheckout {
      ...MoneyFragment
    }
    paymentIntent {
      ...PaymentIntentFragment
    }
    paymentMethod {
      ...PaymentMethodFragment
    }
    paymentStatus
    shippingLineTitle
    status
    subtotalPrice {
      ...MoneyFragment
    }
    taxesIncluded
    totalDeposit {
      ...MoneyFragment
    }
    totalDiscounts {
      ...MoneyFragment
    }
    totalLineItemsPrice {
      ...MoneyFragment
    }
    totalPrice {
      ...MoneyFragment
    }
    totalShipping {
      ...MoneyFragment
    }
    totalTax {
      ...MoneyFragment
    }
  }
}
Variables
{"id": SharedGlobalID}
Response
{
  "data": {
    "campaignOrderGroup": {
      "balanceOwing": Money,
      "campaignOrders": [CampaignOrder],
      "createdAt": ISO8601DateTime,
      "currency": "AED",
      "currentBalanceOwing": Money,
      "currentSubtotalPrice": Money,
      "currentTotalDiscounts": Money,
      "currentTotalLineItemsPrice": Money,
      "currentTotalPrice": Money,
      "currentTotalTax": Money,
      "customer": Customer,
      "dueAt": ISO8601DateTime,
      "externalId": "abc123",
      "id": GlobalID,
      "identifier": "abc123",
      "lineItemsCount": 123,
      "paidAtCheckout": Money,
      "paymentIntent": PaymentIntent,
      "paymentMethod": PaymentMethod,
      "paymentStatus": "FAILED",
      "shippingLineTitle": "abc123",
      "status": "ALLOCATED",
      "subtotalPrice": Money,
      "taxesIncluded": true,
      "totalDeposit": Money,
      "totalDiscounts": Money,
      "totalLineItemsPrice": Money,
      "totalPrice": Money,
      "totalShipping": Money,
      "totalTax": Money
    }
  }
}

campaignOrderGroups

Description

List all campaign order groups

Response

Returns a CampaignOrderGroupConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query campaignOrderGroups(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  campaignOrderGroups(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...CampaignOrderGroupEdgeFragment
    }
    nodes {
      ...CampaignOrderGroupFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "after": "abc123",
  "before": "abc123",
  "first": 987,
  "last": 987
}
Response
{
  "data": {
    "campaignOrderGroups": {
      "edges": [CampaignOrderGroupEdge],
      "nodes": [CampaignOrderGroup],
      "pageInfo": PageInfo,
      "totalCount": 987
    }
  }
}

Mutations

campaignOrderGroupCancel

Description

Cancels a campaign order group.

Response

Returns a CampaignOrderGroupCancelPayload

Arguments
Name Description
input - CampaignOrderGroupCancelInput! Input for canceling the campaign order group.

Example

Query
mutation campaignOrderGroupCancel($input: CampaignOrderGroupCancelInput!) {
  campaignOrderGroupCancel(input: $input) {
    campaignOrderGroup {
      ...CampaignOrderGroupFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": CampaignOrderGroupCancelInput}
Response
{
  "data": {
    "campaignOrderGroupCancel": {
      "campaignOrderGroup": CampaignOrderGroup,
      "userErrors": [UserError]
    }
  }
}

Objects

CampaignOrderGroup

Description

The group of orders by a customer for a Campaign

Fields
Field Name Description
balanceOwing - Money! Balance owing.
campaignOrders - [CampaignOrder!]! The campaign order group's orders.
createdAt - ISO8601DateTime! The date the campaign order group was created.
currency - CurrencyCode! The campaign order group's currency code.
currentBalanceOwing - Money Current balance owing.
currentSubtotalPrice - Money Current subtotal price.
currentTotalDiscounts - Money Current total discounts amount.
currentTotalLineItemsPrice - Money Current total line items price.
currentTotalPrice - Money Current total price.
currentTotalTax - Money Current total tax cost.
customer - Customer! The campaign order group's customer.
dueAt - ISO8601DateTime The date the campaign order group is due.
externalId - String! The campaign order group's external ID.
id - GlobalID! The id of the campaign order group
identifier - String! The campaign order group's identifier
lineItemsCount - Int The campaign order group's total count of line items.
paidAtCheckout - Money! Amount paid at checkout.
paymentIntent - PaymentIntent The payment intent of the campaign order group.
paymentMethod - PaymentMethod The payment method of the campaign order group.
paymentStatus - CampaignOrderPaymentStatus The payment status of the campaign order group.
shippingLineTitle - String Shipping line title.
status - CampaignOrderGroupStatus! The status of the campaign order group.
subtotalPrice - Money! Subtotal price.
taxesIncluded - Boolean! Indicates if taxes are included for the campiagn order group.
totalDeposit - Money! Total deposit amount.
totalDiscounts - Money! Total discounts amount.
totalLineItemsPrice - Money! Total line items price.
totalPrice - Money! Total price.
totalShipping - Money! Total shipping cost.
totalTax - Money! Total tax cost.
Example
{
  "balanceOwing": Money,
  "campaignOrders": [CampaignOrder],
  "createdAt": ISO8601DateTime,
  "currency": "AED",
  "currentBalanceOwing": Money,
  "currentSubtotalPrice": Money,
  "currentTotalDiscounts": Money,
  "currentTotalLineItemsPrice": Money,
  "currentTotalPrice": Money,
  "currentTotalTax": Money,
  "customer": Customer,
  "dueAt": ISO8601DateTime,
  "externalId": "xyz789",
  "id": GlobalID,
  "identifier": "xyz789",
  "lineItemsCount": 123,
  "paidAtCheckout": Money,
  "paymentIntent": PaymentIntent,
  "paymentMethod": PaymentMethod,
  "paymentStatus": "FAILED",
  "shippingLineTitle": "abc123",
  "status": "ALLOCATED",
  "subtotalPrice": Money,
  "taxesIncluded": false,
  "totalDeposit": Money,
  "totalDiscounts": Money,
  "totalLineItemsPrice": Money,
  "totalPrice": Money,
  "totalShipping": Money,
  "totalTax": Money
}

Presale Campaign

Queries

presaleCampaign

Description

Find a presale campaign by ID

Response

Returns a PresaleCampaign

Arguments
Name Description
id - GlobalID! The presale campaign's ID.

Example

Query
query presaleCampaign($id: GlobalID!) {
  presaleCampaign(id: $id) {
    activeCampaignOrdersCount
    allocatedInventoryCount
    allocationStatus
    appliedInventoryCount
    campaignInventoryItems {
      ...CampaignInventoryItemFragment
    }
    campaignItemType
    campaignItems {
      ...CampaignItemFragment
    }
    campaignOrders {
      ...CampaignOrderConnectionFragment
    }
    campaignOrdersCount
    cancelledAt
    channel {
      ...ChannelFragment
    }
    completedAt
    createdAt
    deposit {
      ...CampaignDepositFragment
    }
    description
    dueAt
    endAt
    endedAt
    fulfilAt
    fulfillingAt
    gracePeriodHours
    id
    identifier
    inventoryApplications {
      ...InventoryApplicationFragment
    }
    launchAt
    launchedAt
    limit
    name
    productVariants {
      ...ProductVariantFragment
    }
    products {
      ...ProductFragment
    }
    reference
    reservedItemsCount
    sequentialId
    status
    updatedAt
  }
}
Variables
{"id": GlobalID}
Response
{
  "data": {
    "presaleCampaign": {
      "activeCampaignOrdersCount": 123,
      "allocatedInventoryCount": 987,
      "allocationStatus": "ALLOCATED",
      "appliedInventoryCount": 987,
      "campaignInventoryItems": [CampaignInventoryItem],
      "campaignItemType": "PRODUCT",
      "campaignItems": [CampaignItem],
      "campaignOrders": CampaignOrderConnection,
      "campaignOrdersCount": 123,
      "cancelledAt": ISO8601DateTime,
      "channel": Channel,
      "completedAt": ISO8601DateTime,
      "createdAt": ISO8601DateTime,
      "deposit": CampaignDeposit,
      "description": "You will be charged the remaining balance when the product is released.",
      "dueAt": ISO8601DateTime,
      "endAt": ISO8601DateTime,
      "endedAt": ISO8601DateTime,
      "fulfilAt": ISO8601DateTime,
      "fulfillingAt": ISO8601DateTime,
      "gracePeriodHours": 123,
      "id": GlobalID,
      "identifier": "abc123",
      "inventoryApplications": [InventoryApplication],
      "launchAt": ISO8601DateTime,
      "launchedAt": ISO8601DateTime,
      "limit": 987,
      "name": "June Pre-order for Product.",
      "productVariants": [ProductVariant],
      "products": [Product],
      "reference": "Pre-order June Product #REF-021",
      "reservedItemsCount": 987,
      "sequentialId": 123,
      "status": "CANCELLED",
      "updatedAt": ISO8601DateTime
    }
  }
}

presaleCampaigns

Description

List all presale campaigns

Response

Returns a PresaleCampaignConnection

Arguments
Name Description
after - String Returns the elements in the list that come after the specified cursor.
before - String Returns the elements in the list that come before the specified cursor.
first - Int Returns the first n elements from the list.
last - Int Returns the last n elements from the list.

Example

Query
query presaleCampaigns(
  $after: String,
  $before: String,
  $first: Int,
  $last: Int
) {
  presaleCampaigns(
    after: $after,
    before: $before,
    first: $first,
    last: $last
  ) {
    edges {
      ...PresaleCampaignEdgeFragment
    }
    nodes {
      ...PresaleCampaignFragment
    }
    pageInfo {
      ...PageInfoFragment
    }
    totalCount
  }
}
Variables
{
  "after": "abc123",
  "before": "abc123",
  "first": 987,
  "last": 123
}
Response
{
  "data": {
    "presaleCampaigns": {
      "edges": [PresaleCampaignEdge],
      "nodes": [PresaleCampaign],
      "pageInfo": PageInfo,
      "totalCount": 123
    }
  }
}

searchPresaleCampaigns

Description

Search presale campaigns

Response

Returns a SearchResult

Arguments
Name Description
isAllocating - Boolean Whether the presale campaign is allocating.
productIds - [SharedIdInput!] Return campaigns containing any of these product IDs
productVariantIds - [SharedIdInput!] Return campaigns containing any of these product variant IDs.
query - String A query string.
sortDirection - SortDirection The sort direction.
sortKey - PresaleCampaignSortKey The key used to sort presale campaigns.
status - [CampaignStatus!] The campaign's status (eg. active).

Example

Query
query searchPresaleCampaigns(
  $isAllocating: Boolean,
  $productIds: [SharedIdInput!],
  $productVariantIds: [SharedIdInput!],
  $query: String,
  $sortDirection: SortDirection,
  $sortKey: PresaleCampaignSortKey,
  $status: [CampaignStatus!]
) {
  searchPresaleCampaigns(
    isAllocating: $isAllocating,
    productIds: $productIds,
    productVariantIds: $productVariantIds,
    query: $query,
    sortDirection: $sortDirection,
    sortKey: $sortKey,
    status: $status
  ) {
    queryArguments
    campaignOrders {
      ...CampaignOrderConnectionFragment
    }
    presaleCampaigns {
      ...PresaleCampaignConnectionFragment
    }
  }
}
Variables
{
  "isAllocating": true,
  "productIds": [SharedIdInput],
  "productVariantIds": [SharedIdInput],
  "query": "xyz789",
  "sortDirection": "ASC",
  "sortKey": "COMPLETED_AT",
  "status": ["CANCELLED"]
}
Response
{
  "data": {
    "searchPresaleCampaigns": {
      "queryArguments": "abc123",
      "campaignOrders": CampaignOrderConnection,
      "presaleCampaigns": PresaleCampaignConnection
    }
  }
}

Mutations

presaleCampaignAddProductVariants

Description

Add product variants to an existing campaign.

Arguments
Name Description
input - PresaleCampaignAddProductVariantsInput! Input for adding product variants to the presale campaign.

Example

Query
mutation presaleCampaignAddProductVariants($input: PresaleCampaignAddProductVariantsInput!) {
  presaleCampaignAddProductVariants(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignAddProductVariantsInput}
Response
{
  "data": {
    "presaleCampaignAddProductVariants": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignAddProducts

Description

Add products to an existing campaign.

Arguments
Name Description
input - PresaleCampaignAddProductsInput! Input for adding products to the presale campaign.

Example

Query
mutation presaleCampaignAddProducts($input: PresaleCampaignAddProductsInput!) {
  presaleCampaignAddProducts(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignAddProductsInput}
Response
{
  "data": {
    "presaleCampaignAddProducts": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignApplyBulkInventory

Description

Apply bulk inventory to a presale campaign

Arguments
Name Description
input - PresaleCampaignApplyBulkInventoryInput! Input for applying bulk inventory.

Example

Query
mutation presaleCampaignApplyBulkInventory($input: PresaleCampaignApplyBulkInventoryInput!) {
  presaleCampaignApplyBulkInventory(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignApplyBulkInventoryInput}
Response
{
  "data": {
    "presaleCampaignApplyBulkInventory": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignApplyInventory

Description

Apply inventory to a presale campaign

Arguments
Name Description
input - PresaleCampaignApplyInventoryInput! Input for applying inventory.

Example

Query
mutation presaleCampaignApplyInventory($input: PresaleCampaignApplyInventoryInput!) {
  presaleCampaignApplyInventory(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignApplyInventoryInput}
Response
{
  "data": {
    "presaleCampaignApplyInventory": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignCancel

Description

Cancel an existing presale campaign.

Response

Returns a PresaleCampaignCancelPayload

Arguments
Name Description
input - PresaleCampaignCancelInput! Input for cancelling the presale campaign.

Example

Query
mutation presaleCampaignCancel($input: PresaleCampaignCancelInput!) {
  presaleCampaignCancel(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignCancelInput}
Response
{
  "data": {
    "presaleCampaignCancel": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignCreate

Description

Create a new presale campaign.

Response

Returns a PresaleCampaignCreatePayload

Arguments
Name Description
input - PresaleCampaignCreateInput! Input for creating a presale campaign.

Example

Query
mutation presaleCampaignCreate($input: PresaleCampaignCreateInput!) {
  presaleCampaignCreate(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignCreateInput}
Response
{
  "data": {
    "presaleCampaignCreate": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignDelete

Description

Delete an existing presale campaign.

Response

Returns a PresaleCampaignDeletePayload

Arguments
Name Description
input - PresaleCampaignDeleteInput! Input for deleting the presale campaign.

Example

Query
mutation presaleCampaignDelete($input: PresaleCampaignDeleteInput!) {
  presaleCampaignDelete(input: $input) {
    deletedPresaleCampaignId
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignDeleteInput}
Response
{
  "data": {
    "presaleCampaignDelete": {
      "deletedPresaleCampaignId": GlobalID,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignEnd

Description

End an existing campaign.

Response

Returns a PresaleCampaignEndPayload

Arguments
Name Description
input - PresaleCampaignEndInput! Input for ending the presale campaign.

Example

Query
mutation presaleCampaignEnd($input: PresaleCampaignEndInput!) {
  presaleCampaignEnd(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignEndInput}
Response
{
  "data": {
    "presaleCampaignEnd": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignFulfil

Description

Fulfil an existing campaign.

Response

Returns a PresaleCampaignFulfilPayload

Arguments
Name Description
input - PresaleCampaignFulfilInput! Input for fulfilling the presale campaign.

Example

Query
mutation presaleCampaignFulfil($input: PresaleCampaignFulfilInput!) {
  presaleCampaignFulfil(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignFulfilInput}
Response
{
  "data": {
    "presaleCampaignFulfil": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignLaunch

Description

Launch an existing campaign.

Response

Returns a PresaleCampaignLaunchPayload

Arguments
Name Description
input - PresaleCampaignLaunchInput! Input for launching the presale campaign.

Example

Query
mutation presaleCampaignLaunch($input: PresaleCampaignLaunchInput!) {
  presaleCampaignLaunch(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignLaunchInput}
Response
{
  "data": {
    "presaleCampaignLaunch": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignRemoveProductVariants

Description

Remove product variants from presale campaign

Arguments
Name Description
input - PresaleCampaignRemoveProductVariantsInput! Input for removing product variants from the presale campaign.

Example

Query
mutation presaleCampaignRemoveProductVariants($input: PresaleCampaignRemoveProductVariantsInput!) {
  presaleCampaignRemoveProductVariants(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignRemoveProductVariantsInput}
Response
{
  "data": {
    "presaleCampaignRemoveProductVariants": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignRemoveProducts

Description

Remove products from presale campaign

Arguments
Name Description
input - PresaleCampaignRemoveProductsInput! Input for removing products from the presale campaign.

Example

Query
mutation presaleCampaignRemoveProducts($input: PresaleCampaignRemoveProductsInput!) {
  presaleCampaignRemoveProducts(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignRemoveProductsInput}
Response
{
  "data": {
    "presaleCampaignRemoveProducts": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

presaleCampaignUpdate

Description

Update a new presale campaign.

Response

Returns a PresaleCampaignUpdatePayload

Arguments
Name Description
input - PresaleCampaignUpdateInput! Input for updating the presale campaign.

Example

Query
mutation presaleCampaignUpdate($input: PresaleCampaignUpdateInput!) {
  presaleCampaignUpdate(input: $input) {
    presaleCampaign {
      ...PresaleCampaignFragment
    }
    userErrors {
      ...UserErrorFragment
    }
  }
}
Variables
{"input": PresaleCampaignUpdateInput}
Response
{
  "data": {
    "presaleCampaignUpdate": {
      "presaleCampaign": PresaleCampaign,
      "userErrors": [UserError]
    }
  }
}

Objects

PresaleCampaign

Description

A Platform campaign of type Presale.

Fields
Field Name Description
activeCampaignOrdersCount - Int! The campaign's total count of active orders.
allocatedInventoryCount - Int! The campaign's count of inventory allocated.
allocationStatus - CampaignAllocationStatus! The allocation status of the campaign.
appliedInventoryCount - Int! The total amount of inventory currently applied to the campaign.
campaignInventoryItems - [CampaignInventoryItem!]! The campaign's inventory items.
campaignItemType - CampaignItemType! The type of items in the campaign.
campaignItems - [CampaignItem!]! The campaign's items.
campaignOrders - CampaignOrderConnection! The campaign's orders.
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

campaignOrdersCount - Int! The campaign's total count of orders.
cancelledAt - ISO8601DateTime The date the presale was cancelled.
channel - Channel! The presale campaign's channel.
completedAt - ISO8601DateTime The date the presale completed.
createdAt - ISO8601DateTime The date the presale created.
deposit - CampaignDeposit The amount to be collected at checkout.
description - String! The campaign description.
Arguments
interpolate - Boolean

Whether to replace the description's placeholders with actual values.

dueAt - ISO8601DateTime! The date the payment for the presale is due.
endAt - ISO8601DateTime! The date the presale will end.
endedAt - ISO8601DateTime The date the presale ended.
fulfilAt - ISO8601DateTime The date the presale will be fulfilled.
fulfillingAt - ISO8601DateTime The date the presale started fulfilling.
gracePeriodHours - Int! The number of hours a customer has to rectify a failed presale campaign payment before their campaign order is cancelled.
id - GlobalID! The ID of the campaign.
identifier - String! The identifier of the campaign.
inventoryApplications - [InventoryApplication!]! The campaign's inventory applications.
launchAt - ISO8601DateTime! The date the presale will be launched.
launchedAt - ISO8601DateTime The date the presale launched.
limit - Int! The maximum number of units of the linked products that can be sold.
name - String! The name of the campaign.
Arguments
interpolate - Boolean

Whether to replace the name's placeholders with actual values.

productVariants - [ProductVariant!] The product IDs that are included in the campaign.
products - [Product!] The product IDs that are included in the campaign.
reference - String! The campaign reference.
reservedItemsCount - Int! The campaign's total count of reserved items.
sequentialId - Int! The ordered ID of the campaign.
status - CampaignStatus! The campaign's status.
updatedAt - ISO8601DateTime The date the presale was last updated.
Example
{
  "activeCampaignOrdersCount": 123,
  "allocatedInventoryCount": 123,
  "allocationStatus": "ALLOCATED",
  "appliedInventoryCount": 987,
  "campaignInventoryItems": [CampaignInventoryItem],
  "campaignItemType": "PRODUCT",
  "campaignItems": [CampaignItem],
  "campaignOrders": CampaignOrderConnection,
  "campaignOrdersCount": 123,
  "cancelledAt": ISO8601DateTime,
  "channel": Channel,
  "completedAt": ISO8601DateTime,
  "createdAt": ISO8601DateTime,
  "deposit": CampaignDeposit,
  "description": "You will be charged the remaining balance when the product is released.",
  "dueAt": ISO8601DateTime,
  "endAt": ISO8601DateTime,
  "endedAt": ISO8601DateTime,
  "fulfilAt": ISO8601DateTime,
  "fulfillingAt": ISO8601DateTime,
  "gracePeriodHours": 987,
  "id": GlobalID,
  "identifier": "abc123",
  "inventoryApplications": [InventoryApplication],
  "launchAt": ISO8601DateTime,
  "launchedAt": ISO8601DateTime,
  "limit": 987,
  "name": "June Pre-order for Product.",
  "productVariants": [ProductVariant],
  "products": [Product],
  "reference": "Pre-order June Product #REF-021",
  "reservedItemsCount": 123,
  "sequentialId": 987,
  "status": "CANCELLED",
  "updatedAt": ISO8601DateTime
}

SearchResult

Description

A search result.

Fields
Field Name Description
queryArguments - String! The query arguments as a JSON string
campaignOrders - CampaignOrderConnection The matching campaign orders
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

presaleCampaigns - PresaleCampaignConnection The matching presale campaigns
Arguments
after - String

Returns the elements in the list that come after the specified cursor.

before - String

Returns the elements in the list that come before the specified cursor.

first - Int

Returns the first n elements from the list.

last - Int

Returns the last n elements from the list.

Example
{
  "queryArguments": "abc123",
  "campaignOrders": CampaignOrderConnection,
  "presaleCampaigns": PresaleCampaignConnection
}

Connections

CampaignOrderConnection

Description

The connection type for CampaignOrder.

Fields
Field Name Description
edges - [CampaignOrderEdge] A list of edges.
nodes - [CampaignOrder] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [CampaignOrderEdge],
  "nodes": [CampaignOrder],
  "pageInfo": PageInfo,
  "totalCount": 123
}

CampaignOrderEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - CampaignOrder The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": CampaignOrder
}

CampaignOrderGroupConnection

Description

The connection type for CampaignOrderGroup.

Fields
Field Name Description
edges - [CampaignOrderGroupEdge] A list of edges.
nodes - [CampaignOrderGroup] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [CampaignOrderGroupEdge],
  "nodes": [CampaignOrderGroup],
  "pageInfo": PageInfo,
  "totalCount": 123
}

CampaignOrderGroupEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - CampaignOrderGroup The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": CampaignOrderGroup
}

ChannelConnection

Description

The connection type for Channel.

Fields
Field Name Description
edges - [ChannelEdge] A list of edges.
nodes - [Channel] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [ChannelEdge],
  "nodes": [Channel],
  "pageInfo": PageInfo
}

ChannelEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Channel The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": Channel
}

ChargeConnection

Description

The connection type for Charge.

Fields
Field Name Description
edges - [ChargeEdge] A list of edges.
nodes - [Charge] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [ChargeEdge],
  "nodes": [Charge],
  "pageInfo": PageInfo,
  "totalCount": 123
}

ChargeEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Charge The item at the end of the edge.
Example
{
  "cursor": "xyz789",
  "node": Charge
}

CrowdfundingCampaignConnection

Description

The connection type for CrowdfundingCampaign.

Fields
Field Name Description
edges - [CrowdfundingCampaignEdge] A list of edges.
nodes - [CrowdfundingCampaign] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [CrowdfundingCampaignEdge],
  "nodes": [CrowdfundingCampaign],
  "pageInfo": PageInfo,
  "totalCount": 987
}

CrowdfundingCampaignEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - CrowdfundingCampaign The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": CrowdfundingCampaign
}

CustomerConnection

Description

The connection type for Customer.

Fields
Field Name Description
edges - [CustomerEdge] A list of edges.
nodes - [Customer] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [CustomerEdge],
  "nodes": [Customer],
  "pageInfo": PageInfo
}

CustomerEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Customer The item at the end of the edge.
Example
{
  "cursor": "xyz789",
  "node": Customer
}

OrganisationConnection

Description

The connection type for Organisation.

Fields
Field Name Description
edges - [OrganisationEdge] A list of edges.
nodes - [Organisation] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [OrganisationEdge],
  "nodes": [Organisation],
  "pageInfo": PageInfo
}

OrganisationEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Organisation The item at the end of the edge.
Example
{
  "cursor": "xyz789",
  "node": Organisation
}

PaymentIntentConnection

Description

The connection type for PaymentIntent.

Fields
Field Name Description
edges - [PaymentIntentEdge] A list of edges.
nodes - [PaymentIntent] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [PaymentIntentEdge],
  "nodes": [PaymentIntent],
  "pageInfo": PageInfo,
  "totalCount": 123
}

PaymentIntentEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - PaymentIntent The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": PaymentIntent
}

PaymentMethodConnection

Description

The connection type for PaymentMethod.

Fields
Field Name Description
edges - [PaymentMethodEdge] A list of edges.
nodes - [PaymentMethod] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [PaymentMethodEdge],
  "nodes": [PaymentMethod],
  "pageInfo": PageInfo,
  "totalCount": 987
}

PaymentMethodEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - PaymentMethod The item at the end of the edge.
Example
{
  "cursor": "xyz789",
  "node": PaymentMethod
}

PresaleCampaignConnection

Description

The connection type for PresaleCampaign.

Fields
Field Name Description
edges - [PresaleCampaignEdge] A list of edges.
nodes - [PresaleCampaign] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [PresaleCampaignEdge],
  "nodes": [PresaleCampaign],
  "pageInfo": PageInfo,
  "totalCount": 987
}

PresaleCampaignEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - PresaleCampaign The item at the end of the edge.
Example
{
  "cursor": "xyz789",
  "node": PresaleCampaign
}

ProductConnection

Description

The connection type for Product.

Fields
Field Name Description
edges - [ProductEdge] A list of edges.
nodes - [Product] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [ProductEdge],
  "nodes": [Product],
  "pageInfo": PageInfo
}

ProductEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Product The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": Product
}

ProductVariantConnection

Description

The connection type for ProductVariant.

Fields
Field Name Description
edges - [ProductVariantEdge] A list of edges.
nodes - [ProductVariant] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [ProductVariantEdge],
  "nodes": [ProductVariant],
  "pageInfo": PageInfo
}

ProductVariantEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - ProductVariant The item at the end of the edge.
Example
{
  "cursor": "xyz789",
  "node": ProductVariant
}

RefundConnection

Description

The connection type for Refund.

Fields
Field Name Description
edges - [RefundEdge] A list of edges.
nodes - [Refund] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
totalCount - Int! The total number of items in the collection
Example
{
  "edges": [RefundEdge],
  "nodes": [Refund],
  "pageInfo": PageInfo,
  "totalCount": 987
}

RefundEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Refund The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": Refund
}

WebhookConnection

Description

The connection type for Webhook.

Fields
Field Name Description
edges - [WebhookEdge] A list of edges.
nodes - [Webhook] A list of nodes.
pageInfo - PageInfo! Information to aid in pagination.
Example
{
  "edges": [WebhookEdge],
  "nodes": [Webhook],
  "pageInfo": PageInfo
}

WebhookEdge

Description

An edge in a connection.

Fields
Field Name Description
cursor - String! A cursor for use in pagination.
node - Webhook The item at the end of the edge.
Example
{
  "cursor": "abc123",
  "node": Webhook
}

Enums

AccessTokenMode

Description

The access token mode.

Values
Enum Value Description

STATEFUL

Token has state

STATELESS

Token has no state
Example
"STATEFUL"

AccessTokenType

Description

Type of access token.

Values
Enum Value Description

CHANNEL

Token linked to channel

CUSTOMER

Token linked to customer

ORGANISATION

Token linked to organisation
Example
"CHANNEL"

CampaignAllocationStatus

Description

The allocation status of a campaign.

Values
Enum Value Description

ALLOCATED

Allocation is complete.

ALLOCATING

Allocation is in progress.

ALLOCATION_QUEUED

Allocation is queued.

PARTIALLY_ALLOCATED

Campaign is partially allocated.

PENDING

Allocation is pending.
Example
"ALLOCATED"

CampaignDepositType

Description

The campaign deposit type.

Values
Enum Value Description

PERCENTAGE

Campaign deposit type is a percentage
Example
"PERCENTAGE"

CampaignItemType

Description

The possible item types.

Values
Enum Value Description

PRODUCT

The type is a product type.

PRODUCT_VARIANT

The type is a product variant type.
Example
"PRODUCT"

CampaignOrderFulfilmentStatus

Description

Fulfilment status of campaign order.

Values
Enum Value Description

ALLOCATED

Campaign order fulfilment is allocated

FAILED

Campaign order fulfilment is failed

FULFILLED

Campaign order fulfilment is fulfilled

ON_HOLD

Campaign order fulfilment is on hold

OPEN

Campaign order fulfilment is open

PENDING

Campaign order fulfilment is pending

RETURNED

Campaign order fulfilment is returned

SUBMITTED

Campaign order fulfilment is submitted
Example
"ALLOCATED"

CampaignOrderGroupStatus

Description

Status of campaign order group eg: (pending, paid)

Values
Enum Value Description

ALLOCATED

Campaign order group is allocated

CANCELLED

Campaign order group is cancelled

COMPLETED

Campaign order group is completed

PAID

Campaign order group is paid

PENDING

Campaign order group is pending
Example
"ALLOCATED"

CampaignOrderPaymentStatus

Description

Payment status of the campaign order.

Values
Enum Value Description

FAILED

Payment failed.

PAID

Payment captured..

PARTIALLY_REFUNDED

Payment partially refunded.

PENDING

Payment pending.

REFUNDED

Payment refunded.

SUBMITTED

Payment submitted.
Example
"FAILED"

CampaignOrderSortKey

Description

The key used to sort campaign orders.

Values
Enum Value Description

ID

Sort by ID.
Example
"ID"

CampaignOrderStatus

Description

Status of campaign order eg: (pending, paid)

Values
Enum Value Description

ALLOCATED

Campaign order is allocated

CANCELLED

Campaign order is cancelled

COMPLETED

Campaign order is completed

PAID

Campaign order is paid

PENDING

Campaign order is pending
Example
"ALLOCATED"

CampaignPaymentTermsAlignment

Description

When should payments be captured when they are defined on a group?

Values
Enum Value Description

FIRST_CAMPAIGN

Payment terms are aligned to the first campaign.

LAST_CAMPAIGN

Payment terms are aligned to the last campaign.
Example
"FIRST_CAMPAIGN"

CampaignStatus

Description

The status of a campaign.

Values
Enum Value Description

CANCELLED

Campaign is cancelled

COMPLETED

Campaign is completed

ENDED

Campaign is ended

FAILED

Campaign is failed

FULFILLING

Campaign is fulfilling

LAUNCHED

Campaign is launched

PENDING

Campaign is pending

SUCCEEDED

Campaign is succeeded
Example
"CANCELLED"

CampaignType

Description

The possible campaign types.

Values
Enum Value Description

CROWDFUNDING

The campaign is a crowdfunding campaign.

PRESALE

The campaign is a presale campaign.
Example
"CROWDFUNDING"

CardBrand

Description

The card brands supported by Submarine.

Values
Enum Value Description

AMEX

American Express (Amex).

DISCOVER

Discover & Diners

JCB

Japan Credit Bureau (JCB)

MASTERCARD

Mastercard.

UNIONPAY

China UnionPay (CUP)

VISA

Visa.
Example
"AMEX"

ChannelStatus

Description

The possible channel statuses.

Values
Enum Value Description

ACTIVE

The channel is active.

INACTIVE

The channel is inactive.
Example
"ACTIVE"

ChannelType

Description

Type of channel eg: (Shopify)

Values
Enum Value Description

SHOPIFY

A Shopify channel
Example
"SHOPIFY"

ChargeFailureCode

Description

Failure code

Values
Enum Value Description

API_ERROR

API error

CARD_DECLINED

Card declined
Example
"API_ERROR"

ChargeSource

Description

The source of a charge or refund.

Values
Enum Value Description

SHOPIFY

Shopify

SUBMARINE

Submarine

UNKNOWN

Unknown source
Example
"SHOPIFY"

ChargeStatus

Description

Status of charge eg: (pending)

Values
Enum Value Description

FAILED

Charge failed

PENDING

Charge pending

SUCCEEDED

Charge succeeded
Example
"FAILED"

ChargeType

Description

Type of charge (eg. verify)

Values
Enum Value Description

AUTHORISE

Authorise

CAPTURE

Capture

SALE

Sale

VERIFY

Verify
Example
"AUTHORISE"

CountryCode

Description

ISO-3166-1 country codes.

Values
Enum Value Description

AD

Andorra

AE

United Arab Emirates

AF

Afghanistan

AG

Antigua and Barbuda

AI

Anguilla

AL

Albania

AM

Armenia

AO

Angola

AQ

Antarctica

AR

Argentina

AS

American Samoa

AT

Austria

AU

Australia

AW

Aruba

AX

Åland Islands

AZ

Azerbaijan

BA

Bosnia and Herzegovina

BB

Barbados

BD

Bangladesh

BE

Belgium

BF

Burkina Faso

BG

Bulgaria

BH

Bahrain

BI

Burundi

BJ

Benin

BL

Saint Barthélemy

BM

Bermuda

BN

Brunei Darussalam

BO

Bolivia (Plurinational State of)

BQ

Bonaire, Sint Eustatius and Saba

BR

Brazil

BS

Bahamas

BT

Bhutan

BV

Bouvet Island

BW

Botswana

BY

Belarus

BZ

Belize

CA

Canada

CC

Cocos (Keeling) Islands

CD

Congo (Democratic Republic of the)

CF

Central African Republic

CG

Congo

CH

Switzerland

CI

Côte d'Ivoire

CK

Cook Islands

CL

Chile

CM

Cameroon

CN

China

CO

Colombia

CR

Costa Rica

CU

Cuba

CV

Cabo Verde

CW

Curaçao

CX

Christmas Island

CY

Cyprus

CZ

Czechia

DE

Germany

DJ

Djibouti

DK

Denmark

DM

Dominica

DO

Dominican Republic

DZ

Algeria

EC

Ecuador

EE

Estonia

EG

Egypt

EH

Western Sahara

ER

Eritrea

ES

Spain

ET

Ethiopia

FI

Finland

FJ

Fiji

FK

Falkland Islands (Malvinas)

FM

Micronesia (Federated States of)

FO

Faroe Islands

FR

France

GA

Gabon

GB

United Kingdom of Great Britain and Northern Ireland

GD

Grenada

GE

Georgia

GF

French Guiana

GG

Guernsey

GH

Ghana

GI

Gibraltar

GL

Greenland

GM

Gambia

GN

Guinea

GP

Guadeloupe

GQ

Equatorial Guinea

GR

Greece

GS

South Georgia and the South Sandwich Islands

GT

Guatemala

GU

Guam

GW

Guinea-Bissau

GY

Guyana

HK

Hong Kong

HM

Heard Island and McDonald Islands

HN

Honduras

HR

Croatia

HT

Haiti

HU

Hungary

ID

Indonesia

IE

Ireland

IL

Israel

IM

Isle of Man

IN

India

IO

British Indian Ocean Territory

IQ

Iraq

IR

Iran (Islamic Republic of)

IS

Iceland

IT

Italy

JE

Jersey

JM

Jamaica

JO

Jordan

JP

Japan

KE

Kenya

KG

Kyrgyzstan

KH

Cambodia

KI

Kiribati

KM

Comoros

KN

Saint Kitts and Nevis

KP

Korea (Democratic People's Republic of)

KR

Korea (Republic of)

KW

Kuwait

KY

Cayman Islands

KZ

Kazakhstan

LA

Lao People's Democratic Republic

LB

Lebanon

LC

Saint Lucia

LI

Liechtenstein

LK

Sri Lanka

LR

Liberia

LS

Lesotho

LT

Lithuania

LU

Luxembourg

LV

Latvia

LY

Libya

MA

Morocco

MC

Monaco

MD

Moldova (Republic of)

ME

Montenegro

MF

Saint Martin (French part)

MG

Madagascar

MH

Marshall Islands

MK

North Macedonia

ML

Mali

MM

Myanmar

MN

Mongolia

MO

Macao

MP

Northern Mariana Islands

MQ

Martinique

MR

Mauritania

MS

Montserrat

MT

Malta

MU

Mauritius

MV

Maldives

MW

Malawi

MX

Mexico

MY

Malaysia

MZ

Mozambique

NA

Namibia

NC

New Caledonia

NE

Niger

NF

Norfolk Island

NG

Nigeria

NI

Nicaragua

NL

Netherlands

NO

Norway

NP

Nepal

NR

Nauru

NU

Niue

NZ

New Zealand

OM

Oman

PA

Panama

PE

Peru

PF

French Polynesia

PG

Papua New Guinea

PH

Philippines

PK

Pakistan

PL

Poland

PM

Saint Pierre and Miquelon

PN

Pitcairn

PR

Puerto Rico

PS

Palestine, State of

PT

Portugal

PW

Palau

PY

Paraguay

QA

Qatar

RE

Réunion

RO

Romania

RS

Serbia

RU

Russian Federation

RW

Rwanda

SA

Saudi Arabia

SB

Solomon Islands

SC

Seychelles

SD

Sudan

SE

Sweden

SG

Singapore

SH

Saint Helena, Ascension and Tristan da Cunha

SI

Slovenia

SJ

Svalbard and Jan Mayen

SK

Slovakia

SL

Sierra Leone

SM

San Marino

SN

Senegal

SO

Somalia

SR

Suriname

SS

South Sudan

ST

Sao Tome and Principe

SV

El Salvador

SX

Sint Maarten (Dutch part)

SY

Syrian Arab Republic

SZ

Eswatini

TC

Turks and Caicos Islands

TD

Chad

TF

French Southern Territories

TG

Togo

TH

Thailand

TJ

Tajikistan

TK

Tokelau

TL

Timor-Leste

TM

Turkmenistan

TN

Tunisia

TO

Tonga

TR

Türkiye

TT

Trinidad and Tobago

TV

Tuvalu

TW

Taiwan, Province of China

TZ

Tanzania, United Republic of

UA

Ukraine

UG

Uganda

UM

United States Minor Outlying Islands

US

United States of America

UY

Uruguay

UZ

Uzbekistan

VA

Holy See

VC

Saint Vincent and the Grenadines

VE

Venezuela (Bolivarian Republic of)

VG

Virgin Islands (British)

VI

Virgin Islands (U.S.)

VN

Viet Nam

VU

Vanuatu

WF

Wallis and Futuna

WS

Samoa

YE

Yemen

YT

Mayotte

ZA

South Africa

ZM

Zambia

ZW

Zimbabwe
Example
"AD"

CurrencyCode

Description

The currency codes.

Values
Enum Value Description

AED

United Arab Emirates Dirham (AED).

AFN

Afghan Afghani (AFN).

ALL

Albanian Lek (ALL).

AMD

Armenian Dram (AMD).

ANG

Netherlands Antillean Guilder (ANG).

AOA

Angolan Kwanza (AOA).

ARS

Argentine Pesos (ARS).

AUD

Australian Dollar (AUD).

AWG

Aruban Florin (AWG).

AZN

Azerbaijani Manat (AZN).

BAM

Bosnia and Herzegovina Convertible Mark (BAM).

BBD

Barbadian Dollar (BBD).

BDT

Bangladesh Taka (BDT).

BGN

Bulgarian Lev (BGN).

BIF

Burundian Franc (BIF).

BMD

Bermudian Dollar (BMD).

BND

Brunei Dollar (BND).

BOB

Bolivian Boliviano (BOB).

BRL

Brazilian Real (BRL).

BSD

Bahamian Dollar (BSD).

BWP

Botswana Pula (BWP).

BZD

Belize Dollar (BZD).

CAD

Canadian Dollar (CAD).

CDF

Congolese Franc (CDF).

CHF

Swiss Francs (CHF).

CLP

Chilean Peso (CLP).

CNY

Chinese Yuan Renminbi (CNY).

COP

Colombian Peso (COP).

CRC

Costa Rican Colones (CRC).

CVE

Cape Verdean Escudo (CVE).

CZK

Czech Koruny (CZK).

DJF

Djiboutian Franc (DJF).

DKK

Danish Kroner (DKK).

DOP

Dominican Peso (DOP).

DZD

Algerian Dinar (DZD).

EGP

Egyptian Pound (EGP).

ETB

Ethiopian Birr (ETB).

EUR

Euro (EUR).

FJD

Fijian Dollar (FJD).

FKP

Falkland Islands Pounds (FKP).

GBP

United Kingdom Pounds (GBP).

GEL

Georgian Lari (GEL).

GIP

Gibraltar Pounds (GIP).

GMD

Gambian Dalasi (GMD).

GNF

Guinean Franc (GNF).

GTQ

Guatemalan Quetzal (GTQ).

GYD

Guyanese Dollar (GYD).

HKD

Hong Kong Dollar (HKD).

HNL

Honduran Lempira (HNL).

HTG

Haitian Gourde (HTG).

HUF

Hungarian Forint (HUF).

IDR

Indonesian Rupiah (IDR).

ILS

Israeli New Shekel (NIS).

INR

Indian Rupees (INR).

ISK

Icelandic Kronur (ISK).

JMD

Jamaican Dollar (JMD).

JPY

Japanese Yen (JPY).

KES

Kenyan Shilling (KES).

KGS

Kyrgyzstani Som (KGS).

KHR

Cambodian Riel. (KHR)

KMF

Comorian Franc (KMF).

KRW

South Korean Won (KRW).

KYD

Cayman Dollar (KYD).

KZT

Kazakhstani Tenge (KZT).

LAK

Laotian Kip (LAK).

LBP

Lebanese Pounds (LBP).

LKR

Sri Lankan Rupees (LKR).

LRD

Liberian Dollar (LRD).

LSL

Lesotho Loti (LSL).

MAD

Moroccan Dirham (MAD).

MDL

Moldovan Leu (MDL).

MGA

Malagasy Ariary (MGA).

MKD

Macedonia Denar (MKD).

MMK

Burmese Kyat (MMK).

MNT

Mongolian Tugrik (MNT).

MOP

Macanese Pataca (MOP).

MUR

Mauritian Rupee (MUR).

MVR

Maldivian Rufiyaa (MVR).

MWK

Malawian Kwacha (MWK).

MXN

Mexican Pesos (MXN).

MYR

Malaysian Ringgits (MYR).

MZN

Mozambican Metical (MZN).

NAD

Namibian Dollar (NAD).

NGN

Nigerian Naira (NGN).

NIO

Nicaraguan Córdoba (NIO).

NOK

Norwegian Kroner (NOK).

NPR

Nepalese Rupee (NPR).

NZD

New Zealand Dollar (NZD).

PAB

Panamian Balboa (PAB).

PEN

Peruvian Nuevo Sol (PEN).

PGK

Papua New Guinean Kina (PGK).

PHP

Philippine Peso (PHP).

PKR

Pakistani Rupee (PKR).

PLN

Polish Zlotych (PLN).

PYG

Paraguayan Guarani (PYG).

QAR

Qatari Rial (QAR).

RON

Romanian Lei (RON).

RSD

Serbian dinar (RSD).

RUB

Russian Rubles (RUB).

RWF

Rwandan Franc (RWF).

SAR

Saudi Riyal (SAR).

SBD

Solomon Islands Dollar (SBD).

SCR

Seychellois Rupee (SCR).

SEK

Swedish Kronor (SEK).

SGD

Singapore Dollar (SGD).

SHP

Saint Helena Pounds (SHP).

SLL

Sierra Leonean Leone (SLL).

SRD

Surinamese Dollar (SRD).

SZL

Swazi Lilangeni (SZL).

THB

Thai baht (THB).

TJS

Tajikistani Somoni (TJS).

TOP

Tongan Pa'anga (TOP).

TRY

Turkish Lira (TRY).

TTD

Trinidad and Tobago Dollar (TTD).

TWD

Taiwan Dollar (TWD).

TZS

Tanzanian Shilling (TZS).

UAH

Ukrainian Hryvnia (UAH).

UGX

Ugandan Shilling (UGX).

USD

United States Dollar (USD).

UYU

Uruguayan Pesos (UYU).

UZS

Uzbekistan som (UZS).

VND

Vietnamese đồng (VND).

VUV

Vanuatu Vatu (VUV).

WST

Samoan Tala (WST).

XAF

Central African CFA Franc (XAF).

XCD

East Caribbean Dollar (XCD).

XOF

West African CFA franc (XOF).

XPF

CFP Franc (XPF).

YER

Yemeni Rial (YER).

ZAR

South African Rand (ZAR).

ZMW

Zambian Kwacha (ZMW).
Example
"AED"

CustomerStatus

Description

The possible customer statuses.

Values
Enum Value Description

ACTIVE

The customer is active.

DELETED

The customer is deleted.

INACTIVE

The customer is inactive
Example
"ACTIVE"

OrganisationStatus

Description

Status of organisation eg: (active)

Values
Enum Value Description

ACTIVE

Organisation is active

INACTIVE

Organisation is inactive
Example
"ACTIVE"

PaymentInstrumentType

Description

The types of payment instrument supported by Submarine.

Values
Enum Value Description

CARD

Card

PAYPAL_BILLING_AGREEMENT

Paypal billing agreement
Example
"CARD"

PaymentIntentStatus

Description

Status of the payment intent

Values
Enum Value Description

CANCELLED

Payment intent cancelled

PROCESSING

Payment intent processing

REQUIRES_ACTION

Payment intent requires_action

REQUIRES_CAPTURE

Payment intent requires_capture

SUCCEEDED

Payment intent succeeded
Example
"CANCELLED"

PaymentMethodStatus

Description

Status of the payment method

Values
Enum Value Description

ACTIVE

Payment method active

INACTIVE

Payment method inactive
Example
"ACTIVE"

PaymentProcessorType

Description

The types of payment processor supported by Submarine.

Values
Enum Value Description

SHOPIFY

Shopify Payments.
Example
"SHOPIFY"

Persona

Description

A Submarine persona.

Values
Enum Value Description

CUSTOMER

A customer.

MERCHANT

A merchant.

SUBMARINE

A Submarine service.
Example
"CUSTOMER"

PresaleCampaignSortKey

Description

The key used to sort presale campaigns.

Values
Enum Value Description

COMPLETED_AT

Sort by the presale campaign completion date.

END_AT

Sort by the presale campaign end date.

FULFIL_AT

Sort by the presale campaign fulfilment date.

ID

Sort by the presale campaign ID.

LAUNCH_AT

Sort by the presale campaign launch date.
Example
"COMPLETED_AT"

ProductStatus

Description

Status of product eg: (published)

Values
Enum Value Description

DELETED

Product is deleted

PUBLISHED

Product is published

UNPUBLISHED

Product is unpublished
Example
"DELETED"

ProductVariantStatus

Description

Status of product variant eg: (published)

Values
Enum Value Description

DELETED

Product variant is deleted

PUBLISHED

Product variant is published

UNPUBLISHED

Product variant is unpublished
Example
"DELETED"

RecordStatus

Description

Record status of charge eg: (processed)

Values
Enum Value Description

PROCESSED

Charge processed

RECORDED

Charge recorded
Example
"PROCESSED"

RefundStatus

Description

Status of refund eg: (pending)

Values
Enum Value Description

FAILED

Refund failed

PENDING

Refund pending

SUCCEEDED

Refund succeeded
Example
"FAILED"

SortDirection

Description

The sort direction.

Values
Enum Value Description

ASC

Sort in ascending order.

DESC

Sort in descending order.
Example
"ASC"

WebhookStatus

Description

Status of webhook

Values
Enum Value Description

ACTIVE

Webhook is active

INACTIVE

Webhook is inactive
Example
"ACTIVE"

WebhookTopic

Description

A Webhook's topic

Values
Enum Value Description

CAMPAIGN_ORDER_CANCELLED

Webhook topic is campaign_order-cancelled

CAMPAIGN_ORDER_CREATED

Webhook topic is campaign_order-created

CAMPAIGN_ORDER_FULFILLED

Webhook topic is campaign_order-fulfilled

CAMPAIGN_ORDER_GROUP_DUE_DATE_UPDATED

Webhook topic is campaign_order_group-due_date_updated

CHARGE_FAILED

Webhook topic is charge-failed

CHARGE_SUCCEEDED

Webhook topic is charge-succeeded

PRESALE_CAMPAIGN_COMPLETED

Webhook topic is presale_campaign-completed

PRESALE_CAMPAIGN_ENDED

Webhook topic is presale_campaign-ended

PRESALE_CAMPAIGN_LAUNCHED

Webhook topic is presale_campaign-launched

REFUND_SUCCEEDED

Webhook topic is refund-succeeded
Example
"CAMPAIGN_ORDER_CANCELLED"

Input Objects

AccessTokenCreateInput

Description

Input for creating an access token.

Fields
Input Field Description
tokenMode - AccessTokenMode! The token's mode
tokenType - AccessTokenType! Type of token
Example
{"tokenMode": "STATEFUL", "tokenType": "CHANNEL"}

CampaignDepositInput

Description

Input for configuring a campaign deposit.

Fields
Input Field Description
type - CampaignDepositType!
value - Float!
Example
{"type": "PERCENTAGE", "value": 123.45}

CampaignOrderCancelInput

Description

Specifies the input fields required to cancel a campaign order.

Fields
Input Field Description
id - GlobalID! ID of the campaign order to cancel.
Example
{"id": GlobalID}

CampaignOrderCreateInput

Description

Specifies the input fields required to create a campaign order.

Fields
Input Field Description
campaignId - GlobalID! The campaign order's campaign ID.
campaignType - CampaignType! The campaign order's campaign type.
id - GlobalID ID of the campaign order to create.
itemPrice - MoneyInput! The price of the campaign order's product
paymentMethodId - GlobalID The campaign order's payment method ID.
productId - GlobalID! The campaign order's product ID.
productVariantId - GlobalID! The campaign order's product variant ID.
quantity - Int! The campaign order's quantity.
subtotalPrice - MoneyInput! The subtotal price of the campaign order.
totalDeposit - MoneyInput! The total deposit of the campaign order.
totalDiscounts - MoneyInput! The total discounts of the campaign order.
totalPrice - MoneyInput! The total price of the campaign order.
totalShipping - MoneyInput! The shipping price of the campaign order.
totalTax - MoneyInput! The tax total price of the campaign order.
Example
{
  "campaignId": GlobalID,
  "campaignType": "CROWDFUNDING",
  "id": GlobalID,
  "itemPrice": MoneyInput,
  "paymentMethodId": GlobalID,
  "productId": GlobalID,
  "productVariantId": GlobalID,
  "quantity": 987,
  "subtotalPrice": MoneyInput,
  "totalDeposit": MoneyInput,
  "totalDiscounts": MoneyInput,
  "totalPrice": MoneyInput,
  "totalShipping": MoneyInput,
  "totalTax": MoneyInput
}

CampaignOrderDecreaseQuantityInput

Description

Specifies the input fields required to update a campaign order.

Fields
Input Field Description
id - GlobalID! ID of the campaign order to update.
quantity - Int The desired new quantity of the campaign order
Example
{"id": GlobalID, "quantity": 123}

CampaignOrderGroupCancelInput

Description

Specifies the input fields required to cancel a campaign order group.

Fields
Input Field Description
id - GlobalID! ID of the campaign order group to cancel.
Example
{"id": GlobalID}

CampaignOrderGroupCreateInput

Description

Specifies the input fields required to create a campaign order group.

Fields
Input Field Description
balanceOwing - MoneyInput! The balance_owing price of the campaign order group.
campaignOrders - [CampaignOrderCreateInput!]! The products which are included in the campaign
currency - CurrencyCode! The campaign order group's currency code.
customerId - GlobalID! The customer who owns this group
externalId - String! The campaign order group's external ID.
id - GlobalID ID of the campaign order to create.
identifier - String The identifier for the group.
lineItemsCount - Int! The campaign order group's total count of line items.
paymentMethodId - GlobalID The campaign order's payment method ID.
shippingLineTitle - String! Shipping line title.
subtotalPrice - MoneyInput! The subtotal price of the campaign order group.
taxesIncluded - Boolean! Indicates if taxes are included for the campiagn order group.
totalDeposit - MoneyInput! The total deposit of the campaign order group.
totalDiscounts - MoneyInput! The total discounts of the campaign order group.
totalLineItemsPrice - MoneyInput! The total line items price of the campaign order group.
totalPrice - MoneyInput! The total price of the campaign order group.
totalShipping - MoneyInput! The shipping price of the campaign order group.
totalTax - MoneyInput! The total tax price of the campaign order group.
Example
{
  "balanceOwing": MoneyInput,
  "campaignOrders": [CampaignOrderCreateInput],
  "currency": "AED",
  "customerId": GlobalID,
  "externalId": "abc123",
  "id": GlobalID,
  "identifier": "xyz789",
  "lineItemsCount": 987,
  "paymentMethodId": GlobalID,
  "shippingLineTitle": "abc123",
  "subtotalPrice": MoneyInput,
  "taxesIncluded": true,
  "totalDeposit": MoneyInput,
  "totalDiscounts": MoneyInput,
  "totalLineItemsPrice": MoneyInput,
  "totalPrice": MoneyInput,
  "totalShipping": MoneyInput,
  "totalTax": MoneyInput
}

CampaignOrderGroupRetryPaymentInput

Description

Specifies the input fields required to retry payment for a campaign order group.

Fields
Input Field Description
id - GlobalID! ID of the campaign order group to retry paying.
Example
{"id": GlobalID}

CampaignOrderRetryFulfilmentInput

Description

Specifies the input fields required to retry fulfilling a campaign order.

Fields
Input Field Description
id - GlobalID! ID of the campaign order to retry fulfilling.
Example
{"id": GlobalID}

CampaignOrderRetryPaymentInput

Description

Specifies the input fields required to retry payment for a campaign order.

Fields
Input Field Description
id - GlobalID! ID of the campaign order to retry paying.
Example
{"id": GlobalID}

CardCreateInput

Description

Specifies the input fields required to create a card.

Fields
Input Field Description
brand - CardBrand! The card brand.
expiry - CardExpiryInput! The card expiry.
externalId - String The (optional) external ID of the card.
last4 - String! The last four digits of the card number.
Example
{
  "brand": "AMEX",
  "expiry": CardExpiryInput,
  "externalId": "abc123",
  "last4": "xyz789"
}

CardExpiryInput

Description

Expiry details of the card.

Fields
Input Field Description
month - Int! Expiry month (as an integer, starting at 1 for Janaury).
year - Int! Expiry year (as a four-digit integer, e.g. 2023).
Example
{"month": 123, "year": 123}

ChannelConfigSetInput

Description

Input for configuring a channel's settings.

Fields
Input Field Description
config - PlatformConfigSetInput! The Submarine configuration.
id - GlobalID! The channel ID.
Example
{
  "config": PlatformConfigSetInput,
  "id": GlobalID
}

ChannelCreateInput

Description

Input for creating a channel.

Fields
Input Field Description
channelType - ChannelType! The channel type.
externalId - String! The channel's external ID.
identifier - String! The channel's identifier
Example
{
  "channelType": "SHOPIFY",
  "externalId": "abc123",
  "identifier": "xyz789"
}

ChannelUpdateInput

Description

Specifies the input fields required to update a channel.

Fields
Input Field Description
externalId - String The channel's external ID.
id - GlobalID! The ID of the channel to update.
identifier - String The channel's identifier
status - ChannelStatus The channel's status.
Example
{
  "externalId": "xyz789",
  "id": GlobalID,
  "identifier": "xyz789",
  "status": "ACTIVE"
}

ChargeCaptureInput

Description

The input required to capture a charge

Fields
Input Field Description
amount - MoneyInput The amount to be charged. If blank, the balance owing will be charged.
description - String The description of the charge.
externalId - String The external ID of the charge.
metadata - MetadataInput Unstructured key/value pairs.
paymentIntentId - GlobalID! The payment intent ID.
source - ChargeSource The source of the charge.
Example
{
  "amount": MoneyInput,
  "description": "abc123",
  "externalId": "xyz789",
  "metadata": MetadataInput,
  "paymentIntentId": GlobalID,
  "source": "SHOPIFY"
}

ChargeRecordInput

Description

The input required to record a charge

Fields
Input Field Description
amount - MoneyInput! The amount to be charged.
chargeType - ChargeType! The type of charge to record.
description - String The description of the charge.
externalId - String The external ID of the charge.
metadata - MetadataInput Unstructured key/value pairs.
paymentIntentId - GlobalID The payment intent ID.
source - ChargeSource The source of the charge.
Example
{
  "amount": MoneyInput,
  "chargeType": "AUTHORISE",
  "description": "xyz789",
  "externalId": "abc123",
  "metadata": MetadataInput,
  "paymentIntentId": GlobalID,
  "source": "SHOPIFY"
}

CrowdfundingCampaignEndInput

Description

Specifies the input fields required to end a crowdfunding campaign.

Fields
Input Field Description
id - GlobalID! ID of the crowdfunding campaign order to end.
Example
{"id": GlobalID}

CrowdfundingCampaignLaunchInput

Description

Specifies the input fields required to launch a crowdfunding campaign.

Fields
Input Field Description
id - GlobalID! ID of the crowdfunding campaign order to launch.
Example
{"id": GlobalID}

CustomerCreateInput

Description

Input for creating a customer.

Fields
Input Field Description
email - String The customer's email.
externalId - String! The customer's external ID.
firstName - String The customer's first name.
id - GlobalID The customer's ID.
lastName - String The customer's last name.
phone - String The customer's phone.
Example
{
  "email": "abc123",
  "externalId": "abc123",
  "firstName": "abc123",
  "id": GlobalID,
  "lastName": "xyz789",
  "phone": "abc123"
}

MailingAddressInput

Description

An organisation's mailing address.

Fields
Input Field Description
address1 - String! Line 1 of mailing address.
address2 - String Line 2 of mailing address.
city - String! The name of the city, district, village, or town.
company - String The name of the organisation's company.
countryCode - CountryCode! The two-letter code for the country of the address.
phone - String Phone number
province - String The region of the address
provinceCode - String The code for the region of the address
zip - String! The zip or postal code of the address.
Example
{
  "address1": "xyz789",
  "address2": "xyz789",
  "city": "xyz789",
  "company": "abc123",
  "countryCode": "AD",
  "phone": "xyz789",
  "province": "abc123",
  "provinceCode": "xyz789",
  "zip": "abc123"
}

MoneyInput

Description

A money object.

Fields
Input Field Description
amount - String! The money object's amount.
currency - CurrencyCode! The money object's currency code.
Example
{"amount": "abc123", "currency": "AED"}

NotificationsConfigSetInput

Description

Input for configuring settings for notifications.

Fields
Input Field Description
emailCustomerWhenCampaignDueDateIsUpdated - Boolean
emailCustomerWhenCampaignIsOrdered - Boolean
emailMerchantOnWebhookFailure - Boolean
emailMerchantWhenCampaignOrderCannotBeFulfilled - Boolean
Example
{
  "emailCustomerWhenCampaignDueDateIsUpdated": false,
  "emailCustomerWhenCampaignIsOrdered": true,
  "emailMerchantOnWebhookFailure": true,
  "emailMerchantWhenCampaignOrderCannotBeFulfilled": true
}

OrganisationCreateInput

Description

Input for creating an organisation.

Fields
Input Field Description
address - MailingAddressInput The organisation's mailing address.
email - String! The organisation's email address.
name - String! The organisation's name.
Example
{
  "address": MailingAddressInput,
  "email": "abc123",
  "name": "xyz789"
}

OrganisationUpdateInput

Description

Input for updating an organisation.

Fields
Input Field Description
address - MailingAddressInput The organisation's mailing address.
email - String The organisation's email address.
id - GlobalID! The organisation's ID.
name - String The organisation's name.
status - OrganisationStatus The organisation's status (eg. active).
Example
{
  "address": MailingAddressInput,
  "email": "abc123",
  "id": GlobalID,
  "name": "abc123",
  "status": "ACTIVE"
}

PaymentInstrumentCreateInput

Description

Specifies the input fields required to create a payment instrument.

Fields
Input Field Description
card - CardCreateInput The card to be used for this payment method.
externalReference - String The (optional) external reference of the instrument.
paymentProcessor - PaymentProcessorType! The payment processor to be used for this payment method.
paypalBillingAgreement - PaypalBillingAgreementCreateInput The agreement to be used for this payment method.
type - PaymentInstrumentType! The type of payment instrument to create.
Example
{
  "card": CardCreateInput,
  "externalReference": "abc123",
  "paymentProcessor": "SHOPIFY",
  "paypalBillingAgreement": PaypalBillingAgreementCreateInput,
  "type": "CARD"
}

PaymentIntentAdjustmentCreateInput

Description

The input values required to create an adjustment to a payment intent

Fields
Input Field Description
amount - MoneyInput! The money object
description - String The description of the charge
metadata - MetadataInput Unstructured key/value pairs
paymentIntentId - GlobalID! The payment intent ID
Example
{
  "amount": MoneyInput,
  "description": "xyz789",
  "metadata": MetadataInput,
  "paymentIntentId": GlobalID
}

PaymentIntentCancelInput

Description

The input required to cancel a payment intent

Fields
Input Field Description
id - GlobalID! The payment intent ID
Example
{"id": GlobalID}

PaymentIntentCreateInput

Description

The input values required to create a new payment intent

Fields
Input Field Description
amount - MoneyInput! The amount to be collected.
initialCharge - ChargeRecordInput An initial charge to be recorded against the intent.
metadata - MetadataInput Unstructured key/value pairs.
paymentMethodId - GlobalID! The payment method ID.
Example
{
  "amount": MoneyInput,
  "initialCharge": ChargeRecordInput,
  "metadata": MetadataInput,
  "paymentMethodId": GlobalID
}

PaymentIntentUpdateInput

Description

The input values required to update a payment intent

Fields
Input Field Description
id - GlobalID! The PaymentIntent ID
metadata - MetadataInput Unstructured key/value pairs
paymentMethodId - GlobalID The payment method ID
Example
{
  "id": GlobalID,
  "metadata": MetadataInput,
  "paymentMethodId": GlobalID
}

PaymentMethodCancelInput

Description

The input required to cancel a payment method

Fields
Input Field Description
id - GlobalID! The payment method ID
Example
{"id": GlobalID}

PaymentMethodCreateInput

Description

Specifies the input fields required to create a payment method.

Fields
Input Field Description
customerId - GlobalID! The ID of the customer.
paymentInstrument - PaymentInstrumentCreateInput! The payment instrument.
Example
{
  "customerId": GlobalID,
  "paymentInstrument": PaymentInstrumentCreateInput
}

PaypalBillingAgreementCreateInput

Description

Specifies the input fields required to create a Paypal billing agreement.

Fields
Input Field Description
accountEmail - String The account email.
accountName - String The account name.
externalId - String The (optional) external ID of the agreement.
Example
{
  "accountEmail": "abc123",
  "accountName": "abc123",
  "externalId": "abc123"
}

PlatformConfigSetInput

Description

Input for configuring Submarine settings.

Fields
Input Field Description
notifications - NotificationsConfigSetInput
presales - PresalesConfigSetInput
Example
{
  "notifications": NotificationsConfigSetInput,
  "presales": PresalesConfigSetInput
}

PresaleCampaignAddProductVariantsInput

Description

Input for adding product variants to a presale campaign.

Fields
Input Field Description
id - GlobalID The campaigns's ID.
productVariantIds - [SharedIdInput!]! The product variants to be added to the campaign
Example
{
  "id": GlobalID,
  "productVariantIds": [SharedIdInput]
}

PresaleCampaignAddProductsInput

Description

Input for adding products to a presale campaign.

Fields
Input Field Description
id - GlobalID The campaigns's ID.
productIds - [SharedIdInput!] The products that are included in the campaign
Example
{
  "id": GlobalID,
  "productIds": [SharedIdInput]
}

PresaleCampaignApplyBulkInventoryInput

Description

Specifies the input fields required to apply bulk inventory to a presale campaign.

Fields
Input Field Description
campaignId - GlobalID! The presale campaign ID.
inventoryApplications - [PresaleCampaignApplyInventoryBaseInput!]! The campaign inventory items and quantities which should be applied
Example
{
  "campaignId": GlobalID,
  "inventoryApplications": [
    PresaleCampaignApplyInventoryBaseInput
  ]
}

PresaleCampaignApplyInventoryBaseInput

Description

Specifies the base input fields required to apply inventory to a presale campaign.

Fields
Input Field Description
campaignInventoryItemId - GlobalID! The campaign inventory item for which inventory is being applied
quantityReceived - Int! The number of units available to be allocated
Example
{
  "campaignInventoryItemId": GlobalID,
  "quantityReceived": 987
}

PresaleCampaignApplyInventoryInput

Description

Specifies the input fields required to apply inventory to a presale campaign.

Fields
Input Field Description
campaignId - GlobalID! The presale campaign ID.
campaignInventoryItemId - GlobalID! The campaign inventory item for which inventory is being applied
quantityReceived - PositiveInteger! The number of units available to be allocated
Example
{
  "campaignId": GlobalID,
  "campaignInventoryItemId": GlobalID,
  "quantityReceived": PositiveInteger
}

PresaleCampaignCancelInput

Description

Specifies the input fields required to cancel a presale campaign.

Fields
Input Field Description
id - GlobalID! ID of the presale campaign to cancel.
Example
{"id": GlobalID}

PresaleCampaignCreateInput

Description

Input for creating a presale campaign.

Fields
Input Field Description
deposit - CampaignDepositInput The campaign deposit
description - String The campaign description
endAt - ISO8601DateTime! The date the presale will end
fulfilAt - ISO8601DateTime The date the presale will be fulfilled
gracePeriodHours - Int! The number of hours a customer has to rectify a failed presale campaign payment before their campaign order is cancelled.
launchAt - ISO8601DateTime! The date the presale will be launched
limit - Int! The maximum number of units of the linked products that can be sold
name - String The name of the campaign
productIds - [SharedIdInput!] The products that are included in the campaign
productVariantIds - [SharedIdInput!] The product variants that are included in the campaign
reference - String! The campaign reference
Example
{
  "deposit": CampaignDepositInput,
  "description": "xyz789",
  "endAt": ISO8601DateTime,
  "fulfilAt": ISO8601DateTime,
  "gracePeriodHours": 123,
  "launchAt": ISO8601DateTime,
  "limit": 123,
  "name": "abc123",
  "productIds": [SharedIdInput],
  "productVariantIds": [SharedIdInput],
  "reference": "xyz789"
}

PresaleCampaignDeleteInput

Description

Specifies the input fields required to delete a presale campaign.

Fields
Input Field Description
id - GlobalID! ID of the presale campaign to delete.
Example
{"id": GlobalID}

PresaleCampaignEndInput

Description

Specifies the input fields required to end a presale campaign.

Fields
Input Field Description
id - GlobalID! ID of the presale campaign to end.
Example
{"id": GlobalID}

PresaleCampaignFulfilInput

Description

Specifies the input fields required to fulfil a presale campaign.

Fields
Input Field Description
id - GlobalID! ID of the presale campaign to fulfil.
Example
{"id": GlobalID}

PresaleCampaignLaunchInput

Description

Specifies the input fields required to launch a presale campaign.

Fields
Input Field Description
id - GlobalID! ID of the presale campaign to launch.
Example
{"id": GlobalID}

PresaleCampaignRemoveProductVariantsInput

Description

Input for removing product variants from a presale campaign.

Fields
Input Field Description
id - GlobalID The campaigns's ID.
productVariantIds - [SharedIdInput!] The product variants to be removed from the campaign
Example
{
  "id": GlobalID,
  "productVariantIds": [SharedIdInput]
}

PresaleCampaignRemoveProductsInput

Description

Input for removing products from a presale campaign.

Fields
Input Field Description
id - GlobalID The campaigns's ID.
productIds - [SharedIdInput!] The products to be removed from the campaign
Example
{
  "id": GlobalID,
  "productIds": [SharedIdInput]
}

PresaleCampaignUpdateInput

Description

Input for updating a presale campaign.

Fields
Input Field Description
deposit - CampaignDepositInput The campaign deposit
description - String The campaign description
endAt - ISO8601DateTime The date the presale will end
fulfilAt - ISO8601DateTime The date the presale will be fulfilled
gracePeriodHours - Int The number of hours a customer has to rectify a failed presale campaign payment before their campaign order is cancelled.
id - GlobalID! The campaign's ID.
launchAt - ISO8601DateTime The date the presale will be launched
limit - Int The maximum number of units of the linked products that can be sold
name - String The name of the campaign
productIds - [SharedIdInput!] The products that are included in the campaign
productVariantIds - [SharedIdInput!] The product variants to be added to the campaign
reference - String The campaign reference
Example
{
  "deposit": CampaignDepositInput,
  "description": "xyz789",
  "endAt": ISO8601DateTime,
  "fulfilAt": ISO8601DateTime,
  "gracePeriodHours": 987,
  "id": GlobalID,
  "launchAt": ISO8601DateTime,
  "limit": 987,
  "name": "xyz789",
  "productIds": [SharedIdInput],
  "productVariantIds": [SharedIdInput],
  "reference": "xyz789"
}

PresalesConfigSetInput

Description

Input for configuring settings for presales.

Fields
Input Field Description
allowDepositUpdatesOnLaunchedPresales - Boolean
campaignPaymentTermsAlignment - CampaignPaymentTermsAlignment
defaultCurrency - CurrencyCode
defaultPresaleDeposit - CampaignDepositInput
metafieldUpdateInterval - Int
refundPresalesDepositsOnCancellation - Boolean
templateForCrowdfundSellingPlanDescription - String
templateForCrowdfundSellingPlanName - String
templateForPresaleSellingPlanDescription - String
templateForPresaleSellingPlanName - String
Example
{
  "allowDepositUpdatesOnLaunchedPresales": false,
  "campaignPaymentTermsAlignment": "FIRST_CAMPAIGN",
  "defaultCurrency": "AED",
  "defaultPresaleDeposit": CampaignDepositInput,
  "metafieldUpdateInterval": 987,
  "refundPresalesDepositsOnCancellation": false,
  "templateForCrowdfundSellingPlanDescription": "xyz789",
  "templateForCrowdfundSellingPlanName": "xyz789",
  "templateForPresaleSellingPlanDescription": "abc123",
  "templateForPresaleSellingPlanName": "xyz789"
}

ProductCreateInput

Description

Input for creating a product.

Fields
Input Field Description
externalId - String! The product's external ID.
imageUrl - String The product's image URL.
productVariants - [ProductVariantCreateInput!] The product's variants.
status - ProductStatus! The product's status.
title - String The product's title.
Example
{
  "externalId": "xyz789",
  "imageUrl": "xyz789",
  "productVariants": [ProductVariantCreateInput],
  "status": "DELETED",
  "title": "abc123"
}

ProductDeleteInput

Description

Input for deleting a product.

Fields
Input Field Description
id - GlobalID! The product's ID.
Example
{"id": GlobalID}

ProductUpdateInput

Description

Input for updating a product.

Fields
Input Field Description
externalId - String The product's external ID.
id - GlobalID! The product's ID.
imageUrl - String The product's image URL.
title - String The product's title.
Example
{
  "externalId": "abc123",
  "id": GlobalID,
  "imageUrl": "abc123",
  "title": "abc123"
}

ProductVariantCreateInput

Description

Input for creating a product variant.

Fields
Input Field Description
externalId - String! The variant's external ID.
imageUrl - String The variant's image URL.
productId - GlobalID The ID of the parent product.
sku - String The variant's SKU
status - ProductStatus The variant's status.
title - String The variant's title.
Example
{
  "externalId": "abc123",
  "imageUrl": "abc123",
  "productId": GlobalID,
  "sku": "abc123",
  "status": "DELETED",
  "title": "xyz789"
}

ProductVariantDeleteInput

Description

Input for deleting a product variant.

Fields
Input Field Description
id - GlobalID! The variant's ID.
Example
{"id": GlobalID}

ProductVariantUpdateInput

Description

Input for updating a product variant.

Fields
Input Field Description
externalId - String The variant's external ID.
id - GlobalID! The product variant's ID.
imageUrl - String The variant's image URL.
sku - String The variant's SKU
title - String The variant's title.
Example
{
  "externalId": "xyz789",
  "id": GlobalID,
  "imageUrl": "xyz789",
  "sku": "xyz789",
  "title": "abc123"
}

RefundProcessInput

Description

The input required to process a refund

Fields
Input Field Description
amount - MoneyInput The money object
description - String The refund description
metadata - MetadataInput Unstructured key/value pairs
paymentIntentId - GlobalID! The payment intent ID
Example
{
  "amount": MoneyInput,
  "description": "abc123",
  "metadata": MetadataInput,
  "paymentIntentId": GlobalID
}

RefundRecordInput

Description

The input required to record a refund

Fields
Input Field Description
amount - MoneyInput The money object
description - String The refund description
metadata - MetadataInput Unstructured key/value pairs
paymentIntentId - GlobalID! The payment intent ID
Example
{
  "amount": MoneyInput,
  "description": "xyz789",
  "metadata": MetadataInput,
  "paymentIntentId": GlobalID
}

SharedIdInput

Description

A shared ID.

Fields
Input Field Description
externalId - ID The external ID.
platformId - GlobalID The Platform ID.
Example
{"externalId": 4, "platformId": GlobalID}

ShopifyCredentialsCreateInput

Description

Input for storing Shopify credentials.

Fields
Input Field Description
accessToken - String! The Shopify access token.
shopifyDomain - String! The shop's shopify sub-domain.
Example
{
  "accessToken": "abc123",
  "shopifyDomain": "abc123"
}

WebhookCreateInput

Description

Input for creating a webhook subscription.

Fields
Input Field Description
topic - WebhookTopic! The webhooks's topic (eg. CHARGE_FAILED).
url - Url! The webhooks url path
Example
{"topic": "CAMPAIGN_ORDER_CANCELLED", "url": Url}