Orders
Orders, transactions, refunds and abandoned checkouts (the last 60 days without read_all_orders). Every example sets SOOQUNA_TOKEN from the environment; see authentication. Responses are from a test store, cut to two items per list.
| Endpoint | Method | Path |
|---|---|---|
| List orders | GET | /orders |
| Get an order | GET | /orders/{id} |
| Update an order | PATCH | /orders/{id} |
| Record payment of an order | POST | /orders/{id}/mark-paid |
| Calculate a refund | POST | /orders/{id}/refunds/calculate |
| Refund an order | POST | /orders/{id}/refunds |
| Cancel an order | POST | /orders/{id}/cancel |
| Archive an order | POST | /orders/{id}/close |
| Unarchive an order | POST | /orders/{id}/reopen |
| Confirm a cash-on-delivery order | POST | /orders/{id}/cod-confirm |
| List an order’s tax invoices | GET | /orders/{id}/invoices |
| Issue a tax invoice for an order | POST | /orders/{id}/invoices |
| List abandoned checkouts | GET | /abandoned-checkouts |
| Get an abandoned checkout | GET | /abandoned-checkouts/{id} |
| List tax invoices | GET | /invoices |
| Get a tax invoice | GET | /invoices/{id} |
| Download a tax invoice as PDF | GET | /invoices/{id}/pdf |
List orders
Section titled “List orders”GET /orders · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
financial_status |
query | For example pending. |
fulfillment_status |
query | For example unfulfilled. |
limit |
query | For example 20. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/orders?financial_status=pending&fulfillment_status=unfulfilled&limit=20" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders?financial_status=pending&fulfillment_status=unfulfilled&limit=20", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/orders?financial_status=pending&fulfillment_status=unfulfilled&limit=20", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders?financial_status=pending&fulfillment_status=unfulfilled&limit=20');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/orders?financial_status=pending&fulfillment_status=unfulfilled&limit=20", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/orders?financial_status=pending&fulfillment_status=unfulfilled&limit=20");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "data": [ { "cancelled_at": null, "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "financial_status": "pending", "fulfillment_status": "unfulfilled", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "name": "#1001", "number": 1001, "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "sample": false, "source": "draft", "state": "open", "tags": [], "total": "420.00", "total_outstanding": "420.00" } ], "page_info": {"has_next_page": false}}Get an order
Section titled “Get an order”GET /orders/{id} · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "attributes": {}, "billing_address": null, "buyer_accepts_marketing": false, "cancel_reason": "", "cancelled_at": null, "checkout_id": null, "closed_at": null, "cod_status": "", "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "discount_applications": [], "discount_codes": [], "draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013", "financial_status": "pending", "fulfillment_orders": [ { "delivery_method": "shipping", "hold_reason": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "remaining": 1 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "status": "open" } ], "fulfillment_status": "unfulfilled", "fulfillments": [], "gift": false, "gift_message": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "lines": [ { "discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}], "fulfilled_quantity": 0, "gift_card": false, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "image": "", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "original_price": "520.00", "price": "450.00", "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "properties": {}, "quantity": 1, "refunded_quantity": 0, "requires_shipping": true, "sku": "ABY-LIN-M", "tax": "0.00", "tax_lines": [], "taxable": true, "title": "Embroidered linen abaya", "total": "405.00", "total_discount": "45.00", "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M", "vendor": "Layla", "weight_grams": 0 } ], "locale": "en", "name": "#1001", "net_payment": "0.00", "note": "", "number": 1001, "order_discount": "45.00", "payment_fee": "0.00", "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "refunds": [], "sample": false, "shipping_address": null, "shipping_line": { "final": 1500, "kind": "shipping", "price": 1500, "title": "Doha delivery" }, "source": "draft", "state": "open", "status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162", "subtotal": "450.00", "tags": [], "tax_lines": [], "taxes_included": true, "tip": "0.00", "token": "01a14f9f314a7de682d35010a325f162", "total": "420.00", "total_discounts": "45.00", "total_outstanding": "420.00", "total_received": "0.00", "total_refunded": "0.00", "total_shipping": "15.00", "total_tax": "0.00", "transactions": [], "updated_at": "2026-10-18T09:30:00Z", "version": 2}Update an order
Section titled “Update an order”PATCH /orders/{id} · Scope: write_orders
Change the note, tags, contact details, addresses or attributes; leave out what doesn’t change.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "note": "Call before delivery", "tags": ["phone", "priority"], "version": 2}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035", { method: "PATCH", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "note": "Call before delivery", "tags": ["phone", "priority"], "version": 2 }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.patch( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "note": "Call before delivery", "tags": ["phone", "priority"], "version": 2, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'note' => 'Call before delivery', 'tags' => ['phone', 'priority'], 'version' => 2, ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{ "note": "Call before delivery", "tags": ["phone", "priority"], "version": 2}` req, err := http.NewRequest("PATCH", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Patch, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "note": "Call before delivery", "tags": ["phone", "priority"], "version": 2}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "attributes": {}, "billing_address": null, "buyer_accepts_marketing": false, "cancel_reason": "", "cancelled_at": null, "checkout_id": null, "closed_at": null, "cod_status": "", "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "discount_applications": [], "discount_codes": [], "draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013", "financial_status": "pending", "fulfillment_orders": [ { "delivery_method": "shipping", "hold_reason": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "remaining": 1 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "status": "open" } ], "fulfillment_status": "unfulfilled", "fulfillments": [], "gift": false, "gift_message": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "lines": [ { "discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}], "fulfilled_quantity": 0, "gift_card": false, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "image": "", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "original_price": "520.00", "price": "450.00", "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "properties": {}, "quantity": 1, "refunded_quantity": 0, "requires_shipping": true, "sku": "ABY-LIN-M", "tax": "0.00", "tax_lines": [], "taxable": true, "title": "Embroidered linen abaya", "total": "405.00", "total_discount": "45.00", "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M", "vendor": "Layla", "weight_grams": 0 } ], "locale": "en", "name": "#1001", "net_payment": "0.00", "note": "Call before delivery", "number": 1001, "order_discount": "45.00", "payment_fee": "0.00", "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "refunds": [], "sample": false, "shipping_address": null, "shipping_line": { "final": 1500, "kind": "shipping", "price": 1500, "title": "Doha delivery" }, "source": "draft", "state": "open", "status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162", "subtotal": "450.00", "tags": ["phone", "priority"], "tax_lines": [], "taxes_included": true, "tip": "0.00", "token": "01a14f9f314a7de682d35010a325f162", "total": "420.00", "total_discounts": "45.00", "total_outstanding": "420.00", "total_received": "0.00", "total_refunded": "0.00", "total_shipping": "15.00", "total_tax": "0.00", "transactions": [], "updated_at": "2026-10-18T09:30:00Z", "version": 3}Record payment of an order
Section titled “Record payment of an order”POST /orders/{id}/mark-paid · Scope: write_orders · Needs an Idempotency-Key header
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/mark-paid" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/mark-paid", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Idempotency-Key": crypto.randomUUID(), },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import os, uuidimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/mark-paid", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/mark-paid');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Idempotency-Key: ' . bin2hex(random_bytes(16)), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os"
"github.com/google/uuid")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/mark-paid", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Idempotency-Key", uuid.NewString()) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/mark-paid");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "attributes": {}, "billing_address": null, "buyer_accepts_marketing": false, "cancel_reason": "", "cancelled_at": null, "checkout_id": null, "closed_at": null, "cod_status": "", "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "discount_applications": [], "discount_codes": [], "draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013", "financial_status": "paid", "fulfillment_orders": [ { "delivery_method": "shipping", "hold_reason": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "remaining": 1 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "status": "open" } ], "fulfillment_status": "unfulfilled", "fulfillments": [], "gift": false, "gift_message": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "lines": [ { "discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}], "fulfilled_quantity": 0, "gift_card": false, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "image": "", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "original_price": "520.00", "price": "450.00", "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "properties": {}, "quantity": 1, "refunded_quantity": 0, "requires_shipping": true, "sku": "ABY-LIN-M", "tax": "0.00", "tax_lines": [], "taxable": true, "title": "Embroidered linen abaya", "total": "405.00", "total_discount": "45.00", "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M", "vendor": "Layla", "weight_grams": 0 } ], "locale": "en", "name": "#1001", "net_payment": "420.00", "note": "Call before delivery", "number": 1001, "order_discount": "45.00", "payment_fee": "0.00", "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "refunds": [], "sample": false, "shipping_address": null, "shipping_line": { "final": 1500, "kind": "shipping", "price": 1500, "title": "Doha delivery" }, "source": "draft", "state": "open", "status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162", "subtotal": "450.00", "tags": ["phone", "priority"], "tax_lines": [], "taxes_included": true, "tip": "0.00", "token": "01a14f9f314a7de682d35010a325f162", "total": "420.00", "total_discounts": "45.00", "total_outstanding": "0.00", "total_received": "420.00", "total_refunded": "0.00", "total_shipping": "15.00", "total_tax": "0.00", "transactions": [ { "actor": "Docs", "amount": "420.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000051", "kind": "sale", "method": "manual", "provider": "manual", "status": "success", "test": false } ], "updated_at": "2026-10-18T09:30:00Z", "version": 4}Calculate a refund
Section titled “Calculate a refund”POST /orders/{id}/refunds/calculate · Scope: write_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds/calculate" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds/calculate", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds/calculate", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, }, ], "restock": True, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds/calculate');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'lines' => [ [ 'line_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000037', 'quantity' => 1, ], ], 'restock' => true, ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings")
func main() { body := `{ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds/calculate", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds/calculate");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "available": "420.00", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "subtotal": "405.00", "tax": "0.00" } ], "shipping": "0.00", "shipping_refundable": "15.00", "subtotal": "405.00", "suggested": "405.00", "tax": "0.00"}Refund an order
Section titled “Refund an order”POST /orders/{id}/refunds · Scope: write_orders · Needs an Idempotency-Key header
Refund lines (with restock), shipping, or an amount. Send an idempotency_key so a retried request isn’t refunded twice.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true, "notify_customer": true, "note": "Wrong size", "idempotency_key": "refund-1001-1"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true, "notify_customer": true, "note": "Wrong size", "idempotency_key": "refund-1001-1" }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import os, uuidimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), }, json={ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, }, ], "restock": True, "notify_customer": True, "note": "Wrong size", "idempotency_key": "refund-1001-1", },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Idempotency-Key: ' . bin2hex(random_bytes(16)), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'lines' => [ [ 'line_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000037', 'quantity' => 1, ], ], 'restock' => true, 'notify_customer' => true, 'note' => 'Wrong size', 'idempotency_key' => 'refund-1001-1', ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings"
"github.com/google/uuid")
func main() { body := `{ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true, "notify_customer": true, "note": "Wrong size", "idempotency_key": "refund-1001-1"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Idempotency-Key", uuid.NewString()) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/refunds");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());req.Content = new StringContent("""{ "lines": [{"line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1}], "restock": true, "notify_customer": true, "note": "Wrong size", "idempotency_key": "refund-1001-1"}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 201
{ "attributes": {}, "billing_address": null, "buyer_accepts_marketing": false, "cancel_reason": "", "cancelled_at": null, "checkout_id": null, "closed_at": null, "cod_status": "", "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "discount_applications": [], "discount_codes": [], "draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013", "financial_status": "partially_refunded", "fulfillment_orders": [ { "delivery_method": "shipping", "hold_reason": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "remaining": 0 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "status": "closed" } ], "fulfillment_status": "fulfilled", "fulfillments": [ { "created_at": "2026-10-18T09:30:00Z", "fulfillment_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000050", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "name": "#1001-F1", "shipment_status": "in_transit", "status": "success", "tracking_company": "Aramex", "tracking_number": "47012233442", "tracking_url": "https://www.aramex.com/track/results?ShipmentNumber=47012233442" } ], "gift": false, "gift_message": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "lines": [ { "discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}], "fulfilled_quantity": 1, "gift_card": false, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "image": "", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "original_price": "520.00", "price": "450.00", "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "properties": {}, "quantity": 1, "refunded_quantity": 1, "requires_shipping": true, "sku": "ABY-LIN-M", "tax": "0.00", "tax_lines": [], "taxable": true, "title": "Embroidered linen abaya", "total": "405.00", "total_discount": "45.00", "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M", "vendor": "Layla", "weight_grams": 0 } ], "locale": "en", "name": "#1001", "net_payment": "15.00", "note": "Call before delivery", "number": 1001, "order_discount": "45.00", "payment_fee": "0.00", "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "refunds": [ { "amount": "405.00", "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000055", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "quantity": 1, "restock_type": "return", "subtotal": "405.00", "tax": "0.00" } ], "note": "Wrong size", "restock": true, "shipping": "0.00" } ], "sample": false, "shipping_address": null, "shipping_line": { "final": 1500, "kind": "shipping", "price": 1500, "title": "Doha delivery" }, "source": "draft", "state": "open", "status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162", "subtotal": "450.00", "tags": ["phone", "priority"], "tax_lines": [], "taxes_included": true, "tip": "0.00", "token": "01a14f9f314a7de682d35010a325f162", "total": "420.00", "total_discounts": "45.00", "total_outstanding": "0.00", "total_received": "420.00", "total_refunded": "405.00", "total_shipping": "15.00", "total_tax": "0.00", "transactions": [ { "actor": "Docs", "amount": "420.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000051", "kind": "sale", "method": "manual", "provider": "manual", "status": "success", "test": false }, { "actor": "Docs", "amount": "405.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000056", "kind": "refund", "method": "manual", "provider": "manual", "status": "success", "test": false } ], "updated_at": "2026-10-18T09:30:00Z", "version": 6}Cancel an order
Section titled “Cancel an order”POST /orders/{id}/cancel · Scope: write_orders · Needs an Idempotency-Key header
Reasons: customer, inventory, fraud, declined, staff, other.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cancel" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "reason": "customer", "refund": true, "restock": true, "notify_customer": true}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cancel", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ "reason": "customer", "refund": true, "restock": true, "notify_customer": true }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import os, uuidimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cancel", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), }, json={ "reason": "customer", "refund": True, "restock": True, "notify_customer": True, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cancel');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Idempotency-Key: ' . bin2hex(random_bytes(16)), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'reason' => 'customer', 'refund' => true, 'restock' => true, 'notify_customer' => true, ], JSON_UNESCAPED_UNICODE),]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os" "strings"
"github.com/google/uuid")
func main() { body := `{ "reason": "customer", "refund": true, "restock": true, "notify_customer": true}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cancel", strings.NewReader(body)) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) req.Header.Set("Idempotency-Key", uuid.NewString()) req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cancel");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());req.Content = new StringContent("""{ "reason": "customer", "refund": true, "restock": true, "notify_customer": true}""", Encoding.UTF8, "application/json");var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Archive an order
Section titled “Archive an order”POST /orders/{id}/close · Scope: write_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/close" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/close", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/close", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/close');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/close", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/close");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "attributes": {}, "billing_address": null, "buyer_accepts_marketing": false, "cancel_reason": "", "cancelled_at": null, "checkout_id": null, "closed_at": "2026-10-18T09:30:00Z", "cod_status": "", "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "discount_applications": [], "discount_codes": [], "draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013", "financial_status": "partially_refunded", "fulfillment_orders": [ { "delivery_method": "shipping", "hold_reason": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "remaining": 0 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "status": "closed" } ], "fulfillment_status": "fulfilled", "fulfillments": [ { "created_at": "2026-10-18T09:30:00Z", "fulfillment_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000050", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "name": "#1001-F1", "shipment_status": "in_transit", "status": "success", "tracking_company": "Aramex", "tracking_number": "47012233442", "tracking_url": "https://www.aramex.com/track/results?ShipmentNumber=47012233442" } ], "gift": false, "gift_message": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "lines": [ { "discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}], "fulfilled_quantity": 1, "gift_card": false, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "image": "", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "original_price": "520.00", "price": "450.00", "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "properties": {}, "quantity": 1, "refunded_quantity": 1, "requires_shipping": true, "sku": "ABY-LIN-M", "tax": "0.00", "tax_lines": [], "taxable": true, "title": "Embroidered linen abaya", "total": "405.00", "total_discount": "45.00", "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M", "vendor": "Layla", "weight_grams": 0 } ], "locale": "en", "name": "#1001", "net_payment": "15.00", "note": "Call before delivery", "number": 1001, "order_discount": "45.00", "payment_fee": "0.00", "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "refunds": [ { "amount": "405.00", "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000055", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "quantity": 1, "restock_type": "return", "subtotal": "405.00", "tax": "0.00" } ], "note": "Wrong size", "restock": true, "shipping": "0.00" } ], "sample": false, "shipping_address": null, "shipping_line": { "final": 1500, "kind": "shipping", "price": 1500, "title": "Doha delivery" }, "source": "draft", "state": "archived", "status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162", "subtotal": "450.00", "tags": ["phone", "priority"], "tax_lines": [], "taxes_included": true, "tip": "0.00", "token": "01a14f9f314a7de682d35010a325f162", "total": "420.00", "total_discounts": "45.00", "total_outstanding": "0.00", "total_received": "420.00", "total_refunded": "405.00", "total_shipping": "15.00", "total_tax": "0.00", "transactions": [ { "actor": "Docs", "amount": "420.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000051", "kind": "sale", "method": "manual", "provider": "manual", "status": "success", "test": false }, { "actor": "Docs", "amount": "405.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000056", "kind": "refund", "method": "manual", "provider": "manual", "status": "success", "test": false } ], "updated_at": "2026-10-18T09:30:00Z", "version": 7}Unarchive an order
Section titled “Unarchive an order”POST /orders/{id}/reopen · Scope: write_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/reopen" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/reopen", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/reopen", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/reopen');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/reopen", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/reopen");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{ "attributes": {}, "billing_address": null, "buyer_accepts_marketing": false, "cancel_reason": "", "cancelled_at": null, "checkout_id": null, "closed_at": null, "cod_status": "", "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "customer": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000007", "name": "Noora Al-Kuwari", "orders_count": 1, "phone": "+97455123456" }, "delivery_method": "shipping", "delivery_title": "Doha delivery", "discount_applications": [], "discount_codes": [], "draft_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000013", "financial_status": "partially_refunded", "fulfillment_orders": [ { "delivery_method": "shipping", "hold_reason": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1, "remaining": 0 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "status": "closed" } ], "fulfillment_status": "fulfilled", "fulfillments": [ { "created_at": "2026-10-18T09:30:00Z", "fulfillment_order_id": "0193a1b2-c3d4-7e5f-8a6b-000000000036", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000050", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "quantity": 1 } ], "location": { "id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "name": "West Bay shop" }, "name": "#1001-F1", "shipment_status": "in_transit", "status": "success", "tracking_company": "Aramex", "tracking_number": "47012233442", "tracking_url": "https://www.aramex.com/track/results?ShipmentNumber=47012233442" } ], "gift": false, "gift_message": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000035", "item_count": 1, "lines": [ { "discount_allocations": [{"amount": 4500, "class": "order", "title": "Loyal customer"}], "fulfilled_quantity": 1, "gift_card": false, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "image": "", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "original_price": "520.00", "price": "450.00", "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "properties": {}, "quantity": 1, "refunded_quantity": 1, "requires_shipping": true, "sku": "ABY-LIN-M", "tax": "0.00", "tax_lines": [], "taxable": true, "title": "Embroidered linen abaya", "total": "405.00", "total_discount": "45.00", "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M", "vendor": "Layla", "weight_grams": 0 } ], "locale": "en", "name": "#1001", "net_payment": "15.00", "note": "Call before delivery", "number": 1001, "order_discount": "45.00", "payment_fee": "0.00", "payment_method": "manual", "phone": "+97455123456", "processed_at": "2026-10-18T09:30:00Z", "refunds": [ { "amount": "405.00", "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000055", "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000037", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "quantity": 1, "restock_type": "return", "subtotal": "405.00", "tax": "0.00" } ], "note": "Wrong size", "restock": true, "shipping": "0.00" } ], "sample": false, "shipping_address": null, "shipping_line": { "final": 1500, "kind": "shipping", "price": 1500, "title": "Doha delivery" }, "source": "draft", "state": "open", "status_url": "https://shop.sooquna.test/orders/01a14f9f314a7de682d35010a325f162", "subtotal": "450.00", "tags": ["phone", "priority"], "tax_lines": [], "taxes_included": true, "tip": "0.00", "token": "01a14f9f314a7de682d35010a325f162", "total": "420.00", "total_discounts": "45.00", "total_outstanding": "0.00", "total_received": "420.00", "total_refunded": "405.00", "total_shipping": "15.00", "total_tax": "0.00", "transactions": [ { "actor": "Docs", "amount": "420.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000051", "kind": "sale", "method": "manual", "provider": "manual", "status": "success", "test": false }, { "actor": "Docs", "amount": "405.00", "created_at": "2026-10-18T09:30:00Z", "error_code": "", "gateway_ref": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000056", "kind": "refund", "method": "manual", "provider": "manual", "status": "success", "test": false } ], "updated_at": "2026-10-18T09:30:00Z", "version": 8}Confirm a cash-on-delivery order
Section titled “Confirm a cash-on-delivery order”POST /orders/{id}/cod-confirm · Scope: write_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cod-confirm" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cod-confirm", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cod-confirm", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cod-confirm');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cod-confirm", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/cod-confirm");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());List an order’s tax invoices
Section titled “List an order’s tax invoices”GET /orders/{id}/invoices · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{"data": []}Issue a tax invoice for an order
Section titled “Issue a tax invoice for an order”POST /orders/{id}/invoices · Scope: write_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.post( "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Post, "https://api.sooquna.com/admin/api/2026-10/orders/0193a1b2-c3d4-7e5f-8a6b-000000000035/invoices");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());List abandoned checkouts
Section titled “List abandoned checkouts”GET /abandoned-checkouts · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
limit |
query | For example 20. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts?limit=20" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts?limit=20", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts?limit=20", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts?limit=20');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts?limit=20", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts?limit=20");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{"data": [], "page_info": {"end_cursor": "", "has_next_page": false}}Get an abandoned checkout
Section titled “Get an abandoned checkout”GET /abandoned-checkouts/{id} · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts/0193a1b2-6e4e-7021-831d-c062f3224a2f" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts/0193a1b2-6e4e-7021-831d-c062f3224a2f", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts/0193a1b2-6e4e-7021-831d-c062f3224a2f", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts/0193a1b2-6e4e-7021-831d-c062f3224a2f');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts/0193a1b2-6e4e-7021-831d-c062f3224a2f", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/abandoned-checkouts/0193a1b2-6e4e-7021-831d-c062f3224a2f");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());List tax invoices
Section titled “List tax invoices”GET /invoices · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
from |
query | For example 2026-10-01. |
to |
query | For example 2026-10-31. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/invoices?from=2026-10-01&to=2026-10-31" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/invoices?from=2026-10-01&to=2026-10-31", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/invoices?from=2026-10-01&to=2026-10-31", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/invoices?from=2026-10-01&to=2026-10-31');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/invoices?from=2026-10-01&to=2026-10-31", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/invoices?from=2026-10-01&to=2026-10-31");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Response 200
{"data": []}Get a tax invoice
Section titled “Get a tax invoice”GET /invoices/{id} · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-fcce-7039-8c02-ad9a810b3006" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-fcce-7039-8c02-ad9a810b3006", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-fcce-7039-8c02-ad9a810b3006", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-fcce-7039-8c02-ad9a810b3006');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}$data = json_decode($response, true);print_r($data);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-fcce-7039-8c02-ad9a810b3006", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } data, _ := io.ReadAll(res.Body) fmt.Println(string(data))}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-fcce-7039-8c02-ad9a810b3006");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");Console.WriteLine(await res.Content.ReadAsStringAsync());Download a tax invoice as PDF
Section titled “Download a tax invoice as PDF”GET /invoices/{id}/pdf · Scope: read_orders
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-a106-72b4-8b5d-6a45297a2d2b/pdf" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -o invoice.pdfimport { writeFile } from "node:fs/promises";
const res = await fetch("https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-a106-72b4-8b5d-6a45297a2d2b/pdf", { method: "GET", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, },});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);await writeFile("invoice.pdf", Buffer.from(await res.arrayBuffer()));import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-a106-72b4-8b5d-6a45297a2d2b/pdf", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()with open("invoice.pdf", "wb") as f: f.write(res.content)<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-a106-72b4-8b5d-6a45297a2d2b/pdf');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), ], CURLOPT_RETURNTRANSFER => true,]);$response = curl_exec($ch);$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);if ($status >= 300) { throw new RuntimeException("$status: $response");}file_put_contents('invoice.pdf', $response);package main
import ( "fmt" "io" "net/http" "os")
func main() { req, err := http.NewRequest("GET", "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-a106-72b4-8b5d-6a45297a2d2b/pdf", nil) if err != nil { panic(err) } req.Header.Set("X-Sooquna-Access-Token", os.Getenv("SOOQUNA_TOKEN")) res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() if res.StatusCode >= 300 { data, _ := io.ReadAll(res.Body) panic(fmt.Sprintf("%d: %s", res.StatusCode, data)) } out, err := os.Create("invoice.pdf") if err != nil { panic(err) } defer out.Close() io.Copy(out, res.Body)}using System.Text;
using var client = new HttpClient();var req = new HttpRequestMessage(HttpMethod.Get, "https://api.sooquna.com/admin/api/2026-10/invoices/0193a1b2-a106-72b4-8b5d-6a45297a2d2b/pdf");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));var res = await client.SendAsync(req);if (!res.IsSuccessStatusCode) throw new Exception($"{(int)res.StatusCode}: {await res.Content.ReadAsStringAsync()}");await File.WriteAllBytesAsync("invoice.pdf", await res.Content.ReadAsByteArrayAsync());Was this page helpful?

