Documentation 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.
The Get Store endpoint returns the complete record for a single store identified by its unique MongoDB ObjectId. This is useful when you already hold a store identifier — for example from a previous list call — and need the full set of fields including address, GeoJSON coordinates, and weekly schedule.
Endpoint
This endpoint is public and does not require authentication.
Path Parameters
The MongoDB ObjectId of the store (24-character hex string, e.g. 64f1c2e9a1b2c3d4e5f12345).
Response — 200 OK
Human-readable status message ("Store found").
The complete store record. MongoDB ObjectId of the store.
Store display name (3–50 characters, unique).
URL-friendly identifier auto-generated from the name.
Store contact email address (unique).
Store phone number. Optional; omitted when not set.
Physical address of the store. GeoJSON Point representing the store’s geographic coordinates. Two-element array [longitude, latitude]. Longitude must be between -180 and 180; latitude between -90 and 90.
Whether the store is currently active. Defaults to true.
Array of exactly 7 elements representing the weekly schedule, starting on Sunday (index 0) through Saturday (index 6). Each element is either:
[] — the store is closed that day
["HH:MM", "HH:MM"] — opening time followed by closing time
ISO 8601 timestamp of when the store was created.
ISO 8601 timestamp of the last update.
Error Codes
Status Description 400The supplied id is not a valid MongoDB ObjectId. 404No store exists with the given id. 500Unexpected server error.
Example
curl https://api.ocha.ch/api/v1/stores/64f1c2e9a1b2c3d4e5f12345
{
"message" : "Store found" ,
"store" : {
"_id" : "64f1c2e9a1b2c3d4e5f12345" ,
"name" : "Ocha Neuchâtel" ,
"slug" : "ocha-neuchatel" ,
"email" : "[email protected] " ,
"phone" : "+41321234567" ,
"address" : {
"line1" : "Avenue de la Gare 1" ,
"city" : "Neuchâtel" ,
"zipcode" : "2000" ,
"country" : "Suisse"
},
"location" : {
"type" : "Point" ,
"coordinates" : [ 6.93 , 46.99 ]
},
"is_active" : true ,
"opening_hours" : [
[],
[ "08:00" , "18:00" ],
[ "08:00" , "18:00" ],
[ "08:00" , "18:00" ],
[ "08:00" , "20:00" ],
[ "08:00" , "20:00" ],
[ "09:00" , "17:00" ]
],
"created_at" : "2024-01-15T10:00:00.000Z" ,
"updated_at" : "2024-03-20T14:30:00.000Z"
}
}