Portal/Instance Identifier:
ipaas-com-demo / Shopify
Version: 22.200.001
Base URLs
Staging/Production:
https://{Instance Identifier}/entity/Default/{Version}
NOTES: The The |
Table of Contents
Company Endpoints
Get a Company: (GET)
Mutation @"
query {
{
company(id: ""gid: //shopify/Company/{id}"")
{
{
id name note externalId metafields(first: 250)
{
{
nodes
{
{
id key namespace type value
}
}
}
totalSpent
{
{
amount currencyCode
}
}
contactsCount
{
{
count
}
}
createdAt customerSince defaultRole
{
{
id name note
}
}
hasTimelineComment lifetimeDuration updatedAt
}
}
}
}
Create a Company (POST)
Mutation @"
mutation CompanyCreate($input: CompanyCreateInput!) {
companyCreate(input: $input) {
company {
id name externalId mainContact {
id customer {
id email firstName lastName
}
}
contacts(first: 5) {
edges {
node {
id customer
{
email firstName lastName
}
}
}
} contactRoles(first: 5) {
edges {
node
{
id name
}
}
}
locations(first: 5)
{
edges
{
node
{
id name shippingAddress
{
firstName lastName address1 city province zip country
}
}
}
}
}
userErrors
{
field message code
}
}
}
Update a [Entity Name]: (POST)
@" mutation companyUpdate($companyId: ID!,
$input: CompanyInput!)
{ companyUpdate(companyId: $companyId, input: $input) { company { id name note
} userErrors { field message
}
}
}"
Product Endpoints
Get a Product: (POST)
@" mutation companyUpdate($companyId: ID!,
$input: CompanyInput!)
{ companyUpdate(companyId: $companyId, input: $input) { company { id name note
} userErrors { field message
}
}
}"
Create a Product: (POST)
$@" mutation {
{ productCreate(input: {
{
{
fieldsString
}
}
}) {
{ userErrors {
{
field message
}
} product {
{
id title descriptionHtml status options {
{
id name optionValues {{ id name }}
}
} vendor tags images(first: 5) {
{
nodes {{ url }}
}
} publishedAt templateSuffix handle productType variants(first: 250) {
{ edges {
{ node {
{
id displayName sku title position inventoryPolicy compareAtPrice updatedAt createdAt taxable barcode inventoryQuantity inventoryItem
{
{
id measurement {
{
weight {
{
unit value
}
}
}
} unitCost {
{
amountcurrencyCode
}
} requiresShipping
}
} selectedOptions {
{
name value
}
} image {
{
id
}
} contextualPricing(context: {
{country: US
}
}) {
{
price {
{
amount currencyCode
}
}
}
}
}}}}}}}}}}}}"
Update a Product: (POST)
$@" query
{
{
metafieldDefinitions({param})
{
{
edges {
{
node {
{
id name key namespace ownerType description type{
{ name}
}
}
} cursor
}}}}}} "
Product Options Endpoints
Create Product Options: (POST)
mutation {
productOptionsCreate(
productId: "gid://shopify/Product/{productId}",
options: {
name: "{option.Name}",
values: [
{ name: "{OptionValue1}" },
{ name: "{OptionValue2}" }
]
}
) {
userErrors {
field
message
code
}
product {
id
options {
id
name
values
position
optionValues {
id
name
hasVariants
}
}
variants(first: 5) {
nodes {
id
title
selectedOptions {
name
value
}
}
}
}
}
}
Update Product Options: (POST)
mutation {
productOptionUpdate(
productId: "gid://shopify/Product/{productId}",
option: {
id: "gid://shopify/ProductOption/{optionId}",
name: "{option.Name}"
},
optionValuesToUpdate: [
{ id: "gid://shopify/ProductOptionValue/{OptionValueId1}", name: "{OptionValueName1}" },
{ id: "gid://shopify/ProductOptionValue/{OptionValueId2}", name: "{OptionValueName2}" }
],
optionValuesToAdd: [
{ name: "{NewOptionValue1}" },
{ name: "{NewOptionValue2}" }
]
) {
userErrors {
field
message
code
}
product {
id
options {
id
name
values
position
optionValues {
id
name
hasVariants
}
}
variants(first: 5) {
nodes {
id
title
selectedOptions {
name
value
}
}
}
}
}
}
Product Variants Endpoints
Get a Variant: (POST)
query productVariant($variantId: ID!) {
productVariant(id: $variantId) {
id
image {
id
}
product {
id
}
title
sku
price
barcode
inventoryPolicy
inventoryQuantity
position
taxable
inventoryItem {
id
requiresShipping
tracked
inventoryLevels(first: 250) {
edges {
node {
id
location {
id
name
}
}
}
}
measurement {
weight {
unit
value
}
}
}
selectedOptions {
name
value
}
}
}
Create Variants: (POST)
Mutation work is based on the following strategies:
Strategy: DEFAULT/CREATE (creates variants).
Strategy: REMOVE_STANDALONE_VARIANT (Removes the standalone variant when creating new variants in bulk).
mutation {
productVariantsBulkCreate(
productId: "gid://shopify/Product/{ProductId}"
strategy: {Strategy}
variants: [
{
barcode: "{Barcode}"
compareAtPrice: {CompareAtPrice}
inventoryItem: {
id: "gid://shopify/InventoryItem/{InventoryItemId}"
sku: "{Sku}"
requiresShipping: true
tracked: true
cost: {Cost}
countryCodeOfOrigin: "{CountryCode}"
harmonizedSystemCode: "{HSC}"
measurement: {
weight: { unit: {WeightUnit}, value: {WeightValue} }
}
}
inventoryPolicy: {InventoryPolicy}
inventoryQuantities: [
{
availableQuantity: {AvailableQuantity}
locationId: "gid://shopify/Location/{LocationId}"
}
]
mediaId: "{MediaId}"
mediaSrc: ["{MediaSrc}"]
metafields: [
{
id: "gid://shopify/Metafield/{MetaId}"
namespace: "{Namespace}"
key: "{Key}"
type: "{Type}"
value: "{Value}"
}
]
optionValues: [
{ optionName: "{OptionName}", name: "{OptionValue}" }
]
price: {Price}
taxCode: "{TaxCode}"
taxable: {Taxable}
}
]
) {
productVariants {
id
title
}
userErrors {
field
message
}
}
}
Update Variants: (POST)
Mutation work is based on the following strategies:
Strategy: DEFAULT/CREATE (creates variants).
Strategy: REMOVE_STANDALONE_VARIANT (Removes the standalone variant when creating new variants in bulk).
mutation {
productVariantsBulkUpdate(
productId: "gid://shopify/Product/{ProductId}"
variants: [
{
id: "gid://shopify/ProductVariant/{VariantId}"
barcode: "{Barcode}"
compareAtPrice: {CompareAtPrice}
inventoryItem: {
id: "gid://shopify/InventoryItem/{InventoryItemId}"
sku: "{Sku}"
requiresShipping: true
tracked: true
cost: {Cost}
countryCodeOfOrigin: "{CountryCode}"
harmonizedSystemCode: "{HSC}"
measurement: {
weight: { unit: {WeightUnit}, value: {WeightValue} }
}
}
inventoryPolicy: {InventoryPolicy}
inventoryQuantities: [
{
availableQuantity: {AvailableQuantity}
locationId: "gid://shopify/Location/{LocationId}"
}
]
mediaId: "{MediaId}"
mediaSrc: ["{MediaSrc}"]
metafields: [
{
id: "gid://shopify/Metafield/{MetaId}"
namespace: "{Namespace}"
key: "{Key}"
type: "{Type}"
value: "{Value}"
}
]
optionValues: [
{ optionName: "{OptionName}", name: "{OptionValue}" }
]
price: {Price}
taxCode: "{TaxCode}"
taxable: {Taxable}
}
]
) {
productVariants {
id
title
}
userErrors {
field
message
}
}
}
Customer Endpoints
Get a Customer: (POST)
{
customer(id: "gid://shopify/Customer/{id}") {
id
firstName
lastName
displayName
phone
numberOfOrders
amountSpent {
amount
currencyCode
}
createdAt
updatedAt
note
verifiedEmail
validEmailAddress
tags
metafields(first: 250) {
nodes {
id
value
namespace
key
}
}
lifetimeDuration
defaultAddress {
formattedArea
address1
}
addresses {
id
address1
address2
city
company
country
provinceCode
zip
phone
firstName
lastName
}
image {
src
}
canDelete
}
}
Create a Customer: (POST)
@" mutation customerCreate($input: CustomerInput!) {
customerCreate(input: $input) {
userErrors {
field message
} customer {
id email phone tags taxExempt firstName lastName addresses{
address1 address2 city country phone zip company firstName lastName
provinceCode id
}
Update a Customer: (POST)
@" mutation customerCreate($input: CustomerInput!) {
customerCreate(input: $input) {
userErrors {
field message
} customer {
id email phone tags taxExempt firstName lastName addresses{
address1 address2 city country phone zip company firstName lastName provinceCode id
}
amountSpent {
amount currencyCode
} smsMarketingConsent {
marketingState marketingOptInLevel consentUpdatedAt
}}}}";
Customer Collection Endpoints
Get a Customer Collection: (GET)
$@"
query {{
collection(id: ""gid://shopify/Collection/{id}"") {{
id
title
descriptionHtml
metafields(first: 250) {{
nodes {{
id
key
namespace
type
value
}}
}}
handle
templateSuffix
sortOrder
updatedAt
image {{
url
width
__typename
altText
height
id
metafields(first: 250) {{
nodes {{
id
key
namespace
type
value
}}
}}
}}
legacyResourceId
}}
}}"
Create a Customer Collection: (POST)
$@" mutation createCollectionMetafields($input: CollectionInput!) {
{
collectionCreate(input: $input) {
{
collection {
{
descriptionHtml handle id templateSuffix title updatedAt
}
}
}
}
}
}";
Update a Customer Collection: (POST)
$@" mutation CollectionUpdate($input: CollectionInput!)
{
{
collectionUpdate(input: $input) {
{
collection {
{
descriptionHtml handle id templateSuffix title updatedAt
}
}}}}}";
Delete a Customer Collection: (POST)
$@"
mutation {{
collectionDelete(input: {{ id: ""gid://shopify/Collection/{collectionId}"" }}) {{
deletedCollectionId
shop {{
id
name
}}
userErrors {{
field
message
}}
}}
}}"
Customer Category Endpoints
Get a Customer: (POST)
{ customer(id: "gid://shopify/Customer/{id}\") { id tags } }
Get the Inventory Level At Specific Date**(POST)**
{
customers(first: 250, query: "updated_at:>={DateUtc}", after: "eyJpZCI6IjQifQ") {
edges {
node {
id
tags
updatedAt
}
cursor
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}}}
Inventory Level Endpoints
Get the Inventory Level: (GET)
[Base URL]/admin/api/{BaseCallWrapper?.ApiVersion}/inventory_levels.json?inventory_item_ids={inventoryItemId}
Update the Inventory Level: (POST)
$@" mutation {
inventoryAdjustQuantities(input: { reason: "correction", name: "available", referenceDocumentUri: "https:{Apistore}.myshopify.com/admin/api/{ApiVersion}/graphql.json", changes: ["
{locationId: "gid://shopify/Location/{LocationId}", delta: {Delta}, inventoryItemId:"gid://shopify/InventoryItem/{InventoryId}"}
"] })
{
userErrors {
field message
} inventoryAdjustmentGroup { createdAt reason referenceDocumentUri changes { name delta
}
}
}
}
";
Activate/Deactivate Inventory Tracking at Locations: (POST)
mutation { inventoryBulkToggleActivation( inventoryItemId: "gid://shopify/InventoryItem/{InventoryId}", inventoryItemUpdates: [
{locationId: "gid://shopify/Location/{LocationId}",activate: true
},
] ) { inventoryItem { id
} inventoryLevels { id quantities(names: [
"available"
]) { name quantity
} location { id
}
} userErrors { field message code
}
}
}
Customer Order Endpoints
Get a Customer Order: (GET)
[Base URL]/ /admin/api/{ApiVersion}/customers/"{externalIds}.json
Get All Customer Orders: (GET)
[Base URL]/ /admin/api/{ApiVersion}/customers.json
Locations Endpoints
Get a Location: (GET)
[Base URL]/ /admin/api/{ApiVersion}/locations/{id}.json
Get All Locations: (GET)
[Base URL]/ /admin/api/{ApiVersion}/locations.json
Order Endpoints
Get an Order: (GET)
[Base URL]/admin/api/{ApiVersion}/orders/{id}.json
Get All Orders: (GET)
[Base URL]/admin/api/{ApiVersion}/orders.json
Create an Order: (POST)
[Base URL]/admin/api/{ApiVersion}/orders.json
Update an Order: (PUT)
[Base URL]/admin/api/{ApiVersion}/orders/{id}.json
Delete an Order: (DELETE)
[Base URL]/admin/api/{ApiVersion}/orders/{id}.json
Get transactions by Order: (DELETE)
[Base URL]/admin/api/{ApiVersion}/orders/{orderid}/transactions.json
GiftCard Endpoints
Get a Gift Card: (GET)
[Base URL]/ /admin/api/{ApiVersion}/gift_cards/{Id}.json
Get Gift Cards: (GET)
[Base URL]/ /admin/api/{ApiVersion}/gift_cards.json
Create Gift Cards: (POST)
[Base URL]/ /admin/api/{ApiVersion}/gift_cards.json
Update a Gift Card: (PUT)
[Base URL]/ /admin/api/{ApiVersion}/gift_cards/{Id}.json
Authentication/OAuth Endpoints
Get Access Token: (POST)
[Base URL]/[APIStore].myshopify.com/admin/oauth/access_token
Utility/Generic Endpoints
Get Channels: (POST)
query getChannels($cursor: String) {
channels(first: 3, after: $cursor) {
edges {
node {
id
name
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Get Product By SKU (POST)
{productVariants(first:100,query:"sku:'{productSku}'") {edges {node {id}}}}
Get Variants By SKU (POST)
{
productVariants(first: 100, query: "sku:'{SkuValue}'") {
edges {
node {
id
}
}
}
}