Skip to main content

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

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

NameDescriptionTypeRequired
outlet_idID of the outlet for which you want to update the menu.StringRequired

Request Parameters

JSON AttributeDescriptionTypeRequired
request_idID of the request sent to update the menu. This will be useful for troubleshooting purpose.StringRequired
menusArray of the menus object.ObjectRequired
» nameName of the menu category. Maximum limit: 150 characters.Stringoptional
» menu_itemsDetails of the menu items to be updated.Array(Object)Optional
variant_categoriesArray of the variant_categories object.ObjectRequired
note
  • 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 variant Cheese like Mozzarella, or Parmesan is not supported.
  • The update of variant_categories is dependent on the value of min_quantity. If you want to make the variant category mandatory, then set min_quantity = 1. If you want to make the variant category optional, then set min_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 in variants is added to the value of price in menu_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

Sample Response
{
"success": true,
"data": {
"request_id": "a7956af2-e5e9-4b1e-9844-52494d6cb6fc"
}
}

Response Parameters - 200 Success

JSON AttributeDescriptionType
successStatus of the request. Value true indicates successful submission of the request.Boolean
dataDetails of the updated menu.Object
» request_idID of the request for which the menu is updated.String
note
  • To perform this operation, you must be authenticated using go_auth_client_credentials(gofood:catalog:write).
  • Possible error responses are 401, 404, 406, and 415. Please refer Error Glossary.

Get Catalog

GET /integrations/gofood/outlets/{outlet_id}/v2/catalog

Sample Request

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

NameDescriptionTypeRequired
outlet_idID of the outlet for which you want to update the menu.StringRequired

Request Parameters

N/A

Sample Response - 200 Success

Sample Response
{
"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 AttributeDescriptionType
successStatus of the request. Value true indicates successful submission of the request.Boolean
dataDetails of the promotion including success and error cases.Object
» variant_categoriesList of variant categories.Object
» menusList of menus.Object
note
  • To perform this operation, you must be authenticated using go_auth_client_credentials(gofood:catalog:read).
  • Possible error responses are 401, 404, 406, and 415. 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

NameDescriptionTypeRequired
outlet_idID of the outlet for which you want to update the menu.StringRequired

Request Parameters

NameDescriptionTypeRequired
external_idID of the menu item on the partner sideStringRequired
in_stockStock status of the item.BooleanRequired

Sample Response - 200 Success

Sample Response
{
"success": true,
"data": {}
}

Response Parameter - 200 Success

JSON AttributeDescriptionType
successStatus of the request. Value true indicates successful submission of the request.Boolean
dataDetails of the promotion including success and error cases.Object
note
  • To perform this operation, you must be authenticated using go_auth_client_credentials(gofood:catalog:write).
  • Possible error responses are 401, 404, 406, and 415. Please refer Error Glossary.

Update Variants Out-of-Stock (OOS) Status

PATCH /integrations/gofood/outlets/{outlet_id}/v2/variant_stocks

Sample Request

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

NameDescriptionTypeRequired
outlet_idID of the outlet for which you want to update the menu.StringRequired

Request Parameters

NameDescriptionTypeRequired
external_idID of the variant on the partner sideStringRequired
in_stockStock status of the item.BooleanRequired

Sample Response - 200 Success

Sample Response
{
"success": true,
"data": {}
}

Response Parameter - 200 Success

JSON AttributeDescriptionType
successStatus of the request. Value true indicates successful submission of the request.Boolean
dataDetails of the promotion including success and error cases.Object
note
  • To perform this operation, you must be authenticated using go_auth_client_credentials(gofood:catalog:write).
  • Possible error responses are 401, 404, 406, and 415. Please refer Error Glossary.