Appearance
Requests
Canteen's Admin API follows RESTful principles, allowing interaction through standard HTTP methods. Ensure that all requests are properly structured and include the necessary headers.
Base URL
All API requests should be sent to:
https://<your-org-uuid>.canteenweb.com/api/v1/admin
Replace <your-org-uuid>
with your actual organization UUID, which is assigned upon authentication.
HTTP Methods
Canteen’s API supports the following HTTP methods:
Method | Description |
---|---|
GET | Retrieve data from the API. |
POST | Send data to create a new resource. |
PUT | Update an existing resource. |
PATCH | Partially update a resource. |
DELETE | Remove a resource. |
Request Format
- All requests must be sent as JSON.
- Include the appropriate headers in each request.
Required Headers
Header | Description | Example Value |
---|---|---|
Authorization | Bearer token for authentication | Bearer your-access-token |
Content-Type | Defines the request format | application/json |
Example Request
Fetching orders
bash
curl https://your-org-uuid.canteenweb.com/api/v1/admin/orders \
-H "Authorization: Bearer your-access-token" \
-H "Content-Type: application/json"
Make sure to replace your-org-uuid
with the actual organization UUID.