Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

v2 categories

Tolfx edited this page Dec 15, 2021 · 3 revisions

Categories

CPG Categories

Routes

GET - /v2/categories

Returns:

[
  {
    "name": "string",
    "description": "string",
    "private": "boolean",
    "images(?)": ["id"],
  }
]

GET - /v2/categories/:id

:id : The id of category.

Returns:

{
  "name": "string",
  "description": "string",
  "private": "boolean",
  "images(?)": ["id"],
}

GET - /v2/categories/:id/products

:id : The id of category.

Returns:

[
    "id": "number",
    "uid": "string",
    "name": "string",
    "description": "string",
    "category_uid": "string",
    "stock": "number",
    "BStock": "Boolean",
    "hidden": "Boolean",
    "special": "boolean",
    "payment_type": "string",
    "price": "number",
    "setup_fee": "number",
    "images(?)": ["object"],
    "tax_rate": "number",
    "recurring_method(?)": "",
    "module_name": "string",
    "modules": [
      {
       "name": "string",
       "value": "string"
      } 
    ]
]

POST - /v2/categories

Input:

{
  "name": "string",
  "description": "string",
  "private": "boolean",
  "images(?)": ["id"],
}

Returns:

"uid": "string"

PATCH - /v2/categories/:id

:id : The id of category.

Input:

{
  "name": "string",
  "description": "string",
  "private": "boolean",
  "images(?)": ["id"],
}

PUT - /v2/categories/:id

:id : The id of category.

Input:

{
  "name": "string",
  "description": "string",
  "private": "boolean",
  "images(?)": ["id"],
}

DELETE - /v2/categories/:id

:id : The id of category.