Translations
Languages and translated content. 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 the store’s published languages | GET | /locales |
| Get a resource’s translations | GET | /translations |
| List resources and their translation status | GET | /translations/resources |
| Save translations | PUT | /translations |
List the store’s published languages
Section titled “List the store’s published languages”GET /locales · Scope: read_translations
curl -X GET "https://api.sooquna.com/admin/api/2026-10/locales" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/locales", { 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/locales", 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/locales');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/locales", 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/locales");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
{ "available": [ {"code": "ur", "dir": "rtl", "endonym": "اردو", "name": "Urdu"}, {"code": "fa", "dir": "rtl", "endonym": "فارسی", "name": "Persian"} ], "limit": 5, "locales": [ { "code": "en", "dir": "ltr", "endonym": "English", "name": "English", "primary": true, "published": true }, { "code": "ar", "dir": "rtl", "endonym": "العربية", "name": "Arabic", "primary": false, "published": true } ], "settings": { "arabic_digits": false, "hijri_dates": false, "money_formats": {}, "translate_handles": false }}Get a resource’s translations
Section titled “Get a resource’s translations”GET /translations · Scope: read_translations
| Parameter | In | Description |
|---|---|---|
resource_type |
query | For example product. |
resource_id |
query | An ID, as in the example. |
locale |
query | For example ar. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/translations?resource_type=product&resource_id=0193a1b2-c3d4-7e5f-8a6b-000000000005&locale=ar" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/translations?resource_type=product&resource_id=0193a1b2-c3d4-7e5f-8a6b-000000000005&locale=ar", { 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/translations?resource_type=product&resource_id=0193a1b2-c3d4-7e5f-8a6b-000000000005&locale=ar", 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/translations?resource_type=product&resource_id=0193a1b2-c3d4-7e5f-8a6b-000000000005&locale=ar');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/translations?resource_type=product&resource_id=0193a1b2-c3d4-7e5f-8a6b-000000000005&locale=ar", 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/translations?resource_type=product&resource_id=0193a1b2-c3d4-7e5f-8a6b-000000000005&locale=ar");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
{ "fields": [ { "key": "title", "kind": "text", "outdated": false, "source": "Embroidered linen abaya", "value": "" }, { "key": "handle", "kind": "handle", "outdated": false, "source": "embroidered-linen-abaya", "value": "" } ], "id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "type": "product"}List resources and their translation status
Section titled “List resources and their translation status”GET /translations/resources · Scope: read_translations
| Parameter | In | Description |
|---|---|---|
type |
query | For example product. |
locale |
query | For example ar. |
curl -X GET "https://api.sooquna.com/admin/api/2026-10/translations/resources?type=product&locale=ar" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"const res = await fetch("https://api.sooquna.com/admin/api/2026-10/translations/resources?type=product&locale=ar", { 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/translations/resources?type=product&locale=ar", 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/translations/resources?type=product&locale=ar');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/translations/resources?type=product&locale=ar", 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/translations/resources?type=product&locale=ar");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": [ { "fields": 6, "id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "outdated": 0, "title": "Embroidered linen abaya", "translated": 0, "type": "product" } ], "types": ["product", "collection"]}Save translations
Section titled “Save translations”PUT /translations · Scope: write_translations
curl -X PUT "https://api.sooquna.com/admin/api/2026-10/translations" \ -H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "resource_type": "product", "resource_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "values": { "title": "عباية كتان مطرزة", "body_html": "<p>كتان ناعم مطرز يدوياً في الدوحة.</p>" }}'const res = await fetch("https://api.sooquna.com/admin/api/2026-10/translations", { method: "PUT", headers: { "X-Sooquna-Access-Token": process.env.SOOQUNA_TOKEN, "Content-Type": "application/json", }, body: JSON.stringify({ "resource_type": "product", "resource_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "values": { "title": "عباية كتان مطرزة", "body_html": "<p>كتان ناعم مطرز يدوياً في الدوحة.</p>" } }),});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/translations", headers={ "X-Sooquna-Access-Token": os.environ["SOOQUNA_TOKEN"], }, json={ "resource_type": "product", "resource_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "values": { "title": "عباية كتان مطرزة", "body_html": "<p>كتان ناعم مطرز يدوياً في الدوحة.</p>", }, },)res.raise_for_status()print(res.json())<?php$ch = curl_init('https://api.sooquna.com/admin/api/2026-10/translations');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([ 'resource_type' => 'product', 'resource_id' => '0193a1b2-c3d4-7e5f-8a6b-000000000005', 'locale' => 'ar', 'values' => [ 'title' => 'عباية كتان مطرزة', 'body_html' => '<p>كتان ناعم مطرز يدوياً في الدوحة.</p>', ], ], 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 := `{ "resource_type": "product", "resource_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "values": { "title": "عباية كتان مطرزة", "body_html": "<p>كتان ناعم مطرز يدوياً في الدوحة.</p>" }}` req, err := http.NewRequest("PUT", "https://api.sooquna.com/admin/api/2026-10/translations", 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/translations");req.Headers.Add("X-Sooquna-Access-Token", Environment.GetEnvironmentVariable("SOOQUNA_TOKEN"));req.Content = new StringContent("""{ "resource_type": "product", "resource_id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "values": { "title": "عباية كتان مطرزة", "body_html": "<p>كتان ناعم مطرز يدوياً في الدوحة.</p>" }}""", 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
{ "fields": [ { "key": "title", "kind": "text", "outdated": false, "source": "Embroidered linen abaya", "value": "عباية كتان مطرزة" }, { "key": "body_html", "kind": "html", "outdated": false, "source": "", "value": "<p>كتان ناعم مطرز يدوياً في الدوحة.</p>" } ], "id": "0193a1b2-c3d4-7e5f-8a6b-000000000005", "locale": "ar", "type": "product"}Was this page helpful?

