Gift cards
Gift cards and their balances. 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 |
|---|---|---|
| Issue a gift card | POST | /gift-cards |
| List gift cards | GET | /gift-cards |
| Get a gift card | GET | /gift-cards/{id} |
| Update a gift card | PUT | /gift-cards/{id} |
| Adjust a gift card’s balance | POST | /gift-cards/{id}/adjust |
| Disable a gift card | POST | /gift-cards/{id}/disable |
| Enable a gift card | POST | /gift-cards/{id}/enable |
Issue a gift card
Section titled “Issue a gift card”POST /gift-cards · Scope: write_gift_cards
curl -X POST "https://api.sooquna.com/admin/api/2026-10/gift-cards" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "value": "250.00", "recipient_email": "[email protected]", "recipient_name": "Noora", "message": "Eid Mubarak!", "no_expiry": true, "notify": false}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "value": "250.00", "recipient_name": "Noora", "message": "Eid Mubarak!", "no_expiry": true, "notify": false }),});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/gift-cards", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "value": "250.00", "recipient_name": "Noora", "message": "Eid Mubarak!", "no_expiry": True, "notify": False, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/gift-cards');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([ 'value' => '250.00', 'recipient_name' => 'Noora', 'message' => 'Eid Mubarak!', 'no_expiry' => true, 'notify' => false, ], 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 := `{ "value": "250.00", "recipient_email": "[email protected]", "recipient_name": "Noora", "message": "Eid Mubarak!", "no_expiry": true, "notify": false}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/gift-cards", 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/gift-cards");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "value": "250.00", "recipient_email": "[email protected]", "recipient_name": "Noora", "message": "Eid Mubarak!", "no_expiry": true, "notify": false}""", 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
{ "balance": 25000, "code": "F99N Y2QF CNQ5 5Z99", "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": null, "expires_on": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "active", "transactions": [ { "actor": "Docs", "amount": 25000, "balance_after": 25000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000016", "kind": "issue", "note": "Issued", "order_id": null } ], "version": 1}List gift cards
Section titled “List gift cards”GET /gift-cards · Scope: read_gift_cards
| Parameter | In | Description |
|---|---|---|
status |
query | For example active. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/gift-cards?status=active" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards?status=active", { 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/gift-cards?status=active", 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/gift-cards?status=active');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/gift-cards?status=active", 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/gift-cards?status=active");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": [ { "balance": 25000, "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": null, "expires_on": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "active", "version": 1 } ], "page_info": {"end_cursor": "", "has_next_page": false}}Get a gift card
Section titled “Get a gift card”GET /gift-cards/{id} · Scope: read_gift_cards
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015", { 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015');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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015");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
{ "balance": 25000, "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": null, "expires_on": null, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "active", "transactions": [ { "actor": "Docs", "amount": 25000, "balance_after": 25000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000016", "kind": "issue", "note": "Issued", "order_id": null } ], "version": 1}Update a gift card
Section titled “Update a gift card”PUT /gift-cards/{id} · Scope: write_gift_cards
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "expires_on": "2027-12-31", "note": "Customer service goodwill", "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "expires_on": "2027-12-31", "note": "Customer service goodwill", "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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "expires_on": "2027-12-31", "note": "Customer service goodwill", "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015');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([ 'expires_on' => '2027-12-31', 'note' => 'Customer service goodwill', '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 := `{ "expires_on": "2027-12-31", "note": "Customer service goodwill", "version": 1}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "expires_on": "2027-12-31", "note": "Customer service goodwill", "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
{ "balance": 25000, "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": null, "expires_on": "2027-12-31", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "Customer service goodwill", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "active", "transactions": [ { "actor": "Docs", "amount": 25000, "balance_after": 25000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000016", "kind": "issue", "note": "Issued", "order_id": null } ], "version": 2}Adjust a gift card’s balance
Section titled “Adjust a gift card’s balance”POST /gift-cards/{id}/adjust · Scope: write_gift_cards
A signed amount: +50.00 adds, -20.00 takes off.
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/adjust" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{"amount": "+50.00", "reason": "Delivery delay apology", "version": 1}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/adjust", { method: "POST", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({"amount": "+50.00", "reason": "Delivery delay apology", "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.post( "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/adjust", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "amount": "+50.00", "reason": "Delivery delay apology", "version": 1, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/adjust');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([ 'amount' => '+50.00', 'reason' => 'Delivery delay apology', '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 := `{"amount": "+50.00", "reason": "Delivery delay apology", "version": 1}` req, err := http.NewRequest("POST", "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/adjust", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/adjust");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{"amount": "+50.00", "reason": "Delivery delay apology", "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
{ "balance": 30000, "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": null, "expires_on": "2027-12-31", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "Customer service goodwill", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "active", "transactions": [ { "actor": "Docs", "amount": 5000, "balance_after": 30000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000053", "kind": "adjust", "note": "Delivery delay apology", "order_id": null }, { "actor": "Docs", "amount": 25000, "balance_after": 25000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000016", "kind": "issue", "note": "Issued", "order_id": null } ], "version": 3}Disable a gift card
Section titled “Disable a gift card”POST /gift-cards/{id}/disable · Scope: write_gift_cards
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/disable" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/disable", { 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/disable", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/disable');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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/disable", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/disable");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
{ "balance": 30000, "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": "2026-10-18T09:30:00Z", "expires_on": "2027-12-31", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "Customer service goodwill", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "disabled", "transactions": [ { "actor": "Docs", "amount": 5000, "balance_after": 30000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000053", "kind": "adjust", "note": "Delivery delay apology", "order_id": null }, { "actor": "Docs", "amount": 25000, "balance_after": 25000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000016", "kind": "issue", "note": "Issued", "order_id": null } ], "version": 4}Enable a gift card
Section titled “Enable a gift card”POST /gift-cards/{id}/enable · Scope: write_gift_cards
| Parameter | In | Description |
|---|---|---|
id |
path | The resource’s ID. |
curl -X POST "https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/enable" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/enable", { 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/enable", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/enable');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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/enable", 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/gift-cards/0193a1b2-c3d4-7e5f-8a6b-000000000015/enable");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
{ "balance": 30000, "created_at": "2026-10-18T09:30:00Z", "created_by": "Docs", "currency": "QAR", "customer_id": null, "disabled_at": null, "expires_on": "2027-12-31", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000015", "initial_value": 25000, "last4": "5Z99", "message": "Eid Mubarak!", "note": "Customer service goodwill", "order_id": null, "recipient_name": "Noora", "send_at": null, "sent_at": null, "source": "manual", "status": "active", "transactions": [ { "actor": "Docs", "amount": 5000, "balance_after": 30000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000053", "kind": "adjust", "note": "Delivery delay apology", "order_id": null }, { "actor": "Docs", "amount": 25000, "balance_after": 25000, "created_at": "2026-10-18T09:30:00Z", "id": "0193a1b2-c3d4-7e5f-8a6b-000000000016", "kind": "issue", "note": "Issued", "order_id": null } ], "version": 5}Was this page helpful?

