cURL
curl -X PATCH "https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"city": "Giza",
"metadata": {
"erp_ref": "INV-778"
}
}'const response = await fetch('https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
city: 'Giza',
metadata: {
erp_ref: 'INV-778',
},
}),
})
const json = await response.json()
if (!response.ok) {
throw new Error(`${json.error.code}: ${json.error.message}`)
}
const { order } = jsonpackage main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body := []byte(`{
"city": "Giza",
"metadata": {
"erp_ref": "INV-778"
}
}`)
req, err := http.NewRequest("PATCH", "https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("EASYORDERS_ACCESS_TOKEN"))
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["order"])
}<?php
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'city' => 'Giza',
'metadata' => [
'erp_ref' => 'INV-778',
],
]),
]);
$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']);
}
$order = $answer['order'];import os
import requests
response = requests.patch(
"https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
},
json={
"city": "Giza",
"metadata": {
"erp_ref": "INV-778",
},
},
timeout=30,
)
answer = response.json()
if not response.ok:
raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
order = answer["order"]{
"order": {
"id": "6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c",
"number": 1042,
"status": "confirmed",
"payment_status": "pending_payment",
"payment_method": "cod",
"full_name": "Mona Hassan",
"email": "",
"phone": "+201001234567",
"phone_alt": "",
"country": "Egypt",
"city": "Cairo",
"address": "12 Tahrir St, Downtown",
"sa_national_address": "",
"note": "",
"ref": "",
"utm_source": "",
"utm_campaign": "",
"metadata": {
"is_app_order": true,
"app_name": "ERP Sync",
"erp_ref": "INV-778"
},
"product_cost": 900,
"shipping_cost": 60,
"coupon_code": "",
"coupon_discount": 0,
"total_cost": 960,
"custom_currency": "",
"is_digital": false,
"shipping_status": "",
"masked": false,
"masked_reason": null,
"items": [
{
"id": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f60",
"product_id": "0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10",
"variant_id": null,
"quantity": 2,
"price": 450,
"metadata": {}
}
],
"created_at": "2026-12-04T10:15:00Z",
"updated_at": "2026-12-04T10:20: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": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "order_closed",
"message": "The order is canceled, refunded or failed payment: its items cannot change"
}
}{
"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"
}
}Orders
Update an order
Scope: write_orders
Changes only the fields you send; null is refused.
itemsreplaces every cart item of the order, and stock moves with it. An order that does not hold its stock (canceled, refunded, or its payment failed) answers409 order_closed.metadatais merged: the keys you send are added or changed, the order’s other keys stay. Reserved keys are refused.- Changing
itemsorshipping_costmovestotal_costwith them. - The email and phones of a digital order cannot change
(
409 digital_order).
PATCH
/
orders
/
{id}
cURL
curl -X PATCH "https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c" \
-H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"city": "Giza",
"metadata": {
"erp_ref": "INV-778"
}
}'const response = await fetch('https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
city: 'Giza',
metadata: {
erp_ref: 'INV-778',
},
}),
})
const json = await response.json()
if (!response.ok) {
throw new Error(`${json.error.code}: ${json.error.message}`)
}
const { order } = jsonpackage main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
)
func main() {
body := []byte(`{
"city": "Giza",
"metadata": {
"erp_ref": "INV-778"
}
}`)
req, err := http.NewRequest("PATCH", "https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("EASYORDERS_ACCESS_TOKEN"))
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["order"])
}<?php
$ch = curl_init('https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'city' => 'Giza',
'metadata' => [
'erp_ref' => 'INV-778',
],
]),
]);
$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']);
}
$order = $answer['order'];import os
import requests
response = requests.patch(
"https://api.easy-orders.net/api/partners-apps/v1/orders/6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c",
headers={
"Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
},
json={
"city": "Giza",
"metadata": {
"erp_ref": "INV-778",
},
},
timeout=30,
)
answer = response.json()
if not response.ok:
raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
order = answer["order"]{
"order": {
"id": "6f1c2a9e-8b4d-4e3a-9f7c-1d2e3f4a5b6c",
"number": 1042,
"status": "confirmed",
"payment_status": "pending_payment",
"payment_method": "cod",
"full_name": "Mona Hassan",
"email": "",
"phone": "+201001234567",
"phone_alt": "",
"country": "Egypt",
"city": "Cairo",
"address": "12 Tahrir St, Downtown",
"sa_national_address": "",
"note": "",
"ref": "",
"utm_source": "",
"utm_campaign": "",
"metadata": {
"is_app_order": true,
"app_name": "ERP Sync",
"erp_ref": "INV-778"
},
"product_cost": 900,
"shipping_cost": 60,
"coupon_code": "",
"coupon_discount": 0,
"total_cost": 960,
"custom_currency": "",
"is_digital": false,
"shipping_status": "",
"masked": false,
"masked_reason": null,
"items": [
{
"id": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f60",
"product_id": "0b6f3c7e-3a1d-4a8e-9d5e-2f1b7c9a4e10",
"variant_id": null,
"quantity": 2,
"price": 450,
"metadata": {}
}
],
"created_at": "2026-12-04T10:15:00Z",
"updated_at": "2026-12-04T10:20: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": "not_found",
"message": "Resource not found"
}
}{
"error": {
"code": "order_closed",
"message": "The order is canceled, refunded or failed payment: its items cannot change"
}
}{
"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.
Body
application/json
Every field is optional; only the fields sent change.