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
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the menu. | String | Required |
order_type | The order type, either delivery or pickup . | String | Required |
order_id | ID of the order for which you want to update the status. | String | Required |
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
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the menu. | String | Required |
order_type | The order type, either delivery or pickup . | String | Required |
order_id | ID of the order for which you want to update the status. | String | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
cancel_reason_code | The cancelation reason code. The accepted values are: HIGH_DEMAND , RESTAURANT_CLOSED , ITEMS_OUT_OF_STOCK , OTHERS | String | Required |
cancel_reason_description | The cancelation reason description. Min length = 3 Example: Restaurant is closed | String | Required |
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
, and408
. Please refer Error Glossary.