Skip to content
Address/reference/StatusSupport
Run in Yaak

Acme Store API

The Acme Store API lets you manage products, orders and customers of an Acme storefront.

All requests are made over HTTPS and return JSON. Authenticate by sending a bearer token in the Authorization header — see Authentication.

Status Meaning
2xx Success
4xx Client error, check the error field
5xx Server error, please retry

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

VariablesProduction

NameValue
base_urlhttps://api.acme.dev/v1
api_token<redacted>
store_idstore_42

Obtain and refresh access tokens. These endpoints don't require authentication.

Authentication

POST
https://api.acme.dev/v1/auth/login

Exchange user credentials for an access token.

The token expires after 1 hour; use Refresh token to get a new one.

Authentication

No authentication required.

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Content-Typeapplication/json

Bodyapplication/json

{
  "email": "jane@acme.dev",
  "password": "{{password}}",
  "remember": true
}
Example request
curl -X POST https://api.acme.dev/v1/auth/login \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "email": "jane@acme.dev",
  "password": "{{password}}",
  "remember": true
}'
Example response
{
  "accessToken": "eyJhbGciOi...",
  "refreshToken": "rt_8f2k...",
  "expiresIn": 3600
}

Authentication

POST
https://api.acme.dev/v1/auth/token

Get a new access token using a refresh token (OAuth 2 style form body).

Authentication

No authentication required.

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0

Bodyapplication/x-www-form-urlencoded

FieldValue
grant_typerefresh_token
refresh_token{{refresh_token}}
Example request
curl -X POST https://api.acme.dev/v1/auth/token \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode grant_type=refresh_token \
  --data-urlencode 'refresh_token={{refresh_token}}'

Products are the items sold in your store.

Prices are always expressed in the smallest currency unit (e.g. cents).

Products

GET
https://api.acme.dev/v1/stores/{{store_id}}/products

Returns a paginated list of products, newest first.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Query parameters

NameValue
page1
limit20
searchoptionalshoes
sort-created_at

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl 'https://api.acme.dev/v1/stores/store_42/products?page=1&limit=20&sort=-created_at' \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}'
Example response
{
  "data": [
    {
      "id": "prod_123",
      "name": "Running shoes",
      "price": 8999,
      "currency": "USD"
    },
    {
      "id": "prod_124",
      "name": "Trail socks",
      "price": 1299,
      "currency": "USD"
    }
  ],
  "page": 1,
  "hasMore": true
}

Products

GET
https://api.acme.dev/v1/products/:id

Retrieve a single product by its id.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Path parameters

NameValue
idprod_123

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl https://api.acme.dev/v1/products/prod_123 \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}'
Example response
{
  "id": "prod_123",
  "name": "Running shoes",
  "price": 8999,
  "currency": "USD",
  "inStock": true
}

Products

POST
https://api.acme.dev/v1/products

Create a new product.

{ "id": "prod_124", "status": "draft" }

The response contains the created product.

The API validates the payload and returns 422 when a field is invalid.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Content-Typeapplication/json
Idempotency-Key{{uuid.v4}}

Bodyapplication/json

{
  "name": "Running shoes",
  "price": 8999,
  "currency": "USD",
  "tags": [
    "sport",
    "shoes"
  ],
  "inStock": true,
  "dimensions": {
    "weight": 0.8,
    "unit": "kg"
  }
}
Example request
curl -X POST https://api.acme.dev/v1/products \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: {{uuid.v4}}' \
  -H 'Authorization: Bearer {{api_token}}' \
  --data-raw '{
  "name": "Running shoes",
  "price": 8999,
  "currency": "USD",
  "tags": [
    "sport",
    "shoes"
  ],
  "inStock": true,
  "dimensions": {
    "weight": 0.8,
    "unit": "kg"
  }
}'
Example response
Location
/v1/products/prod_125
Content-Type
application/json
{
  "id": "prod_125",
  "name": "Running shoes",
  "status": "draft"
}

Products

PATCH
https://api.acme.dev/v1/products/:id

Partially update a product. Only the fields you send are changed.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Path parameters

NameValue
idprod_123

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0

Bodyapplication/json

{
  "price": 7999
}
Example request
curl -X PATCH https://api.acme.dev/v1/products/prod_123 \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "price": 7999
}'

Products

DELETE
https://api.acme.dev/v1/products/:id

Permanently delete a product. This cannot be undone.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Path parameters

NameValue
idprod_123

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl -X DELETE https://api.acme.dev/v1/products/prod_123 \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}'
Example response

No response body

Products

Images

Upload and manage product images.

Products › Images

POST
https://api.acme.dev/v1/products/:id/images

Upload a product image (PNG or JPEG, max 5 MB).

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Path parameters

NameValue
idprod_123

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0

Bodymultipart/form-data

FieldValue
altSide view
file@./shoe.png
Example request
curl -X POST https://api.acme.dev/v1/products/prod_123/images \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}' \
  -F 'alt=Side view' \
  -F 'file=@./shoe.png;type=image/png'

Browse the product catalog by category. Folders can be nested as deeply as you like.

Catalog

Categories

Top-level product categories.

Catalog › Categories

GET
https://api.acme.dev/v1/catalog/categories

Returns all top-level categories.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl https://api.acme.dev/v1/catalog/categories \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}'
Example response
{
  "data": [
    {
      "id": "cat_shoes",
      "name": "Shoes"
    },
    {
      "id": "cat_apparel",
      "name": "Apparel"
    }
  ]
}

Catalog › Categories

Subcategories

Categories within a category.

Catalog › Categories › Subcategories

GET
https://api.acme.dev/v1/catalog/categories/:category/subcategories

Returns the subcategories of a category.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Path parameters

NameValue
categorycat_shoes

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl https://api.acme.dev/v1/catalog/categories/cat_shoes/subcategories \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}'
Example response
{
  "data": [
    {
      "id": "sub_running",
      "name": "Running"
    },
    {
      "id": "sub_trail",
      "name": "Trail"
    }
  ]
}

Catalog › Categories › Subcategories

Attributes

Filterable attributes of a subcategory (size, color, …).

Catalog › Categories › Subcategories › Attributes

GET
https://api.acme.dev/v1/catalog/categories/:category/subcategories/:subcategory/attributes

Returns the values of every filterable attribute in a subcategory.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Path parameters

NameValue
categorycat_shoes
subcategorysub_running

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl https://api.acme.dev/v1/catalog/categories/cat_shoes/subcategories/sub_running/attributes \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}'
Example response
{
  "size": [
    "38",
    "39",
    "40",
    "41",
    "42"
  ],
  "color": [
    "black",
    "white",
    "volt"
  ]
}

Orders placed by customers. Requires an API key with the orders:read scope.

Orders

GET
https://api.acme.dev/v1/orders

List orders, optionally filtered by status.

Authentication

API Key — send X-API-Key in the headers. Inherited from folder "Orders".

Query parameters

NameValue
statuspaid

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Acme-VersionOrders{{orders_version}}
Example request
curl 'https://api.acme.dev/v1/orders?status=paid' \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Acme-Version: 2025-01' \
  -H 'X-API-Key: {{orders_api_key}}'

Orders

POST
https://api.acme.dev/v1/orders

Place an order on behalf of a customer.

Authentication

Basic Auth — send Authorization: Basic <base64(username:password)>.

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Acme-VersionOrders{{orders_version}}

Bodyapplication/json

{
  "customerId": "cus_9",
  "items": [
    {
      "productId": "prod_123",
      "quantity": 2
    }
  ]
}
Example request
curl -X POST https://api.acme.dev/v1/orders \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Acme-Version: 2025-01' \
  -H 'Content-Type: application/json' \
  -u 'merchant:{{merchant_password}}' \
  --data-raw '{
  "customerId": "cus_9",
  "items": [
    {
      "productId": "prod_123",
      "quantity": 2
    }
  ]
}'

Orders

GET
https://api.acme.dev/v1/orders/export.xml

Legacy XML export.

Authentication

API Key — send X-API-Key in the headers. Inherited from folder "Orders".

Headers

NameValue
User-Agentworkspaceacme-docs/1.0
Acme-VersionOrders{{orders_version}}
Acceptapplication/xml
Example request
curl https://api.acme.dev/v1/orders/export.xml \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Acme-Version: 2025-01' \
  -H 'Accept: application/xml' \
  -H 'X-API-Key: {{orders_api_key}}'
Example response
<?xml version="1.0"?>
<orders>
  <order id="ord_1" status="paid" total="17998"/>
</orders>

A GraphQL endpoint is available for flexible queries.

GraphQL

POST
https://api.acme.dev/v1/graphql

Full-text product search with GraphQL.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0

Bodyapplication/json

query Search($term: String!) {
  products(search: $term, first: 5) {
    id
    name
    price
  }
}

Variables

{
  "term": "shoes"
}
Example request
curl -X POST https://api.acme.dev/v1/graphql \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0' \
  -H 'Authorization: Bearer {{api_token}}' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "query": "query Search($term: String!) { products(search: $term, first: 5) { id name price } }",
  "variables": {
    "term": "shoes"
  }
}'

Streaming APIs over WebSockets and gRPC.

Realtime

WS
wss://stream.acme.dev/orders

Subscribe to real-time order events.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Query parameters

NameValue
store{{store_id}}

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0

Message

{
  "subscribe": "orders.*"
}
Example request
// Note: browsers don't support custom WebSocket headers. In Node.js, use the `ws` package:
// new WebSocket(url, { headers: {"Accept":"application/json","User-Agent":"acme-docs/1.0","Authorization":"Bearer {{api_token}}"} })
const socket = new WebSocket("wss://stream.acme.dev/orders?store=store_42");

socket.addEventListener("open", () => {
  socket.send("{\"subscribe\": \"orders.*\"}");
});

socket.addEventListener("message", (event) => {
  console.log(event.data);
});

Realtime

gRPC
http://grpc.acme.dev:50051

acme.inventory.v1.Inventory/GetStock

Query live inventory via gRPC.

Authentication

Bearer Token — send Authorization: Bearer <token>. Inherited from workspace "Acme Store API".

Metadata

NameValue
x-store-id{{store_id}}

Message

{
  "productId": "prod_123"
}
Example request
grpcurl \
  -plaintext \
  -H 'x-store-id: store_42' \
  -H 'authorization: Bearer {{api_token}}' \
  -d '{
  "productId": "prod_123"
}' \
  grpc.acme.dev:50051 \
  acme.inventory.v1.Inventory/GetStock
GET
https://api.acme.dev/v1/health

Returns ok when the API is up. No authentication required.

Authentication

No authentication required.

Headers

NameValue
Acceptworkspaceapplication/json
User-Agentworkspaceacme-docs/1.0
Example request
curl https://api.acme.dev/v1/health \
  -H 'Accept: application/json' \
  -H 'User-Agent: acme-docs/1.0'
Example response
ok

© Acme Inc. Questions? Contact the API team.

Exported Jun 1, 2025
Search Results

Type a title, a method or a word from the description.