# CMS-V2 APIs
figma: https://www.figma.com/file/6BgHoyCISmyuoQ2TmVX4zq/Food-Ops?node-id=105%3A5018
prd: https://docs.google.com/document/d/1j3ISIn4SX59MvdIo0RjtqtSS-czCDQphdPfAQ0-Ym_Q/edit
## Restarant
### Create restaurant
- API: `/admin/api/v1/restaurants`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart Form
- fields: `parse_id`, `name`, `address`, `latitude`, `longitude`, `min_delivery_time`, `min_order_value`, `min_delivery_fee`, `delivery_discount_percent`, `global_delivery_fee`, `global_delivery_fee_discount_percent`, `vat`, `service_charge`, `phone`, `email`, `website`, `discount_type`, `discount`, `max_discount_amount`, `min_discount_order_amount`, `visible_in_app`, `is_flagged`, `search_score`, `radius_promotion`, `city`, `is_resto`, `marketplace_fee`, `is_partner`, `currency`, `group_id`, `is_supershop`, `is_sc_inclusive`, `is_vat_inclusive`,
`is_sd_inclusive`, `custom_radius`, `is_tong`,`is_pharma`
- image file fields: `logo`, `banner`
- fields:
- `tags`: JSON Array string.
```json
[
{
"title": "choco chips",
"description": ""
},
{
"title": "crunchy toppings",
"description": ""
}
]
```
- `badges`: JSON Array string.
```json
[
{
"name": "choco chips"
},
{
"name": "crunchy toppings"
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update restaurant
- API: `/admin/api/v1/restaurants/<restaurant_id>`
- Method: `PUT`
- Query Param: n/a
- Request Body: Multipart Form
- fields(Required): `parse_id`, `name`, `address`, `latitude`, `longitude`, `min_order_value`, `min_delivery_fee`, `delivery_discount_percent`, `global_delivery_fee`, `global_delivery_fee_discount_percent`, `vat`, `service_charge`, `phone`, `email`, `discount_type`, `discount`, `visible_in_app`, `is_flagged`, `marketplace_fee`, `is_partner`,
`is_supershop`, `is_sc_inclusive`, `is_vat_inclusive`, `is_sd_inclusive`, `custom_radius`, `is_tong`,`is_pharma`,
`max_discount_amount`, `min_discount_order_amount`, `radius_promotion`
- image file fields: `new_logo`, `new_banner`
- fields:
- `tags`: JSON Array string.
```json
[
{
"title": "choco chips",
"description": ""
},
{
"title": "crunchy toppings",
"description": ""
}
]
```
- `badges`: JSON Array string.
```json
[
{
"name": "choco chips"
},
{
"name": "crunchy toppings"
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Get restaurant by id
- API: `/admin/api/v1/restaurants/<id>`
- Method: `GET`
- Query Param: n/a
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "000369fa-c126-49d5-b996-bd0ca5dc32c3",
"parse_id": 20127,
"name": "Saltbae updated",
"address": "Kazi Aspharagus Food Court, Zindabazar",
"latitude": 24.895700454711914,
"longitude": 91.87020111083984,
"logo": null,
"banner": "http://food-m.p-stageenv.xyz/food/20127_banner.jpeg",
"min_delivery_time": "60 min",
"min_order_value": 50,
"min_delivery_fee": 0,
"delivery_discount_percent": 33.33,
"global_delivery_fee": 0,
"global_delivery_fee_discount_percent": 60,
"vat": 0,
"service_charge": 0,
"phone": "01312005531",
"email": "",
"website": "",
"store_front": null,
"long_shot": null,
"discount_type": "PERCENTAGE",
"discount": 0,
"max_discount_amount": null,
"min_discount_order_amount": 0,
"visible_in_app": true,
"is_flagged": false,
"search_score": 0,
"radius_promotion": false,
"city": 3,
"is_resto": false,
"accepting_orders": true,
"average_rating": null,
"rating_count": 0,
"marketplace_fee": 0,
"is_partner": false,
"is_supershop": false,
"currency": "BDT",
"sd": 0,
"created_at": "2021-03-05T23:09:48+0000",
"modified_at": "2022-01-16T01:00:51+0000",
"is_chain": false,
"is_manual_dispatch": false,
"popularity_score": 0,
"is_tong": false,
"is_pharma": false,
"custom_radius": null,
"badges": null,
"tags": null,
"mpf": 0,
"upfront": false,
"subsidy_resto_share": 0,
"subsidy_pathao_share": 0,
"is_featured": true,
"is_sc_inclusive": false,
"is_vat_inclusive": false,
"is_sd_inclusive": false
}
}
```
### List restaurants by filter
- API: `/admin/api/v1/restaurants`
- Method: `GET`
- Query Param:
- `id`: Optional. String
- `name`: Optional. String
- `city`: Optional. Interger
- `delivery_discount`: Optional. String (for example: 10-20)
- `radius_promotion`: Optional. Boolean
- `visible_in_app`: Optional. Boolean
- `is_partner`: Optional. Boolean
- `is_resto`: Optional. Boolean
- `upfront`: Optional. Boolean
- `is_supershop`: Optional. Boolean
- `page`: Optional. Default: 1
- `page_size`: Optional.
- Request Body: n/a
- note:
- sorted in parse_id ascending order
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 1,
"page_size": 30,
"current_page": 1,
"data": [
{
"id": "000369fa-c126-49d5-b996-bd0ca5dc32c3",
"parse_id": 20127,
"name": "Saltbae updated",
"address": "Kazi Aspharagus Food Court, Zindabazar",
"latitude": 24.895700454711914,
"longitude": 91.87020111083984,
"logo": null,
"banner": "http://food-m.p-stageenv.xyz/food/20127_banner.jpeg",
"min_delivery_time": "60 min",
"min_order_value": 50,
"min_delivery_fee": 0,
"delivery_discount_percent": 33.33,
"global_delivery_fee": 0,
"global_delivery_fee_discount_percent": 60,
"vat": 0,
"service_charge": 0,
"phone": "01312005531",
"email": "",
"website": "",
"store_front": null,
"long_shot": null,
"discount_type": "PERCENTAGE",
"discount": 0,
"max_discount_amount": null,
"min_discount_order_amount": 0,
"visible_in_app": true,
"is_flagged": false,
"search_score": 0,
"radius_promotion": false,
"city": 3,
"is_resto": false,
"accepting_orders": true,
"average_rating": null,
"rating_count": 0,
"marketplace_fee": 0,
"is_partner": false,
"is_supershop": false,
"currency": "BDT",
"sd": 0,
"created_at": "2021-03-05T23:09:48.893044Z",
"modified_at": "2022-01-16T01:00:51.85117Z",
"is_chain": false,
"is_manual_dispatch": false,
"popularity_score": 0,
"is_tong": false,
"is_pharma": false,
"custom_radius": null,
"badges": null,
"tags": null,
"mpf": 0,
"upfront": false,
"subsidy_resto_share": 0,
"subsidy_pathao_share": 0,
"is_featured": true,
"is_sc_inclusive": false,
"is_vat_inclusive": false,
"is_sd_inclusive": false
}
]
}
```
### Update restaurant visibility bulk
- API: `/admin/api/v1/restaurants/visibility`
- Method: `PATCH`
- Query Param: n/a
- Request Body:
```json
{
"parse_ids":[
20127,9095
],
"visible_in_app": true
}
```
```json
{
"ids": [
"000369fa-c126-49d5-b996-bd0ca5dc32c3",
"000aa3ff-5b3b-4001-9f99-7167f6100e82"
],
"visible_in_app": true
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Restaurant auto suggestions
- API: `/api/v1/restaurants`
- Method: `GET`
- Query Param:
- `name`: Optional. String
- `page`: Optional. Integer
- `page_size`: Optional. Integer
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 4,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "4cfa0573-22ec-413e-be57-98ba18ce6f5e",
"name": "Food Mood"
},
{
"id": "a9645fc8-b552-4413-8cca-38caf30bfe4a",
"name": "Mood Expresso"
},
{
"id": "bf231255-cef1-4334-9042-e2afbafc5132",
"name": "Moodlift Cafe and Bar"
},
{
"id": "8e9703dd-af4f-4376-ab2d-728be6087cce",
"name": "Food Mood"
}
]
}
```
### Update restaurant upfront by parse ids
- API: `/admin/api/v1/restaurants/upfront`
- Method: `PUT`
- Query Param: n/a
- Request Body:
```json
{
"parse_ids": [
11,
12,
110
],
"upfront": false
}
```
```json
{
"parse_ids": [
11,
12,
110
],
"upfront": true
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
## Restaurant Groups
### List groups by filter
- API: `/api/v1/groups`
- Method: `GET`
- Query Param:
- `group_id`: Optional. Integer
- `restaurant_id`: Optional. String
- `page`: Optional. Default 1. Integer
- `page_size`: Optional. Default 50. Integer
- Request Body: N/A
- note:
- sorted by group_name (ascending order)
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 6,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": 2,
"name": "branching",
"created_at": "2021-07-13T07:31:58.405152Z",
"modified_at": "2021-07-13T07:31:58.417073Z",
"restaurants": [
{
"id": "ca70a048-a06c-4339-bc6d-66c2f60ed200",
"name": "Frybox, From Kludio (Khilgaon)"
},
{
"id": "e3dd7960-3337-4b3b-ac49-1a5fd9bbf2cc",
"name": "Rice & Noodles"
},
{
"id": "e7ebcc18-67db-4d56-87ac-52f467cf80ec",
"name": "Euro Asiano Restaurant - Moghbazar"
},
{
"id": "35a80e9f-35cd-467c-9f14-631009dd744d",
"name": "New Cathay (RESTO)"
}
]
},
{
"id": 3,
"name": "Chillox branches",
"created_at": "2021-08-01T09:06:46.3157Z",
"modified_at": "2021-08-01T09:06:46.352308Z",
"restaurants": [
{
"id": "6f7569a5-61ad-4d97-ba25-4099a2464d15",
"name": "Chillox"
},
{
"id": "feda3606-3058-42e9-aae1-6950a97c0073",
"name": "Chillox Aftabnagar"
}
]
},
{
"id": 4,
"name": "CP",
"created_at": "2021-08-02T10:18:33.18794Z",
"modified_at": "2021-08-02T10:18:33.20055Z",
"restaurants": [
{
"id": "f67d068a-34af-4247-bc58-d0dfe3be353c",
"name": "CP Five Star"
}
]
},
{
"id": 6,
"name": "Mithai",
"created_at": "2022-01-16T10:07:18.753025Z",
"modified_at": "2022-01-16T10:07:18.770804Z",
"restaurants": [
{
"id": "8dc6f827-470a-47f6-bc97-53c14a819075",
"name": "Mithai - Paltan"
},
{
"id": "ae05d865-1957-4f3d-9e8d-960ab8acf022",
"name": "Mithai - Malibag Bus Stand"
},
{
"id": "9f660daa-99d7-4f31-9c12-26817edd52ec",
"name": "Mithai - Hazipara"
},
{
"id": "3c93137e-ed56-46c7-a424-6f56f6953c5d",
"name": "Mithai - Mogbazar"
},
{
"id": "c27f2f6c-2aad-4336-8619-b654977932a9",
"name": "Mithai - Paltan 2"
},
{
"id": "9cd4e475-7de6-49a6-b8ac-7ed60ce8c9b9",
"name": "Mithai Shantinagar Branch"
}
]
},
{
"id": 1,
"name": "S baker group",
"created_at": "2021-07-06T10:39:20.962859Z",
"modified_at": "2021-07-06T10:39:20.973741Z",
"restaurants": [
{
"id": "b0e30b4d-cc0e-4d8f-81d6-02a0c46c9355",
"name": "S Baker Food & Pastry"
},
{
"id": "4e8f129f-9b95-45ba-bf8c-3f7d58b89336",
"name": "S Baker Food & Pastry (Branch-2)"
},
{
"id": "778a90b7-9beb-4f79-aaa0-081dcbcc0061",
"name": "S Baker Food & Pastry (Branch-3)"
},
{
"id": "f16ef82a-40d5-415e-aa1f-3ed1b5b587ac",
"name": "S Baker Food & Pastry (Branch-4)"
}
]
},
{
"id": 42,
"name": "test_group2",
"created_at": "2022-01-26T11:23:29.683563Z",
"modified_at": "2022-01-26T11:23:29.683563Z",
"restaurants": [
{
"id": "c2b618ed-a0fe-4ec2-b12c-56306ab555b8",
"name": "Delhi Darbar"
}
]
}
]
}
```
### List groups by Suggestion
- API: `/api/v1/groups/suggestions`
- Method: `GET`
- Query Param:
- `name`: Required. String. (empty string is ok)
- `page`: Optional. Default 1. Integer
- `page_size`: Optional. Default 50. Integer
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 6,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": 2,
"name": "branching"
},
{
"id": 3,
"name": "Chillox branches"
}
]
}
```
### Get group by id
- API: `/api/v1/groups/<group_id>`
- Method: `GET`
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": 42,
"name": "Delhi Darbar Branches",
"created_at": "2022-01-26T11:23:29.683563Z",
"modified_at": "2022-01-26T11:23:29.683563Z",
"restaurants": [
{
"id": "c2b618ed-a0fe-4ec2-b12c-56306ab555b8",
"name": "Delhi Darbar"
}
]
}
}
```
### Create group
- API: `/api/v1/groups/`
- Method: `POST`
- Request Body:
```json
{
"name": "Delhi Darbar branches",
"restaurant_ids": [
"c2b618ed-a0fe-4ec2-b12c-56306ab555b8"
]
}
```
- Response:
- code: `201`
```json
{
"success": true,
"message": "group 'Delhi Darbar branches' is created successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0001",
"message": "another group with same name already exists"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0001",
"message": "one or more restaurants are bound to another group"
}
```
### Update group by id
- API: `/api/v1/groups/<group_id>`
- Method: `PUT`
- Request Body:
```json
{
"name": "Delhi Darbar branches",
"restaurant_ids": [
"c2b618ed-a0fe-4ec2-b12c-56306ab555b8"
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "group 'Delhi Darbar branches' is updated successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0001",
"message": "another group with same name already exists"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0001",
"message": "one or more restaurants are bound to another group"
}
```
### Delete group by id
- API: `/api/v1/groups/<group_id>`
- Method: `DELETE`
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "group is deleted successfully"
}
```
## Restaurant Schedules
### Create schedule for a restaurant
- API: `/admin/api/v1/schedules`
- Method: `POST`
- Query Param: n/a
- Request Body:
```json
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"schedules": [
{
"day": "Saturday",
"opening_time": "08:30:00",
"closing_time": "10:00:00"
},
{
"day": "Saturday",
"opening_time": "10:30:00",
"closing_time": "15:00:00"
},
{
"day": "Saturday",
"opening_time": "15:30:00",
"closing_time": "21:00:00"
},
{
"day": "Sunday",
"opening_time": "08:30:00",
"closing_time": "21:00:00"
}
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update schedule for a restaurant
- API: `/admin/api/v1/schedules`
- Method: `PUT`
- Query Param: n/a
- Request Body:
```json
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"schedules": [
{
"day": "Saturday",
"opening_time": "08:30:00",
"closing_time": "10:00:00"
},
{
"day": "Saturday",
"opening_time": "10:30:00",
"closing_time": "15:00:00"
},
{
"day": "Saturday",
"opening_time": "15:30:00",
"closing_time": "21:00:00"
},
{
"day": "Sunday",
"opening_time": "08:30:00",
"closing_time": "21:00:00"
}
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Get restaurant schedules
- API: `/admin/api/v1/schedules/restaurants/<restaurant_id>`
- Method: `GET`
- Query Param: n/a
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"schedules": [
{
"id": "f0d40c0a-d566-46da-8653-9b697b2cc66a",
"day": "Saturday",
"opening_time": "08:30:00",
"closing_time": "10:00:00"
},
{
"id": "d230bdf7-41c2-4c2d-89ed-5f71d4622cdf",
"day": "Saturday",
"opening_time": "10:30:00",
"closing_time": "15:00:00"
},
{
"id": "845e3b8b-5935-4535-8c1e-98d1cb16287f",
"day": "Saturday",
"opening_time": "15:30:00",
"closing_time": "21:00:00"
},
{
"id": "296703e7-c6e2-42ec-b5c8-f8836552c217",
"day": "Sunday",
"opening_time": "08:30:00",
"closing_time": "21:00:00"
}
]
}
}
```
### List restaurant schedules by filter
- API: `/admin/api/v1/schedules`
- Method: `GET`
- Query Param:
- `restaurant_id`: Optional.
- `city_id`: Optional.
- `page`: Optional. Default: 1
- `page_size`: Optional.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 1,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"name": "test-resto",
"schedules": [
{
"id": "f0d40c0a-d566-46da-8653-9b697b2cc66a",
"day": "Saturday",
"opening_time": "00:30:00",
"closing_time": "10:00:00"
},
{
"id": "d230bdf7-41c2-4c2d-89ed-5f71d4622cdf",
"day": "Saturday",
"opening_time": "10:30:00",
"closing_time": "15:00:00"
},
{
"id": "845e3b8b-5935-4535-8c1e-98d1cb16287f",
"day": "Saturday",
"opening_time": "15:30:00",
"closing_time": "21:00:00"
},
{
"id": "717288c4-5504-468a-8691-6df91d974c6f",
"day": "Sunday",
"opening_time": "08:30:00",
"closing_time": "21:00:00"
}
]
}
]
}
```
### Delete restaurant schedules
- API: `/admin/api/v1/schedules/restaurants/<restaurant_id>`
- Method: `DELETE`
- Query Param: n/a
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
}
```
## Restaurant Items
### Single Item Details
- API: `/admin/api/v1/items/:item_id`
- Method: `GET`
- Query Param: N/A
- Response:
- code: `200`
> fields note: `image`: null or string, `priority`: null or interger, `popularity_priority`: null or integer, `description`: null or string, `ingredients`: null or string, `max_allowed_quantity`: null or interger
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "cb6bdee0-b20b-4136-b0f9-f9380e68a52c",
"name": "No Bones (About It) Platter (4) Sides",
"image": null,
"image_required": false,
"category": {
"id": "4fea7063-2aa1-42c2-bb4f-29f3ae19393f",
"name": "Sharing Platters"
},
"price": 1550,
"cuisine": {
"id": "ea406c2c-f0ab-4a57-aff0-595553783412",
"name": "Portuguese"
},
"addons_required": [
{
"addon_key": "Extra",
"addon_name": "Choose Your Extra Veg Toppings",
"required_addon_count": 2,
"items": [
{
"id": "53fd2367-8146-45a4-81f7-a6bcef031389",
"name": "Mushroom"
},
{
"id": "b2cc20c1-39c6-4b65-839f-9c93a0e9ad05",
"name": "Gr. Pepper"
},
{
"id": "db441d4e-9fd9-4e9d-86ce-98a4622dfcc8",
"name": "Spinach"
},
{
"id": "618c78ee-4e67-4b45-a531-042bee79b09e",
"name": "Pineapple"
},
{
"id": "6dc3fed6-a76c-4505-b6ef-7739dd95bbea",
"name": "Onion"
},
{
"id": "3a110ea7-1596-4c8a-bed5-494a2d4b7569",
"name": "Olive"
}
]
},
{
"addon_key": "Extras",
"addon_name": "Choose Your Extra Non-Veg Toppings",
"required_addon_count": 1,
"items": [
{
"id": "7ab41e26-53b6-4439-bd4d-690ab5a41aa2",
"name": "Ham"
},
{
"id": "83d83002-ab27-4d06-a0a0-d90611a014ef",
"name": "Bacon"
},
{
"id": "803268d9-9bc1-4b86-8427-f5178bdb0963",
"name": "Salami"
},
{
"id": "742aab2d-5df5-4740-b9eb-d7e40bbc37f1",
"name": "Chicken"
},
{
"id": "00efc3b1-6352-4201-876c-321f413b82ac",
"name": "Egg"
},
{
"id": "98d8abe8-ca4a-4580-8fd9-bb38faf426ff",
"name": "Pepperoni"
},
{
"id": "c3dd053b-3eb8-4794-a9ea-97deac705e5d",
"name": "Tuna"
},
{
"id": "b712a2a7-4eea-44f2-af7b-1dca5fd3ce22",
"name": "Cheese"
}
]
},
{
"addon_key": "Extrass",
"addon_name": "Choose Your Extra Topping",
"required_addon_count": 1,
"items": [
{
"id": "eba9edd1-6528-47d3-8c5b-054ca749c789",
"name": "Extra non veg"
},
{
"id": "ed58ecff-0dd1-43d9-a106-ed41cd815af0",
"name": "Extra Cheese"
},
{
"id": "aaf7c006-07b1-4979-a90f-cb324042681c",
"name": "Extra Fried Egg"
}
]
}
],
"addons_optional": [
{
"addon_key": "Extra",
"addon_name": "Choose Your Extra Veg Toppings",
"items": [
{
"id": "7816cb0e-e3eb-45d8-8e07-3ff6a5828673",
"name": "Mushroom"
},
{
"id": "adbc0ca8-b946-4fc2-a66c-7ab5587b4541",
"name": "Gr. Pepper"
},
{
"id": "15b4a9af-7269-49c4-92cb-fd44e09f1af0",
"name": "Spinach"
},
{
"id": "6e019545-8502-45c1-bec3-0e7442496e60",
"name": "Pineapple"
},
{
"id": "d7cdc6ab-9509-442e-9a6e-f74b6c8592e8",
"name": "Onion"
},
{
"id": "99b01b10-6502-4bcb-8b34-ed47d95efd70",
"name": "Olive"
}
]
},
{
"addon_key": "Extras",
"addon_name": "Choose Your Extra Non-Veg Toppings",
"items": [
{
"id": "cddc6c62-4e42-4ddd-93f0-8918c90051ca",
"name": "Ham"
},
{
"id": "81bf14b2-2da3-497a-bdb3-22971d72f35b",
"name": "Bacon"
},
{
"id": "c002710c-aea5-406a-af84-4181e34ef6d6",
"name": "Salami"
},
{
"id": "f4adf6f4-36cb-499d-973a-afd5e6b338d0",
"name": "Chicken"
},
{
"id": "bb8ce00a-60cf-4cc5-83e4-5f8a9ee81160",
"name": "Egg"
},
{
"id": "4492dff8-b3aa-400a-8c15-91318141929f",
"name": "Pepperoni"
},
{
"id": "81b80fcf-4950-4eb6-8b55-9b3cf71fcb25",
"name": "Tuna"
},
{
"id": "d458e8f2-3921-42d1-b3ad-772377380bfb",
"name": "Cheese"
}
]
},
{
"addon_key": "Extrass",
"addon_name": "Choose Your Extra Topping",
"items": [
{
"id": "961f2163-58b3-427e-a7a1-4998f11ef2e2",
"name": "Extra non veg"
},
{
"id": "aaf3a5d2-a2df-4f8a-8407-120f287c1b78",
"name": "Extra Cheese"
},
{
"id": "bea70e8a-47c7-47d1-9e4e-0f9141ff31bf",
"name": "Extra Fried Egg"
}
]
}
],
"menu_hour": {
"id": "e52c1163-5006-4a9b-a65a-96f39d0007df",
"menu_type": "All Day Menu"
},
"discount_type": "PERCENTAGE",
"discount": 0,
"visibility": true,
"priority": null,
"popular": false,
"popularity_priority": null,
"description": "new description",
"ingredients": "tomato, onion",
"max_allowed_quantity": 9,
"is_available": true
}
}
```
### List Item by Filter
- API: `/admin/api/v1/items`
- Method: `GET`
- Query Param:
- `restaurant_id` - Required. String
- `name`: Optional. String. Items name.
- `menu_hour_id`: Optional. String.
- `has_discount`: Optional. Boolean.
- `page` - Optional. Integer. default 1.
- `page_size` - Optional. Integer. default 30.
- `popular` - Optional. Boolean. default NULL
- `has_addons` - Optional. Boolean. default NULL
- `visible` - Optional. Boolean. default NULL
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 30,
"current_page": 1,
"data": [
{
"id": "e368d9fb-c008-4073-9f93-51e84f3c286c",
"name": "Mini Cappuccino",
"description": "Served with Fried Rice, Sweet & Sour Chicken, Mixed Vegetable & French Fry",
"image": null,
"image_required": false,
"max_allowed_quantity": null,
"category": "Specialty",
"price": 150,
"currency": "BDT",
"addons_required_count": 0,
"addons_optional_count": 2,
"is_popular": true,
"menu_type": "Full Day Menu",
"is_visible": true,
"popularity_priority": null,
"priority": null,
"is_available": true
},
{
"id": "ea7854df-8c37-499a-be5f-8eadc14bd1c2",
"name": "Hazelnut Coffee Freddos (Large)",
"description": "",
"image": "http://image.com/123",
"image_required": true,
"max_allowed_quantity": 5,
"category": "Coffee Freddos",
"price": 345,
"currency": "BDT",
"addons_required_count": 0,
"addons_optional_count": 2,
"is_popular": true,
"menu_type": "Full Day Menu",
"is_visible": true,
"popularity_priority": null,
"priority": null,
"is_available": true
}
]
}
```
### Create item
- API: `/admin/api/v1/items`
- Method: `POST`
- Query Param: N/A
- Request Body: Multipart Form
- fields: `name`, `restaurant_id`, `price`, `popular`, `popularity_priority`, `addons_optional`, `addons_required`, `menu_hours_id`, `cuisine_id`, `category_id`, `discount`, `discount_type`, `visibility`, `priority`, `description`,
`ingredients`, `max_allowed_quantity`, `is_available`, `addon_counter`
- image file fields: `image`
> `addons_optional` or `addons_required` value should be json string array. examples:
`addons_optional` : `[]`
`addons_optional`: `["1aef59d4-40e0-44cc-91a7-ee62e3185c0c", "06c7f434-083f-406b-b2fe-46ea5cb2f72c"]`
`addons_required`: `["1aef59d4-40e0-44cc-91a7-ee62e3185c0c", "06c7f434-083f-406b-b2fe-46ea5cb2f72c"]`
> `addon_counter` : `[{"key":" test1","count":1},{"key":" test2","count":2}]`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update item
- API: `/admin/api/v1/items/:item_id`
- Method: `PUT`
- Query Param: N/A
- Request Body: Multipart Form
- fields: `name`, `restaurant_id`, `price`, `popular`, `popularity_priority`, `addons_optional`, `addons_required`, `menu_hours_id`, `cuisine_id`, `category_id`, `discount`, `discount_type`, `visibility`, `priority`, `description`,
`ingredients`, `max_allowed_quantity`, `is_available`, `addon_counter`
- image file fields: `image`
> `addons_optional` or `addons_required` value should be json string array. examples:
`addons_optional` : `[]`
`addons_optional`: `["1aef59d4-40e0-44cc-91a7-ee62e3185c0c", "06c7f434-083f-406b-b2fe-46ea5cb2f72c"]`
`addons_required`: `["1aef59d4-40e0-44cc-91a7-ee62e3185c0c", "06c7f434-083f-406b-b2fe-46ea5cb2f72c"]`
> `addon_counter` : `[{"key":" test1","count":1},{"key":" test2","count":2}]`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Get Response for bulk item update
- API: `/admin/api/v1/items/bulk/<restaurant_id>`
- Method: `GET`
- Query Param:
- `category_id`: Optional.
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 165,
"page_size": 30,
"next_page": 2,
"current_page": 1,
"data": [
{
"id": "0100a9ce-dc64-476b-bfda-3382308b6b90",
"name": "Iced Vanilla Latte",
"description": "",
"image": "http://image.com/123",
"image_required": true,
"max_allowed_quantity": 5,
"category": {
"id": "6a6b6aa2-493e-4433-be88-200360a83c70",
"name": "Freddo"
},
"price": 12,
"cuisine": {
"id": "0d90a4cc-246a-4fa0-b232-11faa86de75e",
"name": "Drinks And Beverages"
},
"addons_required": [
{
"addon_name": "Choose Your Pizza Size",
"addon_key": "sor",
"items": [
{
"id": "52609eb8-364a-43ea-a458-d006f0914b9a",
"name": "12 Inch"
}
]
}
],
"addons_optional": [
{
"addon_name": "Choose Your Pizza Size",
"addon_key": "regu",
"items": [
{
"id": "02eb5975-8fcb-44d6-b196-bfdf30b9bb79",
"name": "8 Inch"
}
]
},
{
"addon_name": "Choose Your Pizza Size",
"addon_key": "grill",
"items": [
{
"id": "0fc082d5-4514-47c2-9305-3fae18ce4657",
"name": "8 Inch"
}
]
}
],
"menu_hour": {
"id": "04fe605c-a525-4bef-b640-90b4989f61e4",
"menu_type": "Full Day Menu"
},
"discount_type": "PERCENTAGE",
"discount": 0,
"is_visible": true,
"priority": null,
"is_popular": true,
"popularity_priority": 1
},
{
"id": "03049eea-648b-4291-ad27-1d29d5b19c07",
"name": "Brazil - 450 Gm",
"description": "this is ...",
"image": null,
"image_required": true,
"max_allowed_quantity": null,
"category": {
"id": "3e36c243-8511-4101-a8cb-2d641eedbf79",
"name": "Coffee Beans"
},
"price": 920,
"cuisine": {
"id": "0d90a4cc-246a-4fa0-b232-11faa86de75e",
"name": "Drinks And Beverages"
},
"addons_required": [
{
"addon_name": "Choose Your Pizza Size",
"addon_key": "sor",
"items": [
{
"id": "52609eb8-364a-43ea-a458-d006f0914b9a",
"name": "12 Inch"
}
]
}
],
"addons_optional": [],
"menu_hour": {
"id": "04fe605c-a525-4bef-b640-90b4989f61e4",
"menu_type": "Full Day Menu"
},
"discount_type": "PERCENTAGE",
"discount": 0,
"is_visible": true,
"priority": null,
"is_popular": true,
"popularity_priority": null
}
]
}
```
### Delete Bulk Item
- API: `/admin/api/v1/items/bulk/delete`
- Method: `POST`
- Query Param: N/A
- Request Body:
```json
[
{
"id": "2fe38bf6-ea58-4193-b1c7-207fe423bb28"
},
{
"id": "2fe38bf6-ea58-4193-b1c7-207fe423bb28"
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update Bulk Item
- API: `/admin/api/v1/items/bulk`
- Method: `PATCH`
- Query Param: N/A
- Request Body:
- Required fields: `id`.
- Optional fields: all other fields which will be updated.
- fields: `addons_required`, `addons_optional`, `popular`, `popularity_priority`, `visibility`, `name`, `price`,
`image`, `discount_type`, `discount`, `category_id`, `cuisine_id`, `menu_hours_id`, `visibility`, `priority`,
`max_allowed_quantity`, `description`, `image_required`
> note: `max_allowed_quantity` is nullable field, `"max_allowed_quantity": null`
```json
[
{
"id": "0100a9ce-dc64-476b-bfda-3382308b6b90",
"price": 12,
"visibility": true
},
{
"id": "064c8b78-2849-4f96-9bd0-1c15a7dcf734",
"category_id": "6a6b6aa2-493e-4433-be88-200360a83c70",
"addons_required": [
"72c704ea-1d40-47f1-8299-5791b3d1080b"
]
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
## Restaurant Addons
### Create Addon for a restaurant
- API: `/admin/api/v1/addons`
- Method: `POST`
- Query Param: n/a
- Request Body:
```json
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"key": "key1",
"name": "choose items",
"is_visible": true,
"type": "optional",
"items": [
{
"name": "item1",
"price": 22.44
}
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update Addon for a restaurant
- API: `/admin/api/v1/addons`
- Method: `PUT`
- Query Param: n/a
- Request Body:
```json
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"key": "key1",
"name": "choose items",
"is_visible": true,
"type": "optional",
"items": [
{
"id": "00a1f5e4-7d59-4b3c-9892-35d29e58583d",
"name": "item2",
"price": 24.44
},
{
"id": "",
"name":"item3",
"price": 11
}
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update bulk Addon for a restaurant
- API: `/admin/api/v1/addons/bulk`
- Method: `PUT`
- Query Param: n/a
- Request Body:
- Required fields:
- `restaurant_id`: string.
- `addons`: list of keys with items.
- `key`: string. Non-updatable.
- `name`: string. Non-updatable.
- `type`: string. Non-updatable.
- `items`: list of items (aggregated based on key and restaurant_id).
- `id`: string.
- `name`: string.
- `price`: float.
- `is_visible`: boolean.
```json
{
"restaurant_id": "761984d1-0c85-4d82-b18b-345dd97c0f53",
"addons": [
{
"key": "key1",
"name": "choose optional items",
"type": "optional",
"items": [
{
"id": "b1c7e453-17ae-4878-9ca9-dbd3151f4d03",
"name": "item2",
"price": 24.44,
"is_visible": true
},
{
"id": "434793d6-4262-4424-a0e7-1ed594b3f850",
"name":"item3",
"price": 11,
"is_visible": false
}
]
}
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Delete Bulk Addons for a restaurant
- API: `/admin/api/v1/addons/bulk`
- Method: `DELETE`
- Query Param: N/A
- Request Body:
```json
{
"restaurant_id": "761984d1-0c85-4d82-b18b-345dd97c0f53",
"addons": [
{
"key": "small",
"type": "required"
},
{
"key": "small",
"type": "optional"
}
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Get restaurant addon by addon key
- API: `/admin/api/v1/restaurants/<restaurant_id>/addons/keys/<addon-key>`
- Method: `GET`
- Query Param:
- `type`: Required. Values: `required` or `optional`.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"addon_key": "key1",
"addon_name": "choose items",
"is_visible": true,
"type": "optional",
"items": [
{
"id": "9f0709ac-cf44-40d4-a3fe-21925014ee5c",
"name": "item3",
"price": 11
},
{
"id": "e9a2ba19-f8e8-42f2-8bea-143e7e7d0f57",
"name": "item2",
"price": 24.44
}
]
}
}
```
### List restaurant addon by filter
- API: `/admin/api/v1/restaurants/<restaurant_id>/addons`
- Method: `GET`
- Query Param:
- `search`: Optional. It will search on addon key field
- `type`: Optional. Values: `required` or `optional`.
- `page`: Optional. Default: 1
- `page_size`: Optional.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 50,
"current_page": 1,
"data": [
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"type": "required",
"addon_key": "key1",
"addon_name": "choose items",
"is_visible": true,
"items": [
{
"id": "89f3aac3-db94-4dd0-8d82-5a4135c113b7",
"name": "item2",
"price": 22.44,
"is_visible": true
}
]
},
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"type": "optional",
"addon_key": "key1",
"addon_name": "choose items",
"is_visible": true,
"items": [
{
"id": "9f0709ac-cf44-40d4-a3fe-21925014ee5c",
"name": "item3",
"price": 11,
"is_visible": false
},
{
"id": "e9a2ba19-f8e8-42f2-8bea-143e7e7d0f57",
"name": "item2",
"price": 24.44,
"is_visible": true
}
]
}
]
}
```
### Delete restaurant addon by addon key
- API: `/admin/api/v1/restaurants/<restaurant_id>/addons/keys/<addon-key>`
- Method: `DELETE`
- Query Param:
- `type`: Required. Values: `required` or `optional`.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### List restaurant addon by suggestion
- API: `/admin/api/v1/restaurants/<restaurant_id>/addons/suggestions`
- Method: `GET`
- Query Param:
- `addon_key`: Required. String. (empty string is ok)
- `addon_type`: Optional. String. Allowed valued: required or optional
- `page`: Optional. Default: 1
- `page_size`: Optional. Default: 50
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 50,
"current_page": 1,
"data": [
{
"addon_key": "all",
"addon_name": "choose Your Sauce",
"addon_type": "required",
"items": [
{
"id": "dff280f4-36b8-4907-98a7-34e5596f91e6",
"name": "sauce"
}
]
},
{
"addon_key": "all",
"addon_name": "Choose Your Sauce",
"addon_type": "optional",
"items": [
{
"id": "0e55414c-38da-44ee-bb9a-46d1cf7e7fb8",
"name": "Sauce"
}
]
}
]
}
```
### List restaurant addon by Item Name Suggestion
- API: `/admin/api/v1/restaurants/<restaurant_id>/addons/items/suggestions`
- Method: `GET`
- Query Param:
- `addon_type`: Require. String. (required | optional)
- `item_name`: Required. String. (empty string is ok)
- `page`: Optional. Default: 1
- `page_size`: Optional. Default: 50
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 1,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "dff280f4-36b8-4907-98a7-34e5596f91e6",
"addon_key": "all",
"addon_name": "choose Your Sauce",
"addon_type": "required",
"item_name": "sauce"
}
]
}
```
## Item Category
### List Item Category
- API: `/admin/api/v1/restaurants/<restaurant_id>/item-category`
- Method: `GET`
- Query Param:
- `name`: Optional. String.
- `page`: Optional. Integer. default 1.
- `page_size`: Optional. Integer. default 50.
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 48,
"page_size": 30,
"next_page": 2,
"current_page": 1,
"data": [
{
"id": "ee796963-81b0-41fe-8320-d0280f7ef86c",
"icon": null,
"name": "Cold Drinks",
"priority": 1
},
{
"id": "06ac8056-fab7-4bc4-a746-408780d926fd",
"icon": null,
"name": "Beef",
"priority": null
},
{
"id": "0f8a45ae-a77c-4d46-9e12-40bd078e11cd",
"icon": null,
"name": "Rice",
"priority": null
},
{
"id": "10f854c7-4713-4ac1-8eed-35f1a11e3b6a",
"icon": null,
"name": "Salad",
"priority": null
},
{
"id": "220622f1-bf3a-4d92-8557-92968d731bdd",
"icon": null,
"name": "Fried Items",
"priority": null
},
{
"id": "23d7c3e5-06e0-4653-89a3-79a5af2d8f57",
"icon": null,
"name": "Milk Shake And Frappe",
"priority": null
},
{
"id": "2d5c1ad4-aef7-4fc1-bf22-e1b7856aef3b",
"icon": null,
"name": "Chicken",
"priority": null
},
{
"id": "30aeb985-b0c1-412d-8dae-67561e7a3855",
"icon": null,
"name": "Ice Cream",
"priority": null
},
{
"id": "33297af9-6cc7-481e-9320-bb85195db420",
"icon": null,
"name": "Rice/Biriyani",
"priority": null
},
{
"id": "35e6df04-317a-46f3-8692-70b1fc77d505",
"icon": null,
"name": "Deesert",
"priority": null
},
{
"id": "39e50756-2375-40ab-b748-5548d1faabd9",
"icon": null,
"name": "Vegetable",
"priority": null
},
{
"id": "3a0563f3-4063-45fd-9639-bf0b16d4d599",
"icon": null,
"name": "Beverages",
"priority": null
},
{
"id": "44d1ce02-94f2-4ea1-b665-e2470b9a3600",
"icon": null,
"name": "Tea",
"priority": null
},
{
"id": "50dda668-b0e8-4fee-b73b-a283f5ca1cc0",
"icon": null,
"name": "Moctail",
"priority": null
},
{
"id": "61352778-d17b-4349-9849-f763dce5147c",
"icon": null,
"name": "Fresh Juice",
"priority": null
},
{
"id": "63501114-3ffb-4838-859c-cd5dd062d8d0",
"icon": null,
"name": "Fast Food",
"priority": null
},
{
"id": "64fccc49-5004-4185-847d-b186b766a1b6",
"icon": null,
"name": "Tandoori",
"priority": null
},
{
"id": "66de3f0a-3c09-4332-98f5-cec997c8c1d4",
"icon": null,
"name": "Coffee",
"priority": null
},
{
"id": "6d351c2c-bbd5-49f2-9c6c-e1bae3631233",
"icon": null,
"name": "Noodles/Chowmein",
"priority": null
},
{
"id": "88540240-989e-47b8-89e3-02a189ed8c62",
"icon": null,
"name": "Noodles",
"priority": null
},
{
"id": "8d39ee4a-c44f-4419-be62-eb0c592f9db3",
"icon": null,
"name": "Appetizers",
"priority": null
},
{
"id": "9335aa95-9337-491a-b5a3-34d98199d3c9",
"icon": null,
"name": "Indian Gravy",
"priority": null
},
{
"id": "9b900e3e-80c5-4410-8a51-987149be391e",
"icon": null,
"name": "Biriyani",
"priority": null
},
{
"id": "9e2b97f0-4a3a-4b9e-a21f-7c74e39d953a",
"icon": null,
"name": "Khichuri",
"priority": null
},
{
"id": "9f611c5c-a445-4a70-84ed-ccc4d0863e0d",
"icon": null,
"name": "Naan",
"priority": null
},
{
"id": "a11dae39-a983-4830-8703-ba0e24d91bd8",
"icon": null,
"name": "Grilled Items",
"priority": null
},
{
"id": "b3aaa1c2-af25-4017-a729-8db176cf5082",
"icon": null,
"name": "Soup",
"priority": null
},
{
"id": "ec307bd0-cf0f-4125-b0db-48fc9bd94ccb",
"icon": null,
"name": "Fish",
"priority": null
},
{
"id": "edb2cdd5-8440-45df-8a0e-b3576b518a90",
"icon": null,
"name": "Prawn",
"priority": null
},
{
"id": "ee9850a5-eefb-48bc-aead-d08f7df22161",
"icon": null,
"name": "Breakfast",
"priority": null
}
]
}
```
### List Item Category by Suggestion
- API: `/admin/api/v1/restaurants/<restaurant_id>/item-category/suggestions`
- Method: `GET`
- Query Param:
- `name`: Required. String. (empty string is ok)
- `page`: Optional. Integer. default 1.
- `page_size`: Optional. Integer. default 30.
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 48,
"page_size": 50,
"next_page": 2,
"current_page": 1,
"data": [
{
"id": "ee796963-81b0-41fe-8320-d0280f7ef86c",
"name": "Cold Drinks"
},
{
"id": "2d5c1ad4-aef7-4fc1-bf22-e1b7856aef3b",
"name": "Chicken"
},
{
"id": "30aeb985-b0c1-412d-8dae-67561e7a3855",
"name": "Ice Cream"
}
]
}
```
### Get Item Category by Category ID
- API: `/admin/api/v1/restaurants/<restaurant_id>/item-category/<category_id>`
- Method: `GET`
- Query Param: `N/A`
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "df277c37-ee0a-4c19-a1ab-55da2a0b8fe2",
"icon": null,
"name": "Beverage",
"priority": null
}
}
```
- code: `404`
```json
{
"success": false,
"message": "record not found"
}
```
### Update Item Category by Category ID
- API: `/admin/api/v1/restaurants/<restaurant_id>/item-category/<category_id>`
- Method: `PUT`
- Query Param: N/A
- Request Body: Multipart Form
- fields:
- `name`: Required. name of category. String.
- `priority`: Optional. priority of the category. Integer.
- image field:
- `icon`: Optional. icon of the category. MIME type image.
- Response:
- code: `200`
```json
{
"success": true,
"message": "category 'Kacchi' is updated successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0003",
"message": "another category with same name already exists"
}
```
### Delete Item Category by Category ID
- API: `/api/v1/restaurants/<restaurant_id>/item-category/<category_id>`
- Method: `DELETE`
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "category is deleted successfully"
}
```
### Bulk Update Item Category by Restaurant ID
- API: `/admin/api/v1/restaurants/<restaurant_id>/item-category`
- Method: `PUT`
- Request Body: `json`
- Required Fields:
- `id`: category id. String.
- `name`: name of category. String.
- Optional Fields:
- `priority`: priority of category. Integer.
- Example request body
```json
[
{
"id": "000112b4-1575-4851-8a31-44e9bec82a21",
"name": "Mocktail",
"priority": null
},
{
"id": "df277c37-ee0a-4c19-a1ab-55da2a0b8fe2",
"name": "Beverage",
"priority": 1
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "selected categories are updated successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0003",
"message": "all category names for a specific restaurant must be unique"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0003",
"message": "another category with same name already exists"
}
```
### Bulk Delete Item Category by Category ID
- API: `/api/v1/restaurants/<restaurant_id>/item-category`
- Method: `DELETE`
- Request Body: `json`
- Required Fields:
- `ids`: list of category ids. String.
- Example request body
```json
{
"ids": [
"0005a22f-be46-4ae0-8297-1ff8384123eb",
"000aa041-bc3b-46c7-868d-3efa8b86734e"
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "selected categories are deleted successfully"
}
```
### Create Category by Restaurant ID
- API: `/admin/api/v1/item-category/`
- Method: `POST`
- Query Param:
- `restaurant_id`: Required. String.
- Request Body: Multipart Form
- fields:
- `name`: name of category. String.
- `priority`: priority of the category. Integer.
- image field:
- `icon`: icon of the category. MIME type image.
- Response:
- code: `201`
```json
{
"success": true,
"message": "category 'Kacchi' is created successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0003",
"message": "another category with same name already exists"
}
```
## Menu Hour
### List Menu Hour
- API: `/admin/api/v1/restaurants/<restaurant_id>/menu-hours`
- Method: `GET`
- Query Param:
- `menu_type`: Optional. String.
- `page`: Optional. Integer. default 1.
- `page_size`: Optional. Integer. default 50.
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 5,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "7da5dc1e-01c1-44ca-b023-4baf3eb10270",
"menu_type": "All day menu",
"days_of_week": [
1,
7
],
"start_time": "09:00:00",
"end_time": "18:00:00"
},
{
"id": "b723a9a5-57e2-4348-90c5-f8e6b6f3d8a9",
"menu_type": "Dinner",
"days_of_week": [
1,
7
],
"start_time": "09:00:00",
"end_time": "18:00:00"
},
{
"id": "5f5eac9c-8809-45bc-b2c0-3ee0e45ef08a",
"menu_type": "Lunch",
"days_of_week": [
1,
2,
3,
4,
5,
6,
7
],
"start_time": "09:00:00",
"end_time": "18:00:00"
},
{
"id": "8a136cc1-6844-458e-91de-a2fb6a30ed92",
"menu_type": "Special Offer",
"days_of_week": [],
"start_time": "09:00:00",
"end_time": "18:00:00"
},
{
"id": "7422c5bf-c1c5-4656-8701-3321ceb4aac2",
"menu_type": "Sunday Menu",
"days_of_week": [
1
],
"start_time": "09:00:00",
"end_time": "18:00:00"
}
]
}
```
### List Menu Hour by Suggestion
- API: `/admin/api/v1/restaurants/<restaurant_id>/menu-hours/suggestions`
- Method: `GET`
- Query Param:
- `menu_type`: Required. String. (empty string is ok)
- `page`: Optional. Integer. default 1.
- `page_size`: Optional. Integer. default 50.
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 5,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "7da5dc1e-01c1-44ca-b023-4baf3eb10270",
"menu_type": "All day menu"
}
]
}
```
### Get Menu Hour by Menu Hour ID
- API: `/admin/api/v1/restaurants/<restaurant_id>/menu-hours/<menu_hour_id>`
- Method: `GET`
- Query Param: `N/A`
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "88fe05f1-d980-4178-b8d1-64a382b0937d",
"menu_type": "Lunch",
"days_of_week": [
1,
7
],
"start_time": "09:00:00",
"end_time": "18:00:00"
}
}
```
- code: `404`
```json
{
"success": false,
"message": "record not found"
}
```
### Update Menu Hour by Menu Hour ID
- API: `/admin/api/v1/restaurants/<restaurant_id>/menu-hours/<menu_hour_id>`
- Method: `PUT`
- Query Param: N/A
- Request Body: `json`
- Required Fields:
- `menu_type`: name of menu hour. String.
- `days_of_week`: available days of the menu hour. List of Integers (1<=days<=7). 1 means Sunday and 7 means Saturday.
- `start_time`: start time of the menu hour. String.
- `end_time`: end time of the menu hour. String.
- Example request body
```json
{
"menu_type": "Afternoon",
"days_of_week": [
1,
7
],
"start_time": "09:00:00",
"end_time": "18:00:00"
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "menu hour 'Afternoon' is updated successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0002",
"message": "another menu hour with same name already exists"
}
```
- code: `400`
```json
{
"success": false,
"message": "start time can't be greater than end time"
}
```
- code: `400`
```json
{
"success": false,
"message": "days_of_week must be between 1 and 7 inclusive"
}
```
### Delete Menu Hour by Menu Hour ID
- API: `/api/v1/restaurants/<restaurant_id>/menu-hours/<menu_hour_id>`
- Method: `DELETE`
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "menu hour is deleted successfully"
}
```
### Bulk Update Menu Hour by Restaurant ID
- API: `/admin/api/v1/restaurants/<restaurant_id>/menu-hours`
- Method: `PUT`
- Query Param: N/A
- Request Body: `json`
- Required Fields:
- `id`: menu hour id. UUIDv4 String.
- `menu_type`: name of menu hour. String.
- `days_of_week`: available days of the menu hour. List of Integers (1<=days<=7). 1 means Sunday and 7 means Saturday.
- `start_time`: start time of the menu hour. String.
- `end_time`: end time of the menu hour. String.
- Example request body
```json
[
{
"id": "88fe05f1-d980-4178-b8d1-64a382b0937d",
"menu_type": "All day menu",
"days_of_week": [
1,
2,
3,
4
],
"start_time": "10:00:00",
"end_time": "18:30:00"
},
{
"id": "99ef05f1-d980-4178-b8d1-64a382b0937d",
"menu_type": "Dinner",
"days_of_week": [
1,
2,
3
],
"start_time": "18:00:00",
"end_time": "23:30:00"
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "selected menu hours are updated successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0002",
"message": "all menu names for a specific restaurant must be unique"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_002",
"message": "another menu hour with same name already exists"
}
```
- code: `400`
```json
{
"success": false,
"message": "start time can't be greater than end time"
}
```
- code: `400`
```json
{
"success": false,
"message": "days_of_week must be between 1 and 7 inclusive"
}
```
### Bulk Delete Menu Hour by Menu Hour ID
- API: `/api/v1/restaurants/<restaurant_id>/menu-hours`
- Method: `DELETE`
- Request Body: `json`
- Required Fields:
- `ids`: List of menu hour ids. String.
- Example request body
```json
{
"ids": [
"0005a22f-be46-4ae0-8297-1ff8384123eb",
"0005a22f-be46-4ae0-8297-1ff8384123eb"
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "selected menu hours are deleted successfully"
}
```
### Create Menu Hour by Restaurant ID
- API: `/admin/api/v1/menu-hours/`
- Method: `POST`
- Query Param:
- `restaurant_id`: Required. String.
- Request Body: `json`
- Required Fields:
- `menu_type`: name of menu hour. String.
- `days_of_week`: available days of the menu hour. List of Integers (1<=days<=7). 1 means Sunday and 7 means Saturday.
- `start_time`: start time of the menu hour. String.
- `end_time`: end time of the menu hour. String.
- Example request body
```json
{
"menu_type": "Afternoon",
"days_of_week": [
1,
7
],
"start_time": "09:00:00",
"end_time": "18:00:00"
}
```
- Response:
- code: `201`
```json
{
"success": true,
"message": "menu hour 'Afternoon' is created successfully"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_0002",
"message": "another menu hour with same name already exists"
}
```
- code: `400`
```json
{
"success": false,
"message": "start time can't be greater than end time"
}
```
- code: `400`
```json
{
"success": false,
"message": "days_of_week must be between 1 and 7 inclusive"
}
```
## Cuisine
### Create Cuisine
- API: `/admin/api/v1/cuisines`
- Method: `POST`
- Query Param: n/a
- Request Body:Multipart Form
- fields: `name`, `priority`
- image file fields: `image`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
- code: `400`
```json
{
"success": false,
"code": "FOOD_2001",
"message": "already exists"
}
```
### Update Cuisine
- API: `/admin/api/v1/cuisines/<cuisine_id>`
- Method: `PUT`
- Query Param: n/a
- Request Body:Multipart Form
- fields: `name` (required), `priority` (optional, Default: `nil`)
- image file fields: `image` (optional, Default: `nil`)
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
- code: `404`
```json
{
"success": false,
"message": "resource not found"
}
```
- code: `400`
```json
{
"success": false,
"message": "cuisine is required"
}
```
### Get Cuisine by ID
- API: `/admin/api/v1/cuisines/<cuisine_id>`
- Method: `GET`
- Query Param: n/a
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "ea7ade22-c6f6-4994-bc2a-c7798322b8d1",
"created_at": "2022-03-07T07:24:09+0000",
"modified_at": "2022-03-07T07:24:09+0000",
"name": "New Test",
"image": "http://localhost:9000/food/cuisine_new_test.jpeg",
"priority": 1
}
}
```
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "ba58a278-8996-42a1-8279-853fd65828ab",
"created_at": "2022-03-03T06:29:48+0000",
"modified_at": "2022-03-03T06:29:48+0000",
"name": "Test1 Hit",
"image": null,
"priority": null
}
}
```
- code: `404`
```json
{
"success": false,
"message": "resource not found"
}
```
### List Cuisines by filter
- API: `/admin/api/v1/cuisines`
- Method: `GET`
- Query Param:
- `name`: Optional.
- `restaurant_id`: Optional.
- `page`: Optional. Default: 1
- `page_size`: Optional.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 1,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "16a8523f-526b-43eb-adf7-1021d8b7954c",
"created_at": "2019-07-11T05:40:25+0000",
"modified_at": "2019-07-11T05:40:25+0000",
"name": "South Indian",
"image": null,
"priority": null,
"restaurant_count": 1
}
]
}
```
### List Cuisines by Suggestion
- API: `/admin/api/v1/cuisines/suggestions`
- Method: `GET`
- Query Param:
- `name`: Required. String. (empty string is ok)
- `page`: Optional. Default: 1
- `page_size`: Optional. Default: 50
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "16a8523f-526b-43eb-adf7-1021d8b7954c",
"name": "South Indian"
},
{
"id": "2fd3fda4-6388-4886-9977-a5f2b5f61f73",
"name": "Soups"
}
]
}
```
### List Restaurants Cuisines by Suggestion
- API: `/admin/api/v1/cuisines/restaurants/suggestions`
- Method: `GET`
- Query Param:
- `name`: Required. String. (empty string is ok)
- `restaurant_id`: Required. String.
- `page`: Optional. Default: 1
- `page_size`: Optional. Default: 50
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "2fd3fda4-6388-4886-9977-a5f2b5f61f73",
"name": "Soups"
}
]
}
```
### List specific cuisine restaurants by filter
- API: `/admin/api/v1/cuisines/<cuisine_id>/restaurants`
- Method: `GET`
- Query Param:
- `restaurant_name`: Optional.
- `restaurant_id`: Optional.
- `page`: Optional. Default: 1
- `page_size`: Optional.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 50,
"current_page": 1,
"data": [
{
"restaurant_id": "ea0afcbf-df0b-4b9d-9b13-b154b7a3b21e",
"restaurant_name": "Mama Pizza Test"
},
{
"restaurant_id": "90a1f5e4-7d59-4b3c-9892-35d29e58583d",
"restaurant_name": "test-resto"
}
]
}
```
### Add restaurants to a cuisine
- API: `/admin/api/v1/cuisines/<cuisine_id>/restaurants`
- Method: `PUT`
- Query Param: n/a
- Request Body:
```json
{
"restaurant_ids" : [
"14614c0a-750d-4130-b2dc-a3e36e97e37c",
"90a1f5e4-7d59-4b3c-9892-35d29e58583e"
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
- code: `400`
```json
{
"success": false,
"message": "restaurant id: 90a1f5e4-7d59-4b3c-9892-35d29e58583e not found"
}
```
### Delete restaurants from a cuisine
- API: `/admin/api/v1/cuisines/<cuisine_id>/restaurants`
- Method: `DELETE`
- Query Param: n/a
- Request Body:
```json
{
"restaurant_ids" : [
"14614c0a-750d-4130-b2dc-a3e36e97e37c",
"90a1f5e4-7d59-4b3c-9892-35d29e58583e"
]
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Delete Cuisine by ID
- API: `/admin/api/v1/cuisines/<cuisine_id>`
- Method: `Delete`
- Query Param: n/a
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
## Collections
### Collection List
- API: `/admin/api/v1/collections`
- Method: `GET`
- Query Param:
- `restaurant_id`: Optional. String
- `collection_id`: Optional. String
- `page` - Optional. Integer. default 1.
- `page_size` - Optional. Integer. default 30.
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 2,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "ab02fefb-707a-47de-bd6c-5481fcbe6b1d",
"modified_at": "2019-07-11T11:44:03.929782+06:00",
"name": "Featured",
"priority": 0,
"cover": "http://food-m.p-stageenv.xyz/food/col_cover_Collection-05.png?t=1642058392",
"restaurant_count": 1,
"is_visible": true
},
{
"id": "90972f10-d0b8-40c7-aa89-9317c304bfd5",
"modified_at": "2022-03-10T18:21:48.202291+06:00",
"name": "test",
"priority": 0,
"cover": null,
"restaurant_count": 2,
"is_visible": false
}
]
}
```
### Get Collection by ID
- API: `/admin/api/v1/collections/:collection_id`
- Method: `GET`
- Query Param: n/a
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": "90972f10-d0b8-40c7-aa89-9317c304bfd5",
"name": "updated",
"icon": null,
"priority": 2,
"cover": null,
"banner": null,
"is_visible": true,
"created_at": "2022-03-10T18:21:48+0600",
"modified_at": "2022-05-12T13:13:46+0600"
}
}
```
### Get Restaurant Collections
- API: `/admin/api/v1/collections/restaurant-collections/:collection_id`
- Method: `GET`
- Query Param:
- `restaurant_id` - Optional. String
- `page` - Optional. Integer. default 1.
- `page_size` - Optional. Integer. default 30.
- Request Body: `N/A`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 15,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "e1355333-b4da-4f9b-8be3-ccfdd0336d8d",
"restaurant": "GEC Maloncho",
"sort_order": 3
},
{
"id": "edd926a4-1306-49a5-bdf4-27de6dc5ff81",
"restaurant": "Al Arabian Cake & Sweets Baily Road",
"sort_order": 0
},
{
"id": "a5a90b20-70d1-4252-ae2b-dde4fcd07e73",
"restaurant": "Khushbu Hotel and Restaurant-2",
"sort_order": 0
},
{
"id": "e66244c8-4a5e-4a11-9b67-d734219bf9c6",
"restaurant": "Burger Bite - Kakrail",
"sort_order": 1
}
]
}
```
### Create Collection
- API: `/admin/api/v1/collections`
- Method: `POST`
- Query Param: N/A
- Request Body: Multipart Form
- fields: `name`, `priority`, `visibility`
- image file fields: `icon`, `banner`, `cover`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update collection
- API: `/admin/api/v1/collections/:collection_id`
- Method: `PUT`
- Request Body: Multipart Form
- fields: `name`, `priority`, `visibility`
- image file fields: `icon`, `banner`, `cover`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Delete Collection
- API: `/admin/api/v1/collections/<collection_id>`
- Method: `DELETE`
- Query Param: N/A
- Request Body: N/A
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Delete Bulk Restaurant Collection
- API: `/admin/api/v1/collections/bulk/restaurant-collections/delete`
- Method: `POST`
- Query Param: N/A
- Request Body:
```json
[
{
"id": "2fe38bf6-ea58-4193-b1c7-207fe423bb28"
},
{
"id": "2fe38bf6-ea58-4193-b1c7-207fe423bb28"
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Update Bulk Restaurant Collection
- API: `/admin/api/v1/collections/bulk/restaurant-collections/update`
- Method: `POST`
- Query Param: N/A
- Request Body:
```json
[
{
"id": "0100a9ce-dc64-476b-bfda-3382308b6b90",
"sort_order": 1
},
{
"id": "064c8b78-2849-4f96-9bd0-1c15a7dcf734",
"sort_order": 1
}
]
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Add Restaurant To Collection
- API: `/admin/api/v1/collections/:collection_id/restaurant`
- Method: `POST`
- Query Param: N/A
- Request Body:
```json
{
"restaurant_id": "000369fa-c126-49d5-b996-bd0ca5dc32c3",
"sort_order": 1
}
```
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful"
}
```
### Collection Suggestions
- API: `/admin/api/v1/collections/suggestions`
- Method: `GET`
- Query Param:
- `name`: Optional. String
- `page` - Optional. Integer. default 1.
- `page_size` - Optional. Integer. default 50.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 1,
"page_size": 50,
"current_page": 1,
"data": [
{
"id": "ab02fefb-707a-47de-bd6c-5481fcbe6b1d",
"name": "Featured"
}
]
}
```
## Upload/Download job
### Get Job by ID
- API: `/admin/api/v1/jobs/<job_id>`
- Method: `GET`
- Query Param: n/a
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": 2,
"job_type": "upload",
"task_name": "update-restaurant",
"description": "update restaurant",
"status": "pending",
"file_url": "http://localhost:9000/cms-v2/restaurants_update.csv",
"payload": null,
"error": null,
"created_at": "2022-02-03T09:42:59+0000",
"updated_at": "2022-02-03T09:42:59+0000",
"created_by": "nahid"
}
}
```
```json
{
"success": true,
"message": "request is successful",
"data": {
"id": 4,
"job_type": "upload",
"task_name": "update-restaurant",
"description": "update restaurant",
"status": "failed",
"file_url": "http://localhost:9000/cms-v2/1644224508_restaurants_update.csv",
"payload": null,
"error": {
"message": "error at line 2: failed to convert csv record to db models: 1 error(s) decoding:\n\n* cannot parse 'visible_in_app' as bool: strconv.ParseBool: parsing \"yes\": invalid syntax",
"record_wise_error": null
},
"created_at": "2022-02-07T09:01:48+0000",
"updated_at": "2022-02-07T09:02:13+0000",
"created_by": "nahid"
}
}
```
### List jobs by filter
- API: `/admin/api/v1/jobs`
- Method: `GET`
- Query Param:
- `task_name`: Optional.
- `page`: Optional. Default: 1
- `page_size`: Optional.
- Request Body: n/a
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"count": 3,
"page_size": 100,
"current_page": 1,
"data": [
{
"id": 3,
"job_type": "upload",
"task_name": "update-restaurant",
"description": "update restaurant",
"status": "pending",
"file_url": "http://localhost:9000/cms-v2/1643881418_restaurants_update.csv?",
"payload": null,
"error": null,
"created_at": "2022-02-03T09:43:38+0000",
"updated_at": "2022-02-03T09:43:38+0000",
"created_by": "nahid"
},
{
"id": 2,
"job_type": "upload",
"task_name": "update-restaurant",
"description": "update restaurant",
"status": "pending",
"file_url": "http://localhost:9000/cms-v2/restaurants_update.csv",
"payload": null,
"error": null,
"created_at": "2022-02-03T09:42:59+0000",
"updated_at": "2022-02-03T09:42:59+0000",
"created_by": "nahid"
},
{
"id": 1,
"job_type": "upload",
"task_name": "update-restaurant",
"description": "update restaurant",
"status": "pending",
"file_url": "http://localhost:9000/cms-v2/restaurants_update.csv",
"payload": null,
"error": null,
"created_at": "2022-02-03T09:25:47+0000",
"updated_at": "2022-02-03T09:25:47+0000",
"created_by": "nahid"
},
{
"id": 4,
"job_type": "upload",
"task_name": "update-restaurant",
"description": "update restaurant",
"status": "failed",
"file_url": "http://localhost:9000/cms-v2/1644224508_restaurants_update.csv",
"payload": null,
"error": {
"message": "error at line 2: failed to convert csv record to db models: 1 error(s) decoding:\n\n* cannot parse 'visible_in_app' as bool: strconv.ParseBool: parsing \"yes\": invalid syntax",
"record_wise_error": null
},
"created_at": "2022-02-07T09:01:48+0000",
"updated_at": "2022-02-07T09:02:13+0000",
"created_by": "nahid"
}
]
}
```
### Restaurant Update job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `update-restaurant`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Restaurant Schedule Update job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `update-restaurant-schedules`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Restaurant banner upload job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-restaurant-banner`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Restaurant Upload/Create job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-restaurant`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Upload all restaurant related data job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-all`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Cuisine Upload job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-cuisine`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Upload item images job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-item-images`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Update item job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `update-item`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Upload popular items job
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-restaurant-popular-items`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```
### Upload Collections
- API: `/admin/api/v1/jobs/upload`
- Method: `POST`
- Query Param: n/a
- Request Body: Multipart form
- `created_by`
- `description`
- `file`
- `task_name`: `upload-restaurant-collections`
- Response:
- code: `200`
```json
{
"success": true,
"message": "request is successful",
"data": {
"job_id": 10
}
}
```