Skip to main content

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

GET /api/v1/stores/:id
This endpoint is public and does not require authentication.

Path Parameters

id
string
required
The MongoDB ObjectId of the store (24-character hex string, e.g. 64f1c2e9a1b2c3d4e5f12345).

Response — 200 OK

message
string
Human-readable status message ("Store found").
store
object
The complete store record.

Error Codes

StatusDescription
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"
  }
}

Build docs developers (and LLMs) love