Admin — Online Store & Site
Site documents, releases, publishing, rollbacks, and templates.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
kind?string"theme""layout""template""page""component""menu""assignments""code"pageType?string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"includeRetired?booleanfalseOK
application/json- response
items*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/documents'{ "items": [ { "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ]}Creates a document of kind from document, or a minimal valid one when omitted. A store has one theme, layout, assignments and code document.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
kind*string"theme""layout""template""page""component""menu""assignments""code"document?OK
application/json- response
id*stringkind*string"theme""layout""template""page""component""menu""assignments""code"handle*string|nulltitle*stringpageType*|nulldraftVersion*numberhasDraft*booleanpublishedRevisionId*string|nullretired*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timedraft*warnings?array<>curl -X POST 'https://api.devhelp.pk/admin/v1/site/documents' \ -H 'Content-Type: application/json' \ -d '{ "kind": "theme"}'{ "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "draft": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }, "warnings": [ { "path": [ "string" ], "code": "string", "message": "string", "severity": "error", "nodeId": "string", "documentId": "string" } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringincludeRetired?booleanfalseOK
application/json- response
id*stringkind*string"theme""layout""template""page""component""menu""assignments""code"handle*string|nulltitle*stringpageType*|nulldraftVersion*numberhasDraft*booleanpublishedRevisionId*string|nullretired*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timedraft*warnings?array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/documents/string'{ "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "draft": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }, "warnings": [ { "path": [ "string" ], "code": "string", "message": "string", "severity": "error", "nodeId": "string", "documentId": "string" } ]}Replaces the document's one shared draft. baseVersion is the draftVersion the editor started from; a newer save in between answers 409 with currentVersion.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
baseVersion*numberdocument*OK
application/json- response
id*stringkind*string"theme""layout""template""page""component""menu""assignments""code"handle*string|nulltitle*stringpageType*|nulldraftVersion*numberhasDraft*booleanpublishedRevisionId*string|nullretired*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timedraft*warnings?array<>curl -X PUT 'https://api.devhelp.pk/admin/v1/site/documents/string/draft' \ -H 'Content-Type: application/json' \ -d '{ "baseVersion": 0, "document": { "kind": "theme", "schemaVersion": 0, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }}'{ "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "draft": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }, "warnings": [ { "path": [ "string" ], "code": "string", "message": "string", "severity": "error", "nodeId": "string", "documentId": "string" } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
baseVersion?numberOK
application/json- response
id*stringkind*string"theme""layout""template""page""component""menu""assignments""code"handle*string|nulltitle*stringpageType*|nulldraftVersion*numberhasDraft*booleanpublishedRevisionId*string|nullretired*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timedraft*warnings?array<>curl -X POST 'https://api.devhelp.pk/admin/v1/site/documents/string/discard' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "draft": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }, "warnings": [ { "path": [ "string" ], "code": "string", "message": "string", "severity": "error", "nodeId": "string", "documentId": "string" } ]}Soft-deletes the document. Refused with 409 and usedBy while other documents use it, unless force. It leaves the live site with the next publish.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
force?booleanfalseOK
application/json- response
id*stringkind*string"theme""layout""template""page""component""menu""assignments""code"handle*string|nulltitle*stringpageType*|nulldraftVersion*numberhasDraft*booleanpublishedRevisionId*string|nullretired*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://api.devhelp.pk/admin/v1/site/documents/string/retire' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
revisionId*stringbaseVersion?numberOK
application/json- response
id*stringkind*string"theme""layout""template""page""component""menu""assignments""code"handle*string|nulltitle*stringpageType*|nulldraftVersion*numberhasDraft*booleanpublishedRevisionId*string|nullretired*booleancreatedAt*stringdate-timeupdatedAt*stringdate-timedraft*warnings?array<>curl -X POST 'https://api.devhelp.pk/admin/v1/site/documents/string/restore' \ -H 'Content-Type: application/json' \ -d '{ "revisionId": "string"}'{ "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "draft": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }, "warnings": [ { "path": [ "string" ], "code": "string", "message": "string", "severity": "error", "nodeId": "string", "documentId": "string" } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringOK
application/json- response
items*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/documents/string/usages'{ "items": [ { "id": "string", "kind": "theme", "title": "string" } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringlimit?number50beforeNumber?numberOK
application/json- response
items*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/documents/string/revisions'{ "items": [ { "id": "string", "number": 0, "source": "editor", "label": "string", "contentHash": "string", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "live": true } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringrevisionId*stringOK
application/json- response
id*stringnumber*numbersource*string"editor""ai""import""restore""template""migration"label*string|nullcontentHash*stringcreatedBy*string|nullcreatedAt*stringdate-timelive*booleancontent*curl -X GET 'https://api.devhelp.pk/admin/v1/site/documents/string/revisions/string'{ "id": "string", "number": 0, "source": "editor", "label": "string", "contentHash": "string", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "live": true, "content": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
limit?number50beforeNumber?numberOK
application/json- response
items*array<>liveReleaseId*string|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/site/releases'{ "items": [ { "id": "string", "number": 0, "kind": "publish", "label": "string", "changes": [ { "documentId": "string", "change": "added", "revisionId": "string" } ], "previousReleaseId": "string", "rollbackOfReleaseId": "string", "activatedAt": "2019-08-24T14:15:22Z", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "live": true } ], "liveReleaseId": "string"}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringOK
application/json- response
id*stringnumber*numberkind*string"publish""rollback"label*string|nullchanges*array<>previousReleaseId*string|nullrollbackOfReleaseId*string|nullactivatedAt*|nullcreatedBy*string|nullcreatedAt*stringdate-timelive*booleanentries*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/releases/string'{ "id": "string", "number": 0, "kind": "publish", "label": "string", "changes": [ { "documentId": "string", "change": "added", "revisionId": "string" } ], "previousReleaseId": "string", "rollbackOfReleaseId": "string", "activatedAt": "2019-08-24T14:15:22Z", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "live": true, "entries": [ { "documentId": "string", "revisionId": "string", "kind": "theme", "pageType": "home", "handle": "string", "title": "string", "revisionNumber": 0 } ]}The transitive dependency closure of documentIds, through drafts (mode: draft) or the live release. site adds the theme, layout, assignments and code documents.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
documentIds*array<string>mode?string"draft""draft""live"site?booleanfalseOK
application/json- response
documents*array<>missing*array<string>curl -X POST 'https://api.devhelp.pk/admin/v1/site/dependencies' \ -H 'Content-Type: application/json' \ -d '{ "documentIds": [ "string" ]}'{ "documents": [ { "id": "string", "kind": "theme", "title": "string", "pageType": "home", "live": true, "hasDraft": true, "requested": true } ], "missing": [ "string" ]}Publishes the selected drafts, plus anything they need that is not live yet, as one new release in one transaction. versions maps document ids to the draftVersion that was reviewed; a newer save answers 409.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
documentIds*array<string>versions?label?string|nullOK
application/json- response
release*addedDependencies*array<string>curl -X POST 'https://api.devhelp.pk/admin/v1/site/publish' \ -H 'Content-Type: application/json' \ -d '{ "documentIds": [ "string" ]}'{ "release": { "id": "string", "number": 0, "kind": "publish", "label": "string", "changes": [ { "documentId": "string", "change": "added", "revisionId": "string" } ], "previousReleaseId": "string", "rollbackOfReleaseId": "string", "activatedAt": "2019-08-24T14:15:22Z", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z" }, "addedDependencies": [ "string" ]}Creates a new release from an earlier one's entries, leaving out documents retired since. Drafts with unpublished changes keep them.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
releaseId*stringlabel?string|nullOK
application/json- response
id*stringnumber*numberkind*string"publish""rollback"label*string|nullchanges*array<>previousReleaseId*string|nullrollbackOfReleaseId*string|nullactivatedAt*|nullcreatedBy*string|nullcreatedAt*stringdate-timecurl -X POST 'https://api.devhelp.pk/admin/v1/site/rollback' \ -H 'Content-Type: application/json' \ -d '{ "releaseId": "string"}'{ "id": "string", "number": 0, "kind": "publish", "label": "string", "changes": [ { "documentId": "string", "change": "added", "revisionId": "string" } ], "previousReleaseId": "string", "rollbackOfReleaseId": "string", "activatedAt": "2019-08-24T14:15:22Z", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z"}Inspector schemas and presets for every built-in definition and the store's components, plus the field catalogue, page types and bindable context.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
definitions*array<>components*array<>fields*pageTypes*array<>context*versions*curl -X GET 'https://api.devhelp.pk/admin/v1/site/registry'{ "definitions": [ { "type": "string", "kind": "section", "label": "string", "version": 0, "tabs": { "property1": [ { "property1": null, "property2": null } ], "property2": [ { "property1": null, "property2": null } ] }, "presets": [ { "property1": null, "property2": null } ], "property1": null, "property2": null } ], "components": [ { "type": "string", "kind": "section", "label": "string", "version": 0, "tabs": { "property1": [ { "property1": null, "property2": null } ], "property2": [ { "property1": null, "property2": null } ] }, "presets": [ { "property1": null, "property2": null } ], "property1": null, "property2": null } ], "fields": { "kinds": [ "string" ], "responsive": [ "string" ], "bindable": { "property1": "string", "property2": "string" }, "templates": [ "string" ], "codeLanguages": [ "string" ], "tabs": [ "string" ] }, "pageTypes": [ { "pageType": "home", "main": true, "context": [ "string" ], "rules": true } ], "context": { "globals": [ "string" ], "shapes": { "property1": { "property1": "string", "property2": "string" }, "property2": { "property1": "string", "property2": "string" } }, "bindCompatibility": { "property1": [ "string" ], "property2": [ "string" ] } }, "versions": { "property1": 0, "property2": 0 }}Resolves a route like the storefront does, but from the current drafts instead of the live release. For the editor; never cached.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
pageType*string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"handle?stringid?stringtemplateId?stringOK
application/json- response
release*|nullpreview*booleanpageType*string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"template*|nulltemplateChoice*|||page*|nulllayout*|nulltheme*|nullcode*|nullcustomCode*string"on""paused""blocked""off"components*array<>menus*array<>resource*||||nullcontext*data*media*links*expressions*curl -X GET 'https://api.devhelp.pk/admin/v1/site/preview-resolve?pageType=home'{ "release": { "id": "string", "number": 0 }, "preview": true, "pageType": "home", "template": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "templateChoice": { "templateId": "string", "source": "explicit" }, "page": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "layout": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "theme": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "code": { "css": "string", "snippets": [ { "property1": null, "property2": null } ] }, "customCode": "on", "components": [ { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } } ], "menus": [ { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } } ], "resource": { "kind": "product", "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" } }, "context": { "property1": null, "property2": null }, "data": { "property1": { "source": "products", "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" } ] }, "property2": { "source": "products", "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" } ] } }, "media": { "property1": { "url": "string", "alt": "string", "width": 0, "height": 0 }, "property2": { "url": "string", "alt": "string", "width": 0, "height": 0 } }, "links": { "property1": { "title": "string", "url": "string" }, "property2": { "title": "string", "url": "string" } }, "expressions": { "property1": { "values": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "errors": [ { "address": "string", "setting": "string", "message": "string" } ] }, "property2": { "values": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "errors": [ { "address": "string", "setting": "string", "message": "string" } ] } }}Pages, templates, the layout, menus, assignments and the theme with their drafts, and the product and collection that product and collection pages are shown with. For the AI editor's canvas (SPEC-81a); never cached.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
documents*array<>samples*curl -X GET 'https://api.devhelp.pk/admin/v1/site/map'{ "documents": [ { "id": "string", "kind": "theme", "handle": "string", "title": "string", "pageType": "home", "draftVersion": 0, "hasDraft": true, "publishedRevisionId": "string", "retired": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "draft": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null }, "warnings": [ { "path": [ "string" ], "code": "string", "message": "string", "severity": "error", "nodeId": "string", "documentId": "string" } ] } ], "samples": { "product": "string", "collection": "string" }}One route, resolved from the current drafts like previewResolve, whose template holds every insertable section preset and the store's saved sections. For the editor's library thumbnails; never cached.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
route*items*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/library-preview'{ "route": { "release": { "id": "string", "number": 0 }, "preview": true, "pageType": "home", "template": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "templateChoice": { "templateId": "string", "source": "explicit" }, "page": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "layout": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "theme": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "code": { "css": "string", "snippets": [ { "property1": null, "property2": null } ] }, "customCode": "on", "components": [ { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } } ], "menus": [ { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } } ], "resource": { "kind": "product", "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" } }, "context": { "property1": null, "property2": null }, "data": { "property1": { "source": "products", "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": null, "value": null, "colour": null, "position": null } ] } ], "variants": [ { "id": "string", "pricePaisa": 0, "compareAtPricePaisa": 0, "sku": "string", "barcode": "string", "weightGrams": 0, "position": 0, "optionValues": [ { "optionId": null, "optionName": null, "valueId": null, "value": null } ], "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" } ] }, "property2": { "source": "products", "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": null, "value": null, "colour": null, "position": null } ] } ], "variants": [ { "id": "string", "pricePaisa": 0, "compareAtPricePaisa": 0, "sku": "string", "barcode": "string", "weightGrams": 0, "position": 0, "optionValues": [ { "optionId": null, "optionName": null, "valueId": null, "value": null } ], "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" } ] } }, "media": { "property1": { "url": "string", "alt": "string", "width": 0, "height": 0 }, "property2": { "url": "string", "alt": "string", "width": 0, "height": 0 } }, "links": { "property1": { "title": "string", "url": "string" }, "property2": { "title": "string", "url": "string" } }, "expressions": { "property1": { "values": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "errors": [ { "address": "string", "setting": "string", "message": "string" } ] }, "property2": { "values": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "errors": [ { "address": "string", "setting": "string", "message": "string" } ] } } }, "items": [ { "nodeId": "string", "type": "string", "preset": 0, "componentId": "string" } ]}Collections, tags, type and preview states of the store's products (or collections, or blog posts), most recently updated first, for the Templates screen's live counts and the template preview's product picker.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
kind*string"product""collection""article"OK
application/json- response
items*array<>truncated*booleancurl -X GET 'https://api.devhelp.pk/admin/v1/site/catalog-facts?kind=product'{ "items": [ { "id": "string", "title": "string", "handle": "string", "status": "string", "imageUrl": "string", "collectionIds": [ "string" ], "tags": [ "string" ], "productType": "string", "hasVariants": true, "onSale": true, "soldOut": true, "reviewCount": 0, "updatedAt": "2019-08-24T14:15:22Z" } ], "truncated": true}Places the section's current draft on a page of its kind — with the chosen product, collection or post, or the most recent one — and resolves it from drafts like previewResolve. For My sections' live preview; never cached.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
componentId*stringresourceId?stringOK
application/json- response
release*|nullpreview*booleanpageType*string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"template*|nulltemplateChoice*|||page*|nulllayout*|nulltheme*|nullcode*|nullcustomCode*string"on""paused""blocked""off"components*array<>menus*array<>resource*||||nullcontext*data*media*links*expressions*curl -X GET 'https://api.devhelp.pk/admin/v1/site/component-preview?componentId=string'{ "release": { "id": "string", "number": 0 }, "preview": true, "pageType": "home", "template": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "templateChoice": { "templateId": "string", "source": "explicit" }, "page": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "layout": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "theme": { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } }, "code": { "css": "string", "snippets": [ { "property1": null, "property2": null } ] }, "customCode": "on", "components": [ { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } } ], "menus": [ { "id": "string", "revisionId": "string", "document": { "kind": "theme", "schemaVersion": 0, "defs": { "property1": 0, "property2": 0 }, "meta": { "property1": null, "property2": null }, "body": { "property1": null, "property2": null }, "property1": null, "property2": null } } ], "resource": { "kind": "product", "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" } }, "context": { "property1": null, "property2": null }, "data": { "property1": { "source": "products", "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" } ] }, "property2": { "source": "products", "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" } ] } }, "media": { "property1": { "url": "string", "alt": "string", "width": 0, "height": 0 }, "property2": { "url": "string", "alt": "string", "width": 0, "height": 0 } }, "links": { "property1": { "title": "string", "url": "string" }, "property2": { "title": "string", "url": "string" } }, "expressions": { "property1": { "values": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "errors": [ { "address": "string", "setting": "string", "message": "string" } ] }, "property2": { "values": { "property1": { "property1": null, "property2": null }, "property2": { "property1": null, "property2": null } }, "errors": [ { "address": "string", "setting": "string", "message": "string" } ] } }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
paused*booleanblocked*booleanblockedReason*string|nullcanEdit*booleancurl -X GET 'https://api.devhelp.pk/admin/v1/site/custom-code'{ "paused": true, "blocked": true, "blockedReason": "string", "canEdit": true}Pausing takes every Custom HTML element, section code and site code snippet, and the store-wide CSS, off the storefront until resumed. Owners and admins only.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
paused*booleanOK
application/json- response
paused*booleanblocked*booleanblockedReason*string|nullcanEdit*booleancurl -X POST 'https://api.devhelp.pk/admin/v1/site/custom-code/pause' \ -H 'Content-Type: application/json' \ -d '{ "paused": true}'{ "paused": true, "blocked": true, "blockedReason": "string", "canEdit": true}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
provider*string"models""local"available*booleanreason*|nullplans*array<string>usedPercent*number|nullresetsAt*|nulllock*|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/site/ai'{ "provider": "models", "available": true, "reason": "plan_feature_required", "plans": [ "string" ], "usedPercent": 0, "resetsAt": "2019-08-24T14:15:22Z", "lock": { "message": "string", "action": { "label": "string", "href": "string" } }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
text*stringtone*string"shorter""longer""friendlier""formal""fix"field?stringOK
application/json- response
text*stringcurl -X POST 'https://api.devhelp.pk/admin/v1/site/ai/rewrite' \ -H 'Content-Type: application/json' \ -d '{ "text": "string", "tone": "shorter"}'{ "text": "string"}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
pageType*string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"sections*array<string>brief?stringOK
application/json- response
suggestions*array<>curl -X POST 'https://api.devhelp.pk/admin/v1/site/ai/suggest-sections' \ -H 'Content-Type: application/json' \ -d '{ "pageType": "home", "sections": [ "string" ]}'{ "suggestions": [ { "type": "string", "preset": 0, "reason": "string", "text": [ { "key": "string", "value": "string" } ] } ]}Turns a request in the merchant's words into steps the editor applies as a preview: sections from the library, text, the brand colour or fonts.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
prompt*stringpageType*string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"sections*array<>selectedId?string|nulldocumentId?stringOK
application/json- response
summary*stringsteps*array<|||||||||||>curl -X POST 'https://api.devhelp.pk/admin/v1/site/ai/ask' \ -H 'Content-Type: application/json' \ -d '{ "prompt": "string", "pageType": "home", "sections": [ { "id": "string", "type": "string", "label": "string", "text": [ { "key": "string", "value": "string" } ] } ]}'{ "summary": "string", "steps": [ { "kind": "add", "section": { "type": "string", "preset": 0, "reason": "string", "text": [ { "key": "string", "value": "string" } ] }, "after": "string", "list": "sections", "ref": "" } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
palette*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/site/ai/palette'{ "palette": { "accent": "string", "swatches": [ "string" ], "soft": "string", "ink": "string", "colourful": true }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
conversationId?stringOK
application/json- response
conversationId*string|nullmessages*array<>conversations*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/site/ai/messages'{ "conversationId": "string", "messages": [ { "id": "string", "conversationId": "string", "role": "merchant", "text": "string", "scope": { "documentId": "string", "nodeId": "string", "label": "string" }, "steps": [ { "kind": "add", "section": { "type": "string", "preset": 0, "reason": "string", "text": [ { "key": "string", "value": "string" } ] }, "after": "string", "list": "sections", "ref": "" } ], "attachments": [], "sources": [], "documentId": "string", "baseVersion": 0, "state": "open", "rating": "up", "createdAt": "2019-08-24T14:15:22Z" } ], "conversations": [ { "id": "string", "title": "string", "at": "2019-08-24T14:15:22Z" } ]}Like ask, scoped to an element when the merchant pointed at one; both the request and the answer are kept in the conversation.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
prompt*stringpageType*string"home""product""collection""collection-list""page""article""blog""search""cart""account""not-found"sections*array<>selectedId?string|nulldocumentId*stringconversationId*string|nullbaseVersion*numberscope*|nullattachmentIds?array<string>webSearch?booleanOK
application/json- response
conversationId*stringmerchant*assistant*curl -X POST 'https://api.devhelp.pk/admin/v1/site/ai/messages' \ -H 'Content-Type: application/json' \ -d '{ "prompt": "string", "pageType": "home", "sections": [ { "id": "string", "type": "string", "label": "string", "text": [ { "key": "string", "value": "string" } ] } ], "documentId": "string", "conversationId": "string", "baseVersion": 0, "scope": { "documentId": "string", "nodeId": "string", "label": "string" }}'{ "conversationId": "string", "merchant": { "id": "string", "conversationId": "string", "role": "merchant", "text": "string", "scope": { "documentId": "string", "nodeId": "string", "label": "string" }, "steps": [ { "kind": "add", "section": { "type": "string", "preset": 0, "reason": "string", "text": [ { "key": "string", "value": "string" } ] }, "after": "string", "list": "sections", "ref": "" } ], "attachments": [], "sources": [], "documentId": "string", "baseVersion": 0, "state": "open", "rating": "up", "createdAt": "2019-08-24T14:15:22Z" }, "assistant": { "id": "string", "conversationId": "string", "role": "merchant", "text": "string", "scope": { "documentId": "string", "nodeId": "string", "label": "string" }, "steps": [ { "kind": "add", "section": { "type": "string", "preset": 0, "reason": "string", "text": [ { "key": "string", "value": "string" } ] }, "after": "string", "list": "sections", "ref": "" } ], "attachments": [], "sources": [], "documentId": "string", "baseVersion": 0, "state": "open", "rating": "up", "createdAt": "2019-08-24T14:15:22Z" }}Kept, discarded or out of date, and the merchant's thumbs up or down. Changes nothing on the site.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
state?string"kept""discarded""stale"rating?string"up""down"OK
application/json- response
id*stringconversationId*stringrole*string"merchant""assistant"text*stringscope*|nullsteps*array<|||||||||||>attachments?array<>[]sources?array<>[]documentId*string|nullbaseVersion*number|nullstate*|nullrating*|nullcreatedAt*stringdate-timecurl -X POST 'https://api.devhelp.pk/admin/v1/site/ai/messages/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "string", "conversationId": "string", "role": "merchant", "text": "string", "scope": { "documentId": "string", "nodeId": "string", "label": "string" }, "steps": [ { "kind": "add", "section": { "type": "string", "preset": 0, "reason": "string", "text": [ { "key": "string", "value": "string" } ] }, "after": "string", "list": "sections", "ref": "" } ], "attachments": [], "sources": [], "documentId": "string", "baseVersion": 0, "state": "open", "rating": "up", "createdAt": "2019-08-24T14:15:22Z"}Gallery metadata only: no page bodies or sections.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
data*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/templates'{ "data": [ { "id": "rangrez", "version": 0, "name": "string", "vertical": "string", "description": "string", "tags": [ "string" ], "previews": { "desktop": "string", "mobile": "string" }, "theme": { "preset": "counter", "accent": "string", "radius": "sm", "appearance": "system", "fontPairing": "figtree", "productCard": "standard", "density": "comfortable", "headingScale": "s", "headingCase": "normal", "buttonShape": "square", "buttonStyle": "solid", "cardImageRatio": "portrait" }, "swatch": [ "string" ] } ]}