Create a new vendor store on the platform
curl --request POST \
--url https://api.example.com/api/v1/stores/ \
--header 'Content-Type: application/json' \
--data '
{
"brand_name": "<string>",
"about": "<string>"
}
'{
"id": 123,
"url": "<string>",
"brand_name": "<string>",
"about": "<string>",
"products_sold": 123,
"owner": 123,
"followers": [
{}
]
}This endpoint allows authenticated users to create a new store and become a vendor on the platform. When a store is created, the customer’s account is automatically upgraded to vendor status with staff permissions.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/klvxn/ecommerce-api/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header
The authenticated user automatically becomes the owner of the new store.
curl -X POST http://localhost:8000/api/v1/stores/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"brand_name": "Tech Gadgets Pro",
"about": "Premium electronics and accessories for tech enthusiasts"
}'
import requests
url = "http://localhost:8000/api/v1/stores/"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
data = {
"brand_name": "Tech Gadgets Pro",
"about": "Premium electronics and accessories for tech enthusiasts"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
{
"id": 5,
"url": "http://localhost:8000/api/v1/stores/tech-gadgets-pro/",
"brand_name": "Tech Gadgets Pro",
"about": "Premium electronics and accessories for tech enthusiasts",
"products_sold": 0,
"owner": 42,
"followers": []
}
{
"brand_name": ["store with this brand name already exists."],
"about": ["This field is required."]
}
{
"detail": "Authentication credentials were not provided."
}
is_vendor flag is set to trueis_staff flag is set to true~/workspace/source/stores/views.py:56-65curl --request POST \
--url https://api.example.com/api/v1/stores/ \
--header 'Content-Type: application/json' \
--data '
{
"brand_name": "<string>",
"about": "<string>"
}
'{
"id": 123,
"url": "<string>",
"brand_name": "<string>",
"about": "<string>",
"products_sold": 123,
"owner": 123,
"followers": [
{}
]
}