cURL
curl -X DELETE "https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN"const response = await fetch('https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
},
})
if (!response.ok) {
const { error } = await response.json()
throw new Error(`${error.code}: ${error.message}`)
}package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("EASYORDERS_ACCESS_TOKEN"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
if res.StatusCode >= 300 {
var answer map[string]any
_ = json.NewDecoder(res.Body).Decode(&answer)
panic(fmt.Sprint(res.Status, answer["error"]))
}
fmt.Println(res.Status)
}<?php
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
],
]);
$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']);
}import os
import requests
response = requests.delete(
"https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
},
timeout=30,
)
if not response.ok:
error = response.json()["error"]
raise RuntimeError(f"{error['code']}: {error['message']}"){
"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": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "category_has_children",
"message": "Delete or move the subcategories first"
}
}{
"error": {
"code": "too_many_requests",
"message": "Rate limit exceeded"
}
}Categories
Delete a category
Scope: write_products
Deletes a category: it no longer shows in lists, reading it answers
404, and products stop listing it in their category_ids. A
deleted category cannot be restored through the API.
A category with subcategories answers 409 category_has_children:
delete them first, or move them with a new parent_id.
DELETE
/
categories
/
{id}
cURL
curl -X DELETE "https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN"const response = await fetch('https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
},
})
if (!response.ok) {
const { error } = await response.json()
throw new Error(`${error.code}: ${error.message}`)
}package main
import (
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("DELETE", "https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("EASYORDERS_ACCESS_TOKEN"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
if res.StatusCode >= 300 {
var answer map[string]any
_ = json.NewDecoder(res.Body).Decode(&answer)
panic(fmt.Sprint(res.Status, answer["error"]))
}
fmt.Println(res.Status)
}<?php
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
],
]);
$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']);
}import os
import requests
response = requests.delete(
"https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
},
timeout=30,
)
if not response.ok:
error = response.json()["error"]
raise RuntimeError(f"{error['code']}: {error['message']}"){
"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": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "category_has_children",
"message": "Delete or move the subcategories first"
}
}{
"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.
Response
Deleted.