Skip to main content

Deleting a user tag

Deleting a user tag​

Contents​

Overview​

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

This endpoint allows a user with admin access to remove a tag from a user.

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 DELETE access to the chain to which the user 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
chain(object, mandatory) Details of the chain which is submitting the request
chain.chain_id(integer, mandatory) The Spaaza Chain ID of the retailer entity
user(object, mandatory) Details of the user to remove the tag from
user.user_id(integer, conditional) The ID of the user. At least one of user_id, username, member_number, authentication_point_identifier, auxiliary_identifier, or referral_code is required to identify the user
user.username(string, conditional, max=255) The username of the user
user.member_number(string, conditional, max=255) The member number of the user
user.authentication_point_identifier(string, conditional, max=255) The authentication point identifier of the user
user.auxiliary_identifier(string, conditional, max=255) The auxiliary identifier of the user
user.referral_code(string, conditional, max=255) The referral code of the user
tag(object, mandatory) Details of the tag to remove
tag.id(integer, mandatory) The ID of the tag to remove

Sample request​

DELETE /auth/delete-user-tag HTTP/1.1
Content-Type: application/json

{
"chain": {
"chain_id": 1
},
"user": {
"user_id": 4
},
"tag": {
"id": 4
}
}

Sample response​

{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"user_tag": {
"tag": {
"active": true,
"chain": {
"email_address": null,
"id": 1,
"name": "FOO Chain, inc.",
"phone_number": null
},
"created_date": "2025-01-24T14:54:27+00:00",
"deleted": false,
"id": 11,
"last_modified_date": "2025-01-24T14:54:27+00:00",
"model_class": "user",
"value": "baby_club_nov_2025"
},
"user_info": {
"address_housenumber": null,
"address_housenumber_extension": null,
"address_latitude": null,
"address_line_2": null,
"address_line_3": null,
"address_longitude": null,
"address_postalcode": null,
"address_regionstate": null,
"address_streetname": null,
"address_towncity": null,
"authentication_point": null,
"authentication_point_identifier": "10055501555",
"auxiliary_identifier": null,
"average_basket_value": null,
"birthday": null,
"business_group": null,
"country_code": null,
"created_date": "2025-01-24 14:54:25",
"days_since_last_purchase": null,
"entity_code": {
"code": "20000000000",
"type": "custom"
},
"favorite_store": null,
"first_name": "Janneke",
"frequency": null,
"gender": null,
"id": 4,
"is_employee": false,
"is_influencer": false,
"language": null,
"last_modified_date": "2025-01-24 14:54:25",
"last_name": "De Bruin",
"loyalty_status": null,
"mailing_list": null,
"member_number": "20000000000",
"monetary": null,
"number_of_purchases": null,
"obfuscated": false,
"offline_shopper": null,
"online_shopper": null,
"opt_in_programme": {
"join_date": "2025-01-24T14:54:25+00:00",
"programme_opted_in": true
},
"opt_in_secondary": false,
"opt_in_secondary_last_modified_date": "2025-01-24 14:54:25",
"overall": null,
"points_wallet_total": 0,
"push_notification_subscription": {
"subscribed": false,
"subscriptions": []
},
"recency": null,
"referral_channel": null,
"referral_code": "nsq5k3",
"referred": false,
"referring_user": null,
"registered": true,
"signup_channel": null,
"stores": null,
"tags": [
"baby_club_jun_2025",
"baby_club_jul_2025"
],
"total_cashback_balance": 0,
"user_id": 4,
"username": "testchainuser@acme.com"
}
},
"result_type": "delete-user-tag"
}
}

Possible error responses​

The following represents a list of possible error responses for the delete-user-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 parameters (chain, user, tag) 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, user, or tag was not found
400