# Categories

## GET /v1/core/categories

> List all categories of products.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetCategoriesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetCategories_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetCategories_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CategoryMap"}},"next":{"type":"string"}},"required":["items"]},"CategoryMap":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/categories":{"get":{"operationId":"Categories_listCategories","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoriesApiResponse"}}}}},"summary":"List all categories of products.","tags":["Categories"]}}}}
```

## POST /v1/core/categories

> Creates a new category

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateCategoryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateCategory_Params"}},"required":["params"]},"CreateCategory_Params":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/CreateCategory_Params_Locales"},"sort":{"type":"number"}},"required":["locales"]},"CreateCategory_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateCategory_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateCategory_Params_Locales_En"}},"required":["ar","en"]},"CreateCategory_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateCategory_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateCategory_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateCategory_Data_Item"}},"required":["item"]},"CreateCategory_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/categories":{"post":{"operationId":"Categories_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryApiResponse"}}}}},"summary":"Creates a new category","tags":["Categories"]}}}}
```

## GET /v1/core/categories/{uid}

> Returns a specific category

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetCategory_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetCategory_Data_Item"}},"required":["item"]},"GetCategory_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"GetCategoryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetCategory_Error"}},"required":["error"]},"GetCategory_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetCategory_ErrorCodes_enum"}]}},"required":["code"]},"GetCategory_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/categories/{uid}":{"get":{"operationId":"Categories_getCategory","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoryApiError"}}}}},"summary":"Returns a specific category","tags":["Categories"]}}}}
```

## DELETE /v1/core/categories/{uid}

> Deletes a specific category

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteCategory_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/core/categories/{uid}":{"delete":{"operationId":"Categories_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCategoryApiResponse"}}}}},"summary":"Deletes a specific category","tags":["Categories"]}}}}
```

## PATCH /v1/core/categories/{uid}

> Updates a specific categoy

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateCategoryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateCategory_Params"}},"required":["params"]},"UpdateCategory_Params":{"type":"object","properties":{"id":{"type":"string"},"image":{"type":"string","nullable":true},"locales":{"type":"object"},"sort":{"type":"number"}},"required":["id"]},"UpdateCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateCategory_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateCategory_Data_Item"}},"required":["item"]},"UpdateCategory_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"UpdateCategoryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateCategory_Error"}},"required":["error"]},"UpdateCategory_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateCategory_ErrorCodes_enum"}]}},"required":["code"]},"UpdateCategory_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/core/categories/{uid}":{"patch":{"operationId":"Categories_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryApiError"}}}}},"summary":"Updates a specific categoy","tags":["Categories"]}}}}
```

## GET /v1/core/categories/export

> Exports all categories with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportCategoriesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportCategories_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportCategories_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CategoryMap"}},"next":{"type":"string"}},"required":["items"]},"CategoryMap":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/categories/export":{"get":{"operationId":"Categories_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportCategoriesApiResponse"}}}}},"summary":"Exports all categories with support for incremental fetching.","tags":["Categories"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.gormic.com/api-reference/core/categories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
