Sync Menu
This section specifies how you can update the food menus of your outlet on the GoFood app. It also describes how to update the variant categories such as size, toppings, and its corresponding variants such as 7 inches/10 inches, garlic/cheese, and so on. You can push the updated menu via Update GoFood Outlet Catalog API. The updated menu is then displayed on GoFood within few minutes.
Apart from updating the menu, you can also review the current menus, as well as marking items or variants as out-of-stock.
Update GoFood Outlet Catalog
PUT /integrations/gofood/outlets/{outlet_id}/v1/catalog
Sample Request
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v1/catalog \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"request_id": "a7956af2-e5e9-4b1e-9844-52494d6cb6fc",
"menus":
[
{
"name": "Pizza",
"menu_items":
[
{
"external_id": "XID",
"name": "Pizza Margherita",
"description": "Delicious Italian Pizza",
"in_stock": true,
"price": 9000,
"image": "http://gofood.co.id/some.png",
"operational_hours": {
"sunday":
[
{
"start": "00:00",
"end": "23:59"
}
],
"monday":
[
{
"start": "00:00",
"end": "23:59"
}
],
"tuesday":
[
{
"start": "00:00",
"end": "23:59"
}
],
"wednesday":
[
{
"start": "00:00",
"end": "23:59"
}
],
"thursday":
[
{
"start": "00:00",
"end": "23:59"
}
],
"friday":
[
{
"start": "00:00",
"end": "23:59"
}
],
"saturday":
[
{
"start": "00:00",
"end": "23:59"
}
]
},
"variant_category_external_ids":
[
"VC-XID"
]
}
]
}
],
"variant_categories":
[
{
"external_id": "VC-XID",
"internal_name": "Topping (promo)",
"name": "Topping",
"rules": {
"selection": {
"min_quantity": 1,
"max_quantity": 2
}
},
"variants":
[
{
"external_id": "V-XID",
"name": "Cheese",
"price": 1000,
"in_stock": true
}
]
}
]
}
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the menu. | String | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
request_id | ID of the request sent to update the menu. This will be useful for troubleshooting purpose. | String | Required |
menus | Array of the menus object. | Object | Required |
» name | Name of the menu category. Maximum limit: 150 characters. | String | optional |
» menu_items | Details of the menu items to be updated. | Array(Object) | Optional |
variant_categories | Array of the variant_categories object. | Object | Required |
- Partial update of menus and variant categories is not supported. All menus and variant categories need to be pushed to update specific entries. For example, you have three menus A, B, and C and you need to update menu C with menu D. So, to update the menu, you need to push all the three menus A, B, and D. You cannot push only the menu D. You can update the variant categories similarly.
- Currently, only one level of selection is supported for variants. You can set only one variant value, for example,
Cheese
. Next level of selection in the variantCheese
like Mozzarella, or Parmesan is not supported. - The update of
variant_categories
is dependent on the value ofmin_quantity
. If you want to make the variant category mandatory, then setmin_quantity
= 1. If you want to make the variant category optional, then setmin_quantity
= 0. - The value of
max_quantity
should be set depending on the number of variants (in the variant category) that can be selected for a menu or menu item. - The value of
price
invariants
is added to the value ofprice
inmenu_items
in each order. - The menu item's image URL needs to be in jpeg or png format, have the correct MIME-type header, and use either the :80 or :443 HTTP port for the GoBiz API to accept it.
Sample Response - 200 Success
{
"success": true,
"data": {
"request_id": "a7956af2-e5e9-4b1e-9844-52494d6cb6fc"
}
}
Response Parameters - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. | Boolean |
data | Details of the updated menu. | Object |
» request_id | ID of the request for which the menu is updated. | String |
- To perform this operation, you must be authenticated using
go_auth_client_credentials(gofood:catalog:write)
. - Possible error responses are
401
,404
,406
, and415
. Please refer Error Glossary.
Get Catalog
GET /integrations/gofood/outlets/{outlet_id}/v2/catalog
Sample Request
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v2/catalog \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the menu. | String | Required |
Request Parameters
N/A
Sample Response - 200 Success
{
"success": true,
"data": {
"variant_categories": [
{
"id": "bb447057-4572-46f6-a97c-2e6478d98ac2",
"internal_name": "Topping (promo)",
"name": "Topping",
"rules": {
"selection": {
"min_quantity": 1,
"max_quantity": 2
}
},
"variants": [
{
"id": "be18dc03-e941-4238-8bba-bcd9b5e554fc",
"external_id": "V-XID",
"price": 1000,
"name": "Garlic",
"in_stock": true
}
]
}
],
"menus": [
{
"name": "Burger",
"menu_items": [
{
"id": "cc3d0c9f-47ff-4871-8443-348591437e92",
"external_id": "XID",
"name": "Beef Burger",
"description": "Beef Burger",
"image": "https://image.jpg",
"price": 12000,
"in_stock": true,
"variant_category_ids": ["bb447057-4572-46f6-a97c-2e6478d98ac2"],
"operational_hours": {
"wednesday": [
{
"start": "00:00",
"end": "23:59"
}
],
"tuesday": [
{
"start": "00:00",
"end": "23:59"
}
],
"thursday": [
{
"start": "00:00",
"end": "23:59"
}
],
"sunday": [
{
"start": "00:00",
"end": "23:59"
}
],
"saturday": [
{
"start": "00:00",
"end": "23:59"
}
],
"monday": [
{
"start": "00:00",
"end": "23:59"
}
],
"friday": [
{
"start": "00:00",
"end": "23:59"
}
]
}
}
]
}
]
}
}
Response Parameters - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. | Boolean |
data | Details of the promotion including success and error cases. | Object |
» variant_categories | List of variant categories. | Object |
» menus | List of menus. | Object |
- To perform this operation, you must be authenticated using
go_auth_client_credentials(gofood:catalog:read)
. - Possible error responses are
401
,404
,406
, and415
. Please refer Error Glossary.
Update Menu Items Out-of-Stock (OOS) Status
PATCH /integrations/gofood/outlets/{outlet_id}/v2/menu_item_stocks
Sample Request
curl -X PATCH https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v2/menu_item_stocks \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
[
{
"external_id": "XID",
"in_stock": true
}
]
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the menu. | String | Required |
Request Parameters
Name | Description | Type | Required |
---|---|---|---|
external_id | ID of the menu item on the partner side | String | Required |
in_stock | Stock status of the item. | Boolean | Required |
Sample Response - 200 Success
{
"success": true,
"data": {}
}
Response Parameter - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. | Boolean |
data | Details of the promotion including success and error cases. | Object |
- To perform this operation, you must be authenticated using
go_auth_client_credentials(gofood:catalog:write)
. - Possible error responses are
401
,404
,406
, and415
. Please refer Error Glossary.
Update Variants Out-of-Stock (OOS) Status
PATCH /integrations/gofood/outlets/{outlet_id}/v2/variant_stocks
Sample Request
curl -X PATCH https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v2/variant_stocks \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
[
{
"external_id": "V-XID",
"in_stock": true
}
]
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the menu. | String | Required |
Request Parameters
Name | Description | Type | Required |
---|---|---|---|
external_id | ID of the variant on the partner side | String | Required |
in_stock | Stock status of the item. | Boolean | Required |
Sample Response - 200 Success
{
"success": true,
"data": {}
}
Response Parameter - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. | Boolean |
data | Details of the promotion including success and error cases. | Object |
- To perform this operation, you must be authenticated using
go_auth_client_credentials(gofood:catalog:write)
. - Possible error responses are
401
,404
,406
, and415
. Please refer Error Glossary.