The Create Store endpoint registers a new physical store in the Ocha platform. The store name and email address must each be unique across all existing stores — the API returnsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/floriansalvi/HEIG-VD_Ocha-api/llms.txt
Use this file to discover all available pages before exploring further.
409 Conflict if either is already in use. A URL-friendly slug is automatically derived from the name and does not need to be supplied in the request body.
Endpoint
Request Body
Store display name. Must be between 3 and 50 characters and unique across all stores.
Contact email address for the store. Must be a valid email format and unique across all stores. Stored in lowercase.
Store phone number. Optional. Must be a valid mobile phone number in any international format (validated by
validator.isMobilePhone).Physical address of the store. All four sub-fields are required.
GeoJSON Point representing the store’s geographic position.
Weekly schedule. Must be an array of exactly 7 elements, one per day starting with Sunday (index 0) through Saturday (index 6). Each element is either:
[]— the store is closed that day["HH:MM", "HH:MM"]— opening time then closing time in 24-hour format
09:00–17:00.Response — 201 Created
Confirmation message (
"Store created").The newly created store record, including the auto-generated
slug, is_active flag, and timestamps.Error Codes
| Status | Description |
|---|---|
400 | One or more required fields (name, email, address, location) are missing. |
401 | No valid JWT was provided in the Authorization header. |
403 | The authenticated user does not have admin privileges. |
409 | A store with the same name or email already exists. |
422 | A field value failed validation (e.g. invalid email format, bad coordinates, malformed opening_hours). |
500 | Unexpected server error. |