Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 1.83 KB

File metadata and controls

62 lines (44 loc) · 1.83 KB
title Categories
nav_order 9

Services can be listed in a category. Categories can be presented like a tree. Root categories are defined with empty {parent_id}.

Attributes

NameTypeDescription
idIntegerAutomatically set
created_atDatetimeAutomatically set
updated_atDatetimeAutomatically set
titleStringRequired
parent_idInteger
custom_dataArrayNot required.
priority_valueIntegerNot required. Priority value for ordering.

Listing

GET /categories will return all categories.

Response

[
  {
    "category": {
      "created_at": "2012-09-20T15:34:16+02:00",
      "custom_data": null,
      "id": 1,
      "parent_id": null,
      "title": "My first little category",
      "updated_at": "2012-09-20T15:34:16+02:00"
    }
  }
]

Get category

GET /categories/{category_id} will get a category with id {category_id}.

Add new category

POST /categories will create a new category. To add connected services specify array of {service_id} in parameter {service_id_list}.

Update category

PUT /categories/{category_id} will update existing category with id {category_id}. To add connected services specify array of {service_id} in parameter {service_id_list}.

Delete category

DELETE /categories/{category_id} will delete existing category with id {category_id}.

List services

GET /categories/{category_id}/services will return all services for category with id {category_id}.

For any additional usage of a service please use the main service endpoint.