Skip to main content

Getting tags

Getting tags​

Contents​

Overview​

  • Call name: get-tags
  • Endpoint URL: https://{API hostname}/auth/get-tags
  • Request methods: GET
  • Response Content-Type: application/json
  • Auth required: yes

This endpoint retrieves a list of tags which are part of a chain.

Version-specific information​

The following version-specific changes apply to this endpoint. See the versioning page for more details.

VersionChange details
N/AN/A

Permissions and Authentication​

This API call requires admin authentication:

  • The performing user must be logged in and have READ access to the chain to which the tags are connected
  • User and privileged authentication methods are not permitted for this endpoint

Headers​

Standard headers are used for this endpoint. No special headers are required.

HTTP Parameters​

The following HTTP parameters can be passed to the API:

ParameterDescription
chain_id(integer, mandatory) The ID of the chain to get tags for
exclude_inactive(boolean, optional) If true, excludes inactive tags from the results. If false or not provided, inactive tags are included
limit(integer, optional) Limit the number of results returned. Default is 50. Must be between 1 and 50
offset(integer, optional) Offset the results returned. Default is 0

Sample request​

GET /auth/get-tags?chain_id=1&exclude_inactive=true&limit=10&offset=0 HTTP/1.1

Sample response​

{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"limit": 50,
"offset": 0,
"tags": [
{
"active": true,
"chain": {
"email_address": "info@foo.com",
"id": 1,
"name": "FOO Chain, inc.",
"phone_number": "01 1234 4321"
},
"created_date": "2025-01-23T14:05:30+00:00",
"deleted": false,
"id": 11,
"last_modified_date": "2025-01-23T14:05:30+00:00",
"model_class": "user",
"value": "baby_club_nov_2025"
},
{
"active": true,
"chain": {
"email_address": "info@foo.com",
"id": 1,
"name": "FOO Chain, inc.",
"phone_number": "01 1234 4321"
},
"created_date": "2025-01-23T14:05:30+00:00",
"deleted": false,
"id": 12,
"last_modified_date": "2025-01-23T14:05:30+00:00",
"model_class": "user",
"value": "baby_club_dec_2025"
}
],
"total_count": 12,
"result_type": "get-tags"
}
}

Possible error responses​

The following represents a list of possible error responses for the get-tags endpoint:

CodeName and DescriptionHTTP Status Code
6no_valid_session
The user needs to be logged in and a valid session key needs to be sent
401
52missing_necessary_parameters
Required parameter (chain_id) missing
400
68permission_denied_or_non_existent
This user has insufficient permissions for this object or the object does not exist
403
154chain_id_invalid
The supplied chain_id is not valid
400
230entity_not_found
The specified chain was not found
400
316parameter_supplied_not_boolean
The exclude_inactive parameter must be a boolean value
400