Shop.app API endpoint
Returns the Shop.app product category tree, with no parameters. Each category has its `id`, `gid`, `name`, `slug`, `image`, `has_children`, nested `children` and a `path` of ancestors. Ids are taken from Shopify product category GIDs where present.
/shop-app/categoriesQuery parameters: none.
Notable response behavior:
| Field | Filled in, of 14 checked | Values in the sample |
|---|---|---|
| id | 14 | |
| gid | 14 | |
| name | 14 | “Women” and 13 other values |
| slug | 14 | |
| path | 14 | median 2 entries |
| has_children | 13 | true in 13 of 13 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/shop-app/categories" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"categories": [
{
"id": "1",
"name": "Women",
"slug": "women",
"has_children": true
}
]
}
}Request schema
No body schema
Response schema
#/definitions/shopapp.categoriesResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | shopapp.CategoriesResponse | No | ||||
| data.categories | array | No | Product categories listed on Shop.app, each with its subcategories. | |||
| data.categories[].children | array | No | Subcategories of this category. | |||
| data.categories[].gid | string | No | gid://shopify/ProductCategory/1?version=13 | Shopify global ID of the category. | ||
| data.categories[].has_children | boolean | No | `true` when the category has subcategories. | |||
| data.categories[].id | string | No | 1 | Numeric category ID taken from the Shopify global ID. | ||
| data.categories[].image | string | No | URL of the category image. | |||
| data.categories[].name | string | No | Women | Category name, for example `Women`. | ||
| data.categories[].path | array | No | Categories on the path from the top level down to this category. | |||
| data.categories[].path[].gid | string | No | gid://shopify/ProductCategory/1?version=13 | Shopify global ID of the category on the path. | ||
| data.categories[].path[].id | string | No | 1 | Numeric ID of the category on the path. | ||
| data.categories[].path[].name | string | No | Women | Name of the category on the path. | ||
| data.categories[].slug | string | No | women | URL-friendly form of the category name. | ||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/shop-app/categories" \
-H "x-api-key: $CRAWLORA_API_KEY"