Delete Customer Address
Deletes an existing customer address.
HTTP Request
DELETE/api/customers/:customer_pk/addresses/:id
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token-based (Authorization: Token <your_api_key>)
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| customer_pk | Integer | Yes | Unique ID of the customer |
| id | Integer | Yes | Unique ID of the address to delete |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3response = requests.delete('http://www.example.com/api/customers/123/addresses/456',
4 headers={'Authorization': 'Token <your_api_key>'}
5)
6print(response.status_code) # Should be 204 for successful deletion1curl -X DELETE "http://www.example.com/api/customers/123/addresses/456" -H "Authorization: Token <your_api_key>"Status Codes
| Code | Description |
|---|---|
| 204 | Customer address deleted successfully |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 404 | Customer or address not found |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| None | None | No content returned on successful deletion |