Overview
The ZeroShop Admin API lets you programmatically manage every aspect of your shop — products,
orders, customers, settings, and more. All endpoints live under
https://yourshop.zeroshop.io/admin/api and return JSON.
This guide walks you through creating an access token and making your first API call. You'll have a working integration in under 5 minutes.
Create a Personal Access Token
Personal Access Tokens (PATs) are the recommended way to authenticate with the API. To create one:
- Log into your shop admin panel
- Go to Settings → Personal Access Tokens
- Click "Create Token" and give it a descriptive name
- Copy the token — it starts with
zspat_and won't be shown again
Tokens inherit the permissions of your user role. They expire after 90 days by default, but you can configure this (or set them to never expire) when creating the token.
Your First API Call
Let's verify your token works by fetching your shop settings:
curl https://yourshop.zeroshop.io/admin/api/settings \
-H "Authorization: Bearer zspat_your_token_here"
import requests
resp = requests.get(
"https://yourshop.zeroshop.io/admin/api/settings",
headers={"Authorization": "Bearer zspat_your_token_here"}
)
print(resp.json())
const resp = await fetch("https://yourshop.zeroshop.io/admin/api/settings", {
headers: { "Authorization": "Bearer zspat_your_token_here" }
});
const settings = await resp.json();
console.log(settings);
require "net/http"
require "json"
uri = URI("https://yourshop.zeroshop.io/admin/api/settings")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer zspat_your_token_here"
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.parse(resp.body)
You should receive a JSON response with your shop's configuration.
Create a Product
Now let's create your first product via the API. Prices are in cents — 1999 means $19.99:
curl -X POST https://yourshop.zeroshop.io/admin/api/products \
-H "Authorization: Bearer zspat_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Classic T-Shirt",
"description": "A comfortable everyday tee",
"price": 2999,
"product_type": "physical",
"visible": true
}'
import requests
resp = requests.post(
"https://yourshop.zeroshop.io/admin/api/products",
headers={
"Authorization": "Bearer zspat_your_token_here",
"Content-Type": "application/json"
},
json={
"name": "Classic T-Shirt",
"description": "A comfortable everyday tee",
"price": 2999,
"product_type": "physical",
"visible": True
}
)
product = resp.json()
print(f"Created product #{product['id']}")
const resp = await fetch("https://yourshop.zeroshop.io/admin/api/products", {
method: "POST",
headers: {
"Authorization": "Bearer zspat_your_token_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "Classic T-Shirt",
description: "A comfortable everyday tee",
price: 2999,
product_type: "physical",
visible: true
})
});
const product = await resp.json();
console.log(`Created product #${product.id}`);
require "net/http"
require "json"
uri = URI("https://yourshop.zeroshop.io/admin/api/products")
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "Bearer zspat_your_token_here"
req["Content-Type"] = "application/json"
req.body = {
name: "Classic T-Shirt",
description: "A comfortable everyday tee",
price: 2999,
product_type: "physical",
visible: true
}.to_json
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
product = JSON.parse(resp.body)
puts "Created product ##{product['id']}"
Next Steps
- Authentication — learn about all auth methods including OAuth for MCP
- Pagination — navigate large result sets
- Common Workflows — complete guides for product variants, order processing, and more
- API Reference — browse all available endpoints