Inventory
Stock levels, adjustments, transfers, suppliers and purchase 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 inventory items with stock | GET | /inventory |
| Get stock levels of items | GET | /inventory/levels |
| Adjust stock | POST | /inventory/adjust |
| Move stock between states | POST | /inventory/move |
| Update an inventory item | PATCH | /inventory/items/{id} |
| List an item’s stock changes | GET | /inventory/items/{id}/history |
| Create a stock transfer | POST | /inventory-transfers |
| List stock transfers | GET | /inventory-transfers |
| Get a stock transfer | GET | /inventory-transfers/{id} |
| Update a draft transfer | PUT | /inventory-transfers/{id} |
| Mark a transfer as shipped | POST | /inventory-transfers/{id}/ship |
| Receive a transfer | POST | /inventory-transfers/{id}/receive |
| Cancel a transfer | POST | /inventory-transfers/{id}/cancel |
| Delete a draft transfer | DELETE | /inventory-transfers/{id} |
| Create a supplier | POST | /suppliers |
| List suppliers | GET | /suppliers |
| Update a supplier | PUT | /suppliers/{id} |
| Create a purchase order | POST | /purchase-orders |
| List purchase orders | GET | /purchase-orders |
| Get a purchase order | GET | /purchase-orders/{id} |
| Update a draft purchase order | PUT | /purchase-orders/{id} |
| Mark a purchase order as ordered | POST | /purchase-orders/{id}/order |
| Receive a purchase order | POST | /purchase-orders/{id}/receive |
| Close a purchase order | POST | /purchase-orders/{id}/close |
| Download a purchase order as PDF | GET | /purchase-orders/{id}/pdf |
| Delete a draft purchase order | DELETE | /purchase-orders/{id} |
| Delete a supplier | DELETE | /suppliers/{id} |
List inventory items with stock
Section titled “List inventory items with stock”GET /inventory · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
low_stock |
query | For example true. |
limit |
query | For example 20. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/inventory?low_stock=true&limit=20" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory?low_stock=true&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/inventory?low_stock=true&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/inventory?low_stock=true&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/inventory?low_stock=true&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/inventory?low_stock=true&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": [ { "available": 0, "barcode": "", "committed": 0, "damaged": 0, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "inventory_policy": "deny", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000018", "low_stock_threshold": 5, "on_hand": 0, "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "product_title": "Embroidered linen abaya", "quality_control": 0, "reserved": 0, "safety_stock": 0, "sku": "ABY-LIN-S", "tracked": true, "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000019", "variant_title": "S" }, { "available": 0, "barcode": "", "committed": 0, "damaged": 0, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "inventory_policy": "deny", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000018", "low_stock_threshold": 5, "on_hand": 0, "product_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "product_title": "Embroidered linen abaya", "quality_control": 0, "reserved": 0, "safety_stock": 0, "sku": "ABY-LIN-M", "tracked": true, "variant_id": "0193a1b2-c3d4-7e5f-8a6b-000000000014", "variant_title": "M" } ], "page_info": {"has_next_page": false}}Get stock levels of items
Section titled “Get stock levels of items”GET /inventory/levels · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
item_ids |
query | An ID, as in the example. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/inventory/levels?item_ids=0193a1b2-c3d4-7e5f-8a6b-000000000017" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory/levels?item_ids=0193a1b2-c3d4-7e5f-8a6b-000000000017", { 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/inventory/levels?item_ids=0193a1b2-c3d4-7e5f-8a6b-000000000017", 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/inventory/levels?item_ids=0193a1b2-c3d4-7e5f-8a6b-000000000017');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/inventory/levels?item_ids=0193a1b2-c3d4-7e5f-8a6b-000000000017", 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/inventory/levels?item_ids=0193a1b2-c3d4-7e5f-8a6b-000000000017");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": { "01a14f9e-ff97-7e10-b684-5d874da1452f": [ { "available": 0, "committed": 0, "damaged": 0, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "location_name": "West Bay shop", "on_hand": 0, "quality_control": 0, "reserved": 0, "safety_stock": 0 }, { "available": 0, "committed": 0, "damaged": 0, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "location_name": "Al Wakrah warehouse", "on_hand": 0, "quality_control": 0, "reserved": 0, "safety_stock": 0 } ] }}Adjust stock
Section titled “Adjust stock”POST /inventory/adjust · Scope: write_inventory · Needs an Idempotency-Key header
delta adds or removes units; set replaces the quantity. States: available, damaged, safety_stock, quality_control. Reasons: correction, received, damaged, shrinkage, return_restock, promotion, cycle_count, other.
curl -X POST "https://api.sooquna.com/admin/api/2026-10/inventory/adjust" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "changes": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "set": 12, "reason": "received" }, { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "delta": 5, "reason": "received", "note": "Supplier delivery INV-2210" } ]}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory/adjust", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ "changes": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "set": 12, "reason": "received" }, { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "delta": 5, "reason": "received", "note": "Supplier delivery INV-2210" } ] }),});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/inventory/adjust", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), }, json={ "changes": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "set": 12, "reason": "received", }, { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "delta": 5, "reason": "received", "note": "Supplier delivery INV-2210", }, ], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/inventory/adjust');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([ 'changes' => [ [ 'inventory_item_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000017', 'location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'state' => 'available', 'set' => 12, 'reason' => 'received', ], [ 'inventory_item_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000020', 'location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'state' => 'available', 'delta' => 5, 'reason' => 'received', 'note' => 'Supplier delivery INV-2210', ], ], ], 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 := `{ "changes": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "set": 12, "reason": "received" }, { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "delta": 5, "reason": "received", "note": "Supplier delivery INV-2210" } ]}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/inventory/adjust", 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/inventory/adjust");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());req.Content = new StringContent("""{ "changes": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "set": 12, "reason": "received" }, { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "state": "available", "delta": 5, "reason": "received", "note": "Supplier delivery INV-2210" } ]}""", 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
{ "levels": [ { "available": 12, "committed": 0, "damaged": 0, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "on_hand": 12, "quality_control": 0, "reserved": 0, "safety_stock": 0 }, { "available": 5, "committed": 0, "damaged": 0, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000020", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "on_hand": 5, "quality_control": 0, "reserved": 0, "safety_stock": 0 } ]}Move stock between states
Section titled “Move stock between states”POST /inventory/move · Scope: write_inventory · Needs an Idempotency-Key header
curl -X POST "https://api.sooquna.com/admin/api/2026-10/inventory/move" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "from_state": "available", "to_state": "damaged", "qty": 1, "note": "Torn hem"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory/move", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json", }, body: JSON.stringify({ "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "from_state": "available", "to_state": "damaged", "qty": 1, "note": "Torn hem" }),});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/inventory/move", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), }, json={ "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "from_state": "available", "to_state": "damaged", "qty": 1, "note": "Torn hem", },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/inventory/move');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([ 'inventory_item_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000017', 'location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'from_state' => 'available', 'to_state' => 'damaged', 'qty' => 1, 'note' => 'Torn hem', ], 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 := `{ "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "from_state": "available", "to_state": "damaged", "qty": 1, "note": "Torn hem"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/inventory/move", 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/inventory/move");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Headers.Add("Idempotency-Key", Guid.NewGuid().ToString());req.Content = new StringContent("""{ "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "from_state": "available", "to_state": "damaged", "qty": 1, "note": "Torn hem"}""", 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
{ "levels": [ { "available": 11, "committed": 0, "damaged": 1, "incoming": 0, "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "on_hand": 12, "quality_control": 0, "reserved": 0, "safety_stock": 0 } ]}Update an inventory item
Section titled “Update an inventory item”PATCH /inventory/items/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"tracked": true, "low_stock_threshold": 3}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017", { method: "PATCH", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"tracked": true, "low_stock_threshold": 3}),});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/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={"tracked": True, "low_stock_threshold": 3},)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017');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(['tracked' => true, 'low_stock_threshold' => 3], 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 := `{"tracked": true, "low_stock_threshold": 3}` req, err := http.NewRequest("PATCH", "https://api.sooquna.com/admin/api/2026-10/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017", 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/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"tracked": true, "low_stock_threshold": 3}""", 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 204
{}List an item’s stock changes
Section titled “List an item’s stock changes”GET /inventory/items/{id}/history · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
limit |
query | For example 20. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017/history?limit=20" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017/history?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/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017/history?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/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017/history?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/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017/history?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/inventory/items/0193a1b2-c3d4-7e5f-8a6b-000000000017/history?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": [ { "actor": "Docs", "created_at": "2026-10-18T09:30:00Z", "delta": 1, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000025", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "location_name": "West Bay shop", "note": "Torn hem", "quantity_after": 1, "reason": "movement", "reference_id": "", "reference_type": "", "state": "damaged" }, { "actor": "Docs", "created_at": "2026-10-18T09:30:00Z", "delta": -1, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000026", "location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "location_name": "West Bay shop", "note": "Torn hem", "quantity_after": 11, "reason": "movement", "reference_id": "", "reference_type": "", "state": "available" } ], "page_info": {"has_next_page": false}}Create a stock transfer
Section titled “Create a stock transfer”POST /inventory-transfers · Scope: write_inventory
curl -X POST "https://api.sooquna.com/admin/api/2026-10/inventory-transfers" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 2 } ]}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 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.post( "https://api.sooquna.com/admin/api/2026-10/inventory-transfers", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 2, }, ], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/inventory-transfers');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([ 'origin_location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'destination_location_id' => '0193a1b2-c810-7698-8039-998bb6c1a849', 'reference' => 'TR-1001', 'lines' => [ [ 'inventory_item_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000017', 'qty' => 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 := `{ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 2 } ]}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/inventory-transfers", 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/inventory-transfers");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 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 201
{ "created_at": "2026-10-18T09:30:00Z", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "destination_name": "Al Wakrah warehouse", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000022", "lines": [ { "barcode": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000024", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "product_title": "Embroidered linen abaya", "qty": 2, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-S", "variant_title": "S" } ], "name": "#T1001", "notes": "", "number": 1001, "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "origin_name": "West Bay shop", "received_qty": 0, "reference": "TR-1001", "shipped_at": null, "status": "draft", "total_qty": 2, "version": 1}List stock transfers
Section titled “List stock transfers”GET /inventory-transfers · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
status |
query | For example draft. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/inventory-transfers?status=draft" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers?status=draft", { 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/inventory-transfers?status=draft", 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/inventory-transfers?status=draft');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/inventory-transfers?status=draft", 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/inventory-transfers?status=draft");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": [ { "created_at": "2026-10-18T09:30:00Z", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "destination_name": "Al Wakrah warehouse", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000022", "name": "#T1001", "notes": "", "number": 1001, "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "origin_name": "West Bay shop", "received_qty": 0, "reference": "TR-1001", "shipped_at": null, "status": "draft", "total_qty": 2, "version": 1 } ], "has_more": false}Get a stock transfer
Section titled “Get a stock transfer”GET /inventory-transfers/{id} · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", { 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022');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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022");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
{ "created_at": "2026-10-18T09:30:00Z", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "destination_name": "Al Wakrah warehouse", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000022", "lines": [ { "barcode": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000024", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "product_title": "Embroidered linen abaya", "qty": 2, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-S", "variant_title": "S" } ], "name": "#T1001", "notes": "", "number": 1001, "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "origin_name": "West Bay shop", "received_qty": 0, "reference": "TR-1001", "shipped_at": null, "status": "draft", "total_qty": 2, "version": 1}Update a draft transfer
Section titled “Update a draft transfer”PUT /inventory-transfers/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "notes": "Eid stock for the warehouse", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 3 } ], "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "notes": "Eid stock for the warehouse", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 3 } ], "version": 1 }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.put( "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "notes": "Eid stock for the warehouse", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 3, }, ], "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'origin_location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'destination_location_id' => '0193a1b2-c810-7698-8039-998bb6c1a849', 'reference' => 'TR-1001', 'notes' => 'Eid stock for the warehouse', 'lines' => [ [ 'inventory_item_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000017', 'qty' => 3, ], ], 'version' => 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")
func main() { body := `{ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "notes": "Eid stock for the warehouse", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 3 } ], "version": 1}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", 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.Put, "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_location_id": "0193a1b2-c810-7698-8039-998bb6c1a849", "reference": "TR-1001", "notes": "Eid stock for the warehouse", "lines": [ { "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "qty": 3 } ], "version": 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 200
{ "created_at": "2026-10-18T09:30:00Z", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "destination_name": "Al Wakrah warehouse", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000022", "lines": [ { "barcode": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000054", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "product_title": "Embroidered linen abaya", "qty": 3, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-S", "variant_title": "S" } ], "name": "#T1001", "notes": "Eid stock for the warehouse", "number": 1001, "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "origin_name": "West Bay shop", "received_qty": 0, "reference": "TR-1001", "shipped_at": null, "status": "draft", "total_qty": 3, "version": 2}Mark a transfer as shipped
Section titled “Mark a transfer as shipped”POST /inventory-transfers/{id}/ship · Scope: write_inventory · 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/ship" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/ship", { 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/ship", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/ship');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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/ship", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/ship");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
{ "created_at": "2026-10-18T09:30:00Z", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "destination_name": "Al Wakrah warehouse", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000022", "lines": [ { "barcode": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000054", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "product_title": "Embroidered linen abaya", "qty": 3, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-S", "variant_title": "S" } ], "name": "#T1001", "notes": "Eid stock for the warehouse", "number": 1001, "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "origin_name": "West Bay shop", "received_qty": 0, "reference": "TR-1001", "shipped_at": "2026-10-18T09:30:00Z", "status": "in_transit", "total_qty": 3, "version": 3}Receive a transfer
Section titled “Receive a transfer”POST /inventory-transfers/{id}/receive · Scope: write_inventory · 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/receive" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000024", "accepted": 3, "rejected": 0 } ]}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/receive", { 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-000000000024", "accepted": 3, "rejected": 0 } ] }),});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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/receive", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), }, json={ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000024", "accepted": 3, "rejected": 0, }, ], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/receive');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-000000000024', 'accepted' => 3, 'rejected' => 0, ], ], ], 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-000000000024", "accepted": 3, "rejected": 0 } ]}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/receive", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/receive");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-000000000024", "accepted": 3, "rejected": 0 } ]}""", 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
{ "created_at": "2026-10-18T09:30:00Z", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000021", "destination_name": "Al Wakrah warehouse", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000022", "lines": [ { "barcode": "", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000054", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000017", "product_title": "Embroidered linen abaya", "qty": 3, "received_qty": 3, "rejected_qty": 0, "sku": "ABY-LIN-S", "variant_title": "S" } ], "name": "#T1001", "notes": "Eid stock for the warehouse", "number": 1001, "origin_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "origin_name": "West Bay shop", "received_qty": 3, "reference": "TR-1001", "shipped_at": "2026-10-18T09:30:00Z", "status": "received", "total_qty": 3, "version": 4}Cancel a transfer
Section titled “Cancel a transfer”POST /inventory-transfers/{id}/cancel · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/cancel" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/cancel", { 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/cancel", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/cancel');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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/cancel", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022/cancel");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());Delete a draft transfer
Section titled “Delete a draft transfer”DELETE /inventory-transfers/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", { method: "DELETE", 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.delete( "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", 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/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'DELETE', 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("DELETE", "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022", 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.Delete, "https://api.sooquna.com/admin/api/2026-10/inventory-transfers/0193a1b2-c3d4-7e5f-8a6b-000000000022");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());Create a supplier
Section titled “Create a supplier”POST /suppliers · Scope: write_inventory
curl -X POST "https://api.sooquna.com/admin/api/2026-10/suppliers" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Al Noor Textiles", "contact": { "name": "Ahmed Saleh", "email": "[email protected]", "phone": "+97455001122" }, "address": { "address1": "Industrial Area Street 41", "city": "Doha", "country": "QA" }, "currency": "QAR"}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/suppliers", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Al Noor Textiles", "contact": { "name": "Ahmed Saleh", "phone": "+97455001122" }, "address": { "address1": "Industrial Area Street 41", "city": "Doha", "country": "QA" }, "currency": "QAR" }),});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/suppliers", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "name": "Al Noor Textiles", "contact": { "name": "Ahmed Saleh", "phone": "+97455001122", }, "address": { "address1": "Industrial Area Street 41", "city": "Doha", "country": "QA", }, "currency": "QAR", },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/suppliers');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([ 'name' => 'Al Noor Textiles', 'contact' => [ 'name' => 'Ahmed Saleh', 'phone' => '+97455001122', ], 'address' => [ 'address1' => 'Industrial Area Street 41', 'city' => 'Doha', 'country' => 'QA', ], 'currency' => 'QAR', ], 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 := `{ "name": "Al Noor Textiles", "contact": { "name": "Ahmed Saleh", "email": "[email protected]", "phone": "+97455001122" }, "address": { "address1": "Industrial Area Street 41", "city": "Doha", "country": "QA" }, "currency": "QAR"}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/suppliers", 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/suppliers");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "name": "Al Noor Textiles", "contact": { "name": "Ahmed Saleh", "email": "[email protected]", "phone": "+97455001122" }, "address": { "address1": "Industrial Area Street 41", "city": "Doha", "country": "QA" }, "currency": "QAR"}""", 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
{ "address": { "address1": "Industrial Area Street 41", "address2": "", "city": "Doha", "country": "QA", "postal_code": "", "region": "" }, "contact": { "name": "Ahmed Saleh", "phone": "+97455001122" }, "currency": "QAR", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "name": "Al Noor Textiles", "notes": "", "version": 1}List suppliers
Section titled “List suppliers”GET /suppliers · Scope: read_inventory
curl -X GET "https://api.sooquna.com/admin/api/2026-10/suppliers" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/suppliers", { 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/suppliers", 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/suppliers');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/suppliers", 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/suppliers");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": [ { "address": { "address1": "Industrial Area Street 41", "address2": "", "city": "Doha", "country": "QA", "postal_code": "", "region": "" }, "contact": { "name": "Ahmed Saleh", "phone": "+97455001122" }, "currency": "QAR", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "name": "Al Noor Textiles", "notes": "", "version": 1 } ]}Update a supplier
Section titled “Update a supplier”PUT /suppliers/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Al Noor Textiles", "contact": {"name": "Ahmed Saleh", "email": "[email protected]"}, "currency": "QAR", "notes": "Net 30", "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Al Noor Textiles", "currency": "QAR", "notes": "Net 30", "version": 1 }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.put( "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "name": "Al Noor Textiles", "currency": "QAR", "notes": "Net 30", "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'name' => 'Al Noor Textiles', 'currency' => 'QAR', 'notes' => 'Net 30', 'version' => 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")
func main() { body := `{ "name": "Al Noor Textiles", "contact": {"name": "Ahmed Saleh", "email": "[email protected]"}, "currency": "QAR", "notes": "Net 30", "version": 1}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040", 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.Put, "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "name": "Al Noor Textiles", "contact": {"name": "Ahmed Saleh", "email": "[email protected]"}, "currency": "QAR", "notes": "Net 30", "version": 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 200
{ "address": { "address1": "", "address2": "", "city": "", "country": "", "postal_code": "", "region": "" }, "currency": "QAR", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "name": "Al Noor Textiles", "notes": "Net 30", "version": 2}Create a purchase order
Section titled “Create a purchase order”POST /purchase-orders · Scope: write_inventory
curl -X POST "https://api.sooquna.com/admin/api/2026-10/purchase-orders" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 20, "cost": "180.00" } ]}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 20, "cost": "180.00" } ] }),});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/purchase-orders", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 20, "cost": "180.00", }, ], },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/purchase-orders');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([ 'supplier_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000040', 'destination_location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'currency' => 'QAR', 'payment_terms' => 'net_30', 'reference' => 'PO-2210', 'lines' => [ [ 'inventory_item_id' => '0193a1b2-515c-7600-8567-54a045bc4ee8', 'qty' => 20, 'cost' => '180.00', ], ], ], 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 := `{ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 20, "cost": "180.00" } ]}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/purchase-orders", 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/purchase-orders");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 20, "cost": "180.00" } ]}""", 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
{ "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_name": "West Bay shop", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000039", "lines": [ { "barcode": "", "cost": "180.00", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000041", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000042", "product_title": "Embroidered linen abaya", "qty": 20, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-L", "variant_title": "L" } ], "name": "#PO1001", "notes": "", "number": 1001, "ordered_at": null, "payment_terms": "net_30", "received_qty": 0, "reference": "PO-2210", "shipping_cost": "0.00", "status": "draft", "subtotal": "3600.00", "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "supplier_name": "Al Noor Textiles", "total": "3600.00", "total_qty": 20, "version": 1}List purchase orders
Section titled “List purchase orders”GET /purchase-orders · Scope: read_inventory
curl -X GET "https://api.sooquna.com/admin/api/2026-10/purchase-orders" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders", { 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/purchase-orders", 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/purchase-orders');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/purchase-orders", 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/purchase-orders");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": [ { "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_name": "West Bay shop", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000039", "name": "#PO1001", "notes": "", "number": 1001, "ordered_at": null, "payment_terms": "", "received_qty": 0, "reference": "PO-2210", "shipping_cost": "0.00", "status": "draft", "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "supplier_name": "Al Noor Textiles", "total_qty": 20, "version": 1 } ], "has_more": false}Get a purchase order
Section titled “Get a purchase order”GET /purchase-orders/{id} · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", { 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039');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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039");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
{ "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_name": "West Bay shop", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000039", "lines": [ { "barcode": "", "cost": "180.00", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000041", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000042", "product_title": "Embroidered linen abaya", "qty": 20, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-L", "variant_title": "L" } ], "name": "#PO1001", "notes": "", "number": 1001, "ordered_at": null, "payment_terms": "net_30", "received_qty": 0, "reference": "PO-2210", "shipping_cost": "0.00", "status": "draft", "subtotal": "3600.00", "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "supplier_name": "Al Noor Textiles", "total": "3600.00", "total_qty": 20, "version": 1}Update a draft purchase order
Section titled “Update a draft purchase order”PUT /purchase-orders/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 24, "cost": "180.00" } ], "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 24, "cost": "180.00" } ], "version": 1 }),});if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);const data = await res.json();console.log(data);import osimport requests
res = requests.put( "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 24, "cost": "180.00", }, ], "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_HTTPHEADER => [ 'X-Sooquna-Access-Token: ' . getenv('SOOQUNA_TOKEN'), 'Content-Type: application/json', ], CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode([ 'supplier_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000040', 'destination_location_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000023', 'currency' => 'QAR', 'payment_terms' => 'net_30', 'reference' => 'PO-2210', 'lines' => [ [ 'inventory_item_id' => '0193a1b2-515c-7600-8567-54a045bc4ee8', 'qty' => 24, 'cost' => '180.00', ], ], 'version' => 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")
func main() { body := `{ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 24, "cost": "180.00" } ], "version": 1}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", 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.Put, "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "currency": "QAR", "payment_terms": "net_30", "reference": "PO-2210", "lines": [ { "inventory_item_id": "0193a1b2-515c-7600-8567-54a045bc4ee8", "qty": 24, "cost": "180.00" } ], "version": 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 200
{ "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_name": "West Bay shop", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000039", "lines": [ { "barcode": "", "cost": "180.00", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000063", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000042", "product_title": "Embroidered linen abaya", "qty": 24, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-L", "variant_title": "L" } ], "name": "#PO1001", "notes": "", "number": 1001, "ordered_at": null, "payment_terms": "net_30", "received_qty": 0, "reference": "PO-2210", "shipping_cost": "0.00", "status": "draft", "subtotal": "4320.00", "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "supplier_name": "Al Noor Textiles", "total": "4320.00", "total_qty": 24, "version": 2}Mark a purchase order as ordered
Section titled “Mark a purchase order as ordered”POST /purchase-orders/{id}/order · Scope: write_inventory · 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/order" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/order", { 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/order", 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/order');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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/order", 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/order");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
{ "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_name": "West Bay shop", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000039", "lines": [ { "barcode": "", "cost": "180.00", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000063", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000042", "product_title": "Embroidered linen abaya", "qty": 24, "received_qty": 0, "rejected_qty": 0, "sku": "ABY-LIN-L", "variant_title": "L" } ], "name": "#PO1001", "notes": "", "number": 1001, "ordered_at": "2026-10-18T09:30:00Z", "payment_terms": "net_30", "received_qty": 0, "reference": "PO-2210", "shipping_cost": "0.00", "status": "ordered", "subtotal": "4320.00", "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "supplier_name": "Al Noor Textiles", "total": "4320.00", "total_qty": 24, "version": 3}Receive a purchase order
Section titled “Receive a purchase order”POST /purchase-orders/{id}/receive · Scope: write_inventory · 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/receive" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000041", "accepted": 24, "rejected": 0 } ], "update_cost": true}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/receive", { 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-000000000041", "accepted": 24, "rejected": 0 } ], "update_cost": 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/receive", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], "Idempotency-Key": str(uuid.uuid4()), }, json={ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000041", "accepted": 24, "rejected": 0, }, ], "update_cost": True, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/receive');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-000000000041', 'accepted' => 24, 'rejected' => 0, ], ], 'update_cost' => 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 := `{ "lines": [ { "line_id": "0193a1b2-c3d4-7e5f-8a6b-000000000041", "accepted": 24, "rejected": 0 } ], "update_cost": true}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/receive", 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/receive");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-000000000041", "accepted": 24, "rejected": 0 } ], "update_cost": 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
{ "created_at": "2026-10-18T09:30:00Z", "currency": "QAR", "destination_location_id": "0193a1b2-c3d4-7e5f-8a6b-000000000023", "destination_name": "West Bay shop", "expected_at": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000039", "lines": [ { "barcode": "", "cost": "180.00", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000063", "inventory_item_id": "0193a1b2-c3d4-7e5f-8a6b-000000000042", "product_title": "Embroidered linen abaya", "qty": 24, "received_qty": 24, "rejected_qty": 0, "sku": "ABY-LIN-L", "variant_title": "L" } ], "name": "#PO1001", "notes": "", "number": 1001, "ordered_at": "2026-10-18T09:30:00Z", "payment_terms": "net_30", "received_qty": 24, "reference": "PO-2210", "shipping_cost": "0.00", "status": "received", "subtotal": "4320.00", "supplier_id": "0193a1b2-c3d4-7e5f-8a6b-000000000040", "supplier_name": "Al Noor Textiles", "total": "4320.00", "total_qty": 24, "version": 4}Close a purchase order
Section titled “Close a purchase order”POST /purchase-orders/{id}/close · Scope: write_inventory
Closes an order that won’t be received in full; fully received orders close themselves.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/close" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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());Download a purchase order as PDF
Section titled “Download a purchase order as PDF”GET /purchase-orders/{id}/pdf · Scope: read_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/pdf" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -o PO-2210.pdfimport { writeFile } from "node:fs/promises";
const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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("PO-2210.pdf", Buffer.from(await res.arrayBuffer()));import osimport requests
res = requests.get( "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/pdf", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], },)res.raise_for_status()with open("PO-2210.pdf", "wb") as f: f.write(res.content)<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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('PO-2210.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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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("PO-2210.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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039/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("PO-2210.pdf", await res.Content.ReadAsByteArrayAsync());Delete a draft purchase order
Section titled “Delete a draft purchase order”DELETE /purchase-orders/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", { method: "DELETE", 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.delete( "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", 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/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'DELETE', 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("DELETE", "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039", 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.Delete, "https://api.sooquna.com/admin/api/2026-10/purchase-orders/0193a1b2-c3d4-7e5f-8a6b-000000000039");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());Delete a supplier
Section titled “Delete a supplier”DELETE /suppliers/{id} · Scope: write_inventory
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040", { method: "DELETE", 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.delete( "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040", 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/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040');curl_setopt_array($ch, [ CURLOPT_CUSTOMREQUEST => 'DELETE', 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("DELETE", "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040", 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.Delete, "https://api.sooquna.com/admin/api/2026-10/suppliers/0193a1b2-c3d4-7e5f-8a6b-000000000040");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());Was this page helpful?

