cURL
curl -G "https://api.easy-orders.net/api/partners-apps/v1/coupons" \
--data-urlencode "limit=20" \
--data-urlencode "filter=is_active||\$eq||true" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN"const params = new URLSearchParams([
['limit', '20'],
['filter', 'is_active||$eq||true'],
])
const url = 'https://api.easy-orders.net/api/partners-apps/v1/coupons?' + params
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
},
})
const json = await response.json()
if (!response.ok) {
throw new Error(`${json.error.code}: ${json.error.message}`)
}
const { data } = jsonpackage main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
)
func main() {
query := url.Values{}
query.Add("limit", "20")
query.Add("filter", "is_active||$eq||true")
req, err := http.NewRequest("GET", "https://api.easy-orders.net/api/partners-apps/v1/coupons?"+query.Encode(), 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()
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["data"])
}<?php
$query = http_build_query([
'limit' => '20',
'filter' => 'is_active||$eq||true',
]);
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/coupons?' . $query);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
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']);
}
$data = $answer['data'];import os
import requests
response = requests.get(
"https://api.easy-orders.net/api/partners-apps/v1/coupons",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
},
params=[
("limit", "20"),
("filter", "is_active||$eq||true"),
],
timeout=30,
)
answer = response.json()
if not response.ok:
raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
data = answer["data"]{
"data": [
{
"id": "4b7e2c1a-9d3f-4e6b-8a5c-2f1d0e9c8b7a",
"method": "code",
"code": "summer15",
"title": "",
"discount_type": "amount_off_products",
"value_type": "percentage",
"value": 15,
"min_order_amount": 0,
"min_quantity": 0,
"max_discount_amount": 200,
"usage_limit": 500,
"usage_count": 37,
"is_active": true,
"starts_at": null,
"expires_at": "2027-09-01T00:00:00Z",
"applies_to": "specific_categories",
"buy_quantity": 0,
"buy_requirement_type": "quantity",
"buy_amount": 0,
"get_quantity": 0,
"get_value_type": "free",
"get_value": 0,
"max_uses_per_order": 0,
"max_shipping_discount": 0,
"exclude_shipping_over": 0,
"combines_with_product": false,
"combines_with_order": false,
"combines_with_shipping": true,
"applicable_items": [
{
"item_type": "category",
"item_id": "8d2f4b6a-1c3e-4a5b-9d7f-0e1a2b3c4d5e",
"is_buy_item": false
}
],
"created_at": "2026-12-01T09:00:00Z",
"updated_at": "2026-12-03T14:30:00Z"
},
{
"id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"method": "automatic",
"code": "",
"title": "Free shipping over 1000",
"discount_type": "free_shipping",
"value_type": "fixed",
"value": 0,
"min_order_amount": 1000,
"min_quantity": 0,
"max_discount_amount": 0,
"usage_limit": 0,
"usage_count": 112,
"is_active": true,
"starts_at": null,
"expires_at": null,
"applies_to": "all",
"buy_quantity": 0,
"buy_requirement_type": "quantity",
"buy_amount": 0,
"get_quantity": 0,
"get_value_type": "free",
"get_value": 0,
"max_uses_per_order": 0,
"max_shipping_discount": 0,
"exclude_shipping_over": 0,
"combines_with_product": true,
"combines_with_order": false,
"combines_with_shipping": false,
"applicable_items": [],
"created_at": "2026-12-02T08:00:00Z",
"updated_at": "2026-12-02T08:00:00Z"
}
],
"next_cursor": null
}{
"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": "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"
}
}Coupons
List coupons
Scope: read_discounts
Lists the store’s coupons, each with its applicable items, oldest
first unless sort=created_at,DESC. Deleted coupons are not listed.
Filter with filter=field||$op||value (repeatable, all must match):
| Field | Operators |
|---|---|
method | $eq, $in |
discount_type | $eq, $in |
applies_to | $eq, $in |
is_active | $eq |
code | $eq, $in, $cont |
title | $eq, $cont |
starts_at | $gt, $gte, $lt, $lte, $isnull, $notnull |
expires_at | $gt, $gte, $lt, $lte, $isnull, $notnull |
created_at | $gt, $gte, $lt, $lte |
Codes are saved lowercased, so code||$eq takes the code in lower
case; $cont ignores letter case. $in takes comma-separated
values, up to 50. Up to 10 filters per request.
GET
/
coupons
cURL
curl -G "https://api.easy-orders.net/api/partners-apps/v1/coupons" \
--data-urlencode "limit=20" \
--data-urlencode "filter=is_active||\$eq||true" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN"const params = new URLSearchParams([
['limit', '20'],
['filter', 'is_active||$eq||true'],
])
const url = 'https://api.easy-orders.net/api/partners-apps/v1/coupons?' + params
const response = await fetch(url, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
},
})
const json = await response.json()
if (!response.ok) {
throw new Error(`${json.error.code}: ${json.error.message}`)
}
const { data } = jsonpackage main
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"os"
)
func main() {
query := url.Values{}
query.Add("limit", "20")
query.Add("filter", "is_active||$eq||true")
req, err := http.NewRequest("GET", "https://api.easy-orders.net/api/partners-apps/v1/coupons?"+query.Encode(), 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()
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["data"])
}<?php
$query = http_build_query([
'limit' => '20',
'filter' => 'is_active||$eq||true',
]);
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/coupons?' . $query);
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
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']);
}
$data = $answer['data'];import os
import requests
response = requests.get(
"https://api.easy-orders.net/api/partners-apps/v1/coupons",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
},
params=[
("limit", "20"),
("filter", "is_active||$eq||true"),
],
timeout=30,
)
answer = response.json()
if not response.ok:
raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
data = answer["data"]{
"data": [
{
"id": "4b7e2c1a-9d3f-4e6b-8a5c-2f1d0e9c8b7a",
"method": "code",
"code": "summer15",
"title": "",
"discount_type": "amount_off_products",
"value_type": "percentage",
"value": 15,
"min_order_amount": 0,
"min_quantity": 0,
"max_discount_amount": 200,
"usage_limit": 500,
"usage_count": 37,
"is_active": true,
"starts_at": null,
"expires_at": "2027-09-01T00:00:00Z",
"applies_to": "specific_categories",
"buy_quantity": 0,
"buy_requirement_type": "quantity",
"buy_amount": 0,
"get_quantity": 0,
"get_value_type": "free",
"get_value": 0,
"max_uses_per_order": 0,
"max_shipping_discount": 0,
"exclude_shipping_over": 0,
"combines_with_product": false,
"combines_with_order": false,
"combines_with_shipping": true,
"applicable_items": [
{
"item_type": "category",
"item_id": "8d2f4b6a-1c3e-4a5b-9d7f-0e1a2b3c4d5e",
"is_buy_item": false
}
],
"created_at": "2026-12-01T09:00:00Z",
"updated_at": "2026-12-03T14:30:00Z"
},
{
"id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"method": "automatic",
"code": "",
"title": "Free shipping over 1000",
"discount_type": "free_shipping",
"value_type": "fixed",
"value": 0,
"min_order_amount": 1000,
"min_quantity": 0,
"max_discount_amount": 0,
"usage_limit": 0,
"usage_count": 112,
"is_active": true,
"starts_at": null,
"expires_at": null,
"applies_to": "all",
"buy_quantity": 0,
"buy_requirement_type": "quantity",
"buy_amount": 0,
"get_quantity": 0,
"get_value_type": "free",
"get_value": 0,
"max_uses_per_order": 0,
"max_shipping_discount": 0,
"exclude_shipping_over": 0,
"combines_with_product": true,
"combines_with_order": false,
"combines_with_shipping": false,
"applicable_items": [],
"created_at": "2026-12-02T08:00:00Z",
"updated_at": "2026-12-02T08:00:00Z"
}
],
"next_cursor": null
}{
"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": "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.