Skip to main content

Order Acceptance

This section specifies how you can accept or reject the GoFood order. Once the order has been accepted, the system will find the driver after a period of time.

Accept Order

PUT /integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/accepted

Sample Request

Sample Request
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/accepted \
-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
order_typeThe order type, either delivery or pickup.StringRequired
order_idID of the order for which you want to update the status.StringRequired

Sample Response - 200

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

Reject Order

PUT /integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/cancelled

Sample Request

Sample Request
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/cancelled \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"cancel_reason_code" : "ITEMS_OUT_OF_STOCK",
"cancel_reason_description" : "One of the items is not available"
}
'

Path Parameters

NameDescriptionTypeRequired
outlet_idID of the outlet for which you want to update the menu.StringRequired
order_typeThe order type, either delivery or pickup.StringRequired
order_idID of the order for which you want to update the status.StringRequired

Request Parameters

JSON AttributeDescriptionTypeRequired
cancel_reason_codeThe cancelation reason code.
The accepted values are: HIGH_DEMAND, RESTAURANT_CLOSED, ITEMS_OUT_OF_STOCK, OTHERS
StringRequired
cancel_reason_descriptionThe cancelation reason description.
Min length = 3
Example: Restaurant is closed
StringRequired

Sample Response - 200 Success

Sample Response
{
"success": true,
"data": {}
}
note
  • To perform this operation, you must be authenticated using go_auth_client_credentials(gofood:order:write).
  • Possible error responses are 401, 404, 406, and 408. Please refer Error Glossary.