Getting started

API Endpoint

The Skutally GraphQL API has a single endpoint:

POST https://api.skutally.com/graphql

Make sure to send the X-Skutally-API-Token header in each request with your app's api_token. More about this in the Authentication page.

GraphQL Explorer

To explore available queries and mutations, you can use the interactive GraphQL Explorer that is available to install in each Skutally account.

Example queries

Query account basic details with regions and their stores

Query
Response
Query
query {
account {
id
name
regions {
edges {
node {
id
stores {
edges {
node {
id
}
}
}
}
}
}
}
}
Response
{
"data": {
"account": {
"id": "111110",
"name": "Account 1",
"regions": {
"edges": [
{
"node": {
"id": "111111",
"name": "Region 1",
"stores": {
"edges": [
{
"node": {
"id": "111112",
"name": "Store 1"
}
}
]
}
}
}
]
}
}
}
}

Query the first 3 products and their variants

Query
Response
Query
query {
products(first: 2) {
edges {
node {
id
title
variants(first: 5) {
edges {
node {
id
sku
}
}
}
}
}
}
}
Response
{
"data": {
"products": {
"edges": [
{
"node": {
"id": "111111",
"title": "Sample product 1",
"variants": {
"edges": [
{
"node": {
"id": "222222",
"sku": "AA-10001"
}
}
]
}
}
},
{
"node": {
"id": "111112",
"title": "Sample product 2",
"variants": {
"edges": [
{
"node": {
"id": "222223",
"sku": "AA-10002"
}
}
]
}
}
}
]
}
}
}

Query variant by id with region price

Query
Response
Query
query {
variant(id: "112233", regionId: "223344") {
id
sku
msrp
regionPrice
}
}
Response
{
"data": {
"variant": {
"id": "112233",
"sku": "AA-110011",
"msrp": 99.99,
"regionPrice": 79.29
}
}
}

Example Mutations

Create a product

Query
Response
Query
mutation {
productCreate(title: "Sample product", sku: "AA-0001", price: 123.45, msrp: 200) {
id
title
description
variants(first: 5) {
edges {
node {
id
sku
}
}
}
}
}
Response
{
"data": {
"productCreate": {
"id": "196079",
"title": "Sample Product",
"description": null,
"variants": {
"edges": [
{
"node": {
"id": "991941",
"sku": "AA-0001"
}
}
]
}
}
}
}

Update a product

Query
Response
Query
mutation {
productUpdate(id: "196079", title: "Updated product", description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") {
id
title
description
variants(first: 5) {
edges {
node {
id
sku
}
}
}
}
}
Response
{
"data": {
"productUpdate": {
"id": "196079",
"title": "Updated product",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"variants": {
"edges": [
{
"node": {
"id": "991941",
"sku": "AA-0001"
}
}
]
}
}
}
}

Additional Resources