Skip to content

Files

Files and uploads. 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
Start a file upload POST /files/uploads
Finish a file upload POST /files/uploads/{id}/complete
Import a file from a URL POST /files/imports
List files GET /files
Get a file GET /files/{id}
Update a file’s alt text PATCH /files/{id}
Download a file GET /files/{id}/download
List where a file is used GET /files/{id}/usage
Delete a file DELETE /files/{id}

POST /files/uploads · Scope: write_files

Returns a signed URL; PUT the file there, then complete the upload.

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/files/uploads" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filename": "abaya-front.jpg",
"content_type": "image/jpeg",
"size": 482113,
"purpose": "product_media"
}'

POST /files/uploads/{id}/complete · Scope: write_files

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/files/uploads/0193a1b2-e283-7594-8a2c-0c28281e9c62/complete" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

POST /files/imports · Scope: write_files

Terminal window
curl -X POST "https://api.sooquna.com/admin/api/2026-10/files/imports" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://cdn.example.com/abaya-front.jpg",
"purpose": "product_media"
}'

GET /files · Scope: read_files

Parameter In Description
kind query For example image.
limit query For example 20.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/files?kind=image&limit=20" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"
Response 200
{"data": [], "page_info": {"has_next_page": false}}

GET /files/{id} · Scope: read_files

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/files/0193a1b2-b156-780e-84f5-048f32443475" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

PATCH /files/{id} · Scope: write_files

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X PATCH "https://api.sooquna.com/admin/api/2026-10/files/0193a1b2-b156-780e-84f5-048f32443475" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"alt": "Embroidered linen abaya",
"alt_translations": {"ar": "عباية كتان مطرزة"},
"version": 1
}'

GET /files/{id}/download · Scope: read_files

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/files/0193a1b2-98fc-7bd2-8bf0-91459d0341d6/download" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN" \
-o abaya-front.jpg

GET /files/{id}/usage · Scope: read_files

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X GET "https://api.sooquna.com/admin/api/2026-10/files/0193a1b2-346e-7c53-8e35-095de053aa58/usage" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

DELETE /files/{id} · Scope: write_files

Parameter In Description
id path The resource’s ID.
Terminal window
curl -X DELETE "https://api.sooquna.com/admin/api/2026-10/files/0193a1b2-b156-780e-84f5-048f32443475" \
-H "X-Sooquna-Access-Token: $SOOQUNA_TOKEN"

Was this page helpful?