API Documentation
Proxy your Shopify Admin API requests through AuthCrate with automatic token management.
Contents
Authentication
All API requests require authentication using an API key. Generate API keys from your dashboard after adding a custom app.
Request Header
X-Api-Key: your_api_key_here
Keep your API key secret
Never expose your API key in client-side code. Always make requests from your server.
Rate Limits
API requests are rate limited to ensure fair usage and protect against abuse.
| Limit | Value |
|---|---|
| Requests per minute | 60 |
| Rate limit scope | Per API key |
When rate limited, requests will return HTTP 429. Wait before retrying.
GraphQL Proxy
Execute GraphQL queries against the Shopify Admin API. AuthCrate handles token management automatically.
/api/v1/graphql
Execute a GraphQL query or mutation
Request Body
{
"query": "{ shop { name email } }",
"variables": {}
}
Example Request
curl -X POST https://authcrate.shop/api/v1/graphql \
-H "X-Api-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"query": "{ shop { name email myshopifyDomain } }"
}'
Example Response
{
"data": {
"shop": {
"name": "My Store",
"email": "[email protected]",
"myshopifyDomain": "my-store.myshopify.com"
}
}
}
REST Proxy
Execute REST API requests against the Shopify Admin API. Supports GET, POST, PUT, and DELETE methods.
/api/v1/rest/{endpoint}
Forward requests to Shopify Admin REST API
Supported Methods
Read data
Create data
Update data
Remove data
Common Endpoints
| Endpoint | Description |
|---|---|
shop.json |
Get shop details |
products.json |
List products |
orders.json |
List orders |
customers.json |
List customers |
Example: Get Shop Info
curl https://authcrate.shop/api/v1/rest/shop.json \
-H "X-Api-Key: your_api_key"
Example: List Products with Query Parameters
curl "https://authcrate.shop/api/v1/rest/products.json?limit=10&status=active" \
-H "X-Api-Key: your_api_key"
Example: Create a Product
curl -X POST https://authcrate.shop/api/v1/rest/products.json \
-H "X-Api-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"product": {
"title": "New Product",
"body_html": "Product description
",
"vendor": "My Store"
}
}'
Example: Update a Product
curl -X PUT https://authcrate.shop/api/v1/rest/products/123456789.json \
-H "X-Api-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"product": {
"title": "Updated Product Title"
}
}'
Example: Delete a Product
curl -X DELETE https://authcrate.shop/api/v1/rest/products/123456789.json \
-H "X-Api-Key: your_api_key"
Error Handling
When an error occurs, the API returns a JSON response with an errors array.
Error Response Format
{
"errors": [
{
"message": "Error description here"
}
]
}
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 401 | Invalid or missing API key |
| 405 | HTTP method not allowed |
| 422 | Validation error (invalid request body) |
| 429 | Rate limit exceeded |
| 500 | Server error (or Shopify API error) |
Code Examples
Here are examples in popular programming languages to help you get started.
JS JavaScript / Node.js
const apiKey = 'your_api_key';
// GraphQL request
const graphqlResponse = await fetch('https://authcrate.shop/api/v1/graphql', {
method: 'POST',
headers: {
'X-Api-Key': apiKey,
'Content-Type': 'application/json',
},
body: JSON.stringify({
query: '{ shop { name } }',
}),
});
// REST request
const restResponse = await fetch('https://authcrate.shop/api/v1/rest/products.json?limit=10', {
headers: {
'X-Api-Key': apiKey,
},
});
const products = await restResponse.json();
PHP PHP (cURL)
<?php
$apiKey = 'your_api_key';
// GraphQL request
$ch = curl_init('https://authcrate.shop/api/v1/graphql');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'X-Api-Key: ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'query' => '{ shop { name } }',
]),
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
// REST request
$ch = curl_init('https://authcrate.shop/api/v1/rest/products.json?limit=10');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-Api-Key: ' . $apiKey,
],
]);
$products = json_decode(curl_exec($ch), true);
curl_close($ch);
PY Python (requests)
import requests
api_key = 'your_api_key'
headers = {'X-Api-Key': api_key}
# GraphQL request
graphql_response = requests.post(
'https://authcrate.shop/api/v1/graphql',
headers={**headers, 'Content-Type': 'application/json'},
json={'query': '{ shop { name } }'}
)
shop_data = graphql_response.json()
# REST request
rest_response = requests.get(
'https://authcrate.shop/api/v1/rest/products.json',
headers=headers,
params={'limit': 10}
)
products = rest_response.json()
Ready to integrate?
Create an account and generate your first API key to get started.
Get Started Free