PlatformDevelopersShopifyPricingCompany
Login
Sign Up

SKUSavvy API: GraphQL API for Warehouse and Inventory Management

The SKUSavvy API is a GraphQL API with access to everything in your SKUSavvy account: products, variants, bin level inventory, orders, shipments, purchase orders, transfers, pick batches and more. Use it to connect your warehouse to accounting, ERP and reporting tools, automate workflows, or build your own add-on on top of your Shopify WMS.

Authentication with API Tokens

Every API request is authenticated with an API token. Sign in to SKUSavvy and go to Account > API Tokens to create one. The token is shown only once, so store it somewhere safe, such as a secrets manager or an environment variable.

Create an API Token
Send the token in the X-Token header on every request. An Authorization: Bearer header also works.
X-Token: <your API token>
# or
Authorization: Bearer <your API token>
Read more about creating and revoking API tokens

Making Your First GraphQL Request

Send a POST request to https://app.skusavvy.com/graphql with a JSON body containing query, and variables when the operation declares $variables. This query reads the user that owns the token:

query Me {
  me {
    id
    name
  }
}

Send it with the fetch built into Node.js 18 and later:

const response = await fetch('https://app.skusavvy.com/graphql', {
  method: 'POST',
  headers: {
    'content-type': 'application/json',
    'x-token': process.env.SKUSAVVY_API_TOKEN,
  },
  body: JSON.stringify({
    query: 'query Me { me { id name } }',
    variables: {},
  }),
});

const { data, errors, extensions } = await response.json();
console.log(data, errors, extensions);

API Rate Limits

The SKUSavvy API uses a sliding window rate limit based on query complexity, not on the number of requests. Each operation has a cost based on the fields it selects, and the total cost of your operations in the last 60 seconds must stay under the limit.

  • Limit: 7,500 complexity points per rolling 60 second window

  • Every operation costs at least 5 points, however little it selects

  • All API tokens of a company share one budget

  • The window slides: each operation's cost stops counting 60 seconds after it ran, so capacity comes back gradually, not all at once at a fixed reset time

  • Operations that go over the limit are rejected and do not run

  • A company can have at most 10 requests running at once. Another request is rejected with HTTP 429 and Retry-After: 5

Reading Your Current Usage

Every response includes extensions.cost: operationCost is the cost of this operation, and currentCost is the total cost of your operations in the current window, this one included.

{
  "extensions": {
    "cost": {
      "operationCost": 12.5,
      "currentCost": 840.25,
      "limit": 7500,
      "windowSeconds": 60
    }
  }
}

Handling a Rate Limit Error

When an operation would go over the limit, the API returns HTTP status 429 and an error with the message "Rate limit exceeded". The Retry-After header holds the number of seconds until enough earlier operations leave the window for this one to fit, and the error's extensions.cost holds the same number as waitTimeInSeconds. Wait that long, then retry the same request. Most HTTP clients and retry libraries read Retry-After for you.

{
  "errors": [{
    "message": "Rate limit exceeded. ... Please try again in 14 seconds.",
    "extensions": {
      "cost": {
        "operationCost": 310,
        "currentCost": 7350,
        "limit": 7500,
        "windowSeconds": 60,
        "waitTimeInSeconds": 14
      }
    }
  }]
}

Keeping Query Costs Low

  • Select only the fields you need: nested objects and lists add to the cost

  • Set a limit on list fields: a higher limit costs more

  • Free-text search costs much more than a lookup by field, so use it only for searches a person types in

  • To find records by a known value, search by field: SKU, barcode or external ID for products and inventory items, name or barcode for bins, and name for vendors

  • The field searches (variantSearchBulk, inventoryItemSearchBulk, binSearchBulk and vendorSearchBulk) take up to 100 lookups in one request

  • Page with a cursor where a field takes after (see Pagination below): an offset costs more the deeper it goes, a cursor does not

  • Use webhooks to get notified of changes instead of polling, and narrow a list with a date range instead of reading all of it again

Pagination

List fields return one page at a time. Page with a cursor wherever a field takes an after argument, and narrow the list with its filters (search, date ranges, IDs) rather than reading all of it.

Paging with a Cursor

  1. Set limit, up to 100 rows, and leave after out for the first page

  2. Read the next page's cursor from extensions.cursors in the response, under the field's name, or your alias if you set one

  3. Pass it unchanged as after, a Cursor variable, with the same filters and sort, to get the next page

  4. Stop when the cursor comes back null: that page was the last

A cursor marks a position in one sort. A value that is not a cursor is rejected before the query runs, and one from another sort is rejected with an error on after, as is a request that sends both after and offset.

Fields That Accept an after Argument

  • orders: sorted by createdAt or updatedAt

  • outboundOrders and outboundShipments: sorted by createdAt, the default

  • variants and qtys: without a sortField or search

  • inventoryItems: without a search

  • inventoryLogs, orderLogs and logs: any sort

With another sort, or on a field without after, page with offset. A cursor never skips a row: if a row on an earlier page changes or is removed while you page, an offset shifts every row behind it by one place, so one is read twice or never. Offset paging also costs more the deeper it goes: each full 1,000 rows it skips adds 50 points to the operation, up to 5,000, and the first 1,000 rows are free. A cursor costs the same on every page.

Syncing Orders

To keep a copy of your orders in step, read only the ones that changed since your last sync, oldest change first, instead of reading every order again. An order's updatedAt moves when the order, its line items, shipments, boxes, refunds, returns or metafields change. Start updatedAt a few minutes before your last sync, because a change can be saved slightly after its updatedAt. Set includeDeleted to also get orders deleted since then, with status Deleted.

query OrdersChangedSince($since: Date!, $after: Cursor) {
  orders(
    updatedAt: { min: $since }
    sortField: updatedAt
    sortDirection: ASC
    includeDeleted: true
    limit: 100
    after: $after
  ) {
    ... on CustomerOrder {
      id
      friendlyId
      status
      updatedAt
    }
  }
}
{
  "data": { "orders": [ ... ] },
  "extensions": {
    "cursors": {
      "orders": "WyJac25SOVhCaSIsIjIwMjYtMTAtMjhUMDE6MTg6MDku..."
    },
    "cost": {
      "operationCost": 112,
      "currentCost": 340,
      "limit": 7500,
      "windowSeconds": 60
    }
  }
}

SKUSavvy API Reference

The full API reference is the GraphiQL explorer. The schema documents itself and is always up to date: browse every query, mutation and subscription, read the field descriptions, and run operations against your own account.

Open the GraphiQL Explorer

SKUSavvy API FAQ

01

Where are the full SKUSavvy API docs?

The full SKUSavvy API documentation is the GraphiQL explorer at app.skusavvy.com/graphiql. It lists every query, mutation and subscription with descriptions, and is generated from the live schema, so it is always current.

  • Test queries, mutations and subscriptions in the explorer
  • The schema documents itself and is always up to date
Open the GraphiQL Explorer
02

Does the SKUSavvy API have rate limits?

Yes. The SKUSavvy API uses a sliding window rate limit of 7,500 complexity points per 60 seconds, shared by all API tokens of a company. Each operation costs points based on the fields and lists it selects, and at least 5. Over the limit, the API returns HTTP 429 with a Retry-After header, the number of seconds to wait before you retry.

  • Every response reports its cost and your current usage under extensions.cost
  • Capacity comes back gradually as earlier operations leave the 60 second window
03

How do I authenticate with the SKUSavvy API?

Create a token in SKUSavvy under Account > API Tokens, then send it in the X-Token header (or as Authorization: Bearer) with every request to https://app.skusavvy.com/graphql.

  • Each user can have up to 5 active tokens at a time
  • API access is enabled per company: click Request API Access if you don't see Create Token
API Tokens Guide
04

What can I build with the SKUSavvy API?

Anything your warehouse needs. The API has access to all the data in your account, so you can connect SKUSavvy to accounting and ERP systems, build custom reports, automate warehouse workflows, or create an add-on for other SKUSavvy users.

  • Accounting and ERP integrations
  • Custom reporting tools
  • Warehouse automations
05

Is the SKUSavvy API a Shopify WMS API?

Yes. SKUSavvy is a warehouse management system built for Shopify, and its API exposes the same data the app uses, synced with your Shopify store.

  • Products and product updates
  • Orders and order updates
  • Customers
  • Inventory and bin level inventory
  • Locations
  • Pick batches
  • Bin replenishments
  • Forecasts
  • Stock takes
06

How can I get help with the SKUSavvy API?

Ask the Savvy Bot GPT, which has the full API documentation. Direct help with API usage from our team is included in the Silver support plan and above.

  • Ask the Savvy Bot questions about the API
  • Join the Slack community
Savvy Bot GPTSupport PlansSlack Community

Solutions

  • Purchasing
  • WMS
  • Warehouse Management
  • Visual Warehouse
  • Replenishment
  • Order Management
  • Fulfillment
  • Inventory
  • Shipping
  • Shopify WMS

Integrations

  • Shopify
  • ShipEngine
  • Stripe
  • QuickBooks
  • Amazon
  • All Integrations

Help

  • FAQ
  • Contact Support
  • Contact Sales
  • Schedule Call
  • Developers
  • ROI Calculator
  • WMS eBook
  • Comparisons

Company

  • About
  • Pricing
  • Testimonials
  • Blog
  • YouTube
  • LinkedIn
  • Partner With Us
  • Terms of Service
  • Privacy Policy

Copyright SKUSavvy, Inc. All Rights Reserved - Made With ❤️ in Austin, TX