Supported Formats

json

Errors

Code Description
401 Unauthorized. Include a WWW-Authenticate header field containing a challenge applicable to the requested resource.
403 Forbidden. The request was a valid request, but the server is refusing to respond to it. 403 error semantically means "unauthorized", i.e. the user does not have the necessary permissions for the resource.
404 Not Found. The requested resource could not be found.
422 Unprocessable Entity. The request was well-formed but was unable to be followed due to semantic errors.
500 Internal Server Error. An unexpected condition was encountered.

Examples

request:
  {
    "attribute_group": {
      "code": "attr_grp_1",
      "name": "Attribute group 1",
      "attribute_definitions": [
        { "attribute_definition_code": "attr_1", "sort_order": 1, "completeness": false },
        { "attribute_definition_code": "attr_2", "sort_order": 2, "completeness": true }
      ]
    }
  }

response:
  {
      "id": 11,
      "code": "attr_grp_1",
      "created_at": "2019-06-22T14:52:53.083+10:00",
      "updated_at": "2019-06-22T14:52:53.083+10:00",
      "name": "Attribute group 1"
  }

Params

Param name Description
attribute_group
required

Validations:

  • Must be a Hash

attribute_group[code]
required

Code of the attribute group

Validations:

  • Must be a String

attribute_group[name]
required

Name of the attribute group

Validations:

  • Must be a String

attribute_group[attribute_definitions]
optional , nil allowed

Link to attribute definitions

Validations:

  • Must be an Array of nested elements

attribute_group[attribute_definitions][attribute_definition_code]
optional , nil allowed

Attribute definition code

Validations:

  • Must be a String

attribute_group[attribute_definitions][sort_order]
optional , nil allowed

Sort order

Validations:

  • Must be a Integer

attribute_group[attribute_definitions][completeness]
optional , nil allowed

Use it for completeness

Validations:

  • Must be one of: true, false, 1, 0.

attribute_group[attribute_definition_mode]
optional , nil allowed

Update mode for Attribute Definition. Default is add.

Validations:

  • Must be one of: add, reset.