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

Get account and stores information

Query
Response
Query
query {
account {
id
name
stores {
edges {
node {
id
name
}
}
}
}
}
Response
{
"data": {
"account": {
"id": "112233",
"name": "Account 1",
"stores": {
"edges": [
{
"node": {
"id": "123456",
"name": "Store 1"
}
}
]
}
}
}
}

Query the first 3 tangles and their products

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

Example Mutations

Create a tangle

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

Update a tangle

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

Additional Resources