cURL
curl -X POST "https://api.easy-orders.net/api/partners-apps/v1/categories" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN" \
-H "Idempotency-Key: ERP-CAT-T-SHIRTS" \
-H "Content-Type: application/json" \
-d '{
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"show_in_header": true
}'const response = await fetch('https://api.easy-orders.net/api/partners-apps/v1/categories', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
'Idempotency-Key': 'ERP-CAT-T-SHIRTS',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'T-Shirts',
slug: 't-shirts',
thumb: 'https://cdn.example.com/categories/t-shirts.jpg',
parent_id: '3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d',
show_in_header: true,
}),
})
const json = await response.json()
if (!response.ok) {
throw new Error(`${json.error.code}: ${json.error.message}`)
}
const { category } = jsonpackage main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body := []byte(`{
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"show_in_header": true
}`)
req, err := http.NewRequest("POST", "https://api.easy-orders.net/api/partners-apps/v1/categories", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("EASYORDERS_ACCESS_TOKEN"))
req.Header.Set("Idempotency-Key", "ERP-CAT-T-SHIRTS")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var answer map[string]any
if err := json.NewDecoder(res.Body).Decode(&answer); err != nil {
panic(err)
}
if res.StatusCode >= 300 {
panic(fmt.Sprint(res.Status, answer["error"]))
}
fmt.Println(answer["category"])
}<?php
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/categories');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
'Idempotency-Key: ERP-CAT-T-SHIRTS',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'T-Shirts',
'slug' => 't-shirts',
'thumb' => 'https://cdn.example.com/categories/t-shirts.jpg',
'parent_id' => '3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d',
'show_in_header' => true,
]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 300) {
throw new RuntimeException($answer['error']['code'] . ': ' . $answer['error']['message']);
}
$category = $answer['category'];import os
import requests
response = requests.post(
"https://api.easy-orders.net/api/partners-apps/v1/categories",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
"Idempotency-Key": "ERP-CAT-T-SHIRTS",
},
json={
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"show_in_header": True,
},
timeout=30,
)
answer = response.json()
if not response.ok:
raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
category = answer["category"]{
"category": {
"id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"position": 0,
"hidden": false,
"show_in_header": true,
"created_at": "2026-12-04T09:00:00Z",
"updated_at": "2026-12-04T09:00:00Z"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid JSON body: unknown field"
}
}{
"error": {
"code": "unauthenticated",
"message": "Missing or invalid access token"
}
}{
"error": {
"code": "payment_required",
"message": "The app's subscription on this store is suspended"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This request requires the scope: read_orders",
"details": {
"required_scope": "read_orders"
}
}
}{
"error": {
"code": "slug_taken",
"message": "Another category of the store has this slug"
}
}{
"error": {
"code": "validation_failed",
"message": "Validation failed",
"details": {
"fields": [
{
"field": "items[0].quantity",
"rule": "between",
"param": "1,10000"
}
]
}
}
}{
"error": {
"code": "too_many_requests",
"message": "Rate limit exceeded"
}
}Categories
Create a category
Scope: write_products
Creates a category. name, slug and thumb are required.
slugmust be free among the store’s categories (409 slug_taken).- With
parent_id, the category is a subcategory of that one, which must be a category of the store (422, ruleparent). - The category’s HTML content is not part of the API: a new category starts with none, as in the dashboard.
Send an Idempotency-Key to retry safely.
POST
/
categories
cURL
curl -X POST "https://api.easy-orders.net/api/partners-apps/v1/categories" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN" \
-H "Idempotency-Key: ERP-CAT-T-SHIRTS" \
-H "Content-Type: application/json" \
-d '{
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"show_in_header": true
}'const response = await fetch('https://api.easy-orders.net/api/partners-apps/v1/categories', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
'Idempotency-Key': 'ERP-CAT-T-SHIRTS',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'T-Shirts',
slug: 't-shirts',
thumb: 'https://cdn.example.com/categories/t-shirts.jpg',
parent_id: '3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d',
show_in_header: true,
}),
})
const json = await response.json()
if (!response.ok) {
throw new Error(`${json.error.code}: ${json.error.message}`)
}
const { category } = jsonpackage main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body := []byte(`{
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"show_in_header": true
}`)
req, err := http.NewRequest("POST", "https://api.easy-orders.net/api/partners-apps/v1/categories", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("EASYORDERS_ACCESS_TOKEN"))
req.Header.Set("Idempotency-Key", "ERP-CAT-T-SHIRTS")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
var answer map[string]any
if err := json.NewDecoder(res.Body).Decode(&answer); err != nil {
panic(err)
}
if res.StatusCode >= 300 {
panic(fmt.Sprint(res.Status, answer["error"]))
}
fmt.Println(answer["category"])
}<?php
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/categories');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
'Idempotency-Key: ERP-CAT-T-SHIRTS',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'T-Shirts',
'slug' => 't-shirts',
'thumb' => 'https://cdn.example.com/categories/t-shirts.jpg',
'parent_id' => '3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d',
'show_in_header' => true,
]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status >= 300) {
throw new RuntimeException($answer['error']['code'] . ': ' . $answer['error']['message']);
}
$category = $answer['category'];import os
import requests
response = requests.post(
"https://api.easy-orders.net/api/partners-apps/v1/categories",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
"Idempotency-Key": "ERP-CAT-T-SHIRTS",
},
json={
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"show_in_header": True,
},
timeout=30,
)
answer = response.json()
if not response.ok:
raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
category = answer["category"]{
"category": {
"id": "5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"name": "T-Shirts",
"slug": "t-shirts",
"thumb": "https://cdn.example.com/categories/t-shirts.jpg",
"parent_id": "3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d",
"position": 0,
"hidden": false,
"show_in_header": true,
"created_at": "2026-12-04T09:00:00Z",
"updated_at": "2026-12-04T09:00:00Z"
}
}{
"error": {
"code": "invalid_request",
"message": "Invalid JSON body: unknown field"
}
}{
"error": {
"code": "unauthenticated",
"message": "Missing or invalid access token"
}
}{
"error": {
"code": "payment_required",
"message": "The app's subscription on this store is suspended"
}
}{
"error": {
"code": "insufficient_scope",
"message": "This request requires the scope: read_orders",
"details": {
"required_scope": "read_orders"
}
}
}{
"error": {
"code": "slug_taken",
"message": "Another category of the store has this slug"
}
}{
"error": {
"code": "validation_failed",
"message": "Validation failed",
"details": {
"fields": [
{
"field": "items[0].quantity",
"rule": "between",
"param": "1,10000"
}
]
}
}
}{
"error": {
"code": "too_many_requests",
"message": "Rate limit exceeded"
}
}Authorizations
An access token from the OAuth flow (eo_at_...). It lasts one hour;
refresh it with the refresh token. See Authentication.
Headers
Body
application/json