Reaction Commerce GraphQL API API Reference
This represents the GraphQL API provided by Reaction Commerce with the included plugins. Note that your GraphQL API will vary depending on your mix of plugins. To explore and query the API, go to /graphql
on a Reaction Commerce URL in a browser.
API Endpoints
Reaction GraphQL API:
http://api.v3.reactioncommerce.io/graphql
Contact: hello@reactioncommerce.com
Version: 3.0.0
Queries
Queries return all requested data, without any side effects
account
Returns the account with the provided ID
The account ID
Example
Request Content-Types:
application/json
Query
query account($id: ID!){
account(id: $id){
_id
bio
createdAt
firstName
language
lastName
metafields{
description
key
namespace
scope
value
valueType
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
}
Variables
{
"id": "string"
}
Try it now
query account($id: ID!){
account(id: $id){
_id
bio
createdAt
firstName
language
lastName
metafields{
description
key
namespace
scope
value
valueType
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"account": {
"_id": "string",
"bio": "string",
"firstName": "string",
"language": "string",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"note": "string",
"picture": "string",
"userId": "string",
"username": "string"
}
}
}
accountCartByAccountId
Find a cart for a given account ID.
Account that owns the cart
Shop that owns the cart
Example
Request Content-Types:
application/json
Query
query accountCartByAccountId($accountId: ID!, $shopId: ID!){
accountCartByAccountId(accountId: $accountId, shopId: $shopId){
_id
createdAt
email
expiresAt
referenceId
totalItemQuantity
updatedAt
surcharges
}
}
Variables
{
"accountId": "string",
"shopId": "string"
}
Try it now
query accountCartByAccountId($accountId: ID!, $shopId: ID!){
accountCartByAccountId(accountId: $accountId, shopId: $shopId){
_id
createdAt
email
expiresAt
referenceId
totalItemQuantity
updatedAt
surcharges
}
}
{
"accountId": "string",
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"accountCartByAccountId": {
"_id": "string",
"email": "string",
"referenceId": "string",
"totalItemQuantity": "integer"
}
}
}
accounts
Returns accounts optionally filtered by account groups
Return only accounts in any of these groups
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Return results sorted in this order
By default, groups are sorted by when they were created, oldest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query accounts($groupIds: [ID], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortBy: AccountSortByField){
accounts(groupIds: $groupIds, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
bio
createdAt
firstName
language
lastName
metafields{
description
key
namespace
scope
value
valueType
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
}
nodes{
_id
bio
createdAt
firstName
language
lastName
metafields{
...RecursiveMetafieldFragment
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"groupIds": [
"string"
],
"offset": "integer",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query accounts($groupIds: [ID], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortBy: AccountSortByField){
accounts(groupIds: $groupIds, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
bio
createdAt
firstName
language
lastName
metafields{
description
key
namespace
scope
value
valueType
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
}
nodes{
_id
bio
createdAt
firstName
language
lastName
metafields{
...RecursiveMetafieldFragment
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"groupIds": [
"string"
],
"offset": "integer",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"accounts": {
"edges": [
{
"node": {
"_id": "string",
"bio": "string",
"firstName": "string",
"language": "string",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"note": "string",
"picture": "string",
"userId": "string",
"username": "string"
}
}
],
"nodes": [
{
"_id": "string",
"bio": "string",
"firstName": "string",
"language": "string",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"note": "string",
"picture": "string",
"userId": "string",
"username": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
addressValidation
Get a list of errors and suggested properly formatted addresses for an address. If no address validation service is active for the shop, this will return as if the address is valid even though no check actually occurred.
Address to validate
Shop to use for determining what validation service to use
Example
Request Content-Types:
application/json
Query
query addressValidation($address: AddressInput!, $shopId: ID!){
addressValidation(address: $address, shopId: $shopId){
suggestedAddresses
validationErrors
}
}
Variables
{
"address": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
},
"shopId": "string"
}
Try it now
query addressValidation($address: AddressInput!, $shopId: ID!){
addressValidation(address: $address, shopId: $shopId){
suggestedAddresses
validationErrors
}
}
{
"address": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
},
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addressValidation": {}
}
}
addressValidationRules
Returns a list of defined address validation rules for a shop
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
An optional list of service names, to get only rules that specify one of these services
ID of the shop for which to get defined address validation rules
Return results sorted in this order
By default, rules are sorted by when they were created, oldest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query addressValidationRules($after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $serviceNames: [String], $shopId: ID!, $sortOrder: SortOrder, $sortBy: AddressValidationRuleSortByField){
addressValidationRules(after: $after, before: $before, first: $first, last: $last, offset: $offset, serviceNames: $serviceNames, shopId: $shopId, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
countryCodes
createdAt
serviceName
shopId
updatedAt
}
}
nodes{
_id
countryCodes
createdAt
serviceName
shopId
updatedAt
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"offset": "integer",
"serviceNames": [
"string"
],
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query addressValidationRules($after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $serviceNames: [String], $shopId: ID!, $sortOrder: SortOrder, $sortBy: AddressValidationRuleSortByField){
addressValidationRules(after: $after, before: $before, first: $first, last: $last, offset: $offset, serviceNames: $serviceNames, shopId: $shopId, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
countryCodes
createdAt
serviceName
shopId
updatedAt
}
}
nodes{
_id
countryCodes
createdAt
serviceName
shopId
updatedAt
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"offset": "integer",
"serviceNames": [
"string"
],
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addressValidationRules": {
"edges": [
{
"node": {
"_id": "string",
"countryCodes": [
"string"
],
"serviceName": "string",
"shopId": "string"
}
}
],
"nodes": [
{
"_id": "string",
"countryCodes": [
"string"
],
"serviceName": "string",
"shopId": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
addressValidationServices
Get a full list of all registered address validation services
Example
Request Content-Types:
application/json
Query
query addressValidationServices{
addressValidationServices
}
Try it now
query addressValidationServices{
addressValidationServices
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addressValidationServices": [
{
"displayName": "string",
"name": "string",
"supportedCountryCodes": [
"string"
]
}
]
}
}
anonymousCartByCartId
Finds a cart by the cart ID and anonymous cart token.
The cart ID. Must be an anonymous cart (that is, one with no linked account).
A valid anonymous cart access cartToken for this cart. This is returned when you create an anonymous cart and should be stored securely in storefront client storage.
Example
Request Content-Types:
application/json
Query
query anonymousCartByCartId($cartId: ID!, $cartToken: String!){
anonymousCartByCartId(cartId: $cartId, cartToken: $cartToken){
_id
createdAt
email
expiresAt
referenceId
totalItemQuantity
updatedAt
surcharges
}
}
Variables
{
"cartId": "string",
"cartToken": "string"
}
Try it now
query anonymousCartByCartId($cartId: ID!, $cartToken: String!){
anonymousCartByCartId(cartId: $cartId, cartToken: $cartToken){
_id
createdAt
email
expiresAt
referenceId
totalItemQuantity
updatedAt
surcharges
}
}
{
"cartId": "string",
"cartToken": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"anonymousCartByCartId": {
"_id": "string",
"email": "string",
"referenceId": "string",
"totalItemQuantity": "integer"
}
}
}
availablePaymentMethods
Get a list of all payment methods available during a checkout. This may filter by auth, active/inactive, IP/region, shop, etc. To get the full list, use the paymentMethods
query with proper authorization.
ID of the shop for which the order will be placed
Example
Request Content-Types:
application/json
Query
query availablePaymentMethods($shopId: ID!){
availablePaymentMethods(shopId: $shopId)
}
Variables
{
"shopId": "string"
}
Try it now
query availablePaymentMethods($shopId: ID!){
availablePaymentMethods(shopId: $shopId)
}
{
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"availablePaymentMethods": [
{
"canRefund": "boolean",
"displayName": "string",
"isEnabled": "boolean",
"name": "string",
"pluginName": "string"
}
]
}
}
catalogItemProduct
Gets product from catalog
ID of the shop that owns the catalog product. Not required but highly recommended if you have multiple shops and slugOrId
is a slug because slugs are unique only within a shop.
Provide either a product ID or slug
Example
Request Content-Types:
application/json
Query
query catalogItemProduct($shopId: ID, $slugOrId: String){
catalogItemProduct(shopId: $shopId, slugOrId: $slugOrId){
_id
createdAt
updatedAt
}
}
Variables
{
"shopId": "string",
"slugOrId": "string"
}
Try it now
query catalogItemProduct($shopId: ID, $slugOrId: String){
catalogItemProduct(shopId: $shopId, slugOrId: $slugOrId){
_id
createdAt
updatedAt
}
}
{
"shopId": "string",
"slugOrId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"catalogItemProduct": {
"_id": "string"
}
}
}
catalogItems
Gets items from a shop catalog
Provide a list of shop IDs from which you want to get catalog items
Optionally provide a list of tag IDs to further filter the item list
Additional filters to apply
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Return results sorted in this order
Provide a Currency code if sortBy is minPrice
By default, items are sorted by when they were last updated, most recently updated first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query catalogItems($shopIds: [ID]!, $tagIds: [ID], $booleanFilters: [CatalogBooleanFilter], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortByPriceCurrencyCode: String, $sortBy: CatalogItemSortByField){
catalogItems(shopIds: $shopIds, tagIds: $tagIds, booleanFilters: $booleanFilters, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortByPriceCurrencyCode: $sortByPriceCurrencyCode, sortBy: $sortBy){
edges{
cursor
node{
_id
createdAt
updatedAt
}
}
nodes{
_id
createdAt
updatedAt
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopIds": [
"string"
],
"tagIds": [
"string"
],
"booleanFilters": [
{
"name": "string",
"value": "boolean"
}
],
"offset": "integer",
"sortOrder": "string",
"sortByPriceCurrencyCode": "string",
"sortBy": "string"
}
Try it now
query catalogItems($shopIds: [ID]!, $tagIds: [ID], $booleanFilters: [CatalogBooleanFilter], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortByPriceCurrencyCode: String, $sortBy: CatalogItemSortByField){
catalogItems(shopIds: $shopIds, tagIds: $tagIds, booleanFilters: $booleanFilters, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortByPriceCurrencyCode: $sortByPriceCurrencyCode, sortBy: $sortBy){
edges{
cursor
node{
_id
createdAt
updatedAt
}
}
nodes{
_id
createdAt
updatedAt
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopIds": [
"string"
],
"tagIds": [
"string"
],
"booleanFilters": [
{
"name": "string",
"value": "boolean"
}
],
"offset": "integer",
"sortOrder": "string",
"sortByPriceCurrencyCode": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"catalogItems": {
"edges": [
{}
],
"nodes": [
null
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
discountCodes
Gets discount codes
Provide a shop ID from which you want to get discount codes
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Example
Request Content-Types:
application/json
Query
query discountCodes($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
discountCodes(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
code
description
discount
discountMethod
label
}
}
nodes{
_id
code
description
discount
discountMethod
label
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"offset": "integer"
}
Try it now
query discountCodes($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
discountCodes(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
code
description
discount
discountMethod
label
}
}
nodes{
_id
code
description
discount
discountMethod
label
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"offset": "integer"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"discountCodes": {
"edges": [
{
"node": {
"_id": "string",
"code": "string",
"description": "string",
"discount": "string",
"label": "string"
}
}
],
"nodes": [
{
"_id": "string",
"code": "string",
"description": "string",
"discount": "string",
"label": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
emailTemplates
Retrieves a list of email templates
The shopId to which email templates belong to
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Example
Request Content-Types:
application/json
Query
query emailTemplates($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
emailTemplates(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
language
name
shopId
subject
template
title
}
}
nodes{
_id
language
name
shopId
subject
template
title
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"offset": "integer"
}
Try it now
query emailTemplates($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
emailTemplates(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
language
name
shopId
subject
template
title
}
}
nodes{
_id
language
name
shopId
subject
template
title
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"offset": "integer"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"emailTemplates": {
"edges": [
{
"node": {
"_id": "string",
"language": "string",
"name": "string",
"shopId": "string",
"subject": "string",
"template": "string",
"title": "string"
}
}
],
"nodes": [
{
"_id": "string",
"language": "string",
"name": "string",
"shopId": "string",
"subject": "string",
"template": "string",
"title": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
flatRateFulfillmentMethod
Get a flat rate fulfillment method
Fulfillment method id
Shop ID
Example
Request Content-Types:
application/json
Query
query flatRateFulfillmentMethod($methodId: ID!, $shopId: ID!){
flatRateFulfillmentMethod(methodId: $methodId, shopId: $shopId){
_id
cost
fulfillmentTypes
group
handling
isEnabled
label
name
rate
}
}
Variables
{
"methodId": "string",
"shopId": "string"
}
Try it now
query flatRateFulfillmentMethod($methodId: ID!, $shopId: ID!){
flatRateFulfillmentMethod(methodId: $methodId, shopId: $shopId){
_id
cost
fulfillmentTypes
group
handling
isEnabled
label
name
rate
}
}
{
"methodId": "string",
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"flatRateFulfillmentMethod": {
"_id": "string",
"cost": "number",
"fulfillmentTypes": [
null
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
}
}
}
flatRateFulfillmentMethods
Get a flat rate fulfillment methods
Shop ID
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Example
Request Content-Types:
application/json
Query
query flatRateFulfillmentMethods($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
flatRateFulfillmentMethods(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
cost
fulfillmentTypes
group
handling
isEnabled
label
name
rate
}
}
nodes{
_id
cost
fulfillmentTypes
group
handling
isEnabled
label
name
rate
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"offset": "integer"
}
Try it now
query flatRateFulfillmentMethods($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
flatRateFulfillmentMethods(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
cost
fulfillmentTypes
group
handling
isEnabled
label
name
rate
}
}
nodes{
_id
cost
fulfillmentTypes
group
handling
isEnabled
label
name
rate
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"offset": "integer"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"flatRateFulfillmentMethods": {
"edges": [
{
"node": {
"_id": "string",
"cost": "number",
"fulfillmentTypes": [
null
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
}
}
],
"nodes": [
{
"_id": "string",
"cost": "number",
"fulfillmentTypes": [
null
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
getFlatRateFulfillmentRestriction
Get a single flat rate fulfillment method restriction.
The restriction ID
Shop that owns the restriction
Example
Request Content-Types:
application/json
Query
query getFlatRateFulfillmentRestriction($restrictionId: ID!, $shopId: ID!){
getFlatRateFulfillmentRestriction(restrictionId: $restrictionId, shopId: $shopId){
_id
methodIds
shopId
type
}
}
Variables
{
"restrictionId": "string",
"shopId": "string"
}
Try it now
query getFlatRateFulfillmentRestriction($restrictionId: ID!, $shopId: ID!){
getFlatRateFulfillmentRestriction(restrictionId: $restrictionId, shopId: $shopId){
_id
methodIds
shopId
type
}
}
{
"restrictionId": "string",
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getFlatRateFulfillmentRestriction": {
"_id": "string",
"methodIds": [
"string"
],
"shopId": "string"
}
}
}
getFlatRateFulfillmentRestrictions
Get the full list of flat rate fulfillment method restrictions.
Shop to get restrictions for
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return results sorted in this order
By default, restrictions are sorted by when they were created, newest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query getFlatRateFulfillmentRestrictions($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: FlatRateFulfillmentRestrictionSortByField){
getFlatRateFulfillmentRestrictions(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
methodIds
shopId
type
}
}
nodes{
_id
methodIds
shopId
type
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query getFlatRateFulfillmentRestrictions($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: FlatRateFulfillmentRestrictionSortByField){
getFlatRateFulfillmentRestrictions(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
methodIds
shopId
type
}
}
nodes{
_id
methodIds
shopId
type
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"getFlatRateFulfillmentRestrictions": {
"edges": [
{
"node": {
"_id": "string",
"methodIds": [
"string"
],
"shopId": "string"
}
}
],
"nodes": [
{
"_id": "string",
"methodIds": [
"string"
],
"shopId": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
globalSettings
Returns app settings that are not shop specific. Plugins extend the GlobalSettings type to support whatever settings they need.
Example
Request Content-Types:
application/json
Query
query globalSettings{
globalSettings{
doNotUse
}
}
Try it now
query globalSettings{
globalSettings{
doNotUse
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"globalSettings": {
"doNotUse": "string"
}
}
}
group
Returns a single group by ID.
The group ID
Example
Request Content-Types:
application/json
Query
query group($id: ID!){
group(id: $id){
_id
createdAt
description
name
permissions
slug
updatedAt
}
}
Variables
{
"id": "string"
}
Try it now
query group($id: ID!){
group(id: $id){
_id
createdAt
description
name
permissions
slug
updatedAt
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"group": {
"_id": "string",
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
}
}
}
groups
Returns a list of groups for the shop with ID shopId
, as a Relay-compatible connection.
Return groups for this shop
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return results sorted in this order
By default, groups are sorted by when they were created, oldest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query groups($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: GroupSortByField){
groups(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
createdAt
description
name
permissions
slug
updatedAt
}
}
nodes{
_id
createdAt
description
name
permissions
slug
updatedAt
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query groups($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: GroupSortByField){
groups(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
createdAt
description
name
permissions
slug
updatedAt
}
}
nodes{
_id
createdAt
description
name
permissions
slug
updatedAt
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"groups": {
"edges": [
{
"node": {
"_id": "string",
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
}
}
],
"nodes": [
{
"_id": "string",
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
orderById
Get an order by its ID
The order ID
The shop that owns the order
A valid anonymous access token for this order. Required if the order is not linked with an account.
Example
Request Content-Types:
application/json
Query
query orderById($id: ID!, $shopId: ID!, $token: String){
orderById(id: $id, shopId: $shopId, token: $token){
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
Variables
{
"id": "string",
"shopId": "string",
"token": "string"
}
Try it now
query orderById($id: ID!, $shopId: ID!, $token: String){
orderById(id: $id, shopId: $shopId, token: $token){
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
{
"id": "string",
"shopId": "string",
"token": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"orderById": {
"_id": "string",
"cartId": "string",
"displayStatus": "string",
"email": "string",
"referenceId": "string",
"status": "string",
"totalItemQuantity": "integer"
}
}
}
orderByReferenceId
Get an order by its reference ID (the ID shown to customers)
The order reference ID (the ID shown to customers)
The shop that owns the order
A valid anonymous access token for this order. Required if the order is not linked with an account.
Example
Request Content-Types:
application/json
Query
query orderByReferenceId($id: ID!, $shopId: ID!, $token: String){
orderByReferenceId(id: $id, shopId: $shopId, token: $token){
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
Variables
{
"id": "string",
"shopId": "string",
"token": "string"
}
Try it now
query orderByReferenceId($id: ID!, $shopId: ID!, $token: String){
orderByReferenceId(id: $id, shopId: $shopId, token: $token){
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
{
"id": "string",
"shopId": "string",
"token": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"orderByReferenceId": {
"_id": "string",
"cartId": "string",
"displayStatus": "string",
"email": "string",
"referenceId": "string",
"status": "string",
"totalItemQuantity": "integer"
}
}
}
orders
Get all orders for a single account, optionally limited to certain shop IDs and certain orderStatus
Filters to apply to a list of orders
Provide a list of shop IDs from which you want to get orders from
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Return results sorted in this order
By default, orders are sorted by when they were created, newest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query orders($filters: OrderFilterInput, $shopIds: [ID], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortBy: OrdersSortByField){
orders(filters: $filters, shopIds: $shopIds, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
nodes{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"filters": {
"createdAt": {
"gte": "object",
"lte": "object"
},
"fulfillmentStatus": [
"string"
],
"paymentStatus": [
"string"
],
"searchField": "string",
"status": "string"
},
"shopIds": [
"string"
],
"offset": "integer",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query orders($filters: OrderFilterInput, $shopIds: [ID], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortBy: OrdersSortByField){
orders(filters: $filters, shopIds: $shopIds, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
nodes{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"filters": {
"createdAt": {
"gte": "object",
"lte": "object"
},
"fulfillmentStatus": [
"string"
],
"paymentStatus": [
"string"
],
"searchField": "string",
"status": "string"
},
"shopIds": [
"string"
],
"offset": "integer",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"orders": {
"edges": [
{
"node": {
"_id": "string",
"cartId": "string",
"displayStatus": "string",
"email": "string",
"referenceId": "string",
"status": "string",
"totalItemQuantity": "integer"
}
}
],
"nodes": [
{
"_id": "string",
"cartId": "string",
"displayStatus": "string",
"email": "string",
"referenceId": "string",
"status": "string",
"totalItemQuantity": "integer"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
ordersByAccountId
Get all orders for a single account, optionally limited to certain shop IDs and certain orderStatus
Limit to orders placed by this account
Limit to orders with one of these statuses
Limit to orders owned by one of these shops
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return results sorted in this order
By default, orders are sorted by when they were created, newest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query ordersByAccountId($accountId: ID!, $orderStatus: [String], $shopIds: [ID]!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: OrdersByAccountIdSortByField){
ordersByAccountId(accountId: $accountId, orderStatus: $orderStatus, shopIds: $shopIds, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
nodes{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"accountId": "string",
"orderStatus": [
"string"
],
"shopIds": [
"string"
],
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query ordersByAccountId($accountId: ID!, $orderStatus: [String], $shopIds: [ID]!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: OrdersByAccountIdSortByField){
ordersByAccountId(accountId: $accountId, orderStatus: $orderStatus, shopIds: $shopIds, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
}
nodes{
_id
cartId
createdAt
displayStatus(language: $language)
email
fulfillmentGroups
notes
referenceId
status
totalItemQuantity
updatedAt
surcharges
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"accountId": "string",
"orderStatus": [
"string"
],
"shopIds": [
"string"
],
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"ordersByAccountId": {
"edges": [
{
"node": {
"_id": "string",
"cartId": "string",
"displayStatus": "string",
"email": "string",
"referenceId": "string",
"status": "string",
"totalItemQuantity": "integer"
}
}
],
"nodes": [
{
"_id": "string",
"cartId": "string",
"displayStatus": "string",
"email": "string",
"referenceId": "string",
"status": "string",
"totalItemQuantity": "integer"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
paymentMethods
Get a full list of all payment methods
The shop to get payment methods for
Example
Request Content-Types:
application/json
Query
query paymentMethods($shopId: ID!){
paymentMethods(shopId: $shopId)
}
Variables
{
"shopId": "string"
}
Try it now
query paymentMethods($shopId: ID!){
paymentMethods(shopId: $shopId)
}
{
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"paymentMethods": [
{
"canRefund": "boolean",
"displayName": "string",
"isEnabled": "boolean",
"name": "string",
"pluginName": "string"
}
]
}
}
ping
A test query
Example
Request Content-Types:
application/json
Query
query ping{
ping
}
Try it now
query ping{
ping
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"ping": "string"
}
}
primaryShop
Returns the primary shop for the domain
Example
Request Content-Types:
application/json
Query
query primaryShop{
primaryShop{
_id
allowGuestCheckout
defaultNavigationTreeId
description
keywords
language
name
slug
timezone
}
}
Try it now
query primaryShop{
primaryShop{
_id
allowGuestCheckout
defaultNavigationTreeId
description
keywords
language
name
slug
timezone
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"primaryShop": {
"_id": "string",
"allowGuestCheckout": "boolean",
"defaultNavigationTreeId": "string",
"description": "string",
"keywords": "string",
"language": "string",
"name": "string",
"slug": "string",
"timezone": "string"
}
}
}
primaryShopId
Returns the ID of the primary shop for the domain
Example
Request Content-Types:
application/json
Query
query primaryShopId{
primaryShopId
}
Try it now
query primaryShopId{
primaryShopId
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"primaryShopId": "string"
}
}
product
Query for a single Product
Product ID
Shop ID
Example
Request Content-Types:
application/json
Query
query product($productId: ID!, $shopId: ID!){
product(productId: $productId, shopId: $shopId){
_id
createdAt
currentProductHash
description
isDeleted
isVisible
metaDescription
metafields
originCountry
pageTitle
productType
publishedAt
publishedProductHash
slug
supportedFulfillmentTypes
tagIds
title
updatedAt
variants(shouldIncludeHidden: $shouldIncludeHidden, shouldIncludeArchived: $shouldIncludeArchived)
vendor
price{
max
min
range
}
}
}
Variables
{
"productId": "string",
"shopId": "string"
}
Try it now
query product($productId: ID!, $shopId: ID!){
product(productId: $productId, shopId: $shopId){
_id
createdAt
currentProductHash
description
isDeleted
isVisible
metaDescription
metafields
originCountry
pageTitle
productType
publishedAt
publishedProductHash
slug
supportedFulfillmentTypes
tagIds
title
updatedAt
variants(shouldIncludeHidden: $shouldIncludeHidden, shouldIncludeArchived: $shouldIncludeArchived)
vendor
price{
max
min
range
}
}
}
{
"productId": "string",
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"product": {
"_id": "string",
"currentProductHash": "string",
"description": "string",
"isDeleted": "boolean",
"isVisible": "boolean",
"metaDescription": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"originCountry": "string",
"pageTitle": "string",
"productType": "string",
"publishedProductHash": "string",
"slug": "string",
"supportedFulfillmentTypes": [
null
],
"tagIds": [
"string"
],
"title": "string",
"vendor": "string",
"price": {
"max": "number",
"min": "number",
"range": "string"
}
}
}
}
products
Query for a list of Products
Filter by archived
Filter by visibility
Filter by metafield key
Filter by metafield value
Filter by price range maximum value
Filter by price range minimum value
List of product IDs to filter by
Regex metch query string
List of shop IDs to filter by
List of tag ids to filter by
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Return results sorted in this order
By default, products are sorted by createdAt. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query products($isArchived: Boolean, $isVisible: Boolean, $metafieldKey: String, $metafieldValue: String, $priceMax: Float, $priceMin: Float, $productIds: [ID], $query: String, $shopIds: [ID]!, $tagIds: [ID], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortBy: ProductSortByField){
products(isArchived: $isArchived, isVisible: $isVisible, metafieldKey: $metafieldKey, metafieldValue: $metafieldValue, priceMax: $priceMax, priceMin: $priceMin, productIds: $productIds, query: $query, shopIds: $shopIds, tagIds: $tagIds, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
createdAt
currentProductHash
description
isDeleted
isVisible
metaDescription
metafields
originCountry
pageTitle
productType
publishedAt
publishedProductHash
slug
supportedFulfillmentTypes
tagIds
title
updatedAt
variants(shouldIncludeHidden: $shouldIncludeHidden, shouldIncludeArchived: $shouldIncludeArchived)
vendor
price{
max
min
range
}
}
}
nodes{
_id
createdAt
currentProductHash
description
isDeleted
isVisible
metaDescription
metafields
originCountry
pageTitle
productType
publishedAt
publishedProductHash
slug
supportedFulfillmentTypes
tagIds
title
updatedAt
variants(shouldIncludeHidden: $shouldIncludeHidden, shouldIncludeArchived: $shouldIncludeArchived)
vendor
price{
...RecursiveProductPriceRangeFragment
}
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"isArchived": "boolean",
"isVisible": "boolean",
"metafieldKey": "string",
"metafieldValue": "string",
"priceMax": "number",
"priceMin": "number",
"productIds": [
"string"
],
"query": "string",
"shopIds": [
"string"
],
"tagIds": [
"string"
],
"offset": "integer",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query products($isArchived: Boolean, $isVisible: Boolean, $metafieldKey: String, $metafieldValue: String, $priceMax: Float, $priceMin: Float, $productIds: [ID], $query: String, $shopIds: [ID]!, $tagIds: [ID], $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int, $sortOrder: SortOrder, $sortBy: ProductSortByField){
products(isArchived: $isArchived, isVisible: $isVisible, metafieldKey: $metafieldKey, metafieldValue: $metafieldValue, priceMax: $priceMax, priceMin: $priceMin, productIds: $productIds, query: $query, shopIds: $shopIds, tagIds: $tagIds, after: $after, before: $before, first: $first, last: $last, offset: $offset, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
createdAt
currentProductHash
description
isDeleted
isVisible
metaDescription
metafields
originCountry
pageTitle
productType
publishedAt
publishedProductHash
slug
supportedFulfillmentTypes
tagIds
title
updatedAt
variants(shouldIncludeHidden: $shouldIncludeHidden, shouldIncludeArchived: $shouldIncludeArchived)
vendor
price{
max
min
range
}
}
}
nodes{
_id
createdAt
currentProductHash
description
isDeleted
isVisible
metaDescription
metafields
originCountry
pageTitle
productType
publishedAt
publishedProductHash
slug
supportedFulfillmentTypes
tagIds
title
updatedAt
variants(shouldIncludeHidden: $shouldIncludeHidden, shouldIncludeArchived: $shouldIncludeArchived)
vendor
price{
...RecursiveProductPriceRangeFragment
}
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"isArchived": "boolean",
"isVisible": "boolean",
"metafieldKey": "string",
"metafieldValue": "string",
"priceMax": "number",
"priceMin": "number",
"productIds": [
"string"
],
"query": "string",
"shopIds": [
"string"
],
"tagIds": [
"string"
],
"offset": "integer",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"products": {
"edges": [
{
"node": {
"_id": "string",
"currentProductHash": "string",
"description": "string",
"isDeleted": "boolean",
"isVisible": "boolean",
"metaDescription": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"originCountry": "string",
"pageTitle": "string",
"productType": "string",
"publishedProductHash": "string",
"slug": "string",
"supportedFulfillmentTypes": [
null
],
"tagIds": [
"string"
],
"title": "string",
"vendor": "string",
"price": {
"max": "number",
"min": "number",
"range": "string"
}
}
}
],
"nodes": [
{
"_id": "string",
"currentProductHash": "string",
"description": "string",
"isDeleted": "boolean",
"isVisible": "boolean",
"metaDescription": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"originCountry": "string",
"pageTitle": "string",
"productType": "string",
"publishedProductHash": "string",
"slug": "string",
"supportedFulfillmentTypes": [
null
],
"tagIds": [
"string"
],
"title": "string",
"vendor": "string",
"price": {
"max": "number",
"min": "number",
"range": "string"
}
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
productsByTagId
Returns a list of product in a tag
Shop that owns the tag
The tag ID
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Example
Request Content-Types:
application/json
Query
query productsByTagId($shopId: ID!, $tagId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt){
productsByTagId(shopId: $shopId, tagId: $tagId, after: $after, before: $before, first: $first, last: $last){
edges{
cursor
node{
_id
createdAt
position
title
}
}
nodes{
_id
createdAt
position
title
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"tagId": "string"
}
Try it now
query productsByTagId($shopId: ID!, $tagId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt){
productsByTagId(shopId: $shopId, tagId: $tagId, after: $after, before: $before, first: $first, last: $last){
edges{
cursor
node{
_id
createdAt
position
title
}
}
nodes{
_id
createdAt
position
title
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"tagId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"productsByTagId": {
"edges": [
{
"node": {
"_id": "string",
"position": "integer",
"title": "string"
}
}
],
"nodes": [
{
"_id": "string",
"position": "integer",
"title": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
refunds
Get refunds applied to an order by order ID
The order ID
The shop that owns the order
A valid anonymous access token for this order. Required if the order is not linked with an account.
Example
Request Content-Types:
application/json
Query
query refunds($orderId: ID!, $shopId: ID!, $token: String){
refunds(orderId: $orderId, shopId: $shopId, token: $token){
_id
createdAt
paymentDisplayName
paymentId
reason
}
}
Variables
{
"orderId": "string",
"shopId": "string",
"token": "string"
}
Try it now
query refunds($orderId: ID!, $shopId: ID!, $token: String){
refunds(orderId: $orderId, shopId: $shopId, token: $token){
_id
createdAt
paymentDisplayName
paymentId
reason
}
}
{
"orderId": "string",
"shopId": "string",
"token": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"refunds": [
{
"_id": "string",
"paymentDisplayName": "string",
"paymentId": "string",
"reason": "string"
}
]
}
}
refundsByPaymentId
Get refunds applied to a specific payment by payment ID
The order ID
The ID of one of the payments made for this order
The shop that owns the order
A valid anonymous access token for this order. Required if the order is not linked with an account.
Example
Request Content-Types:
application/json
Query
query refundsByPaymentId($orderId: ID!, $paymentId: ID!, $shopId: ID!, $token: String){
refundsByPaymentId(orderId: $orderId, paymentId: $paymentId, shopId: $shopId, token: $token){
_id
createdAt
paymentDisplayName
paymentId
reason
}
}
Variables
{
"orderId": "string",
"paymentId": "string",
"shopId": "string",
"token": "string"
}
Try it now
query refundsByPaymentId($orderId: ID!, $paymentId: ID!, $shopId: ID!, $token: String){
refundsByPaymentId(orderId: $orderId, paymentId: $paymentId, shopId: $shopId, token: $token){
_id
createdAt
paymentDisplayName
paymentId
reason
}
}
{
"orderId": "string",
"paymentId": "string",
"shopId": "string",
"token": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"refundsByPaymentId": [
{
"_id": "string",
"paymentDisplayName": "string",
"paymentId": "string",
"reason": "string"
}
]
}
}
roles
Returns a paged list of all roles associated with a shop
Return valid roles for this shop
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return results sorted in this order
By default, roles are sorted alphabetically by name. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query roles($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: RoleSortByField){
roles(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
name
}
}
nodes{
_id
name
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query roles($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: RoleSortByField){
roles(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
name
}
}
nodes{
_id
name
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"roles": {
"edges": [
{
"node": {
"_id": "string",
"name": "string"
}
}
],
"nodes": [
{
"_id": "string",
"name": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
shop
Returns a shop by ID
The shop ID
Example
Request Content-Types:
application/json
Query
query shop($id: ID!){
shop(id: $id){
_id
allowGuestCheckout
defaultNavigationTreeId
description
keywords
language
name
slug
timezone
}
}
Variables
{
"id": "string"
}
Try it now
query shop($id: ID!){
shop(id: $id){
_id
allowGuestCheckout
defaultNavigationTreeId
description
keywords
language
name
slug
timezone
}
}
{
"id": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"shop": {
"_id": "string",
"allowGuestCheckout": "boolean",
"defaultNavigationTreeId": "string",
"description": "string",
"keywords": "string",
"language": "string",
"name": "string",
"slug": "string",
"timezone": "string"
}
}
}
shopBySlug
Returns a shop by slug
The shop slug
Example
Request Content-Types:
application/json
Query
query shopBySlug($slug: String!){
shopBySlug(slug: $slug){
_id
allowGuestCheckout
defaultNavigationTreeId
description
keywords
language
name
slug
timezone
}
}
Variables
{
"slug": "string"
}
Try it now
query shopBySlug($slug: String!){
shopBySlug(slug: $slug){
_id
allowGuestCheckout
defaultNavigationTreeId
description
keywords
language
name
slug
timezone
}
}
{
"slug": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"shopBySlug": {
"_id": "string",
"allowGuestCheckout": "boolean",
"defaultNavigationTreeId": "string",
"description": "string",
"keywords": "string",
"language": "string",
"name": "string",
"slug": "string",
"timezone": "string"
}
}
}
shopSettings
Returns app settings for a specific shop. Plugins extend the ShopSettings type to support whatever settings they need.
The shop to get app settings for
Example
Request Content-Types:
application/json
Query
query shopSettings($shopId: ID!){
shopSettings(shopId: $shopId){
doNotUse
canSellVariantWithoutInventory
isShippingRatesFulfillmentEnabled
defaultTaxCode
fallbackTaxServiceName
primaryTaxServiceName
shouldNavigationTreeItemsBeAdminOnly
shouldNavigationTreeItemsBePubliclyVisible
shouldNavigationTreeItemsBeSecondaryNavOnly
sitemapRefreshPeriod
}
}
Variables
{
"shopId": "string"
}
Try it now
query shopSettings($shopId: ID!){
shopSettings(shopId: $shopId){
doNotUse
canSellVariantWithoutInventory
isShippingRatesFulfillmentEnabled
defaultTaxCode
fallbackTaxServiceName
primaryTaxServiceName
shouldNavigationTreeItemsBeAdminOnly
shouldNavigationTreeItemsBePubliclyVisible
shouldNavigationTreeItemsBeSecondaryNavOnly
sitemapRefreshPeriod
}
}
{
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"shopSettings": {
"doNotUse": "string",
"canSellVariantWithoutInventory": "boolean",
"isShippingRatesFulfillmentEnabled": "boolean",
"defaultTaxCode": "string",
"fallbackTaxServiceName": "string",
"primaryTaxServiceName": "string",
"shouldNavigationTreeItemsBeAdminOnly": "boolean",
"shouldNavigationTreeItemsBePubliclyVisible": "boolean",
"shouldNavigationTreeItemsBeSecondaryNavOnly": "boolean",
"sitemapRefreshPeriod": "string"
}
}
}
simpleInventory
Get the SimpleInventory info for a product configuration. Returns null
if updateSimpleInventory
has never been called for this product configuration.
ID of the shop that owns the product
The product configuration for which you want inventory info
Example
Request Content-Types:
application/json
Query
query simpleInventory($shopId: ID!, $productConfiguration: ProductConfigurationInput!){
simpleInventory(shopId: $shopId, productConfiguration: $productConfiguration){
canBackorder
inventoryInStock
inventoryReserved
isEnabled
lowInventoryWarningThreshold
}
}
Variables
{
"shopId": "string",
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
}
}
Try it now
query simpleInventory($shopId: ID!, $productConfiguration: ProductConfigurationInput!){
simpleInventory(shopId: $shopId, productConfiguration: $productConfiguration){
canBackorder
inventoryInStock
inventoryReserved
isEnabled
lowInventoryWarningThreshold
}
}
{
"shopId": "string",
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"simpleInventory": {
"canBackorder": "boolean",
"inventoryInStock": "integer",
"inventoryReserved": "integer",
"isEnabled": "boolean",
"lowInventoryWarningThreshold": "integer"
}
}
}
sitemap
Returns Sitemap object for a shop based on the handle param
The sitemap handle
Shop URL
Example
Request Content-Types:
application/json
Query
query sitemap($handle: String!, $shopUrl: String!){
sitemap(handle: $handle, shopUrl: $shopUrl){
createdAt
handle
shopId
xml
}
}
Variables
{
"handle": "string",
"shopUrl": "string"
}
Try it now
query sitemap($handle: String!, $shopUrl: String!){
sitemap(handle: $handle, shopUrl: $shopUrl){
createdAt
handle
shopId
xml
}
}
{
"handle": "string",
"shopUrl": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"sitemap": {
"handle": "string",
"shopId": "string",
"xml": "string"
}
}
}
surchargeById
Get a single surcharge definition by its ID
ID of shop that owns the surcharge definition
The surcharge ID
Example
Request Content-Types:
application/json
Query
query surchargeById($shopId: ID!, $surchargeId: ID!){
surchargeById(shopId: $shopId, surchargeId: $surchargeId){
_id
message(language: $language)
methodIds
shopId
type
}
}
Variables
{
"shopId": "string",
"surchargeId": "string"
}
Try it now
query surchargeById($shopId: ID!, $surchargeId: ID!){
surchargeById(shopId: $shopId, surchargeId: $surchargeId){
_id
message(language: $language)
methodIds
shopId
type
}
}
{
"shopId": "string",
"surchargeId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"surchargeById": {
"_id": "string",
"message": "string",
"methodIds": [
"string"
],
"shopId": "string"
}
}
}
surcharges
Get the full list of surcharges.
ID of shop to get surcharges for
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return results sorted in this order
By default, surcharges are sorted by when they were created, newest first. Set this to sort by one of the other allowed fields
Example
Request Content-Types:
application/json
Query
query surcharges($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: SurchargeSortByField){
surcharges(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
message(language: $language)
methodIds
shopId
type
}
}
nodes{
_id
message(language: $language)
methodIds
shopId
type
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Try it now
query surcharges($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $sortOrder: SortOrder, $sortBy: SurchargeSortByField){
surcharges(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, sortOrder: $sortOrder, sortBy: $sortBy){
edges{
cursor
node{
_id
message(language: $language)
methodIds
shopId
type
}
}
nodes{
_id
message(language: $language)
methodIds
shopId
type
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"sortOrder": "string",
"sortBy": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"surcharges": {
"edges": [
{
"node": {
"_id": "string",
"message": "string",
"methodIds": [
"string"
],
"shopId": "string"
}
}
],
"nodes": [
{
"_id": "string",
"message": "string",
"methodIds": [
"string"
],
"shopId": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
systemInformation
SystemInformation object
Shop ID to use for shop-specific system information
Example
Request Content-Types:
application/json
Query
query systemInformation($shopId: ID!){
systemInformation(shopId: $shopId){
apiVersion
}
}
Variables
{
"shopId": "string"
}
Try it now
query systemInformation($shopId: ID!){
systemInformation(shopId: $shopId){
apiVersion
}
}
{
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"systemInformation": {
"apiVersion": "string"
}
}
}
tag
Returns a tag from a provided tag ID or slug. Tags with isVisible set to false are excluded by default.
Slug or ID of Tag
The shop to which this tag belongs
Set to true if you want to include tags that have isVisible set to false
Example
Request Content-Types:
application/json
Query
query tag($slugOrId: String!, $shopId: ID!, $shouldIncludeInvisible: Boolean){
tag(slugOrId: $slugOrId, shopId: $shopId, shouldIncludeInvisible: $shouldIncludeInvisible){
_id
createdAt
displayTitle
featuredProductIds
heroMediaUrl
isDeleted
isTopLevel
isVisible
metafields{
description
key
namespace
scope
value
valueType
}
name
position
slug
subTagIds
updatedAt
}
}
Variables
{
"slugOrId": "string",
"shopId": "string",
"shouldIncludeInvisible": "boolean"
}
Try it now
query tag($slugOrId: String!, $shopId: ID!, $shouldIncludeInvisible: Boolean){
tag(slugOrId: $slugOrId, shopId: $shopId, shouldIncludeInvisible: $shouldIncludeInvisible){
_id
createdAt
displayTitle
featuredProductIds
heroMediaUrl
isDeleted
isTopLevel
isVisible
metafields{
description
key
namespace
scope
value
valueType
}
name
position
slug
subTagIds
updatedAt
}
}
{
"slugOrId": "string",
"shopId": "string",
"shouldIncludeInvisible": "boolean"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"tag": {
"_id": "string",
"displayTitle": "string",
"featuredProductIds": [
"string"
],
"heroMediaUrl": "string",
"isDeleted": "boolean",
"isTopLevel": "boolean",
"isVisible": "boolean",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"position": "integer",
"slug": "string",
"subTagIds": [
"string"
]
}
}
}
taxCodes
List all tax codes supported by the current active tax service for the shop
The shop to use for getting the list of active tax services
Example
Request Content-Types:
application/json
Query
query taxCodes($shopId: ID!){
taxCodes(shopId: $shopId)
}
Variables
{
"shopId": "string"
}
Try it now
query taxCodes($shopId: ID!){
taxCodes(shopId: $shopId)
}
{
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"taxCodes": [
{
"code": "string",
"label": "string"
}
]
}
}
taxRates
Gets tax rates
Provide a shp ID from which you want to get tax rates
Return only results that come after this cursor. Use this with first
to specify the number of results to return.
Return only results that come before this cursor. Use this with last
to specify the number of results to return.
Return at most this many results. This parameter may be used with either after
or offset
parameters.
Return at most this many results. This parameter may be used with the before
parameter.
Return only results that come after the Nth result. This parameter may be used with the first
parameter.
Example
Request Content-Types:
application/json
Query
query taxRates($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
taxRates(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
country
postal
rate
region
sourcing
taxCode
}
}
nodes{
_id
country
postal
rate
region
sourcing
taxCode
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
Variables
{
"shopId": "string",
"offset": "integer"
}
Try it now
query taxRates($shopId: ID!, $after: ConnectionCursor, $before: ConnectionCursor, $first: ConnectionLimitInt, $last: ConnectionLimitInt, $offset: Int){
taxRates(shopId: $shopId, after: $after, before: $before, first: $first, last: $last, offset: $offset){
edges{
cursor
node{
_id
country
postal
rate
region
sourcing
taxCode
}
}
nodes{
_id
country
postal
rate
region
sourcing
taxCode
}
pageInfo{
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}
{
"shopId": "string",
"offset": "integer"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"taxRates": {
"edges": [
{
"node": {
"_id": "string",
"country": "string",
"postal": "string",
"rate": "number",
"region": "string",
"taxCode": "string"
}
}
],
"nodes": [
{
"_id": "string",
"country": "string",
"postal": "string",
"rate": "number",
"region": "string",
"taxCode": "string"
}
],
"pageInfo": {
"hasNextPage": "boolean",
"hasPreviousPage": "boolean"
},
"totalCount": "integer"
}
}
}
taxServices
Get a full list of all tax services for the shop
The shop to use for getting the list of all tax services
Example
Request Content-Types:
application/json
Query
query taxServices($shopId: ID!){
taxServices(shopId: $shopId)
}
Variables
{
"shopId": "string"
}
Try it now
query taxServices($shopId: ID!){
taxServices(shopId: $shopId)
}
{
"shopId": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"taxServices": [
{
"displayName": "string",
"name": "string",
"pluginName": "string"
}
]
}
}
viewer
Returns the account for the authenticated user
Example
Request Content-Types:
application/json
Query
query viewer{
viewer{
_id
bio
createdAt
firstName
language
lastName
metafields{
description
key
namespace
scope
value
valueType
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
}
Try it now
query viewer{
viewer{
_id
bio
createdAt
firstName
language
lastName
metafields{
description
key
namespace
scope
value
valueType
}
name
note
picture
preferences
primaryEmailAddress
updatedAt
userId
username
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"viewer": {
"_id": "string",
"bio": "string",
"firstName": "string",
"language": "string",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"note": "string",
"picture": "string",
"userId": "string",
"username": "string"
}
}
}
Mutations
Mutations have side effects, such as mutating data or triggering a task
addAccountAddressBookEntry
Add a new address to the addressBook
field for an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation addAccountAddressBookEntry($input: AddAccountAddressBookEntryInput!){
addAccountAddressBookEntry(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"address": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
},
"clientMutationId": "string"
}
}
Try it now
mutation addAccountAddressBookEntry($input: AddAccountAddressBookEntryInput!){
addAccountAddressBookEntry(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"address": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
},
"clientMutationId": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addAccountAddressBookEntry": {
"clientMutationId": "string"
}
}
}
addAccountEmailRecord
Add an email address to an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation addAccountEmailRecord($input: AddAccountEmailRecordInput!){
addAccountEmailRecord(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"email": "object"
}
}
Try it now
mutation addAccountEmailRecord($input: AddAccountEmailRecordInput!){
addAccountEmailRecord(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"email": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addAccountEmailRecord": {
"clientMutationId": "string"
}
}
}
addAccountToGroup
Add an account to a group
Mutation input
Example
Request Content-Types:
application/json
Query
mutation addAccountToGroup($input: AddAccountToGroupInput!){
addAccountToGroup(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"groupId": "object"
}
}
Try it now
mutation addAccountToGroup($input: AddAccountToGroupInput!){
addAccountToGroup(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"groupId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addAccountToGroup": {
"clientMutationId": "string"
}
}
}
addCartItems
Add item(s) to a cart
Mutation input
Example
Request Content-Types:
application/json
Query
mutation addCartItems($input: AddCartItemsInput!){
addCartItems(input: $input){
clientMutationId
incorrectPriceFailures
minOrderQuantityFailures
}
}
Variables
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"items": [
{
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"price": {
"amount": "number",
"currencyCode": "string"
},
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
]
}
}
Try it now
mutation addCartItems($input: AddCartItemsInput!){
addCartItems(input: $input){
clientMutationId
incorrectPriceFailures
minOrderQuantityFailures
}
}
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"items": [
{
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"price": {
"amount": "number",
"currencyCode": "string"
},
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
]
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addCartItems": {
"clientMutationId": "string"
}
}
}
addOrderFulfillmentGroup
Use this mutation to add a new order fulfillment group to an order. It must have at least one item. Items may be provided or moved from another existing group or both.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation addOrderFulfillmentGroup($input: AddOrderFulfillmentGroupInput!){
addOrderFulfillmentGroup(input: $input){
clientMutationId
newFulfillmentGroupId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"fulfillmentGroup": {
"data": {
"shippingAddress": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
}
},
"items": [
{
"addedAt": "object",
"price": "number",
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
],
"selectedFulfillmentMethodId": "object",
"shopId": "object",
"totalPrice": "number",
"type": "string"
},
"moveItemIds": [
"object"
],
"orderId": "object"
}
}
Try it now
mutation addOrderFulfillmentGroup($input: AddOrderFulfillmentGroupInput!){
addOrderFulfillmentGroup(input: $input){
clientMutationId
newFulfillmentGroupId
}
}
{
"input": {
"clientMutationId": "string",
"fulfillmentGroup": {
"data": {
"shippingAddress": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
}
},
"items": [
{
"addedAt": "object",
"price": "number",
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
],
"selectedFulfillmentMethodId": "object",
"shopId": "object",
"totalPrice": "number",
"type": "string"
},
"moveItemIds": [
"object"
],
"orderId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addOrderFulfillmentGroup": {
"clientMutationId": "string",
"newFulfillmentGroupId": "string"
}
}
}
addTag
Adds a new tag
Mutation input
Example
Request Content-Types:
application/json
Query
mutation addTag($input: AddTagInput!){
addTag(input: $input){
clientMutationId
shopId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"displayTitle": "string",
"heroMediaUrl": "string",
"isVisible": "boolean",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"shopId": "object",
"slug": "string"
}
}
Try it now
mutation addTag($input: AddTagInput!){
addTag(input: $input){
clientMutationId
shopId
}
}
{
"input": {
"clientMutationId": "string",
"displayTitle": "string",
"heroMediaUrl": "string",
"isVisible": "boolean",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"name": "string",
"shopId": "object",
"slug": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"addTag": {
"clientMutationId": "string",
"shopId": "string"
}
}
}
applyDiscountCodeToCart
Apply a discount code to a cart
Mutation input
Example
Request Content-Types:
application/json
Query
mutation applyDiscountCodeToCart($input: ApplyDiscountCodeToCartInput!){
applyDiscountCodeToCart(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cartId": "object",
"discountCode": "string",
"shopId": "object",
"token": "string"
}
}
Try it now
mutation applyDiscountCodeToCart($input: ApplyDiscountCodeToCartInput!){
applyDiscountCodeToCart(input: $input){
clientMutationId
}
}
{
"input": {
"cartId": "object",
"discountCode": "string",
"shopId": "object",
"token": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"applyDiscountCodeToCart": {
"clientMutationId": "string"
}
}
}
approveOrderPayments
Approve one or more payments for an order
Mutation input
Example
Request Content-Types:
application/json
Query
mutation approveOrderPayments($input: ApproveOrderPaymentsInput!){
approveOrderPayments(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"orderId": "object",
"paymentIds": [
"object"
],
"shopId": "object"
}
}
Try it now
mutation approveOrderPayments($input: ApproveOrderPaymentsInput!){
approveOrderPayments(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"orderId": "object",
"paymentIds": [
"object"
],
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"approveOrderPayments": {
"clientMutationId": "string"
}
}
}
archiveMediaRecord
Archive a MediaRecord to hide it without deleting the backing file data
Mutation input
Example
Request Content-Types:
application/json
Query
mutation archiveMediaRecord($input: ArchiveMediaRecordInput!){
archiveMediaRecord(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"mediaRecordId": "object",
"shopId": "object"
}
}
Try it now
mutation archiveMediaRecord($input: ArchiveMediaRecordInput!){
archiveMediaRecord(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"mediaRecordId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"archiveMediaRecord": {
"clientMutationId": "string"
}
}
}
archiveProducts
Archive products
Mutation input
Example
Request Content-Types:
application/json
Query
mutation archiveProducts($input: ArchiveProductsInput!){
archiveProducts(input: $input){
clientMutationId
products
}
}
Variables
{
"input": {
"productIds": [
"object"
],
"shopId": "object"
}
}
Try it now
mutation archiveProducts($input: ArchiveProductsInput!){
archiveProducts(input: $input){
clientMutationId
products
}
}
{
"input": {
"productIds": [
"object"
],
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"archiveProducts": {
"clientMutationId": "string"
}
}
}
archiveProductVariants
Archive product variants
Mutation input
Example
Request Content-Types:
application/json
Query
mutation archiveProductVariants($input: ArchiveProductVariantsInput!){
archiveProductVariants(input: $input){
clientMutationId
variants
}
}
Variables
{
"input": {
"shopId": "object",
"variantIds": [
"object"
]
}
}
Try it now
mutation archiveProductVariants($input: ArchiveProductVariantsInput!){
archiveProductVariants(input: $input){
clientMutationId
variants
}
}
{
"input": {
"shopId": "object",
"variantIds": [
"object"
]
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"archiveProductVariants": {
"clientMutationId": "string"
}
}
}
cancelOrderItem
Use this mutation to cancel one item of an order, either for the full ordered quantity or for a partial quantity. If partial, the item will be split into two items and the original item will have a lower quantity and will be canceled.
If this results in all items in a fulfillment group being canceled, the group will also be canceled. If this results in all fulfillment groups being canceled, the full order will also be canceled.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation cancelOrderItem($input: CancelOrderItemInput!){
cancelOrderItem(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cancelQuantity": "integer",
"clientMutationId": "string",
"itemId": "object",
"orderId": "object",
"reason": "string"
}
}
Try it now
mutation cancelOrderItem($input: CancelOrderItemInput!){
cancelOrderItem(input: $input){
clientMutationId
}
}
{
"input": {
"cancelQuantity": "integer",
"clientMutationId": "string",
"itemId": "object",
"orderId": "object",
"reason": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"cancelOrderItem": {
"clientMutationId": "string"
}
}
}
captureOrderPayments
Capture one or more payments for an order
Mutation input
Example
Request Content-Types:
application/json
Query
mutation captureOrderPayments($input: CaptureOrderPaymentsInput!){
captureOrderPayments(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"orderId": "object",
"paymentIds": [
"object"
],
"shopId": "object"
}
}
Try it now
mutation captureOrderPayments($input: CaptureOrderPaymentsInput!){
captureOrderPayments(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"orderId": "object",
"paymentIds": [
"object"
],
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"captureOrderPayments": {
"clientMutationId": "string"
}
}
}
cloneProducts
Clone an existing product
Mutation input
Example
Request Content-Types:
application/json
Query
mutation cloneProducts($input: CloneProductsInput!){
cloneProducts(input: $input){
clientMutationId
products
}
}
Variables
{
"input": {
"productIds": [
"object"
],
"shopId": "object"
}
}
Try it now
mutation cloneProducts($input: CloneProductsInput!){
cloneProducts(input: $input){
clientMutationId
products
}
}
{
"input": {
"productIds": [
"object"
],
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"cloneProducts": {
"clientMutationId": "string"
}
}
}
cloneProductVariants
Clone an existing product variant
Mutation input
Example
Request Content-Types:
application/json
Query
mutation cloneProductVariants($input: CloneProductVariantsInput!){
cloneProductVariants(input: $input){
clientMutationId
variants
}
}
Variables
{
"input": {
"shopId": "object",
"variantIds": [
"object"
]
}
}
Try it now
mutation cloneProductVariants($input: CloneProductVariantsInput!){
cloneProductVariants(input: $input){
clientMutationId
variants
}
}
{
"input": {
"shopId": "object",
"variantIds": [
"object"
]
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"cloneProductVariants": {
"clientMutationId": "string"
}
}
}
createAccount
Create an account based off a user
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createAccount($input: CreateAccountInput!){
createAccount(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"bio": "string",
"emails": [
{
"address": "object",
"provides": "string",
"verified": "boolean"
}
],
"name": "string",
"picture": "string",
"shopId": "object",
"userId": "object",
"username": "string"
}
}
Try it now
mutation createAccount($input: CreateAccountInput!){
createAccount(input: $input){
clientMutationId
}
}
{
"input": {
"bio": "string",
"emails": [
{
"address": "object",
"provides": "string",
"verified": "boolean"
}
],
"name": "string",
"picture": "string",
"shopId": "object",
"userId": "object",
"username": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createAccount": {
"clientMutationId": "string"
}
}
}
createAccountGroup
Create a new account group. These are usually used for account group permissions
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createAccountGroup($input: CreateAccountGroupInput!){
createAccountGroup(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"group": {
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
},
"shopId": "object"
}
}
Try it now
mutation createAccountGroup($input: CreateAccountGroupInput!){
createAccountGroup(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"group": {
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
},
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createAccountGroup": {
"clientMutationId": "string"
}
}
}
createAddressValidationRule
Create an address validation rule
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createAddressValidationRule($input: CreateAddressValidationRuleInput!){
createAddressValidationRule(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"countryCodes": [
"string"
],
"serviceName": "string",
"shopId": "object"
}
}
Try it now
mutation createAddressValidationRule($input: CreateAddressValidationRuleInput!){
createAddressValidationRule(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"countryCodes": [
"string"
],
"serviceName": "string",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createAddressValidationRule": {
"clientMutationId": "string"
}
}
}
createCart
Create a new cart
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createCart($input: CreateCartInput!){
createCart(input: $input){
clientMutationId
incorrectPriceFailures
minOrderQuantityFailures
token
}
}
Variables
{
"input": {
"clientMutationId": "string",
"items": [
{
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"price": {
"amount": "number",
"currencyCode": "string"
},
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
],
"shopId": "object"
}
}
Try it now
mutation createCart($input: CreateCartInput!){
createCart(input: $input){
clientMutationId
incorrectPriceFailures
minOrderQuantityFailures
token
}
}
{
"input": {
"clientMutationId": "string",
"items": [
{
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"price": {
"amount": "number",
"currencyCode": "string"
},
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
],
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createCart": {
"clientMutationId": "string",
"token": "string"
}
}
}
createDiscountCode
Create a new discount code
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createDiscountCode($input: CreateDiscountCodeInput!){
createDiscountCode(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"discountCode": {
"calculation": {
"method": "string"
},
"code": "string",
"conditions": {
"accountLimit": "integer",
"audience": [
"string"
],
"enabled": "boolean",
"order": {
"endDate": "object",
"max": "number",
"min": "number",
"startDate": "object"
},
"permissions": [
"string"
],
"products": [
"string"
],
"redemptionLimit": "integer",
"tags": [
"string"
]
},
"description": "string",
"discount": "string",
"discountMethod": "string",
"label": "string",
"transactions": [
{
"appliedAt": "object",
"cartId": "string",
"userId": "string"
}
]
},
"shopId": "object"
}
}
Try it now
mutation createDiscountCode($input: CreateDiscountCodeInput!){
createDiscountCode(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"discountCode": {
"calculation": {
"method": "string"
},
"code": "string",
"conditions": {
"accountLimit": "integer",
"audience": [
"string"
],
"enabled": "boolean",
"order": {
"endDate": "object",
"max": "number",
"min": "number",
"startDate": "object"
},
"permissions": [
"string"
],
"products": [
"string"
],
"redemptionLimit": "integer",
"tags": [
"string"
]
},
"description": "string",
"discount": "string",
"discountMethod": "string",
"label": "string",
"transactions": [
{
"appliedAt": "object",
"cartId": "string",
"userId": "string"
}
]
},
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createDiscountCode": {
"clientMutationId": "string"
}
}
}
createFlatRateFulfillmentMethod
Create a flat rate fulfillment method
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createFlatRateFulfillmentMethod($input: CreateFlatRateFulfillmentMethodInput!){
createFlatRateFulfillmentMethod(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"method": {
"cost": "number",
"fulfillmentTypes": [
"string"
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
},
"shopId": "object"
}
}
Try it now
mutation createFlatRateFulfillmentMethod($input: CreateFlatRateFulfillmentMethodInput!){
createFlatRateFulfillmentMethod(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"method": {
"cost": "number",
"fulfillmentTypes": [
"string"
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
},
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createFlatRateFulfillmentMethod": {
"clientMutationId": "string"
}
}
}
createFlatRateFulfillmentRestriction
Create a flat rate fulfillment method restriction.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createFlatRateFulfillmentRestriction($input: CreateFlatRateFulfillmentRestrictionInput!){
createFlatRateFulfillmentRestriction(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"restriction": {
"attributes": [
{
"operator": "string",
"property": "string",
"propertyType": "string",
"value": "string"
}
],
"destination": {
"country": [
"string"
],
"postal": [
"string"
],
"region": [
"string"
]
},
"methodIds": [
"object"
],
"type": "string"
},
"shopId": "object"
}
}
Try it now
mutation createFlatRateFulfillmentRestriction($input: CreateFlatRateFulfillmentRestrictionInput!){
createFlatRateFulfillmentRestriction(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"restriction": {
"attributes": [
{
"operator": "string",
"property": "string",
"propertyType": "string",
"value": "string"
}
],
"destination": {
"country": [
"string"
],
"postal": [
"string"
],
"region": [
"string"
]
},
"methodIds": [
"object"
],
"type": "string"
},
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createFlatRateFulfillmentRestriction": {
"clientMutationId": "string"
}
}
}
createMediaRecord
Create the MediaRecord for file data after you upload it
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createMediaRecord($input: CreateMediaRecordInput!){
createMediaRecord(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"mediaRecord": {
"metadata": {
"priority": "integer",
"productId": "object",
"type": "string",
"variantId": "object"
},
"original": {
"name": "string",
"size": "integer",
"tempStoreId": "string",
"type": "string",
"updatedAt": "object",
"uploadedAt": "object"
}
},
"shopId": "object"
}
}
Try it now
mutation createMediaRecord($input: CreateMediaRecordInput!){
createMediaRecord(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"mediaRecord": {
"metadata": {
"priority": "integer",
"productId": "object",
"type": "string",
"variantId": "object"
},
"original": {
"name": "string",
"size": "integer",
"tempStoreId": "string",
"type": "string",
"updatedAt": "object",
"uploadedAt": "object"
}
},
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createMediaRecord": {
"clientMutationId": "string"
}
}
}
createProduct
Create a new product
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createProduct($input: CreateProductInput!){
createProduct(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"shopId": "object"
}
}
Try it now
mutation createProduct($input: CreateProductInput!){
createProduct(input: $input){
clientMutationId
}
}
{
"input": {
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createProduct": {
"clientMutationId": "string"
}
}
}
createProductVariant
Create a new product variant
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createProductVariant($input: CreateProductVariantInput!){
createProductVariant(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"productId": "object",
"shopId": "object"
}
}
Try it now
mutation createProductVariant($input: CreateProductVariantInput!){
createProductVariant(input: $input){
clientMutationId
}
}
{
"input": {
"productId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createProductVariant": {
"clientMutationId": "string"
}
}
}
createRefund
Use this mutation to create a refund on a payment method used to make the order
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createRefund($input: CreateRefundInput!){
createRefund(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"amount": "number",
"orderId": "object",
"paymentId": "object",
"reason": "string"
}
}
Try it now
mutation createRefund($input: CreateRefundInput!){
createRefund(input: $input){
clientMutationId
}
}
{
"input": {
"amount": "number",
"orderId": "object",
"paymentId": "object",
"reason": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createRefund": {
"clientMutationId": "string"
}
}
}
createShop
Create a new shop
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createShop($input: CreateShopInput!){
createShop(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"currencyCode": "string",
"defaultLanguage": "string",
"defaultTimezone": "string",
"description": "string",
"name": "string",
"type": "string"
}
}
Try it now
mutation createShop($input: CreateShopInput!){
createShop(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"currencyCode": "string",
"defaultLanguage": "string",
"defaultTimezone": "string",
"description": "string",
"name": "string",
"type": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createShop": {
"clientMutationId": "string"
}
}
}
createSurcharge
Create a surcharge
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createSurcharge($input: CreateSurchargeInput!){
createSurcharge(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"shopId": "object",
"surcharge": {
"amount": "number",
"attributes": [
{
"operator": "string",
"property": "string",
"propertyType": "string",
"value": "string"
}
],
"destination": {
"country": [
"string"
],
"postal": [
"string"
],
"region": [
"string"
]
},
"messagesByLanguage": [
{
"content": "string",
"language": "string"
}
],
"methodIds": [
"object"
],
"type": "string"
}
}
}
Try it now
mutation createSurcharge($input: CreateSurchargeInput!){
createSurcharge(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"shopId": "object",
"surcharge": {
"amount": "number",
"attributes": [
{
"operator": "string",
"property": "string",
"propertyType": "string",
"value": "string"
}
],
"destination": {
"country": [
"string"
],
"postal": [
"string"
],
"region": [
"string"
]
},
"messagesByLanguage": [
{
"content": "string",
"language": "string"
}
],
"methodIds": [
"object"
],
"type": "string"
}
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createSurcharge": {
"clientMutationId": "string"
}
}
}
createTaxRate
Create a new tax rate
Mutation input
Example
Request Content-Types:
application/json
Query
mutation createTaxRate($input: CreateTaxRateInput!){
createTaxRate(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"country": "string",
"postal": "string",
"rate": "number",
"region": "string",
"shopId": "object",
"sourcing": "string",
"taxCode": "string"
}
}
Try it now
mutation createTaxRate($input: CreateTaxRateInput!){
createTaxRate(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"country": "string",
"postal": "string",
"rate": "number",
"region": "string",
"shopId": "object",
"sourcing": "string",
"taxCode": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"createTaxRate": {
"clientMutationId": "string"
}
}
}
deleteAddressValidationRule
Delete an address validation rule
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteAddressValidationRule($input: DeleteAddressValidationRuleInput!){
deleteAddressValidationRule(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"ruleId": "object",
"shopId": "object"
}
}
Try it now
mutation deleteAddressValidationRule($input: DeleteAddressValidationRuleInput!){
deleteAddressValidationRule(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"ruleId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteAddressValidationRule": {
"clientMutationId": "string"
}
}
}
deleteDiscountCode
Delete a discount code
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteDiscountCode($input: DeleteDiscountCodeInput!){
deleteDiscountCode(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"discountCodeId": "object",
"shopId": "object"
}
}
Try it now
mutation deleteDiscountCode($input: DeleteDiscountCodeInput!){
deleteDiscountCode(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"discountCodeId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteDiscountCode": {
"clientMutationId": "string"
}
}
}
deleteFlatRateFulfillmentMethod
Delete a flat rate fulfillment method
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteFlatRateFulfillmentMethod($input: DeleteFlatRateFulfillmentMethodInput!){
deleteFlatRateFulfillmentMethod(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"methodId": "object",
"shopId": "object"
}
}
Try it now
mutation deleteFlatRateFulfillmentMethod($input: DeleteFlatRateFulfillmentMethodInput!){
deleteFlatRateFulfillmentMethod(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"methodId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteFlatRateFulfillmentMethod": {
"clientMutationId": "string"
}
}
}
deleteFlatRateFulfillmentRestriction
Delete a flat rate fulfillment method restriction
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteFlatRateFulfillmentRestriction($input: DeleteFlatRateFulfillmentRestrictionInput!){
deleteFlatRateFulfillmentRestriction(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"restrictionId": "object",
"shopId": "object"
}
}
Try it now
mutation deleteFlatRateFulfillmentRestriction($input: DeleteFlatRateFulfillmentRestrictionInput!){
deleteFlatRateFulfillmentRestriction(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"restrictionId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteFlatRateFulfillmentRestriction": {
"clientMutationId": "string"
}
}
}
deleteMediaRecord
Delete a MediaRecord to delete both the record and the backing file data
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteMediaRecord($input: DeleteMediaRecordInput!){
deleteMediaRecord(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"mediaRecordId": "object",
"shopId": "object"
}
}
Try it now
mutation deleteMediaRecord($input: DeleteMediaRecordInput!){
deleteMediaRecord(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"mediaRecordId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteMediaRecord": {
"clientMutationId": "string"
}
}
}
deleteSurcharge
Delete a flat rate fulfillment restriction
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteSurcharge($input: DeleteSurchargeInput!){
deleteSurcharge(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"shopId": "object",
"surchargeId": "object"
}
}
Try it now
mutation deleteSurcharge($input: DeleteSurchargeInput!){
deleteSurcharge(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"shopId": "object",
"surchargeId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteSurcharge": {
"clientMutationId": "string"
}
}
}
deleteTaxRate
Delete a tax rate
Mutation input
Example
Request Content-Types:
application/json
Query
mutation deleteTaxRate($input: DeleteTaxRateInput!){
deleteTaxRate(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"shopId": "object",
"taxRateId": "object"
}
}
Try it now
mutation deleteTaxRate($input: DeleteTaxRateInput!){
deleteTaxRate(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"shopId": "object",
"taxRateId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"deleteTaxRate": {
"clientMutationId": "string"
}
}
}
echo
A test mutation that returns whatever string you send it
Any string
Example
Request Content-Types:
application/json
Query
mutation echo($str: String){
echo(str: $str)
}
Variables
{
"str": "string"
}
Try it now
mutation echo($str: String){
echo(str: $str)
}
{
"str": "string"
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"echo": "string"
}
}
enablePaymentMethodForShop
Enable a payment method for a shop
Mutation input
Example
Request Content-Types:
application/json
Query
mutation enablePaymentMethodForShop($input: EnablePaymentMethodForShopInput!){
enablePaymentMethodForShop(input: $input){
clientMutationId
paymentMethods
}
}
Variables
{
"input": {
"clientMutationId": "string",
"isEnabled": "boolean",
"paymentMethodName": "string",
"shopId": "object"
}
}
Try it now
mutation enablePaymentMethodForShop($input: EnablePaymentMethodForShopInput!){
enablePaymentMethodForShop(input: $input){
clientMutationId
paymentMethods
}
}
{
"input": {
"clientMutationId": "string",
"isEnabled": "boolean",
"paymentMethodName": "string",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"enablePaymentMethodForShop": {
"clientMutationId": "string"
}
}
}
generateSitemaps
Generate sitemap documents
Mutation input
Example
Request Content-Types:
application/json
Query
mutation generateSitemaps($input: GenerateSitemapsInput){
generateSitemaps(input: $input){
clientMutationId
wasJobScheduled
}
}
Variables
{
"input": {
"clientMutationId": "string",
"shopId": "object"
}
}
Try it now
mutation generateSitemaps($input: GenerateSitemapsInput){
generateSitemaps(input: $input){
clientMutationId
wasJobScheduled
}
}
{
"input": {
"clientMutationId": "string",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"generateSitemaps": {
"clientMutationId": "string",
"wasJobScheduled": "boolean"
}
}
}
inviteShopMember
Given a person's email address and name, invite them to create an account for a certain shop, and put them in the provided permission group
Mutation input
Example
Request Content-Types:
application/json
Query
mutation inviteShopMember($input: InviteShopMemberInput!){
inviteShopMember(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"email": "string",
"groupId": "object",
"name": "string",
"shopId": "object"
}
}
Try it now
mutation inviteShopMember($input: InviteShopMemberInput!){
inviteShopMember(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"email": "string",
"groupId": "object",
"name": "string",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"inviteShopMember": {
"clientMutationId": "string"
}
}
}
moveOrderItems
Use this mutation to move one or more items between existing order fulfillment groups.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation moveOrderItems($input: MoveOrderItemsInput!){
moveOrderItems(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"fromFulfillmentGroupId": "object",
"itemIds": [
"object"
],
"orderId": "object",
"toFulfillmentGroupId": "object"
}
}
Try it now
mutation moveOrderItems($input: MoveOrderItemsInput!){
moveOrderItems(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"fromFulfillmentGroupId": "object",
"itemIds": [
"object"
],
"orderId": "object",
"toFulfillmentGroupId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"moveOrderItems": {
"clientMutationId": "string"
}
}
}
placeOrder
Use this mutation to place an order, providing information necessary to pay for it. The order will be placed only if authorization is successful for all submitted payments.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation placeOrder($input: PlaceOrderInput!){
placeOrder(input: $input){
clientMutationId
orders
token
}
}
Variables
{
"input": {
"clientMutationId": "string",
"order": {
"cartId": "string",
"currencyCode": "string",
"email": "string",
"fulfillmentGroups": [
{
"data": {
"shippingAddress": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
}
},
"items": [
{
"addedAt": "object",
"price": "number",
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
],
"selectedFulfillmentMethodId": "object",
"shopId": "object",
"totalPrice": "number",
"type": "string"
}
],
"shopId": "string"
},
"payments": [
{
"amount": "number",
"billingAddress": {
"address1": "string"
}
}
]
}
}
Try it now
mutation placeOrder($input: PlaceOrderInput!){
placeOrder(input: $input){
clientMutationId
orders
token
}
}
{
"input": {
"clientMutationId": "string",
"order": {
"cartId": "string",
"currencyCode": "string",
"email": "string",
"fulfillmentGroups": [
{
"data": {
"shippingAddress": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
}
},
"items": [
{
"addedAt": "object",
"price": "number",
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"quantity": "integer"
}
],
"selectedFulfillmentMethodId": "object",
"shopId": "object",
"totalPrice": "number",
"type": "string"
}
],
"shopId": "string"
},
"payments": [
{
"amount": "number",
"billingAddress": {
"address1": "string"
}
}
]
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"placeOrder": {
"clientMutationId": "string",
"token": "string"
}
}
}
publishProductsToCatalog
Publish products to the Catalog collection by product ID
Array of Product ID
Example
Request Content-Types:
application/json
Query
mutation publishProductsToCatalog($productIds: [ID]!){
publishProductsToCatalog(productIds: $productIds){
_id
createdAt
updatedAt
}
}
Variables
{
"productIds": [
"string"
]
}
Try it now
mutation publishProductsToCatalog($productIds: [ID]!){
publishProductsToCatalog(productIds: $productIds){
_id
createdAt
updatedAt
}
}
{
"productIds": [
"string"
]
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"publishProductsToCatalog": [
{
"_id": "string"
}
]
}
}
recalculateReservedSimpleInventory
Force recalculation of the system-managed inventoryReserved
field based on current order statuses
Mutation input
Example
Request Content-Types:
application/json
Query
mutation recalculateReservedSimpleInventory($input: RecalculateReservedSimpleInventoryInput!){
recalculateReservedSimpleInventory(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"shopId": "object"
}
}
Try it now
mutation recalculateReservedSimpleInventory($input: RecalculateReservedSimpleInventoryInput!){
recalculateReservedSimpleInventory(input: $input){
clientMutationId
}
}
{
"input": {
"productConfiguration": {
"productId": "object",
"productVariantId": "object"
},
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"recalculateReservedSimpleInventory": {
"clientMutationId": "string"
}
}
}
reconcileCarts
Reconcile an anonymous cart with the current account cart for the same shop
Mutation input
Example
Request Content-Types:
application/json
Query
mutation reconcileCarts($input: ReconcileCartsInput!){
reconcileCarts(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"anonymousCartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"mode": "string",
"shopId": "object"
}
}
Try it now
mutation reconcileCarts($input: ReconcileCartsInput!){
reconcileCarts(input: $input){
clientMutationId
}
}
{
"input": {
"anonymousCartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"mode": "string",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"reconcileCarts": {
"clientMutationId": "string"
}
}
}
removeAccountAddressBookEntry
Remove an address from the addressBook
field for an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeAccountAddressBookEntry($input: RemoveAccountAddressBookEntryInput!){
removeAccountAddressBookEntry(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"addressId": "object",
"clientMutationId": "string"
}
}
Try it now
mutation removeAccountAddressBookEntry($input: RemoveAccountAddressBookEntryInput!){
removeAccountAddressBookEntry(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"addressId": "object",
"clientMutationId": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeAccountAddressBookEntry": {
"clientMutationId": "string"
}
}
}
removeAccountEmailRecord
Remove an email address from an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeAccountEmailRecord($input: RemoveAccountEmailRecordInput!){
removeAccountEmailRecord(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"email": "object"
}
}
Try it now
mutation removeAccountEmailRecord($input: RemoveAccountEmailRecordInput!){
removeAccountEmailRecord(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"email": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeAccountEmailRecord": {
"clientMutationId": "string"
}
}
}
removeAccountFromGroup
Remove an account from a group
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeAccountFromGroup($input: RemoveAccountFromGroupInput!){
removeAccountFromGroup(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"groupId": "object"
}
}
Try it now
mutation removeAccountFromGroup($input: RemoveAccountFromGroupInput!){
removeAccountFromGroup(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"groupId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeAccountFromGroup": {
"clientMutationId": "string"
}
}
}
removeAccountGroup
Remove an existing permission group
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeAccountGroup($input: RemoveAccountGroupInput!){
removeAccountGroup(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"groupId": "object",
"shopId": "object"
}
}
Try it now
mutation removeAccountGroup($input: RemoveAccountGroupInput!){
removeAccountGroup(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"groupId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeAccountGroup": {
"clientMutationId": "string"
}
}
}
removeCartItems
Remove item(s) from a cart
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeCartItems($input: RemoveCartItemsInput!){
removeCartItems(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cartId": "object",
"cartItemIds": [
"object"
],
"cartToken": "string",
"clientMutationId": "string"
}
}
Try it now
mutation removeCartItems($input: RemoveCartItemsInput!){
removeCartItems(input: $input){
clientMutationId
}
}
{
"input": {
"cartId": "object",
"cartItemIds": [
"object"
],
"cartToken": "string",
"clientMutationId": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeCartItems": {
"clientMutationId": "string"
}
}
}
removeDiscountCodeFromCart
Remove a discount code from a cart
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeDiscountCodeFromCart($input: RemoveDiscountCodeFromCartInput!){
removeDiscountCodeFromCart(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cartId": "object",
"discountId": "object",
"shopId": "object",
"token": "string"
}
}
Try it now
mutation removeDiscountCodeFromCart($input: RemoveDiscountCodeFromCartInput!){
removeDiscountCodeFromCart(input: $input){
clientMutationId
}
}
{
"input": {
"cartId": "object",
"discountId": "object",
"shopId": "object",
"token": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeDiscountCodeFromCart": {
"clientMutationId": "string"
}
}
}
removeTag
Removes an existing tag
Mutation input
Example
Request Content-Types:
application/json
Query
mutation removeTag($input: RemoveTagInput!){
removeTag(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"id": "object",
"shopId": "object"
}
}
Try it now
mutation removeTag($input: RemoveTagInput!){
removeTag(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"id": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"removeTag": {
"clientMutationId": "string"
}
}
}
retryFailedEmail
Retry a failed or cancelled email job
Mutation input
Example
Request Content-Types:
application/json
Query
mutation retryFailedEmail($input: RetryFailedEmailInput!){
retryFailedEmail(input: $input){
clientMutationId
emailSent
}
}
Variables
{
"input": {
"clientMutationId": "string",
"jobId": "object",
"shopId": "object"
}
}
Try it now
mutation retryFailedEmail($input: RetryFailedEmailInput!){
retryFailedEmail(input: $input){
clientMutationId
emailSent
}
}
{
"input": {
"clientMutationId": "string",
"jobId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"retryFailedEmail": {
"clientMutationId": "string",
"emailSent": "boolean"
}
}
}
selectFulfillmentOptionForGroup
Select a fulfillment option from the availableFulfillmentOptions
list for a fulfillment group
Mutation input
Example
Request Content-Types:
application/json
Query
mutation selectFulfillmentOptionForGroup($input: SelectFulfillmentOptionForGroupInput!){
selectFulfillmentOptionForGroup(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"fulfillmentGroupId": "object",
"fulfillmentMethodId": "object"
}
}
Try it now
mutation selectFulfillmentOptionForGroup($input: SelectFulfillmentOptionForGroupInput!){
selectFulfillmentOptionForGroup(input: $input){
clientMutationId
}
}
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"fulfillmentGroupId": "object",
"fulfillmentMethodId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"selectFulfillmentOptionForGroup": {
"clientMutationId": "string"
}
}
}
sendResetAccountPasswordEmail
Send a reset password email to an email address from an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation sendResetAccountPasswordEmail($input: SendResetAccountPasswordEmailInput!){
sendResetAccountPasswordEmail(input: $input){
clientMutationId
email
}
}
Variables
{
"input": {
"clientMutationId": "string",
"email": "string"
}
}
Try it now
mutation sendResetAccountPasswordEmail($input: SendResetAccountPasswordEmailInput!){
sendResetAccountPasswordEmail(input: $input){
clientMutationId
email
}
}
{
"input": {
"clientMutationId": "string",
"email": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"sendResetAccountPasswordEmail": {
"clientMutationId": "string",
"email": "string"
}
}
}
setAccountDefaultEmail
Set default email address for an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation setAccountDefaultEmail($input: SetAccountDefaultEmailInput!){
setAccountDefaultEmail(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"email": "object"
}
}
Try it now
mutation setAccountDefaultEmail($input: SetAccountDefaultEmailInput!){
setAccountDefaultEmail(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"clientMutationId": "string",
"email": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"setAccountDefaultEmail": {
"clientMutationId": "string"
}
}
}
setEmailOnAnonymousCart
Set the email address for an anonymous cart
Mutation input
Example
Request Content-Types:
application/json
Query
mutation setEmailOnAnonymousCart($input: SetEmailOnAnonymousCartInput!){
setEmailOnAnonymousCart(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"email": "string"
}
}
Try it now
mutation setEmailOnAnonymousCart($input: SetEmailOnAnonymousCartInput!){
setEmailOnAnonymousCart(input: $input){
clientMutationId
}
}
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"email": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"setEmailOnAnonymousCart": {
"clientMutationId": "string"
}
}
}
setShippingAddressOnCart
Set the shipping address for all fulfillment groups
Mutation input
Example
Request Content-Types:
application/json
Query
mutation setShippingAddressOnCart($input: SetShippingAddressOnCartInput!){
setShippingAddressOnCart(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"address": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
},
"addressId": "string",
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string"
}
}
Try it now
mutation setShippingAddressOnCart($input: SetShippingAddressOnCartInput!){
setShippingAddressOnCart(input: $input){
clientMutationId
}
}
{
"input": {
"address": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
},
"addressId": "string",
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"setShippingAddressOnCart": {
"clientMutationId": "string"
}
}
}
setTagHeroMedia
Add an image to the tag
Mutation input
Example
Request Content-Types:
application/json
Query
mutation setTagHeroMedia($input: SetTagHeroMediaInput!){
setTagHeroMedia(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"fileRecord": "object",
"id": "object",
"shopId": "object"
}
}
Try it now
mutation setTagHeroMedia($input: SetTagHeroMediaInput!){
setTagHeroMedia(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"fileRecord": "object",
"id": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"setTagHeroMedia": {
"clientMutationId": "string"
}
}
}
splitOrderItem
Use this mutation to reduce the quantity of one item of an order and create a new item for the remaining quantity in the same fulfillment group, and with the same item status. You may want to do this if you are only able to partially fulfill the item order right now.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation splitOrderItem($input: SplitOrderItemInput!){
splitOrderItem(input: $input){
clientMutationId
newItemId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"itemId": "object",
"newItemQuantity": "integer",
"orderId": "object"
}
}
Try it now
mutation splitOrderItem($input: SplitOrderItemInput!){
splitOrderItem(input: $input){
clientMutationId
newItemId
}
}
{
"input": {
"clientMutationId": "string",
"itemId": "object",
"newItemQuantity": "integer",
"orderId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"splitOrderItem": {
"clientMutationId": "string",
"newItemId": "string"
}
}
}
updateAccount
Update account fields
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateAccount($input: UpdateAccountInput!){
updateAccount(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"bio": "string",
"clientMutationId": "string",
"currencyCode": "string",
"firstName": "string",
"language": "string",
"lastName": "string",
"name": "string",
"note": "string",
"picture": "string",
"username": "string"
}
}
Try it now
mutation updateAccount($input: UpdateAccountInput!){
updateAccount(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"bio": "string",
"clientMutationId": "string",
"currencyCode": "string",
"firstName": "string",
"language": "string",
"lastName": "string",
"name": "string",
"note": "string",
"picture": "string",
"username": "string"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateAccount": {
"clientMutationId": "string"
}
}
}
updateAccountAddressBookEntry
Update an address that exists in the addressBook
field for an account
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateAccountAddressBookEntry($input: UpdateAccountAddressBookEntryInput!){
updateAccountAddressBookEntry(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"accountId": "object",
"addressId": "object",
"clientMutationId": "string",
"type": "string",
"updates": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
}
}
}
Try it now
mutation updateAccountAddressBookEntry($input: UpdateAccountAddressBookEntryInput!){
updateAccountAddressBookEntry(input: $input){
clientMutationId
}
}
{
"input": {
"accountId": "object",
"addressId": "object",
"clientMutationId": "string",
"type": "string",
"updates": {
"address1": "string",
"address2": "string",
"addressName": "string",
"city": "string",
"company": "string",
"country": "string",
"firstName": "string",
"fullName": "string",
"isBillingDefault": "boolean",
"isCommercial": "boolean",
"isShippingDefault": "boolean",
"lastName": "string",
"metafields": [
{
"description": "string",
"key": "string",
"namespace": "string",
"scope": "string",
"value": "string",
"valueType": "string"
}
],
"phone": "string",
"postal": "string",
"region": "string"
}
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateAccountAddressBookEntry": {
"clientMutationId": "string"
}
}
}
updateAccountGroup
Update an existing permission group
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateAccountGroup($input: UpdateAccountGroupInput!){
updateAccountGroup(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"group": {
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
},
"groupId": "object",
"shopId": "object"
}
}
Try it now
mutation updateAccountGroup($input: UpdateAccountGroupInput!){
updateAccountGroup(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"group": {
"description": "string",
"name": "string",
"permissions": [
"string"
],
"slug": "string"
},
"groupId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateAccountGroup": {
"clientMutationId": "string"
}
}
}
updateAddressValidationRule
Update an address validation rule
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateAddressValidationRule($input: UpdateAddressValidationRuleInput!){
updateAddressValidationRule(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"countryCodes": [
"string"
],
"ruleId": "object",
"serviceName": "string",
"shopId": "object"
}
}
Try it now
mutation updateAddressValidationRule($input: UpdateAddressValidationRuleInput!){
updateAddressValidationRule(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"countryCodes": [
"string"
],
"ruleId": "object",
"serviceName": "string",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateAddressValidationRule": {
"clientMutationId": "string"
}
}
}
updateCartItemsQuantity
Update cart item(s) quantity. Use absolute quantity. If updating to 0, the item will be removed.
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateCartItemsQuantity($input: UpdateCartItemsQuantityInput!){
updateCartItemsQuantity(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"items": [
{
"cartItemId": "object",
"quantity": "integer"
}
]
}
}
Try it now
mutation updateCartItemsQuantity($input: UpdateCartItemsQuantityInput!){
updateCartItemsQuantity(input: $input){
clientMutationId
}
}
{
"input": {
"cartId": "object",
"cartToken": "string",
"clientMutationId": "string",
"items": [
{
"cartItemId": "object",
"quantity": "integer"
}
]
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateCartItemsQuantity": {
"clientMutationId": "string"
}
}
}
updateDiscountCode
Update a discount code
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateDiscountCode($input: UpdateDiscountCodeInput!){
updateDiscountCode(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"discountCode": {
"calculation": {
"method": "string"
},
"code": "string",
"conditions": {
"accountLimit": "integer",
"audience": [
"string"
],
"enabled": "boolean",
"order": {
"endDate": "object",
"max": "number",
"min": "number",
"startDate": "object"
},
"permissions": [
"string"
],
"products": [
"string"
],
"redemptionLimit": "integer",
"tags": [
"string"
]
},
"description": "string",
"discount": "string",
"discountMethod": "string",
"label": "string",
"transactions": [
{
"appliedAt": "object",
"cartId": "string",
"userId": "string"
}
]
},
"discountCodeId": "object",
"shopId": "object"
}
}
Try it now
mutation updateDiscountCode($input: UpdateDiscountCodeInput!){
updateDiscountCode(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"discountCode": {
"calculation": {
"method": "string"
},
"code": "string",
"conditions": {
"accountLimit": "integer",
"audience": [
"string"
],
"enabled": "boolean",
"order": {
"endDate": "object",
"max": "number",
"min": "number",
"startDate": "object"
},
"permissions": [
"string"
],
"products": [
"string"
],
"redemptionLimit": "integer",
"tags": [
"string"
]
},
"description": "string",
"discount": "string",
"discountMethod": "string",
"label": "string",
"transactions": [
{
"appliedAt": "object",
"cartId": "string",
"userId": "string"
}
]
},
"discountCodeId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateDiscountCode": {
"clientMutationId": "string"
}
}
}
updateFlatRateFulfillmentMethod
Update a flat rate fulfillment method
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateFlatRateFulfillmentMethod($input: UpdateFlatRateFulfillmentMethodInput!){
updateFlatRateFulfillmentMethod(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"method": {
"cost": "number",
"fulfillmentTypes": [
"string"
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
},
"methodId": "object",
"shopId": "object"
}
}
Try it now
mutation updateFlatRateFulfillmentMethod($input: UpdateFlatRateFulfillmentMethodInput!){
updateFlatRateFulfillmentMethod(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"method": {
"cost": "number",
"fulfillmentTypes": [
"string"
],
"group": "string",
"handling": "number",
"isEnabled": "boolean",
"label": "string",
"name": "string",
"rate": "number"
},
"methodId": "object",
"shopId": "object"
}
}
Successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"data": {
"updateFlatRateFulfillmentMethod": {
"clientMutationId": "string"
}
}
}
updateFlatRateFulfillmentRestriction
Update a flat rate fulfillment method restriction
Mutation input
Example
Request Content-Types:
application/json
Query
mutation updateFlatRateFulfillmentRestriction($input: UpdateFlatRateFulfillmentRestrictionInput!){
updateFlatRateFulfillmentRestriction(input: $input){
clientMutationId
}
}
Variables
{
"input": {
"clientMutationId": "string",
"restriction": {
"attributes": [
{
"operator": "string",
"property": "string",
"propertyType": "string",
"value": "string"
}
],
"destination": {
"country": [
"string"
],
"postal": [
"string"
],
"region": [
"string"
]
},
"methodIds": [
"object"
],
"type": "string"
},
"restrictionId": "object",
"shopId": "object"
}
}
Try it now
mutation updateFlatRateFulfillmentRestriction($input: UpdateFlatRateFulfillmentRestrictionInput!){
updateFlatRateFulfillmentRestriction(input: $input){
clientMutationId
}
}
{
"input": {
"clientMutationId": "string",
"restriction": {
"attributes": [
{
"operator": "string",
"property": "string",
"propertyType": "string",
"value": "string"
}
],
"destination": {
"country": [
"string"
],
"postal": [
"string"
],
"region": [
"string"
]
},
"methodIds": [
"object"
],
"type": "string"
},
"restrictionId": "object",
"shopId": "object"
}
}
Successful operation