Skip to main content

Altering a tag

Altering a tag​

Contents​

Overview​

  • Call name: alter-tag
  • Endpoint URL: https://{API hostname}/auth/alter-tag
  • Request methods: POST
  • Request Content-Type: application/json or application/x-www-form-urlencoded
  • Response Content-Type: application/json
  • Auth required: yes

This endpoint updates an existing tag for 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 WRITE access to the chain to which the tag is 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
id(integer, mandatory) The ID of the tag to update
value(string, optional, max=255) The new string value of the tag
active(boolean, optional) Boolean flag to set a tag as active or not

Sample request​

POST /auth/alter-tag HTTP/1.1
Content-Type: application/json

{
"id": 1,
"value": "baby_club_march_2025",
"active": true
}

Sample response​

{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"tag": {
"active": true,
"chain": {
"email_address": "info@foo.com",
"id": 1,
"name": "FOO Chain, inc.",
"phone_number": "01 1234 4321"
},
"created_date": "2025-01-23T13:53:39+00:00",
"deleted": false,
"id": 1,
"last_modified_date": "2025-01-23T13:53:39+00:00",
"model_class": "user",
"value": "baby_club_march_2025"
},
"result_type": "alter-tag"
}
}

Possible error responses​

The following represents a list of possible error responses for the alter-tag 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 (id) missing
400
68permission_denied_or_non_existent
This user has insufficient permissions for this object or the object does not exist
403
230entity_not_found
The specified tag was not found
400
316parameter_supplied_not_boolean
The active parameter must be a boolean value
400