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.
To explore available queries and mutations, you can use the interactive GraphQL Explorer that is available to install in each Skutally account.
query {account {idnamestores {edges {node {idname}}}}}
{"data": {"account": {"id": "112233","name": "Account 1","stores": {"edges": [{"node": {"id": "123456","name": "Store 1"}}]}}}}
query {tangles(first: 2) {edges {node {idtitleproducts(first: 5) {edges {node {idsku}}}}}}}
{"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"}}]}}}]}}}
mutation {tangleCreate(title: "Sample Tangle", sku: "AA-0001", price: 123.45, msrp: 200) {idtitledescriptionproducts(first: 5) {edges {node {idsku}}}}}
{"data": {"tangleCreate": {"id": "196079","title": "Sample Tangle","description": null,"products": {"edges": [{"node": {"id": "991941","sku": "AA-0001"}}]}}}}
mutation {tangleUpdate(id: "196079", title: "Updated tangle", description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.") {idtitledescriptionproducts(first: 5) {edges {node {idsku}}}}}
{"data": {"tangleUpdate": {"id": "196079","title": "Updated tangle","description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.","products": {"edges": [{"node": {"id": "991941","sku": "AA-0001"}}]}}}}
Learn about GraphQL fundamentals and more: https://www.howtographql.com/