GroceryBot API (2.5.x)
Download OpenAPI specification:Download
Interact with GroceryBot directly through its API at https://api.grocerybot.net
.
GET Grocery Lists and Entries
Get your server's grocery lists and entries. Note: you have to map the relationship between a grocery list and the groceries themselves.
Responses
Response samples
- 200
Content type
application/json
{- "guild_id": "string",
- "grocery_entries": [
- {
- "id": 0,
- "created_at": "string",
- "updated_at": "string",
- "item_desc": "string",
- "updated_by_id": "string",
- "grocery_list_id": null
}
], - "grocery_lists": [
- {
- "id": 0,
- "created_at": "string",
- "updated_at": "string",
- "guild_id": "string",
- "list_label": "string",
- "fancy_name": "string"
}
]
}
POST Grocery Entry
Create a new grocery entry for your server. To attach it to a grocery list, obtain your server's grocery lists from GET /grocery-lists and put it into grocery_list_id
.
Request Body schema: application/json
Creates a new grocery entry.
item_desc | string Description of the entry. For example, |
grocery_list_id | int or null The foreign key pointing to a particular grocery list in your server. A null value means that this belongs to the server's default grocery list. |
Responses
Request samples
- Payload
Content type
application/json
{- "item_desc": "string",
- "grocery_list_id": null
}