Skip to Content
devhelp shopDocs

Admin — Catalog

Create and manage products, variants, collections, and media.

Read a media item

GET
/admin/v1/media/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
status*string
Value in"pending""ready""deleted"
url*string
contentType*string
byteSize*number
width*number|null
height*number|null
alt*string|null
createdAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/media/string'
Example Response
{  "id": "string",  "status": "pending",  "url": "string",  "contentType": "string",  "byteSize": 0,  "width": 0,  "height": 0,  "alt": "string",  "createdAt": "2019-08-24T14:15:22Z"}

Update a media item

PATCH
/admin/v1/media/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
alt*string|null

Response Body

OK

application/json
  1. response
id*string
status*string
Value in"pending""ready""deleted"
url*string
contentType*string
byteSize*number
width*number|null
height*number|null
alt*string|null
createdAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/admin/v1/media/string' \  -H 'Content-Type: application/json' \  -d '{  "alt": "string"}'
Example Response
{  "id": "string",  "status": "pending",  "url": "string",  "contentType": "string",  "byteSize": 0,  "width": 0,  "height": 0,  "alt": "string",  "createdAt": "2019-08-24T14:15:22Z"}

Delete a media item

DELETE
/admin/v1/media/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
deleted*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/media/string'
Example Response
{  "id": "string",  "deleted": true}
POST
/admin/v1/media/uploads

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
contentType*string
Value in"image/jpeg""image/png""image/webp""image/avif"
byteSize*number
width?number
height?number
alt?string

Response Body

OK

application/json
  1. response
mediaId*string
uploadUrl*string
contentType*string
expiresAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/media/uploads' \  -H 'Content-Type: application/json' \  -d '{  "contentType": "image/jpeg",  "byteSize": 0}'
Example Response
{  "mediaId": "string",  "uploadUrl": "string",  "contentType": "string",  "expiresAt": "2019-08-24T14:15:22Z"}

Confirm an upload landed

POST
/admin/v1/media/{id}/complete

The server reads the object back from storage and records its real size and checksum, so a media record cannot claim an upload that never happened.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
status*string
Value in"pending""ready""deleted"
url*string
contentType*string
byteSize*number
width*number|null
height*number|null
alt*string|null
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/media/string/complete'
Example Response
{  "id": "string",  "status": "pending",  "url": "string",  "contentType": "string",  "byteSize": 0,  "width": 0,  "height": 0,  "alt": "string",  "createdAt": "2019-08-24T14:15:22Z"}

List media

GET
/admin/v1/media

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/media'
Example Response
{  "items": [    {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
POST
/admin/v1/products/bulk

Requires an Idempotency-Key header reused for retries. Ordered actions apply to at most 100 products; price amounts are integer paisa or basis points. Collection actions additionally require collection:update.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
ids*array<string>
actions*array<||||>

Response Body

OK

application/json
  1. response
ids*array<string>
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/products/bulk' \  -H 'Content-Type: application/json' \  -d '{  "ids": [    "string"  ],  "actions": [    {      "kind": "status",      "status": "active"    }  ]}'
Example Response
{  "ids": [    "string"  ]}
POST
/admin/v1/products/{id}/duplicate

Requires an Idempotency-Key header reused for retries. Copies options, variants and media references with new identities and suffixed SKUs. Inventory is never copied.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
kind*string
Value in"physical""appointment""session""package"
vendor*string|null
productType*string|null
tags*array<string>
customBadge?string|null
badges?array<string>
rating?|null
relatedProductIds?array<string>
tabs?array<>
publishedAt*|null
taxClassId?string|null
options*array<>
variants*array<>
images*array<>
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/products/string/duplicate'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "kind": "physical",  "vendor": "string",  "productType": "string",  "tags": [    "string"  ],  "customBadge": "string",  "badges": [    "string"  ],  "rating": {    "average": 0,    "count": 0  },  "relatedProductIds": [    "string"  ],  "tabs": [    {      "title": "string",      "pageId": "string",      "sizeGuide": true    }  ],  "publishedAt": "2019-08-24T14:15:22Z",  "taxClassId": "string",  "options": [    {      "id": "string",      "name": "string",      "position": 0,      "values": [        {          "id": "string",          "value": "string",          "colour": "string",          "position": 0        }      ]    }  ],  "variants": [    {      "id": "string",      "pricePaisa": 0,      "compareAtPricePaisa": 0,      "sku": "string",      "barcode": "string",      "weightGrams": 0,      "position": 0,      "optionValues": [        {          "optionId": "string",          "optionName": "string",          "valueId": "string",          "value": "string"        }      ],      "imageId": "string",      "trackInventory": true,      "allowOversell": true,      "sellable": true,      "availability": "in_stock",      "sale": {        "discountId": "string",        "title": "string",        "percentageBps": 0,        "basePricePaisa": 0,        "endsAt": "2019-08-24T14:15:22Z"      }    }  ],  "images": [    {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
GET
/admin/v1/products/export

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
csv*string
filename*string
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products/export'
Example Response
{  "csv": "string",  "filename": "string"}

List saved product views

GET
/admin/v1/products/views

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products/views'
Example Response
{  "items": [    {      "id": "string",      "name": "string",      "filters": {        "q": "string",        "minPricePaisa": 0,        "maxPricePaisa": 0,        "available": true,        "vendor": [          "string"        ],        "productType": [          "string"        ],        "option": [          "string"        ],        "status": "draft",        "collectionId": "string",        "stock": "in_stock",        "sort": "newest"      }    }  ]}
POST
/admin/v1/products/views

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
id?string
name*string
filters*

Response Body

OK

application/json
  1. response
id*string
name*string
filters*
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/products/views' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "filters": {}}'
Example Response
{  "id": "string",  "name": "string",  "filters": {    "q": "string",    "minPricePaisa": 0,    "maxPricePaisa": 0,    "available": true,    "vendor": [      "string"    ],    "productType": [      "string"    ],    "option": [      "string"    ],    "status": "draft",    "collectionId": "string",    "stock": "in_stock",    "sort": "newest"  }}
DELETE
/admin/v1/products/views/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/products/views/string'
Example Response
{  "id": "string"}

List products

GET
/admin/v1/products

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
status?string
Value in"draft""active""archived""deleted"
q?string
minPricePaisa?number
maxPricePaisa?number
available?boolean
vendor?array<string>
productType?array<string>
option?array<string>
collectionId?string
sort?string
Default"newest"
Value in"newest""featured""updated""title_asc""price_asc""price_desc""inventory_asc"
stock?string
Value in"in_stock""low_stock""partly_sold_out""out_of_stock""untracked"
kind?string
Value in"physical""appointment""session""package""service"
prices?string
Value in"stored""public"

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
views*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products'
Example Response
{  "items": [    {      "id": "string",      "slug": "string",      "title": "string",      "description": "string",      "status": "draft",      "kind": "physical",      "vendor": "string",      "productType": "string",      "tags": [        "string"      ],      "customBadge": "string",      "badges": [        "string"      ],      "rating": {        "average": 0,        "count": 0      },      "relatedProductIds": [        "string"      ],      "tabs": [        {          "title": "string",          "pageId": "string",          "sizeGuide": true        }      ],      "publishedAt": "2019-08-24T14:15:22Z",      "taxClassId": "string",      "options": [        {          "id": "string",          "name": "string",          "position": 0,          "values": [            {              "id": "string",              "value": "string",              "colour": "string",              "position": 0            }          ]        }      ],      "variants": [        {          "id": "string",          "pricePaisa": 0,          "compareAtPricePaisa": 0,          "sku": "string",          "barcode": "string",          "weightGrams": 0,          "position": 0,          "optionValues": [            {              "optionId": "string",              "optionName": "string",              "valueId": "string",              "value": "string"            }          ],          "imageId": "string",          "trackInventory": true,          "allowOversell": true,          "sellable": true,          "availability": "in_stock",          "sale": {            "discountId": "string",            "title": "string",            "percentageBps": 0,            "basePricePaisa": 0,            "endsAt": "2019-08-24T14:15:22Z"          }        }      ],      "images": [        {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "seoTitle": "string",      "seoDescription": "string",      "seoImageId": "string",      "seo": {        "title": "string",        "description": "string",        "image": {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "stock": {        "state": "in_stock",        "available": 0,        "onHand": 0,        "variants": 0,        "tracked": 0,        "soldOut": 0      }    }  ],  "nextCursor": "string",  "views": [    {      "id": "string",      "name": "string",      "filters": {        "q": "string",        "minPricePaisa": 0,        "maxPricePaisa": 0,        "available": true,        "vendor": [          "string"        ],        "productType": [          "string"        ],        "option": [          "string"        ],        "status": "draft",        "collectionId": "string",        "stock": "in_stock",        "sort": "newest"      }    }  ]}
POST
/admin/v1/products

Options, their values and every variant are created in one transaction. A variant must name exactly one value from each option.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
slug*string
title*string
description?string|null
status?string
Default"draft"
Value in"draft""active""archived""deleted"
kind?string
Default"physical"
Value in"physical""appointment""session""package"
vendor?string|null
productType?string|null
tags?array<string>
Default[]
customBadge?string|null
relatedProductIds?array<string>
Default[]
tabs?array<>
Default[]
taxClassId?string|null
options?array<>
Default[]
variants*array<>
seoTitle?string|null
seoDescription?string|null
seoImageId?string|null

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
kind*string
Value in"physical""appointment""session""package"
vendor*string|null
productType*string|null
tags*array<string>
customBadge?string|null
badges?array<string>
rating?|null
relatedProductIds?array<string>
tabs?array<>
publishedAt*|null
taxClassId?string|null
options*array<>
variants*array<>
images*array<>
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/products' \  -H 'Content-Type: application/json' \  -d '{  "slug": "string",  "title": "string",  "variants": [    {      "pricePaisa": 0    }  ]}'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "kind": "physical",  "vendor": "string",  "productType": "string",  "tags": [    "string"  ],  "customBadge": "string",  "badges": [    "string"  ],  "rating": {    "average": 0,    "count": 0  },  "relatedProductIds": [    "string"  ],  "tabs": [    {      "title": "string",      "pageId": "string",      "sizeGuide": true    }  ],  "publishedAt": "2019-08-24T14:15:22Z",  "taxClassId": "string",  "options": [    {      "id": "string",      "name": "string",      "position": 0,      "values": [        {          "id": "string",          "value": "string",          "colour": "string",          "position": 0        }      ]    }  ],  "variants": [    {      "id": "string",      "pricePaisa": 0,      "compareAtPricePaisa": 0,      "sku": "string",      "barcode": "string",      "weightGrams": 0,      "position": 0,      "optionValues": [        {          "optionId": "string",          "optionName": "string",          "valueId": "string",          "value": "string"        }      ],      "imageId": "string",      "trackInventory": true,      "allowOversell": true,      "sellable": true,      "availability": "in_stock",      "sale": {        "discountId": "string",        "title": "string",        "percentageBps": 0,        "basePricePaisa": 0,        "endsAt": "2019-08-24T14:15:22Z"      }    }  ],  "images": [    {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Count products by status

GET
/admin/v1/products/counts

Exact counts for the product list's views: every product that is not deleted, and how many are active, drafts or archived.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
all*number
active*number
draft*number
archived*number
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products/counts'
Example Response
{  "all": 0,  "active": 0,  "draft": 0,  "archived": 0}
GET
/admin/v1/products/filter-options

The store's collections, and the brands and product types its products use, alphabetically. At most 200 of each.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
collections*array<>
vendors*array<string>
productTypes*array<string>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products/filter-options'
Example Response
{  "collections": [    {      "id": "string",      "title": "string",      "mode": "manual"    }  ],  "vendors": [    "string"  ],  "productTypes": [    "string"  ]}
GET
/admin/v1/product-editor

The product with its stock by location, collection choices and membership, related products' titles and the template picker's facts. Without id, what the create screen needs. Parts the caller may not read are null.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

id?string

Response Body

OK

application/json
  1. response
product*|null
stock*|null
collections*|null
relatedTitles*
templates*|null
taxes*
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/product-editor'
Example Response
{  "product": {    "id": "string",    "slug": "string",    "title": "string",    "description": "string",    "status": "draft",    "kind": "physical",    "vendor": "string",    "productType": "string",    "tags": [      "string"    ],    "customBadge": "string",    "badges": [      "string"    ],    "rating": {      "average": 0,      "count": 0    },    "relatedProductIds": [      "string"    ],    "tabs": [      {        "title": "string",        "pageId": "string",        "sizeGuide": true      }    ],    "publishedAt": "2019-08-24T14:15:22Z",    "taxClassId": "string",    "options": [      {        "id": "string",        "name": "string",        "position": 0,        "values": [          {            "id": "string",            "value": "string",            "colour": "string",            "position": 0          }        ]      }    ],    "variants": [      {        "id": "string",        "pricePaisa": 0,        "compareAtPricePaisa": 0,        "sku": "string",        "barcode": "string",        "weightGrams": 0,        "position": 0,        "optionValues": [          {            "optionId": "string",            "optionName": "string",            "valueId": "string",            "value": "string"          }        ],        "imageId": "string",        "trackInventory": true,        "allowOversell": true,        "sellable": true,        "availability": "in_stock",        "sale": {          "discountId": "string",          "title": "string",          "percentageBps": 0,          "basePricePaisa": 0,          "endsAt": "2019-08-24T14:15:22Z"        }      }    ],    "images": [      {        "id": "string",        "status": "pending",        "url": "string",        "contentType": "string",        "byteSize": 0,        "width": 0,        "height": 0,        "alt": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "seoTitle": "string",    "seoDescription": "string",    "seoImageId": "string",    "seo": {      "title": "string",      "description": "string",      "image": {        "id": "string",        "status": "pending",        "url": "string",        "contentType": "string",        "byteSize": 0,        "width": 0,        "height": 0,        "alt": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    },    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  },  "stock": {    "locations": [      {        "id": "string",        "name": "string",        "isDefault": true      }    ],    "levels": [      {        "variantId": "string",        "locationId": "string",        "onHand": 0,        "available": 0      }    ]  },  "collections": {    "choices": [      {        "id": "string",        "title": "string",        "automated": true      }    ],    "selected": [      "string"    ]  },  "relatedTitles": {    "property1": "string",    "property2": "string"  },  "templates": {    "fact": {      "id": "string",      "title": "string",      "collectionIds": [        "string"      ],      "tags": [        "string"      ],      "productType": "string"    },    "templates": [      {        "id": "string",        "title": "string",        "pageType": "home",        "published": true      }    ],    "set": {      "default": "string",      "explicit": {        "property1": "string",        "property2": "string"      },      "rules": [        {          "id": "string",          "name": "string",          "template": "string",          "include": [            {              "any": true            }          ],          "exclude": [            {              "any": true            }          ]        }      ]    },    "hasDraft": true  },  "taxes": {    "storeRateBps": 0,    "classes": [      {        "id": "string",        "name": "string",        "rateBps": 0      }    ]  }}

Get a product

GET
/admin/v1/products/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
kind*string
Value in"physical""appointment""session""package"
vendor*string|null
productType*string|null
tags*array<string>
customBadge?string|null
badges?array<string>
rating?|null
relatedProductIds?array<string>
tabs?array<>
publishedAt*|null
taxClassId?string|null
options*array<>
variants*array<>
images*array<>
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products/string'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "kind": "physical",  "vendor": "string",  "productType": "string",  "tags": [    "string"  ],  "customBadge": "string",  "badges": [    "string"  ],  "rating": {    "average": 0,    "count": 0  },  "relatedProductIds": [    "string"  ],  "tabs": [    {      "title": "string",      "pageId": "string",      "sizeGuide": true    }  ],  "publishedAt": "2019-08-24T14:15:22Z",  "taxClassId": "string",  "options": [    {      "id": "string",      "name": "string",      "position": 0,      "values": [        {          "id": "string",          "value": "string",          "colour": "string",          "position": 0        }      ]    }  ],  "variants": [    {      "id": "string",      "pricePaisa": 0,      "compareAtPricePaisa": 0,      "sku": "string",      "barcode": "string",      "weightGrams": 0,      "position": 0,      "optionValues": [        {          "optionId": "string",          "optionName": "string",          "valueId": "string",          "value": "string"        }      ],      "imageId": "string",      "trackInventory": true,      "allowOversell": true,      "sellable": true,      "availability": "in_stock",      "sale": {        "discountId": "string",        "title": "string",        "percentageBps": 0,        "basePricePaisa": 0,        "endsAt": "2019-08-24T14:15:22Z"      }    }  ],  "images": [    {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a product

PATCH
/admin/v1/products/{id}

When options or variants are supplied they are reconciled in full: ids that exist are updated, new entries are created, and anything absent is deleted. Send a variant's id to preserve its identity — and, from SPEC-07, its stock.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
slug?string
title?string
description?string|null
status?string
Value in"draft""active""archived""deleted"
kind?string
Value in"physical""appointment""session""package"
vendor?string|null
productType?string|null
tags?array<string>
customBadge?string|null
relatedProductIds?array<string>
tabs?array<>
taxClassId?string|null
options?array<>
variants?array<>
seoTitle?string|null
seoDescription?string|null
seoImageId?string|null

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
kind*string
Value in"physical""appointment""session""package"
vendor*string|null
productType*string|null
tags*array<string>
customBadge?string|null
badges?array<string>
rating?|null
relatedProductIds?array<string>
tabs?array<>
publishedAt*|null
taxClassId?string|null
options*array<>
variants*array<>
images*array<>
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/admin/v1/products/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "kind": "physical",  "vendor": "string",  "productType": "string",  "tags": [    "string"  ],  "customBadge": "string",  "badges": [    "string"  ],  "rating": {    "average": 0,    "count": 0  },  "relatedProductIds": [    "string"  ],  "tabs": [    {      "title": "string",      "pageId": "string",      "sizeGuide": true    }  ],  "publishedAt": "2019-08-24T14:15:22Z",  "taxClassId": "string",  "options": [    {      "id": "string",      "name": "string",      "position": 0,      "values": [        {          "id": "string",          "value": "string",          "colour": "string",          "position": 0        }      ]    }  ],  "variants": [    {      "id": "string",      "pricePaisa": 0,      "compareAtPricePaisa": 0,      "sku": "string",      "barcode": "string",      "weightGrams": 0,      "position": 0,      "optionValues": [        {          "optionId": "string",          "optionName": "string",          "valueId": "string",          "value": "string"        }      ],      "imageId": "string",      "trackInventory": true,      "allowOversell": true,      "sellable": true,      "availability": "in_stock",      "sale": {        "discountId": "string",        "title": "string",        "percentageBps": 0,        "basePricePaisa": 0,        "endsAt": "2019-08-24T14:15:22Z"      }    }  ],  "images": [    {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a product

DELETE
/admin/v1/products/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
deleted*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/products/string'
Example Response
{  "id": "string",  "deleted": true}
PUT
/admin/v1/products/{id}/images

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
mediaIds*array<string>

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
kind*string
Value in"physical""appointment""session""package"
vendor*string|null
productType*string|null
tags*array<string>
customBadge?string|null
badges?array<string>
rating?|null
relatedProductIds?array<string>
tabs?array<>
publishedAt*|null
taxClassId?string|null
options*array<>
variants*array<>
images*array<>
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PUT 'https://api.devhelp.pk/admin/v1/products/string/images' \  -H 'Content-Type: application/json' \  -d '{  "mediaIds": [    "string"  ]}'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "kind": "physical",  "vendor": "string",  "productType": "string",  "tags": [    "string"  ],  "customBadge": "string",  "badges": [    "string"  ],  "rating": {    "average": 0,    "count": 0  },  "relatedProductIds": [    "string"  ],  "tabs": [    {      "title": "string",      "pageId": "string",      "sizeGuide": true    }  ],  "publishedAt": "2019-08-24T14:15:22Z",  "taxClassId": "string",  "options": [    {      "id": "string",      "name": "string",      "position": 0,      "values": [        {          "id": "string",          "value": "string",          "colour": "string",          "position": 0        }      ]    }  ],  "variants": [    {      "id": "string",      "pricePaisa": 0,      "compareAtPricePaisa": 0,      "sku": "string",      "barcode": "string",      "weightGrams": 0,      "position": 0,      "optionValues": [        {          "optionId": "string",          "optionName": "string",          "valueId": "string",          "value": "string"        }      ],      "imageId": "string",      "trackInventory": true,      "allowOversell": true,      "sellable": true,      "availability": "in_stock",      "sale": {        "discountId": "string",        "title": "string",        "percentageBps": 0,        "basePricePaisa": 0,        "endsAt": "2019-08-24T14:15:22Z"      }    }  ],  "images": [    {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
GET
/admin/v1/products/{id}/collections

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/products/string/collections'
Example Response
{  "items": [    {      "id": "string",      "title": "string",      "status": "draft",      "mode": "manual"    }  ]}
PUT
/admin/v1/products/{id}/collections

The complete set. A collection added here gets the product at the end of its order; the product leaves any collection not named.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
collectionIds*array<string>

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X PUT 'https://api.devhelp.pk/admin/v1/products/string/collections' \  -H 'Content-Type: application/json' \  -d '{  "collectionIds": [    "string"  ]}'
Example Response
{  "items": [    {      "id": "string",      "title": "string",      "status": "draft",      "mode": "manual"    }  ]}

List collections

GET
/admin/v1/collections

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
q?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/collections'
Example Response
{  "items": [    {      "id": "string",      "slug": "string",      "title": "string",      "description": "string",      "status": "draft",      "mode": "manual",      "rules": {        "match": "all",        "conditions": [          {            "field": "title",            "operator": "equals",            "value": ""          }        ]      },      "productCount": 0,      "seoTitle": "string",      "seoDescription": "string",      "seoImageId": "string",      "seo": {        "title": "string",        "description": "string",        "image": {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}

Create a collection

POST
/admin/v1/collections

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
slug*string
title*string
description?string|null
status?string
Default"draft"
Value in"draft""active""archived""deleted"
mode?string
Default"manual"
Value in"manual""automated"
rules?|null
seoTitle?string|null
seoDescription?string|null
seoImageId?string|null

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
mode*string
Value in"manual""automated"
rules*|null
productCount*number
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/collections' \  -H 'Content-Type: application/json' \  -d '{  "slug": "string",  "title": "string"}'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "mode": "manual",  "rules": {    "match": "all",    "conditions": [      {        "field": "title",        "operator": "equals",        "value": ""      }    ]  },  "productCount": 0,  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Get a collection

GET
/admin/v1/collections/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
mode*string
Value in"manual""automated"
rules*|null
productCount*number
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/collections/string'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "mode": "manual",  "rules": {    "match": "all",    "conditions": [      {        "field": "title",        "operator": "equals",        "value": ""      }    ]  },  "productCount": 0,  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a collection

PATCH
/admin/v1/collections/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
slug?string
title?string
description?string|null
status?string
Value in"draft""active""archived""deleted"
mode?string
Value in"manual""automated"
rules?|null
seoTitle?string|null
seoDescription?string|null
seoImageId?string|null

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
mode*string
Value in"manual""automated"
rules*|null
productCount*number
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/admin/v1/collections/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "mode": "manual",  "rules": {    "match": "all",    "conditions": [      {        "field": "title",        "operator": "equals",        "value": ""      }    ]  },  "productCount": 0,  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a collection

DELETE
/admin/v1/collections/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
deleted*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/collections/string'
Example Response
{  "id": "string",  "deleted": true}
GET
/admin/v1/collections/{id}/products

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Query Parameters

limit?number
Default24
cursor?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/collections/string/products'
Example Response
{  "items": [    {      "id": "string",      "slug": "string",      "title": "string",      "description": "string",      "status": "draft",      "kind": "physical",      "vendor": "string",      "productType": "string",      "tags": [        "string"      ],      "customBadge": "string",      "badges": [        "string"      ],      "rating": {        "average": 0,        "count": 0      },      "relatedProductIds": [        "string"      ],      "tabs": [        {          "title": "string",          "pageId": "string",          "sizeGuide": true        }      ],      "publishedAt": "2019-08-24T14:15:22Z",      "taxClassId": "string",      "options": [        {          "id": "string",          "name": "string",          "position": 0,          "values": [            {              "id": "string",              "value": "string",              "colour": "string",              "position": 0            }          ]        }      ],      "variants": [        {          "id": "string",          "pricePaisa": 0,          "compareAtPricePaisa": 0,          "sku": "string",          "barcode": "string",          "weightGrams": 0,          "position": 0,          "optionValues": [            {              "optionId": "string",              "optionName": "string",              "valueId": "string",              "value": "string"            }          ],          "imageId": "string",          "trackInventory": true,          "allowOversell": true,          "sellable": true,          "availability": "in_stock",          "sale": {            "discountId": "string",            "title": "string",            "percentageBps": 0,            "basePricePaisa": 0,            "endsAt": "2019-08-24T14:15:22Z"          }        }      ],      "images": [        {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "seoTitle": "string",      "seoDescription": "string",      "seoImageId": "string",      "seo": {        "title": "string",        "description": "string",        "image": {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
PUT
/admin/v1/collections/{id}/products

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
productIds*array<string>

Response Body

OK

application/json
  1. response
id*string
slug*string
title*string
description*string|null
status*string
Value in"draft""active""archived""deleted"
mode*string
Value in"manual""automated"
rules*|null
productCount*number
seoTitle*string|null
seoDescription*string|null
seoImageId*string|null
seo*
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PUT 'https://api.devhelp.pk/admin/v1/collections/string/products' \  -H 'Content-Type: application/json' \  -d '{  "productIds": [    "string"  ]}'
Example Response
{  "id": "string",  "slug": "string",  "title": "string",  "description": "string",  "status": "draft",  "mode": "manual",  "rules": {    "match": "all",    "conditions": [      {        "field": "title",        "operator": "equals",        "value": ""      }    ]  },  "productCount": 0,  "seoTitle": "string",  "seoDescription": "string",  "seoImageId": "string",  "seo": {    "title": "string",    "description": "string",    "image": {      "id": "string",      "status": "pending",      "url": "string",      "contentType": "string",      "byteSize": 0,      "width": 0,      "height": 0,      "alt": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  },  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
POST
/admin/v1/collections/rules/preview

Counts the products unsaved conditions match and returns the first of them, newest first. Draft and archived products are counted; the storefront shows only active ones.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
rules*
limit?number
Default10

Response Body

OK

application/json
  1. response
count*number
items*array<>
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/collections/rules/preview' \  -H 'Content-Type: application/json' \  -d '{  "rules": {    "match": "all",    "conditions": [      {        "field": "title",        "operator": "equals"      }    ]  }}'
Example Response
{  "count": 0,  "items": [    {      "id": "string",      "slug": "string",      "title": "string",      "description": "string",      "status": "draft",      "kind": "physical",      "vendor": "string",      "productType": "string",      "tags": [        "string"      ],      "customBadge": "string",      "badges": [        "string"      ],      "rating": {        "average": 0,        "count": 0      },      "relatedProductIds": [        "string"      ],      "tabs": [        {          "title": "string",          "pageId": "string",          "sizeGuide": true        }      ],      "publishedAt": "2019-08-24T14:15:22Z",      "taxClassId": "string",      "options": [        {          "id": "string",          "name": "string",          "position": 0,          "values": [            {              "id": "string",              "value": "string",              "colour": "string",              "position": 0            }          ]        }      ],      "variants": [        {          "id": "string",          "pricePaisa": 0,          "compareAtPricePaisa": 0,          "sku": "string",          "barcode": "string",          "weightGrams": 0,          "position": 0,          "optionValues": [            {              "optionId": "string",              "optionName": "string",              "valueId": "string",              "value": "string"            }          ],          "imageId": "string",          "trackInventory": true,          "allowOversell": true,          "sellable": true,          "availability": "in_stock",          "sale": {            "discountId": "string",            "title": "string",            "percentageBps": 0,            "basePricePaisa": 0,            "endsAt": "2019-08-24T14:15:22Z"          }        }      ],      "images": [        {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "seoTitle": "string",      "seoDescription": "string",      "seoImageId": "string",      "seo": {        "title": "string",        "description": "string",        "image": {          "id": "string",          "status": "pending",          "url": "string",          "contentType": "string",          "byteSize": 0,          "width": 0,          "height": 0,          "alt": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      },      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ]}

On this page