Adds A Favorite Products
Adds a favorite product to current authenticated profile favorites
HTTP Request
Add Product to Favorites
POST/api/shop/customers/me/favorites
Authorization
Authorization
- Required: Yes
- Permission: Authenticated Customer
- Authentication: Token-based (`Authorization: Token <your_api_key>`)
Request Body (POST only)
| Field | Type | Required | Description |
|---|---|---|---|
| product | integer | No | ID of the product to add to favorites |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Add product to favorites
4response = requests.post('http://www.example.com/api/shop/customers/me/favorites',
5 json={
6 'product': 456
7 },
8 headers={'Authorization': 'Token <your_api_key>'}
9)
10print(response.status_code) # Should be 2001# Add product to favorites
2curl -X POST "http://www.example.com/api/shop/customers/me/favorites" -H "Authorization: Token <your_api_key>" -H "Content-Type: application/json" -d '{
3 "product": 456
4}'Response Fields
| Field | Type | Description |
|---|---|---|
| None | None | No response body returned |