Deleting user accounts
Returns an OK code and echoes the obfuscated user details. A sample is shown below:
{
"result": {
"code": 1,
"status": "ok"
},
"results": {
"user_info": {
"id": 3354896,
"user_id": 3354896,
"first_name": "Deleted",
"last_name": "Deleted",
"country_code": "IT",
"username": "3354896@deleted.spaaza.com",
"authentication_point_identifier": null,
"auxiliary_identifier": null,
"mailing_list": {
"mailing_list_sub_offered": false,
"mailing_list_subscribed": false,
"printed_mailing_list_subscribed": false
},
"entity_code": {
"type": "custom",
"code": "133791"
},
"opt_in_programme": {
"programme_opted_in": false,
"join_date": null
},
"registered": false,
"address_streetname": null,
"address_housenumber": null,
"address_housenumber_extension": null,
"address_line_2": null,
"address_line_3": null,
"address_towncity": null,
"address_regionstate": null,
"address_postalcode": null
},
"result_type": "delete-user"
}
}
Overview
- Call name: delete-user
- Endpoint URL: https://api0.spaaza.com/delete-user
- Request methods: DELETE
- Response Content-Type: application/json
- Auth required: yes
Delete a user for legal purposes. This API endpoint obfuscates all personally-idenfiable user details such as first name, last name, email address, gender, date of birth and address details.
Permissions and Authentication
This API call requires a valid Spaaza session. The session can be as follows:
Parameter | Description |
---|---|
or | |
admin | A session generated by administrative user login. The performing admin user needs to be logged in and have delete access to the entity (business or chain) to which the user is connected. |
or | |
privileged | An OAuth-based mechanism for trusted third-parties,the use of privileged authentication is permitted for this endpoint . |
Note that if admin authentication is used and the admin user does not have sufficient permissions to delete the user, an error will be generated.
HTTP Parameters
The following HTTP parameters can be passed to the API:
Parameter | Description |
---|---|
chain_id (mandatory in the case of admin authentication) | the id of the chain with which the user to be deleted is associated. |
user_id or username or member_number (one parameter mandatory) | the Spaaza user ID, username (email address) or member_number (user code) of the user to be deleted. One of these parameters must be supplied. |
Headers
The following headers can/must be passed to the API call:
Parameter | Description |
---|---|
X-MyPrice-App-Hostname (mandatory in the case of privileged authentication if user_id parameter not sent) | The hostname of the app for which the user is requesting the card. Required in the case of privileged authentication when the user is identified by either the username or member_number parameter. Not required in the case of admin authentication. |
Permissions
This API call requires delete permissions when using admin authentication.