Category type

Method: list

Authorization is required. Category types is a way of grouping the categories in the category list module. A category has always a category type, as there is a "Default" one. The category types are the same for all groups in the system.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/category-type/list/{groupId}

Parameters

property value description
groupId guid The category type group's ID

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "success": true,
  "message": "Enim cupidatat qui incididunt reprehenderit cupidatat laboris minim proident est.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": [],
  "object": {
    "offset": 0,
    "categoryTypes": [
      {
        "id": 0,
        "type": "categoryType",
        "name": "Default",
        "position": 1
      },
      {
        "id": 1,
        "type": "categoryType",
        "name": "Vehicles",
        "position": 2
      },
      {
        "id": 2,
        "type": "categoryType",
        "name": "Air",
        "position": 3
      }
    ]
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

Method: create

Authorization is required. Category types is a way of grouping the categories in the category list module. A category has always a category type, as there is a "Default" one. The category types are the same for all groups in the system.

Request

HTTP request

POST https://<YOUR_DOMAIN>/api/v1/en_US/category-type

Parameters

Do not supply a request parameters with this method.

Request body

property value description
name string The category type name
The category types are the same for all groups in the system.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "name",
      "value": "",
      "message": "Name cannot be blank"
    }
  ],
  "object": {
    "id": 111,
    "type": "categoryType",
    "name": "11 voluptate amet"
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or that was created. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: update

Authorization is required. Category types is a way of grouping the categories in the category list module. A category has always a category type, as there is a "Default" one. The category types are the same for all groups in the system.

Request

HTTP request

PUT https://<YOUR_DOMAIN>/api/v1/en_US/category-type/{typeId}

Parameters

property value description
typeId integer In id of the updated record

Request body

property value description
name string The category type label

Request body

property value description
name string The category type name
The category types are the same for all groups in the system.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "name",
      "value": "",
      "message": "Name cannot be blank"
    }
  ],
  "object": {
    "id": 111,
    "type": "categoryType",
    "name": "11 voluptate amet"
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) List of validation errors, if any. The "key" property value is matched to one of the record's fields
object object The object that caused the validation errors or that was created. Have in mind that, if the server requires string trimming or data manipulation after the user submission, it is applied in this object. In this way the returned object can differe from the posted one.

Method: delete

Authorization is required. Category types is a way of grouping the categories in the category list module. A category has always a category type, as there is a "Default" one. The category types are the same for all groups in the system.

Request

HTTP request

DELETE https://<YOUR_DOMAIN>/api/v1/en_US/category-type/{typeId}

Parameters

property value description
typeId integer In id of the updated record

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [
    {
      "key": "name",
      "value": "",
      "message": "Name cannot be blank"
    }
  ],
  "object": {
    "id": 111,
    "type": "categoryType",
    "name": "11 voluptate amet"
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.

property value description
success Boolean Whether the requested operation is successful or not
message String Human readable error information
errors List (object) This list very rarely contains records during delete method processing
object object The object that was deleted

Method: update position

Authorization is required. The category type positions can be different for each group, unlike the category type itself.

Request

HTTP request

PUT https://<YOUR_DOMAIN>/api/v1/en_US/category-type/{typeId}/position

Parameters

property value description
typeId integer In id of the updated record

Request body

property value description
groupId guid In which group to create the record
position integer The category type position in the category list module

Response

If successful, this method returns a response JSON with the following structure:

{
  "timestamp": "2014-03-03T23:20:23Z",
  "success": true,
  "message": "Aliqua anim consequat amet cupidatat proident amet amet.",
  "errors": [],
  "object": {
    "id": 111,
    "type": "categoryType",
    "name": "11 voluptate amet",
    "groupId": "e7b89753-4418-4d55-b2df-dd10b14e092b",
    "position": 1
  }
}

The general response properties are described on the Response format page. Here are the list of the specific properties for this method.