Resource Representation

{
  "id": 1,
  "attribute_definition_id": 20,
  "entity_id": 34,
  "entity_type": "Product",
  "associated_id": 2,
  "associated_type": "NpcEntity",
  "attribute_definition_code": "season_npc",
  "entity_code": "Product_ABC",
  "associated_code": "npc_entity_1"

}

Supported Formats

json

GET /api/v2/association_attribute_values
List association attribute values

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

Response:
{
    "page": 1,
    "per_page": 50,
    "total_pages": 1,
    "total_entries": 3,
    "entries": [

    ]
}

Params

Param name Description
per_page
optional

Number of objects in one response. Default is 50

Validations:

  • Must be a number.

page
optional

Page number. Default is 1

Validations:

  • Must be a number.

created_time_from
optional

ISO_8601 format 2016-05-30T05:13:26Z

Validations:

  • Must be a String

created_time_to
optional

ISO_8601 format 2016-05-30T05:13:26Z

Validations:

  • Must be a String

updated_time_from
optional

ISO_8601 format 2016-05-30T05:13:26Z

Validations:

  • Must be a String

updated_time_to
optional

ISO_8601 format 2016-05-30T05:13:26Z

Validations:

  • Must be a String

entity_id
optional

Entity ID

Validations:

  • Must be a String

entity_type
optional

Entity Type

Validations:

  • Must be a String

associated_id
optional

Associated ID

Validations:

  • Must be a String

associated_type
optional

Associated Type

Validations:

  • Must be a String

attribute_definition_id
optional

Attribute Definition ID

Validations:

  • Must be a String


POST /api/v2/association_attribute_values
Create a association attribute value

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:

  {
    "association_attribute_value": {
      "entity_code": "Product_ABC",
      "entity_type": "Product",
      "associated_id": "npc_entity_1",
      "associated_type": "NpcEntity",
      "attribute_definition_code": "season_npc"
    }
  }

  or

  {
    "association_attribute_value": {
      "entity_id": "34",
      "entity_type": "Product",
      "associated_id": "2",
      "associated_type": "NpcEntity",
      "attribute_definition_code": "20"
    }
  }

response:
{
  "id": 8,
  "attribute_definition_id": 20,
  "entity_id": 34,
  "entity_type": "Product",
  "associated_id": 2,
  "associated_type": "NpcEntity",
  "created_at": "2019-09-06T14:25:09.236+10:00",
  "updated_at": "2019-09-06T14:26:10.492+10:00"
}

Params

Param name Description
association_attribute_value
required

Validations:

  • Must be a Hash

association_attribute_value[entity_id]
optional , nil allowed

Entity ID

Validations:

  • Must be a Integer

association_attribute_value[entity_type]
required

Validations:

  • Must be one of: Product.

association_attribute_value[entity_code]
optional , nil allowed

Entity code

Validations:

  • Must be a String

association_attribute_value[associated_id]
optional , nil allowed

Associated ID

Validations:

  • Must be a Integer

association_attribute_value[associated_type]
required

Validations:

  • Must be one of: NpcEntity.

association_attribute_value[associated_code]
optional , nil allowed

Associated code

Validations:

  • Must be a String

association_attribute_value[attribute_definition_id]
optional , nil allowed

Attribute Definition ID

Validations:

  • Must be a Integer

association_attribute_value[attribute_definition_code]
optional , nil allowed

Attribute Definition code

Validations:

  • Must be a String


DELETE /api/v2/association_attribute_values/:id
Delete an association attribute value

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

response:
  {
    "id": 2
  }