Group type

The group types is a way to categorize your groups with in the "Subgroup list" module

Method: list

Authorization is required.

Request

HTTP request

GET https://<YOUR_DOMAIN>/api/v1/en_US/group-type/list

Parameters

Do not supply a request parameters with this method.

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": "Ad tempor cupidatat irure aliqua duis officia voluptate dolor aliquip.",
  "timestamp": "2014-03-03T23:20:23Z",
  "errors": [],
  "object": {
    "offset": 0,
    "groupTypes": [
      {
        "id": 0,
        "type": "groupType",
        "name": "Default",
        "groups": [
          {
            "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
            "slug": "home",
            "name": "Home"
          },
          {
            "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
            "slug": "home",
            "name": "Home"
          }
        ],
        "accessWarnings": []
      },
      {
        "id": 1,
        "type": "groupType",
        "name": "Type #1",
        "groups": [
          {
            "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
            "slug": "home",
            "name": "Home"
          },
          {
            "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
            "slug": "home",
            "name": "Home"
          }
        ],
        "accessWarnings": []
      },
      {
        "id": 2,
        "type": "groupType",
        "name": "Type #2",
        "groups": [],
        "accessWarnings": []
      }
    ]
  }
}

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.

Request

HTTP request

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

Parameters

Do not supply a request parameters with this method.

Request body

propertyvaluedescription
name string The type's name / label

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": 1,
    "type": "groupType",
    "name": "Type #11",
    "groups": [
      {
        "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
        "slug": "home",
        "name": "Home"
      },
      {
        "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
        "slug": "home",
        "name": "Home"
      }
    ],
    "accessWarnings": []
  }
}

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

propertyvaluedescription
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.

Request

HTTP request

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

Parameters

propertyvaluedescription
typeId integer In id of the updated record

Request body

propertyvaluedescription
name string The new value for type name

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": 1,
    "type": "groupType",
    "name": "Type #11",
    "groups": [
      {
        "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
        "slug": "home",
        "name": "Home"
      },
      {
        "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
        "slug": "home",
        "name": "Home"
      }
    ],
    "accessWarnings": []
  }
}

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

propertyvaluedescription
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 updated. 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.

Request

HTTP request

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

Parameters

propertyvaluedescription
typeId integer In id of the deleted 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": 1,
    "type": "groupType",
    "name": "Type #11",
    "groups": [
      {
        "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
        "slug": "home",
        "name": "Home"
      },
      {
        "id": "e532e792-4101-4ef5-8cd7-68380bbbc703",
        "slug": "home",
        "name": "Home"
      }
    ],
    "accessWarnings": []
  }
}

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

propertyvaluedescription
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