Glossary

API

Written by The StoreChart team3 min read

In short

An API (application programming interface) is a defined contract that lets one piece of software request data or actions from another, usually over HTTPS with JSON responses and an access key for authentication. Online stores rely on APIs to sync orders, inventory and customers between the storefront, back office, accounting and messaging tools without re-entering anything by hand.

Every time an order placed on your website shows up in another system without anyone retyping it, an API or a webhook did the work. An API is the agreed way one program talks to another: what data can be requested, what shape it comes back in, which actions are allowed and what permission each one needs. A store owner does not need to write code to understand what an API is, but it pays to know how one works. Nearly every tool a store connects, from shipping software to accounting, depends on the quality of the other side's API. This page covers what a request and response look like, a simple example, and the mistakes that make syncs break.

What is an API

An API (application programming interface) lets one program read data from another program or perform an action in it. It sets the rules of the conversation between the two systems:

  • What data is available: orders, products or customers, for example.
  • What shape it comes back in: usually JSON.
  • Which actions are allowed: read, create, update or delete.
  • What permission is needed: a key or token for each action.

How an API works

Most modern systems expose a REST API over HTTPS. Every request has four parts:

  • Endpoint: the URL that identifies a resource, such as the list of orders.
  • Method: GET to read, POST to create, PUT or PATCH to update, DELETE to remove.
  • Authentication: an API key, a bearer token or OAuth, proving who is asking and what they may do.
  • Body: JSON, when creating or updating something.

Common status codes

The response returns a status code and data:

  • 200: the request succeeded.
  • 401: the key is invalid.
  • 404: the resource does not exist.
  • 429: you have hit the rate limit.

Example: orders into a bookkeeper's sheet

A store wants yesterday's orders copied into its bookkeeper's spreadsheet every morning:

  1. A small script sends a GET request to the orders endpoint, filtered by date and signed with the store's key.
  2. It receives a JSON list and writes one row per order.
  3. The API returns 100 orders per page and there were 340 orders, so the script needs four requests and must follow the pagination.
  4. With a limit of 120 requests per minute, that run is nowhere near the cap. A full sync of a large catalog would have to respect it.

API vs webhook

  • An API is pull-based: your system asks when it needs something.
  • A webhook is push-based: the other system sends a message the moment something happens, such as a new order.
  • The usual combination: the webhook to learn instantly that something changed, the API to fetch full details or reconcile gaps.

APIs for an online store

A store that sells in several channels, shares inventory and issues invoices needs every system to see the same data. Without APIs, someone copies orders by hand and the stock shown on the website lags behind the warehouse. With them, a change made in one place reaches the others within seconds or minutes.

Common mistakes

  • Assuming every API has what you need. Before choosing a tool, check that its API exposes exactly the data you depend on, not just account settings.
  • Ignoring pagination and rate limits. A script that only reads the first page silently misses data.
  • One key for everything. Give each integration its own key with the narrowest permissions, so you can revoke one without breaking the rest.
  • Retrying without an idempotency key. A request sent twice after a network drop can create two orders or two invoices.
  • Building against an unversioned API. An integration with no version pinned breaks the moment the provider changes something.

APIs in StoreChart

  • Connected stores: StoreChart connects to WooCommerce and Shopify through their APIs and receives their webhooks for new orders, as described on the WooCommerce integration page.
  • Inbound webhooks: external systems can send it orders and leads through dedicated inbound webhook URLs.
  • Not included: there is currently no general public API for orders, inventory or customers. Data reaches StoreChart through the store connections and the inbound webhooks.

Frequently asked questions

What's the difference between a public API and a webhook?

An API is typically pull-based: your system requests data when it needs it. A webhook is push-based: the other system sends data the moment an event happens. Most real integrations use both: an API to fetch or write data on demand, and webhooks to react to changes instantly.

Do I need to code to use an API?

Direct API usage requires coding or a developer, but the same API often powers no-code automation platforms (like Make.com or Zapier) that let non-developers build workflows through a visual interface without writing requests by hand.

What is API rate limiting?

It's a cap on how many requests a given API key can make in a time window (for example, 100 requests per minute), designed to prevent one integration from overloading the server for everyone else. Exceeding the limit typically returns an error response until the window resets.

See StoreChart with your own store data

Open an account, connect your store and see your own numbers.