GoBiz API Reference
Gojek serves all of its merchants through GoBiz Platform. It is an all-in-one business solution that enables connectivity, digital payments, and other financial services for small and individual merchants. GoBiz helps you grow your business by making it easy to record orders, providing various types of payments, and bringing in customers. To enhance the experiences of its merchants, GoBiz also provides a platform for our partners to integrate with. GoBiz currently supports two types of integration, Direct Integration and Facilitator.
Integration Type | Description |
---|---|
Direct Integration | You’re a GoBiz merchant and you want to access Gojek features directly from your own system. |
Facilitator | You’re a facilitator. Either you a POS provider or an online order aggregator and you want to enable features to your merchants. |
Scroll down for code samples, example requests, and responses.
HTTP(S) API
You can communicate with GoBiz API by sending HTTP(S) request. The request consists of Base URL and HTTP(S) Header. The Base URL specifies the resource to which the request is applied. The HTTP(S) Header carries the data type of the request, data type of the response, and the authentication information. GoBiz then sends a response back in JSON format.
Base & GoAuth URLs
In the Sandbox Environment, the partner can perform internal end-to-end testing using the GoAuth Staging credentials. Once the testing is completed successfully, the GoBiz service can be fully utilized in the Production Environment using the GoAuth Production credentials. The URLs for Sandbox and Production environments are given below.
Sandbox Environment
BASE_URL: https://api.partner-sandbox.gobiz.co.id/
OAUTH_URL: https://integration-goauth.gojekapi.com
Sandbox Request - Code Sample
curl -X POST https://api.partner-sandbox.gobiz.co.id/
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}'
Production Environment
BASE_URL: https://api.gobiz.co.id/
OAUTH_URL: https://accounts.go-jek.com
Production Request - Code Sample
curl -X POST https://api.gobiz.co.id/
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}'
HTTP(S) Header
An HTTP Header is used in an HTTP request to provide information about the request. The HTTP Header for GoBiz API requests carries the information described in the table below.
Header | Description | Value | Type | Required |
---|---|---|---|---|
Content-Type | The Content-Type field indicates the JSON type that is acceptable to send to the recipient. | application/json |
String | Required |
Authorization | The Authorization field creates the JSON Web Token (JWT) to send to the recipient when authentication is successful. Note: For Direct integration authentication, refer Client Credentials and for facilitator authentication, refer Authorization Code. | Bearer {access-token} |
String | Required |
Responses
GoBiz uses conventional HTTP status response codes to indicate the success or failure of an API request. The response codes used in GoBiz are given below.
- Success codes
- Error codes
- Server error codes
Success Codes
Status codes in the 2xx range indicate success. Different success codes in the 2xx range are returned based on what the request attempts to do.
Error Codes
Status codes in the 4xx range indicate an error. The error codes are returned when the information provided by the client is incorrect or incomplete (for example, incorrect format, omission of a required parameter, invalid information, and so on). Certain 4xx errors can be handled programmatically.
Server Error Codes
Status codes in the 5xx range indicate a server error. The server error codes are returned when the GoBiz server does not work as expected.
Response Format
The HTTP response consists of three fields given below.
- success
- data
- errors
success
represents the success status of the request.
data
returns the values in the response.
errors
returns the error message title and the error message for a request.
Success Response
The field success
is set to true when data (if any) is returned.
JSON Attribute | Description | Type |
---|---|---|
success | It should always be set to true. Request is successful and data, if any, is returned. | Boolean |
data | The object acts as a wrapper for any data returned by the API call. | Object |
Sample Success Response Code
{
"success": true,
"data":
{
"key": "value"
}
}
Error Response
The field success
is set to false when data (if any) is not returned and represents that a problem has occurred.
The root cause can be either of the following:
- A problem with the submitted data or unsatisfied API Call pre-conditions
- An error in the processing of request
JSON Attribute | Description | Type |
---|---|---|
success | It should always be set to false. Request is unsuccessful and data (if any) is not returned. | Boolean |
errors | The array acts as a wrapper for the error objects returned by the API call. | Array (Object) |
» message_title | It is the short description of the HTTP error. | String |
» message | It describes the cause of the HTTP error. | String |
Sample Error Response Code
{
"success": false,
"errors":
[
{
"message_title": "Error hint",
"message": "Start date must be after today."
}
]
}
HTTP Status Code Summary
Status codes used by GoBiz APIs are categorized into 2xx, 4xx, and 5xx.
Code 2xx
Status | Description |
---|---|
200 - OK | It indicates that the request is successful. |
201 - Created | It indicates that the request is successful and the resource is created. |
Code 4xx
Status | Description |
---|---|
400 - Bad Request | It indicates that the request cannot be processed due to an error (for example, incorrect parameters). |
401 - Unauthorized | It indicates that the request contains invalid access token. |
403 - Forbidden | It indicates that the access token does not have the permission to access the resource. |
404 - Not Found | It indicates that the requested resource does not exist. |
409 - Conflict | It indicates that the request cannot be completed due to a conflict with the current state of resource or another request. |
415 - Unsupported Media Type | It indicates that the request does not contain the correct versioning. |
422 - Unprocessable Entity | It indicates that the request contains correct syntax but the contents are incorrect. |
Code 5xx
Status | Description |
---|---|
50x - GoBiz Server Error | It indicates a problem at the GoBiz server and the server is unable to process any request. |
Error Glossary
The errors and errors responses common to all the endpoints are described in the table given below.
The sample error response code for each error is given at the side, in the code section.
Error | Description | Type | Notes |
---|---|---|---|
UnsupportedAcceptType | Invalid versioning header in the request. Refer Errors Response. | String | For errors object, refer Errors 404/406/415. |
UnregisteredOutlet | Invalid versioning header in the request. Refer Errors Response. | String | For errors object, refer Errors 404/406/415). |
Unauthorized | The outlet is not yet registered in the Partner Integration system. Please contact the support team. Refer Errors Response. | String | For errors object, refer Errors 401 - Unauthorized. |
Errors Response
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value false indicates an error. |
Boolean |
errors | Details of the error. | Array(Object) |
Sample Response - 415/406 Unsupported Accept Type
{
"success": false,
"errors":
[
{
"message_title": "UnsupportedAcceptType",
"message": "Invalid Accept header: application/vnd.eim.v0+json"
}
]
}
Sample Response - 404 Unregistered Outlet
{
"success": false,
"errors":
[
{
"message_title": "Requested resource not found",
"message": "The outlet is not yet registered for integration. Please contact the support team."
}
]
}
Sample Response - 401 Unauthorized
{
"success": false,
"errors":
[
{
"code": "HTTP_401",
"message": "Your session is expired. Please login again.",
"message_title": "Session Expired",
"message_severity": "error"
}
]
}
Authentication
Direct Integration
Gojek and GoBiz both use OAuth2 method to authenticate the client. Direct Integration API is authenticated using Client Credentials. It is suitable for machine to machine (M2M) authorization.
To complete the authentication process, the client must authorize itself to Gojek OAuth2 server using client credentials. Client credentials contains two parameters client_id
and client_secret
. This identification of the client is done through client credentials issued by Gojek.
The steps to access protected resources/APIs on GoBiz are given below.
- Get token from token endpoint.
- Use Access Token to access GoBiz API.
Get Token from Token Endpoint
You need to send a request to GoBiz to acquire the access token.
Endpoint = OAUTH_URL/oauth2/token
Header Parameters
Parameter | Description | Type | Required | Example |
---|---|---|---|---|
client_id |
Unique identifier issued to the client by Gojek. | String | Required | abc |
client_secret |
Secret issued to client by Gojek. | String | Required | my_secret |
grant_type |
Method to gain the access token. It must be client_credentials . |
String | Required | client_credentials |
scope |
Scope of access to be associated with the resulting access token. | String | Required | partner:outlet:write |
The available scopes are described in the table given below.
Scope | Scope Description |
---|---|
partner:outlet:read |
To read outlet data. |
partner:outlet:write |
To edit or update outlet data. |
gofood:catalog:read |
To read GoFood menu. |
gofood:catalog:write |
To modify GoFood menu. |
gofood:order:read |
To read GoFood order data. |
gofood:order:write |
To mark an order is ready. |
promo:food_promo:read |
To retrieve GoFood promotions. |
promo:food_promo:write |
To modify GoFood promotions. |
payment:transaction:read |
To read payment transaction. |
payment:transaction:write |
To modify payment transaction. |
payment:pop:read |
To read payment PoP data. |
mokapos:library:read |
To read mokapos libray data. |
mokapos:transaction:read |
To read mokapos transaction data. |
mokapos:reporting:read |
To read mokapos reporting data. |
mokapos:customer:read |
To read mokapos libray data. |
mokapos:checkout:write |
To update mokapos checkout data. |
mokapos:salestype:read |
To read mokapos sales type data. |
Response Parameters
Parameter | Description | Type |
---|---|---|
access_token |
A token that can be used to access the GoBiz API. | String |
expires_in |
Approximate remaining lifetime of the token in seconds. | Integer |
token_type |
Type of the token returned. Value: Bearer . |
String |
scope |
Scope granted to the token. | String |
Code Sample
curl -X POST https://integration-goauth.gojekapi.com/oauth2/token \
-u "my_client_id:my_client_secret" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "scope=partner:outlet:read"
Sample Response - 200 Success
{
"access_token": "this_is_the_access_token",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "partner:outlet:read"
}
Use Access Token to Access GoBiz API
Access token received in the Get Token from Token Endpoint step can be used to access GoBiz APIs by sending the token in the Authorization
header.
For Authorization
header example, see Get All Outlets API.
Facilitator
Gojek and GoBiz both use OAuth2 method to authenticate the client.
The Facilitator is authenticated using Authorization Code. Authorization Code is applicable for integrations involving a highly secure back-channel (backend service) and an insecure front channel (web browser).
In facilitator integration,
- Client is any Facilitator (value-adding service) in the GoBiz application.
- User is the merchant (end-user) of the GoBiz application.
Gojek authorizes both client and user.
The requirements for authorization using the Authorization Code are described in the table given below.
Parameter | Description |
---|---|
Resource Owner | It is the entity that grants access to a protected resource. Value: GoBiz |
Resource Server | It is the server that hosts the protected resources. It accepts and responds to the requests from the client using access tokens. GoBiz API is the resource server. |
Client | It is the web application that accesses the information of the end-user from GoBiz. |
Authorization Server | It is the server that issues access tokens to the client after authenticating the resource owner and obtaining authorization. Value: Gojek |
Integrator | It is the organization that integrates the client with GoBiz. |
User Agent | It is the interface (browser) used to redirect the end-user to Gojek (for authorization) and back to the client. |
Authorization Endpoint | It is used to interact with the resource owner and obtain an authorization grant. The authorization server must first verify the identity of the resource owner. Value: OAUTH_URL/oauth2/auth |
Token Endpoint | It is used by the client to refresh token or obtain an access token by presenting its authorization grant. Value: OAUTH_URL/oauth2/token |
Access Token | It is the token required to access GoBiz APIs. |
ID Token | It is a JSON Web Token (JWT) that contains information about the end-user. |
The image below represents the Gojek Authorization Code workflow.
The subsequent sections describe the steps in the workflow and their significance.
Creating Anti-forgery ‘state’ Token
A state
parameter is required for preventing cross-site request forgery (CSRF) attacks (Refer RFC 6749: Section 10.12). The state
parameter is a unique session token created by the client and holds the state between the client and the user agent (browser). When the user is redirected back to the client after successful authentication and consent, the client should cross-verify the state
token for legitimacy. Thus, the client ensures that the request is coming from legitimate user agent and not a malicious attacker.
state
must be at least 8 characters longstate
must be URL-safe encoded
Sample code for creating
state
token
import os
import hashlib
state = hashlib.sha256(os.urandom(10)).hexdigest()[:16]
Building Query String
The different parameters in the authorization request are described in the table given below.
Parameter | Description | Type | Required |
---|---|---|---|
client_id |
It is a unique identifier given to the client by Gojek during generation of the client credentials. | String | Required |
response_type |
It should be set to ’code’ for authorization code integration. | String | Required |
scope |
It is used in authorization code requests to request additional levels of access. The value should be at least openid. | String | Required |
state |
It is a unique session token created for preventing CSRF attacks. | String | Required |
redirect_uri |
It is the endpoint of the client (backend server). The user is redirected to this URL after authorization. The value should match one of the redirect URI s registered during generation of client credentials. |
String | Required |
nonce |
It is a case-sensitive string value that is used to associate a client session with an ID Token and to mitigate replay attacks. | String | Optional |
max_age |
It is the maximum age of the authentication session. It forces login if session is older than this value. | Integer | Optional |
ui_locales |
It is used to specify the end-user’s preferred language and script for the user interface. For example: id or en | String | Optional |
Sample authorization URL for redirecting the user to Gojek
https://integration-goauth.gojekapi.com/oauth2/auth?
client_id=my_client_id&
response_type=code&
scope=openid&
redirect_uri=https://client-backend.com/gojek/callback&
state=0ee05c09e1cda629
The available scopes or access levels are described in the table given below.
Scope | Scope Description |
---|---|
openid |
To read basic token info. |
offline |
To regenerate access token. |
partner:outlet:read |
To read outlet data. |
partner:outlet:write |
To edit or update outlet data. |
gofood:catalog:read |
To read GoFood menu. |
gofood:catalog:write |
To modify GoFood menu. |
gofood:order:read |
To read GoFood order data. |
gofood:order:write |
To mark an order is ready. |
promo:food_promo:read |
To retrieve GoFood promotions. |
promo:food_promo:write |
To modify GoFood promotions. |
payment:transaction:read |
To read payment transaction. |
payment:transaction:write |
To modify payment transaction. |
payment:pop:read |
To read payment PoP data. |
mokapos:library:read |
To read mokapos libray data. |
mokapos:transaction:read |
To read mokapos transaction data. |
mokapos:reporting:read |
To read mokapos reporting data. |
mokapos:customer:read |
To read mokapos libray data. |
mokapos:checkout:write |
To update mokapos checkout data. |
mokapos:salestype:read |
To read mokapos sales type data. |
Redirecting User to Gojek Server
The client sends the user to Gojek authorization endpoint (/oauth2/auth
) by redirecting the user agent to the Gojek sign-in page (refer to RFC 6749: Section 1.7). This allows the user to login with Gojek credentials and to authorize the client to access their information on Gojek.
Processing Authorization Callback
When the Gojek server authenticates the user and authorizes the client to access information, Gojek generates an authorization code. Gojek then redirects the user to redirect_uri
with the code
and the state
originally sent by the client.
On receiving this callback, the client verifies the state
parameter and ensures that the value is same as the one sent earlier.
Sample URL to which user is redirected after authorization
https://client-backend.com/gojek/callback?
code=e3q4dqlkjasjdl&
state=0ee05c09e1cda629
Exchanging Code for Access Token & ID Token
The code
returned in the previous step is single-use authorization code and is short-lived (expires in two minutes after receiving the redirection). The client exchanges this code
with Gojek to request an access token and an ID token containing information about the user.
A POST
request is sent to the /oauth2/token
endpoint with following parameters in the request body:
Endpoint = OAUTH_URL/oauth2/token
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
grant_type |
It is the authorization_code as defined in OAuth2 Authorization Code Grant. |
String | Required |
code |
It is the value received as part of redirection to redirect_uri . |
String | Required |
client_id |
It is the client identifier issued by GoJek. It should be the same as the one sent during /oauth2/auth . |
String | Required |
client_secret |
It is the Client Secret issued by GoJek for the client_id . |
String | Required |
redirect_uri |
It is the redirection URI used during the /oauth2/auth call. |
String | Required |
Code Sample
curl -X POST https://integration-goauth.gojekapi.com/oauth2/token \
-u "my_client_id:my_client_secret" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "code=e3q4dqlkjasjdl" \
-d "redirect_uri=https://client-backend.com/gojek/callback"
When the client credentials are successfully verified, the code
results in a JSON response with the information given in the table below.
Response Parameters
JSON Attribute | Description | Type |
---|---|---|
access_token |
It is a token used to access GoBiz API. | String |
id_token |
It is an identifier for the token. | String |
expires_in |
It is the approximate lifetime (in seconds) of the token that is remaining since receiving the response. | Integer |
token_type |
It is the type of token returned. It is always Bearer . |
String |
refresh_token |
It is a refresh token for renewing access tokens offline (without user). This is present only if the scope contains offline_access . |
String |
Sample Response
{
"access_token": "this_is_the_access_token",
"expires_in": 3600,
"token_type": "Bearer",
"id_token": "this_is_the_token_identifier"
}
Handling Errors
In case of an error, we recommend that you display a user-friendly screen that describes the error, and redirect the user to the login screen so that the user can try to login again.
Error responses and error codes are similar to those defined in RFC 6749: OAuth2.0, except when specified otherwise.
In case of an error during /oauth2/auth
redirection, the error is sent to the client backend as one of the query parameters of the redirect_uri
, as specified in the OAuth 2.0 RFC.
Outlet Information
This section specifies how to get information about outlets.
The methods available in Outlet Information are listed in the table given below.
HTTP Method | Endpoint | Description |
---|---|---|
GET | /integrations/partner/v1/linked-outlets | It is used to get a list of your linked outlets and their basic information. |
PUT | /integrations/partner/v1/outlet-link | It is used to link an outlet. |
DELETE | /integrations/partner/v1/outlet-link | It is used to unlink an outlet. |
GET | /integrations/partner/v1/token-info | It is used to get outlet information based on the token. |
GET | /integrations/partner/outlets/{outlet_id}/v1 | It is used to get detailed information about a specific outlet. |
Get All Outlets
By using this method, you can view the information about your linked outlets. It returns the basic information about an outlet such as name, email ID, contact details, and so on.
GET /integrations/partner/v1/linked-outlets
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/linked-outlets \
-H 'Authorization: Bearer {access-token}'
Query Parameters
Name | Description | Type | Required |
---|---|---|---|
per | Number of outlets to be displayed per page. | Integer | Optional |
page | The page number that displays the outlets. | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"outlets": [
{
"id": "G000012345",
"external_outlet_id": "sample-abc-12345",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
]
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the outlets. | Object |
» outlets | Array of outlets object. | Array(Object) |
Link Outlet
By using this method, you can link your outlet so you can use call GoBiz endpoints on behalf of merchants and to enable webhook notifications.
PUT /integrations/partner/v1/outlet-link
Code Sample
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/outlet-link \
-H 'Authorization: Bearer {access-token}'
-H 'Content-Type: application/json'
-d $'
{
"external_outlet_id" : "external_outlet_id"
}
'
Sample Response - 200 Success
{
"success": true,
"data": {
"outlet": {
"id": "string",
"external_outlet_id": "sample-abc-12345",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"linked_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the linked outlet. | Object |
» outlet | Linked object data. | Object |
Unlink Outlet
By using this method, you can undo the linking explained in previous section.
DELETE /integrations/partner/v1/outlet-link
Code Sample
curl -X DELETE https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/outlet-link \
-H 'Authorization: Bearer {access-token}'
Sample Response - 200 Success
{
"success": true,
"data": { }
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details metadata if any. | Object |
Get Authenticated Outlet Information
By using this method, you can view the basic information about an outlet based on the token.
GET /integrations/partner/v1/token-info
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/token-info \
-H 'Authorization: Bearer {access-token}'
Sample Response - 200 Success
{
"success": true,
"data":
{
"outlets":
[
{
"id": "string",
"name": "string",
"address": "string",
"email": "string",
"phone": "string"
}
]
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the authenticated outlets. | Object |
» outlets | Array(Object) |
Sample Response - 404 Outlet Not Found
{
"success": false,
"errors":
[
{
"message_title": "Not found",
"message": "Outlet with id: de829e5b-72a5-49bc-a5f3-f0d83edb9daf is not found"
}
]
}
Response - 404 Outlet Not Found
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value false indicates an error. |
Boolean |
errors | Details of the error. | Array(Object) |
Get Outlet Information
By using this method, you can get detailed information about an outlet or merchant. It returns details such as name of the outlet, mode of payment used by the outlet, and so on.
GET /integrations/partner/outlets/{outlet_id}/v1
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/outlets/{outlet_id}/v1 \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to get the detailed information. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data":
{
"outlet":
{
"id": "G916309315",
"merchant_name": "Merchant name",
"name": "Name",
"status": "active",
"email": "user@example.com",
"payment_settings":
{
"gopay":
{
"active": true
},
"qris":
{
"active": true
}
},
"applications":
{
"midtrans":
{
"active": true
},
"gopay":
{
"active": true
}
}
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the outlet to be linked. | Object |
» outlet | Object |
Sample Response - 404 Outlet Not Found
{
"success": false,
"errors":
[
{
"message_title": "Not found",
"message": "Outlet with id: de829e5b-72a5-49bc-a5f3-f0d83edb9daf is not found"
}
]
}
Response - 404 Outlet Not Found
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value false indicates an error. |
Boolean |
errors | Details of the error. | Array(Object) |
Food Integration
The order flow of GoFood is given below.
- Consumer places the order via GoFood.
- Order flows through Gojek backend, that is, GoBiz.
- GoBiz relays order to the partner POS System.
- Enterprise acknowledges and prepares the order.
- Driver picks up the order.
- Consumer receives the order.
To handle the order flow, the Enterprise performs the following steps at the backend:
- Partner confirms that all its outlets are registered in GoBiz.
- Partner calls Update GoFood Outlet Catalog API when outlets push the updated menu.
- Partner subscribes to relevant order subscription events for the order to be relayed to the partner POS system.
- Partner calls Promo APIs to enable self-serving promo setup.
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
Code Sample
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 |
Sample Response - 200 Success
{
"success": true,
"data": {
"request_id": "a7956af2-e5e9-4b1e-9844-52494d6cb6fc"
}
}
Response - 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 |
Get Catalog
GET /integrations/gofood/outlets/{outlet_id}/v2/catalog
Code Sample
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 - 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 |
Update Menu Items Out-of-Stock (OOS) Status
PATCH /integrations/gofood/outlets/{outlet_id}/v2/menu_item_stocks
Code Sample
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 - 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 |
Update Variants Out-of-Stock (OOS) Status
PATCH /integrations/gofood/outlets/{outlet_id}/v2/variant_stocks
Code Sample
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 - 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 |
Mark Food Ready
This section specifies how you can update the status of GoFood order.
- On
pickup
type, it will notify the consumers that the order can be picked up. - On
delivery
type, it will notify the drivers that the order can be picked up to be delivered to consumers.
Mark Food Ready
PUT /integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/food-prepared
Code Sample
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/food-prepared \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"country_code" : "ID"
}
'
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 |
---|---|---|---|
country_code | Country code of the outlet registered country. Value: ID. | String | Required |
Sample Response - 200
{
"success" : true,
"data" : {}
}
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
Code Sample
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
{
"success" : true,
"data" : {}
}
Reject Order
PUT /integrations/gofood/outlets/{outlet_id}/v1/orders/{order_type}/{order_id}/cancelled
Code Sample
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" : true,
"data" : {}
}
Promotions
GoBiz allows a partner to create SKU-level promotions specific to any outlet. You can create a promotion, view a list of promotions for a specific outlet, and also delete or deactivate a promotion.
The methods available in Promotions are listed in the table given below.
Method | Endpoint | Description |
---|---|---|
Post | /integrations/promo/outlets/{outlet_id}/v1/food-promos | It is used to create promotions for a specific outlet. |
Get | /integrations/promo/outlets/{outlet_id}/v1/food-promos | It is used to retrieve the list of promotions for a specific partner. |
Get | /integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id} | It is used to get the detailed information about a specific promotion. |
Delete | /integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id} | It is used to delete a specific promotion. |
Put | /integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id}/deactivate | It is used to deactivate an active promotion. |
Create Promotions
It helps you to create promotions for a specific outlet.
POST /integrations/promo/outlets/{outlet_id}/v1/food-promos
Code Sample
curl -X POST https://api.partner-sandbox.gobiz.co.id/integrations/promo/outlets/{outlet_id}/v1/food-promos \
-H 'Content-Type: application/json' \
-H 'X-Request-ID: some-sample-request-id' \
-H 'X-Idempotency-Key: 71839e9c944b40cebd318a76db666f36' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"promo_type": "sku_promo",
"promo_detail": {
"start_date": "2020-09-04",
"end_date": "2020-09-07",
"start_time" : "14:00:00",
"end_time" : "16:00:00",
"selling_price": 2500,
"external_menu_id": "external_menu_id",
"applicable_days" : ["sunday", "monday"]
}
}
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to create a promotion. | String | Required |
Header Parameters
Name | Description | Type | Required |
---|---|---|---|
X-Request-ID | It is used to track the request. It is sent back on the response headers. If a request ID already exists as the x-request-id in the HTTP request header and fulfills the length requirements, then it is used. Otherwise, a new request ID is generated and the request is not rejected. Maximum Limit: 128 characters. | String | Optional |
X-Idempotency-Key | It is used to identify whether the request is a new request or a retry request. Maximum Limit: 32 characters. | String(UUID) | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
promo_type | Type of the promotion. Value: sku_promo |
String | Required |
promo_detail | Details of a promotion. | Object | Required |
Sample Response - 201 Success
{
"success": true,
"data": {
"success": [
{
"id": "promotion_id",
"external_menu_id": "external-menu-id",
"errors": null
}
],
"failure": [
{
"id": null,
"external_menu_id": "external-menu-id",
"errors": "Item is not active"
}
]
}
}
Response - 201 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 |
» success | Details of the promotion when request is successfully submitted. | Object |
» failure | Details of the promotion when request fails. | Object |
Get Promotions
This method allows you to retrieve the list of promotions for a specific outlet.
GET /integrations/promo/outlets/{outlet_id}/v1/food-promos
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/promo/outlets/{outlet_id}/v1/food-promos \
-H 'X-Request-ID: some-sample-request-id' \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to view the list of promotions. | String | Required |
Header Parameter
Name | Description | Type | Required |
---|---|---|---|
X-Request-ID | It is used to track the request. It is sent back on the response headers. If a request ID already exists as the x-request-id in the HTTP request header and fulfills the length requirements, then it is used. Otherwise, a new request ID is generated and the request is not rejected. Maximum Limit: 128 characters. | String | Optional |
Query Parameters
Name | Description | Type | Required |
---|---|---|---|
limit | Number of promotions to be displayed per page. If zero or null value is passed, it uses the default value, which is 25. | Integer | Optional |
page | The page number to display the promotions. | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"promotions": [
{
"start_date": "2020-09-04",
"end_date": "2020-09-04",
"status": "created",
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8"
}
],
"total_count": 100,
"limit": 10,
"page": 2
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the promotions. | Object |
» promotions | Array of the promotions object. |
Object |
» total_count | Total count of the promotions. | Integer |
» limit | Number of the promotions per page. | Integer |
» page | The page number displaying the promotions. | Integer |
Get a Promotion Detail
By using this method, you can get the detailed information about a specific promotion.
GET /integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id}
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id} \
-H 'X-Request-ID: some-sample-request-id' \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to view the details of a promotion. | String | Required |
promotion_id | ID of the promotion whose details you want to view. | String | Required |
Header Parameter
Name | Description | Type | Required |
---|---|---|---|
X-Request-ID | It is used to track the request. It is sent back on the response headers. If a request ID already exists as the x-request-id in the HTTP request header and fulfills the length requirements, then it is used. Otherwise, a new request ID is generated and the request is not rejected. Maximum Limit: 128 characters. | String | Optional |
Sample Response - 200 Success
{
"success": true,
"data": [
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"start_date": "2020-09-04",
"end_date": "2020-09-04",
"start_time": "14:25:00",
"end_time": "14:55:00",
"status": "activated",
"promo_type": "sku_promo",
"details": {
"menu_item": {
"id": "45ba745f-745e-4568-ad68-c0c8e9ba8dc8",
"external_menu_id": "external-menu-id",
"name": "Kopi",
"price": 4500,
"discounted_price": 2500
}
}
}
]
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the promotions. | Object |
Deactivate a Promotion
You can deactivate an active promotion for a specific outlet using this method.
PUT /integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id}/deactivate
Code Sample
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id}/deactivate \
-H 'X-Request-ID: some-sample-request-id' \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to deactivate a promotion. | String | Required |
promotion_id | ID of the promotion that you want to deactivate. | String | Required |
Header Parameter
Name | Description | Type | Required |
---|---|---|---|
X-Request-ID | It is used to track the request. It is sent back on the response headers. If a request id already exists as the x-request-id in the HTTP request header and fulfills the length requirements, then it is used. Otherwise, a new request id is generated and the request is not rejected. Maximum Limit: 128 characters. | String | Optional |
Sample Response - 200 Success
{
"success": true
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
Delete a Promotion
By using this method, you can delete a promotion associated with a specific outlet.
DELETE /integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id}
Code Sample
curl -X DELETE https://api.partner-sandbox.gobiz.co.id/integrations/promo/outlets/{outlet_id}/v1/food-promos/{promotion_id} \
-H 'X-Request-ID: some-sample-request-id' \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to delete a promotion. | String | Required |
promotion_id | ID of the promotion that you want to delete. | String | Required |
Header Parameter
Name | Description | Type | Required |
---|---|---|---|
X-Request-ID | It is used to track the request. It is sent back on the response headers. If a request id already exists as the x-request-id in the HTTP request header and fulfills the length requirements, then it is used. Otherwise, a new request id is generated and the request is not rejected. Maximum Limit: 128 characters. | String | Optional |
Sample Response - 200 Success
{
"success": true
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
Outlet Properties
This section specifies how a partner can update the outlet information.
Update Outlet Properties
By using this method, you can update your restaurant outlet information such as outlet is open or close.
PATCH /integrations/gofood/outlets/{outlet_id}/v1/properties
Code Sample
curl -X PATCH https://api.partner-sandbox.gobiz.co.id/integrations/gofood/outlets/{outlet_id}/v1/properties \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"force_close": false
}
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the restaurant for which you want to update the status. | String | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
force_close | Restaurant outlet status. | Boolean | Required |
Sample Response - 200 Success
{
"success": true,
"data":
{
"force_close": false
}
}
Response - 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 restaurant. | Object |
» force_close | restaurant outlet status. | Boolean |
Payment Integration
This section explains the different operations performed in payment transactions. You can create a transaction, view transaction details, and so on. Currently, Gojek supports QRIS as a payment method for GoBiz. Transaction expiry for QRIS is one week. Customers can make payments using any QRIS compatible applications.
The methods available in Payment Transaction are listed in the table given below.
HTTP Method | Endpoint | Description |
---|---|---|
Post | /integrations/payment/outlets/{outlet_id}/v2/transactions | It is used to create a transaction. |
Get | /integrations/payment/outlets/{outlet_id}/v1/transactions/{id} | It is used to get details of a specific transaction. |
Create Payment Transaction
By using this method, you can create a transaction. You need to send an API request to Gojek to create a transaction. Gojek processes the request and sends you the QR data. This QR data enables you to create the QR image and display it to the customer.
POST /integrations/payment/outlets/{outlet_id}/v2/transactions
Code Sample
curl -X POST https://api.sandbox.gobiz.co.id/integrations/payment/outlets/{outlet_id}/v1/transactions \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: string' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"payment_type": "qris",
"transaction_details": {
"order_id": "order-1234",
"gross_amount": 3000,
"currency": "IDR"
},
"item_details": [
{
"id": "SKU-000123",
"price": 3000,
"quantity": 1,
"name": "Item sample no.1",
"brand": "sample brand",
"category": "others",
"merchant_name": null
}
],
"customer_details": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+628111000123"
},
"metadata": {}
}
'
Path Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID where the transaction will be recorded. | String | Required |
Header Parameter
Name | Description | Type | Required |
---|---|---|---|
Idempotency-Key | It is used to identify whether the request is a new request or a retry request. Maximum Limit: 32 characters. | String | Required |
Idempotency Key
Gojek uses Idempotency-Key to safely handle the payment requests. The Idempotency-Key is in the form of a string, and it should be included in the request header. You can use any random string to create Idempotency-Key. The maximum allowed length of Idempotency-Key is 32 characters. When you send a request, Gojek server reads the Idempotency-Key to decide whether to return a previous response or to create a new transaction. Gojek ensures that the request for a payment transaction is processed only once for each Idempotency-Key. Gojek recycles idempotency keys after a month. So, you can reuse an idempotency key after a month of its creation.
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
payment_type | Payment method. | String | Required |
transaction_details | Details of a transaction. | Object | Required |
item_details | Details of an item. | Array(Object) | Optional |
customer_details | Details of a customer. | Object | Optional |
Sample Response - 201 Success
{
"success": true,
"data": {
"outlet": {
"id": "G000012345",
"pop_id": "fa6082ea-06da-4483-9c7e-eeb0447ed53e"
},
"transaction": {
"id": "71839e9c-944b-40ce-bd31-8a76db666f36",
"payment_type": "qris",
"status": "pending",
"qris_string": "00020101021226610014COM.GO-JEK.WWW01189360091430438058080210G7641517890303UMI51440014ID.CO.QRIS.WWW0215ID10190450190010303UMI5204581253033605802ID5907Circlek6015Bandung deket r61054025762470703A015036c98a2234-f6d1-46f6-91d3-2597ee7863bc5406122.0063044447",
"order_id": "order-1234",
"gross_amount": 3000,
"currency": "IDR",
"created_at": "2020-03-09T11:33:08Z",
"settlement_at": null
},
"actions": [
{
"name": "generate-qr-code",
"method": "GET",
"url": "https://api.sandbox.gobiz.co.id/transactions/71839e9c-944b-40ce-bd31-8a76db666f36/qr-code"
}
]
}
}
Response - 201 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of transaction. | Object |
» outlet | Details of the outlet. | Object |
» transaction | Details of a transaction. | Object |
» actions | Action that can be performed for the transaction. | Array(Object) |
Get Transaction Detail
By using this method, you can view the details of a specific transaction.
GET /integrations/payment/outlets/{outlet_id}/v1/transactions/{id}
Code Sample
curl -X GET https://api.sandbox.gobiz.co.id/integrations/payment/outlets/{outlet_id}/v1/transactions/{id} \
-H 'Authorization: Bearer {access-token}'
Path Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID where the transaction is bound to. | String | Required |
id | ID of a transaction whose details you want to view. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {
"outlet": {
"id": "G000012345",
"pop_id": "fa6082ea-06da-4483-9c7e-eeb0447ed53e"
},
"transaction": {
"id": "71839e9c-944b-40ce-bd31-8a76db666f36",
"qris_string": "00020101021226610014COM.GO-JEK.WWW01189360091430438058080210G4066636330303UMI51440014ID.CO.QRIS.WWW0215ID10190240190010303UMI5204581253033605802ID5922jumpstart-staging-qris6015Bandung deket r61054025762470703A0150363ed186eb-4837-4f54-afa6-0e007b36b4ce5406342.006304B802",
"payment_type": "qris",
"status": "pending",
"order_id": "order-1234",
"gross_amount": 3000,
"currency": "IDR",
"created_at": "2020-03-09T11:33:08Z",
"settlement_at": null
},
"actions": [
{
"name": "generate-qr-code",
"method": "GET",
"url": "https://api.sandbox.gobiz.co.id/transactions/71839e9c-944b-40ce-bd31-8a76db666f36/qr-code"
}
]
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of transaction. | Object |
» outlet | Details of the outlet. | Object |
» transaction | Details of a transaction. | Object |
» actions | Action performed for the transaction. | Array(Object) |
Response - 404 Not Found
Sample Response - 404 Not Found
{
"success": false,
"errors": [
{
"message_title": "Not found",
"message": "Transaction not found"
}
]
}
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value false indicates an error. |
Boolean |
errors | Details of the error. | Array(Object) |
MokaPOS Integration
This section contains various operations for MokaPOS integration.
The available APIs are listed below.
Get Business’ Outlets
By calling this API, you can get the list of outlets of a specified Moka POS Business.
GET /integrations/mokapos/businesses/{business_id}/v1/outlets
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
business_id | ID of a MokaPOS business | String | Required |
Sample Response - 200 Success
{
"success":true,
"data":{
"id":123,
"outlets":[
{
"id":"G123456",
"expired_at":"2018-01-11T15:33:23.617+07:00",
"name":"Outlet 1",
"address":"Outlet address",
"phone_number":"Outlet phone number",
"city":"outlet city",
"province":"outlet province",
"postal_code":"outlet postal code"
},
{
"id":"G67890",
"expired_at":"2018-01-11T15:33:23.617+07:00",
"name":"Outlet 2",
"address":"Outlet address",
"phone_number":"Outlet phone number",
"city":"outlet city",
"province":"outlet province",
"postal_code":"outlet postal code"
}
]
}
}
Get Sales Summary
By calling this API, you can retrieve the sales summary of the specified MokaPOS outlet.
POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/sales-summary
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | ID of a MokaPOS business | String | Required |
Code Sample
curl -X POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/sales-summary \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"query": {
"range": {
"transaction_time": {
"gte": "2020-01-01T00:00:00+07:00",
"lte": "2020-01-30T23:59:59+07:00"
}
}
}
}
'
Sample Response - 200 Success
{
"success": true,
"data": {
"sales_summary": [
{
"currency": "IDR",
"refund": 68000,
"gross_amount": 5526000,
"redemption": 1000
}
]
}
}
Get Payment Methods Summary
By calling this API, you can retrieve the summary of the payment methods that being used in the specified MokaPOS outlet.
POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/payment-methods
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | ID of a MokaPOS business | String | Required |
Code Sample
curl -X POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/payment-methods \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"query": {
"range": {
"transaction_time": {
"gte": "2020-01-01T00:00:00+07:00",
"lte": "2020-01-30T23:59:59+07:00"
}
}
}
}
'
Sample Response - 200 Success
{
"success": true,
"data": {
"total_number_of_transactions": 5,
"total_collected": 5458000,
"reports": [
{
"Invoice": [
{
"payment_type": "Invoice",
"number_of_transactions": 5,
"collected": 5458000
}
]
}
]
}
}
Get Taxes Summary
By calling this API, you can retrieve the summary of the taxes in the specified MokaPOS outlet.
POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/taxes
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | ID of a MokaPOS business | String | Required |
Code Sample
curl -X POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/taxes \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"query": {
"range": {
"transaction_time": {
"gte": "2020-01-01T00:00:00+07:00",
"lte": "2020-01-30T23:59:59+07:00"
}
}
}
}
'
Sample Response - 200 Success
{
"success": true,
"data": {
"total_refund": 0,
"total_net_sales": 80000,
"total_item_sold": 4,
"total_gross_sales": 80000,
"total_discounts": 0,
"item_sales": [
{
"variant_id": "1234",
"name": "Vanilla Ice Cream",
"category_name": "Dessert",
"refund": 0,
"redemption": 0,
"net_sales": 80000,
"item_sold": 4,
"item_refunded": 0,
"cogs": 0,
"gross_sales": 80000,
"gross_profit": 80000,
"discount": 0
}
]
}
}
Get Item Sales Summary
By calling this API, you can retrieve the summary of the item sales in the specified MokaPOS outlet.
POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/item-sales
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | ID of a MokaPOS business | String | Required |
Code Sample
curl -X POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/item-sales \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"query": {
"range": {
"transaction_time": {
"gte": "2020-01-01T00:00:00+07:00",
"lte": "2020-01-30T23:59:59+07:00"
}
}
}
}
'
Sample Response - 200 Success
{
"success": true,
"data": {
"total_refund": 0,
"total_net_sales": 80000,
"total_item_sold": 4,
"total_gross_sales": 80000,
"total_discounts": 0,
"item_sales": [
{
"variant_id": "1234",
"name": "Vanilla Ice Cream",
"category_name": "Dessert",
"refund": 0,
"redemption": 0,
"net_sales": 80000,
"item_sold": 4,
"item_refunded": 0,
"cogs": 0,
"gross_sales": 80000,
"gross_profit": 80000,
"discount": 0
}
]
}
}
Get Transaction Modifiers Summary
By calling this API, you can retrieve the summary of the transactions’ modifiers in the specified MokaPOS outlet.
POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/modifiers
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | ID of a MokaPOS business | String | Required |
Code Sample
curl -X POST /integrations/mokapos/outlets/{outlet_id}/v1/reporting/modifiers \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"query": {
"range": {
"transaction_time": {
"gte": "2020-01-01T00:00:00+07:00",
"lte": "2020-01-30T23:59:59+07:00"
}
}
}
}
'
Sample Response - 200 Success
{
"success": true,
"data": {
"total_refunds": 0,
"total_quantity": 4,
"total_net_sales": 8000,
"total_gross_sales": 8000,
"total_discounts": 0,
"modifiers": [
{
"id": 362774,
"name": "Topping",
"refund": 0,
"quantity": 4,
"net_sales": 8000,
"gross_sales": 8000,
"discount": 0,
"options": [
{
"id": 2482800,
"name": "Oreo",
"refund": 0,
"quantity": 4,
"net_sales": 8000,
"gross_sales": 8000,
"discount": 0
}
]
}
]
}
}
Get Invoices List
By calling this API, you can get the list of invoices in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/reporting/invoices
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page. Max: 1000 | Integer | Optional |
page | The number of the page | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"invoices": [
{
"id": 43780888,
"invoice_no": "INV10EF2H3",
"invoice_due_date": "2021-11-25",
"invoice_deposit_amount": 0,
"amount_pay": 68000,
"amount_change": 0
"total_tax_amount": 0,
"total_net_sales": 68000,
"total_item_price_amount": 0,
"total_gross_sales": 68000,
"total_gratuity_amount": 0,
"total_discount_amount": 0,
"total_collected_amount": 68000,
"subtotal": 68000,
"refund_amount": 0,
"payment_type": "invoice",
"payment_note": "test",
"payment_no": "INV10EF2H3",
"is_refunded": false,
"is_refund_breakdown": true,
"created_at": "2021-11-25T15:26:52.797000+07:00",
"updated_at": "2021-11-25T15:26:52.797000+07:00"
}
],
"completed": true
}
}
Get Paid Transactions List
By calling this API, you can get the list of paid transactions in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/reporting/transactions
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page. Max: 1000 | Integer | Optional |
page | The number of the page | Integer | Optional |
order | The order of the resulting list, based on date. Valid values are ASC or DESC. Default: DESC | String | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"transactions": [
{
"id": "752cf7ff-6625-42cb-b317-c6ee9fb5b5d5",
"total_collected": 46000,
"name": "Ayam Bawang",
"payment_no": "53L8YFC",
"payment_type": "cash",
"payment_type_label": "Cash",
"payment_note": "",
"discounts": 5100.1,
"subtotal": 45900.9,
"gratuities": 0,
"taxes": 0,
"tendered": 46000,
"transaction_date": "2020-08-03T15:30:50.748+07:00",
"invoice_due_date": null,
"invoice_no": null,
"invoice_deposit_amount": null,
"invoice_payment_records": [],
"payment_taxes": [
{
"id": 66724,
"name": "Pajak Jadian",
"amount": 1,
"total": -755.0125,
"taxable_amount": -75501.25
}
],
"payment_gratuities": [
{
"id": 102878,
"name": "Zakat",
"amount": 2.5,
"total": -1806.25
}
],
"payment_discounts": [
{
"id": 3223,
"payment_id": 86949,
"discount_id": 2712,
"discount_amount": -100000,
"discount_name": "Promo Natal",
"discount_type": "cash",
"discount_cash": 100000
}
],
"payment_refunds": [
{
"id": 86947,
"status": "Done",
"payment_type": "gift_card",
"amount_pay": 0,
"amount_change": 0,
"total_discount_amount": 0,
"total_gratuity_amount": 0,
"total_item_price_amount": 0,
"total_tax_amount": 0,
"total_checkouts_amount": 0,
"is_refunded": true,
"refunded_reason": "Returned Goods",
"refunded_date": "2017-02-06T00:00:00.000+07:00",
"refund_amount": 153,
"refund_type": "partial"
}
],
"items": [
{
"id": 20472591,
"custom_amount": 0,
"variant_id": 36629111,
"quantity": 1,
"discount_amount": 5100.1,
"tax_amount": 0,
"price_library": 51001,
"price": 51001,
"price_discount": 45900.9,
"gratuity_amount": 0,
"price_discount_gratuity": 0,
"total_price": 45900.9,
"price_quantity": 51001,
"category_name": "Ayam",
"category_id": 192604,
"name": "Ayam Bawang",
"variant_name": "",
"sku": "",
"note": null,
"gross_sales": 51001,
"net_sales": 45900.9,
"price": 51001,
"refunded_quantity": 0,
"modifiers": [
{
"id": 85676810,
"checkout_id": 1181534847,
"modifier_id": 46842,
"modifier_option_id": 1918514,
"modifier_name": "dsadsa",
"modifier_option_name": "1",
"price": 1,
"payment_id": 584168793,
"discount_amount": 0.1,
"gross_sales": 1,
"net_sales": 0.9,
"redeem_amount": 0
}
],
"discounts": [
{
"id": 47270,
"type": "percentage",
"name": "A",
"percentage": 10,
"cash": 0,
"amount": 5100.1
}
]
}
]
}
]
}
}
Get Active Items
By calling this API, you can get the list of active items in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/library/items
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page | Integer | Optional |
page | The number of the page | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"total_pages": 9,
"total_count": 9,
"items": [
{
"id": 10582325,
"name": "Ice Cream",
"category": {
"id": 1839094,
"name": "Dessert"
},
"variants": [
{
"id": 17559481,
"name": "Vanilla",
"price": 18000,
"created_at": "2021-10-21T13:53:45+07:00",
"updated_at": "2021-10-21T13:53:45+07:00"
}
],
"active_modifiers": [
{
"id": 362774,
"name": "Topping",
"options": [
{
"id": 2482802,
"name": "Strawberry Sauce",
"price": 1000,
"created_at": "2021-10-21T13:49:15+07:00",
"updated_at": "2021-10-21T13:49:15+07:00"
}
]
}
],
"updated_at": "2021-10-21T13:53:45+07:00",
"created_at": "2021-10-21T13:53:45+07:00"
}
]
}
}
Get Active Categories
By calling this API, you can get the list of active categories in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/library/categories
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page | Integer | Optional |
page | The number of the page | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"total_pages": 7,
"total_count": 7,
"categories": [
{
"id": 1839094,
"name": "Dessert",
"created_at": "2021-10-21T13:53:22.722000+07:00",
"updated_at": "2021-10-21T13:53:22.718000+07:00"
}
]
}
}
Get Active Gratuities
By calling this API, you can get the list of active gratuities in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/library/gratuities
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page | Integer | Optional |
page | The number of the page | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"total_pages": 5,
"total_count": 5,
"gratuity": [
{
"id": 232904,
"name": "Service charge",
"amount": 1000,
"updated_at": "2021-11-22T13:41:25.734000+07:00",
"created_at": "2021-11-22T13:41:25.734000+07:00"
}
]
}
}
Get Active Taxes
By calling this API, you can get the list of active taxes in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/library/taxes
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page | Integer | Optional |
page | The number of the page | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"total_pages": 1,
"total_count": 1,
"taxes": [
{
"id": 16543,
"name": "PPN",
"updated_at": "2021-11-22T13:41:25.734000+07:00",
"created_at": "2021-11-22T13:41:25.734000+07:00"
}
]
}
}
Get Customers List
By calling this API, you can get the list of customers in the specified outlet.
GET /integrations/mokapos/outlets/{outlet_id}/v1/customers
Path Parameters
Attribute | Description | Type | Required |
---|---|---|---|
outlet_id | The Outlet ID | String | Required |
Query Parameters
Attribute | Description | Type | Required |
---|---|---|---|
per_page | The max number of items on each page. Max: 1000 | Integer | Optional |
page | The number of the page | Integer | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"total_pages": 4,
"total_count": 4,
"customers": [
{
"id": 4504270,
"name": "Peter Parker",
"phone": "+6281234567890",
"email": "peterparker@mailinator.com",
"address": "Teluk Gong",
"city": "Jakarta",
"state": "Jakarta",
"postal_code": "14450",
"created_at": "2021-11-26T17:40:54.932000+07:00",
"updated_at": "2021-12-03T18:08:10.165000+07:00"
}
]
}
}
Notification Subscriptions
This section specifies how to subscribe to one or more event notifications. You can create a subscription, view a specific notification, and so on.
There are two types of subscriptions. - General - Outlet specific
General
This type of subscription will create a subscription which listens to any outlets which are already authorized by partner.
The methods available in Notification Subscriptions are listed in the table given below.
HTTP Method | Endpoint | Description | |
---|---|---|---|
POST | /integrations/partner/v1/notification-subscriptions | It is used to subscribe to a specific event notification. | |
GET | /integrations/partner/v1/notification-subscriptions | It is used to get the list of subscriptions. | |
GET | /integrations/partner/v1/notification-subscriptions/{notification_id} | It is used to get details of a subscription. | |
PUT | /integrations/partner/v1/notification-subscriptions/{notification_id} | It is used to edit the notification subscription. | |
DELETE | /integrations/partner/v1/notification-subscriptions/{notification_id} | It is used to delete a subscription. |
Create Notification Subscription
You can subscribe to specific events you are interested in.
After the subscription is created, when a specific event occurs, HTTP request is made to the URL specified in the notification.
POST /integrations/partner/v1/notification-subscriptions
Code Sample
curl -X POST https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/notification-subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true
}
'
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
event | Type of event notification to subscribe. | String | Required |
url | URL at which notification is to be received. | String(URI) | Required |
active | Status of the subscription. The default value is true . Note: If false , notification is not sent. |
Boolean | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"subscription": {
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscription | Object |
Get Notification Subscriptions
By using this method, you can view the list of subscriptions.
GET /integrations/partner/v1/notification-subscriptions
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/notification-subscriptions \
-H 'Authorization: Bearer {access-token}'
Sample Response - 200 Success
{
"success": true,
"data": {
"subscriptions": [
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
]
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscriptions | Array(Object) |
Get Notification Subscription Detail
By using this method, you can get the detailed information about a subscription.
GET /integrations/partner/v1/notification-subscriptions/{notification_id}
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/notification-subscriptions/{notification_id} \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
notification_id | ID of the notification. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {
"subscription": {
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscription | Object |
Update Notification Subscription
By using this method, you can edit the existing notification subscription. You can change the status of subscription and URL using this method.
PUT /integrations/partner/v1/notification-subscriptions/{notification_id}
Code Sample
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/notification-subscriptions/{notification_id} \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true
}
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
notification_id | ID of the notification. | String | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
event | Type of event notification to subscribe. | String | Optional |
url | URL at which notification is to be received. | String(URI) | Optional |
active | Status of the subscription. The default value is true . Note: If false , the subscription is deactivated. |
Boolean | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"subscription": {
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscription | Object |
Delete Notification Subscription
By using this method, you can delete a subscription.
DELETE /integrations/partner/v1/notification-subscriptions/{notification_id}
Code Sample
curl -X DELETE https://api.partner-sandbox.gobiz.co.id/integrations/partner/v1/notification-subscriptions/{notification_id} \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
notification_id | ID of the notification. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | - | Object |
Outlet specific
This type of subscription will create a subscription which listens to a specific outlet. This is useful for partner to do piloting integrations.
The methods available in Outlet Notification Subscriptions are listed in the table given below.
HTTP Method | Endpoint | Description |
---|---|---|
POST | /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions | It is used to subscribe to a specific event notification for an outlet. |
GET | /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions | It is used to get the list of subscriptions of a specific outlet. |
GET | /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id} | It is used to get details of a subscription of an outlet. |
PUT | /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id} | It is used to edit the notification subscription of an outlet. |
DELETE | /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id} | It is used to delete a subscription of an outlet. |
Create Outlet Notification Subscription
You can subscribe to specific events you are interested in for a specific outlet.
After the subscription is created, when a specific event occurs, HTTP request is made to the URL specified in the notification.
POST /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions
Code Sample
curl -X POST https://api.partner-sandbox.gobiz.co.id/integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true
}
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to create a notification subscription. | String | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
event | Type of event notification to subscribe. | String | Required |
url | URL at which notification is to be received. | String(URI) | Required |
active | Status of the subscription. The default value is true .Note: If false , notification is not sent. |
Boolean | Optional |
Sample Response - 201 Success
{
"success": true,
"data": {
"subscription": {
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 201 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscription | Object |
Get Outlet Notification Subscriptions
By using this method, you can view a list of subscriptions of a specific outlet.
GET /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to view the list of subscriptions. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {
"subscriptions": [
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
]
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscriptions | Array(Object) |
Get Outlet Notification Subscription Detail
By using this method, you can get the detailed information about a subscription of a specific outlet.
GET /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id}
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id} \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to view the details of a subscription. | String | Required |
notification_id | ID of the notification. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {
"subscription": {
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscription | Object |
Update Outlet Notification Subscription
By using this method, you can edit the existing notification subscription of a specific outlet. You can change the status of subscription and URL using this method.
PUT /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id}
Code Sample
curl -X PUT https://api.partner-sandbox.gobiz.co.id/integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id} \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d $'
{
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true
}
'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to update the subscription. | String | Required |
notification_id | ID of the notification. | String | Required |
Request Parameters
JSON Attribute | Description | Type | Required |
---|---|---|---|
event | Type of event notification to subscribe. | String | Optional |
url | URL at which notification is to be received. | String(URI) | Optional |
active | Status of the subscription. The default value is true .Note: If false , the subscription is deactivated. |
Boolean | Optional |
Sample Response - 200 Success
{
"success": true,
"data": {
"subscription": {
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the subscription. | Object |
» subscription | Object |
Delete Outlet Notification Subscription
By using this method, you can delete a subscription for an outlet.
DELETE /integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id}
Code Sample
curl -X DELETE https://api.partner-sandbox.gobiz.co.id/integrations/partner/outlets/{outlet_id}/v1/notification-subscriptions/{notification_id} \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
outlet_id | ID of the outlet for which you want to delete a subscription. | String | Required |
notification_id | ID of the notification. | String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | - | Object |
Troubleshooting
This section contains APIs which we provide to enable you do troubleshooting.
The available APIs are listed below.
HTTP Method | Endpoint | Description |
---|---|---|
GET | /integrations/partner/notifications?entity_id={entity_id} | It is used to get the details of notifications. |
Get Notification Details
By using this method, you are expected to be able to debug each notification event given an entity_id
.
GET /integrations/partner/notifications?entity_id={entity_id}
Code Sample
curl -X GET https://api.partner-sandbox.gobiz.co.id/integrations/partner/notifications?entity_id={entity_id} \
-H 'Authorization: Bearer {access-token}'
Path Parameters
Name | Description | Type | Required |
---|---|---|---|
entity_id | ID of the order or transaction. for GoFood and GoMart entity_id is the order id i.e.: F-704173354 and for Payments, the entity_id is the transaction id i.e.: c5fbc785-629a-463f-b6f9-da1106a29f73 |
String | Required |
Sample Response - 200 Success
{
"success": true,
"data": {
"notifications": [
{
"entity_id": "F-704173354",
"created_at": "2023-05-03T16:11:50.446+00:00",
"partner_id": "c5fbc785-629a-463f-b6f9-da1106a29fa1",
"event_type": "gofood.order.merchant_accepted",
"delivery_status": "dead",
"endpoint": "https://webhook.site/5b8922ed-b310-456c-8ea2-9d7a0a9ba0f0",
"headers": {
"X-Go-Signature": "1158ebcb7e821406f0b4993a504d6d561177c494662dad890d651f94f3f08216",
"X-Go-Idempotency-Key": "446cb8ae-8fe3-3c2c-9e9f-c677f37c5e5c",
"Content-Type": "application/json",
"Accept": "application/json"
},
"payload": "stringified JSON of notification payload",
"history": [
{
"time": "2023-05-03T16:11:50.446+00:00",
"exception_message": "URL not found",
"delivered": false
},
{
"time": "2023-05-03T16:15:50.446+00:00",
"exception_message": "URL not found",
"delivered": false
},
{
"time": "2023-05-03T16:19:50.446+00:00",
"exception_message": "URL not found",
"delivered": false
},
{
"time": "2023-05-03T16:19:50.446+00:00",
"exception_message": "Failed after automatic attempts.",
"delivered": false
}
]
}
]
}
}
Response - 200 Success
JSON Attribute | Description | Type |
---|---|---|
success | Status of the request. Value true indicates successful submission of the request. |
Boolean |
data | Details of the notifications. | Object |
» notifications | Array(Object) |
Webhooks
Based on your notification subscription settings, GoBiz sends you real time notifications via HTTP endpoint.
Receiving Notifications
Code Sample
require 'sinatra'
require 'json'
post '/callback' do
request.body.rewind
raw_body = request.body.read
signature = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), ENV['NOTIFICATION_SECRET_KEY'], raw_body)
if Rack::Utils.secure_compare(signature, request.env['HTTP_X_GO_SIGNATURE'])
notif = JSON.parse(raw_body)
"I got some JSON: #{notif.inspect}"
else
halt 400, "Signatures didn't match!"
end
end
GoBiz uses Signature Key mechanism to help you ensure that the notifications you receive are sent by GoBiz. Every request received from GoBiz should have the HTTP header X-Go-Signature
, which is computed using HMAC (sha256, notification_secret_key, request_body)
. If the Signature Key in the request header does not match the Signature Key computed by you, ignore the notification.
The logic of the Signature Key and the sample code to generate the Signature Key are given on the side, in the code section.
Best Practices to Handle Notification
The guidelines to handle the notifications are given below.
- Use HTTPS Endpoint
It is secure and there cannot be MITM attacks because GoBiz verifies that the name on the server certificate matches with the host name. In addition to this, do not use self-signed certificates. - Use Notification Callback URL
Use standard port (80/443) for Notification Callback URL. - Implement Notification in an Idempotent Way
In extremely rare cases, GoBiz may send multiple notifications for the same event. It should not cause double entries at your end. To prevent this,Idempotency-Key
can be used to track the entries. - Use Signature Key
Check the Signature Key of the notification. It confirms that the notification is actually sent by GoBiz. We encode the shared secret (server) key. Nobody else can build this signature hash. - Reduce the Response Time
GoBiz sets the HTTP timeout to fifteen seconds. Please strive to keep the response time of the HTTP notifications under five seconds. - Ignore Delayed Status Notifications
In extremely rare cases, GoBiz may send the HTTP notifications that are not in the correct sequence. Please handle such cases gracefully. - Use JSON Parser
We send the notification body as JSON. Therefore, please parse the JSON with a JSON parser. New fields get added to the notification body. Parse the JSON in a non-strict format, so that when the parser sees new fields, it should not throw exception. It should gracefully ignore the new fields. This allows GoBiz to extend its notification system for newer use cases without breaking old clients. - Use the Correct HTTP Status Code
Always use the correct HTTP status code for responding to the notification. GoBiz handles retry for error cases differently based on the status code.- For
2xx
: No retries, it is considered success. - For
500
: Retry only once. - For
503
: Retry four times. - For
400/404
: Retry two times. - For
301/302/303
: No retries. - For
307/308
: Follow the new URL with POST method and same notification body. Max redirect is five times. - For all other failures: Retry five times.
- For
- Retry at the Most Five Times
GoBiz enables retry at the most five times with following policy.- Different retry intervals from first time to fifth time (2 minutes, 10 minutes, 30 minutes, 1.5 hours, 3.5 hours).
- Put a time shift for each retry based on the above interval. For example, for the first time, retry might be two minutes after the job failed. The second retry might be 10 minutes after the first retry is failed, and so on.
Events List
GoBiz supports various events to which the partner can subscribe to and receive notifications. When the subscribed events are triggered, the partner can receive specific notifications. You can find more information about how to subscribe to specific events in the Notification Subscriptions APIs.
The events supported by GoBiz are described in the table given below.
Name | Description |
---|---|
gofood.order.awaiting_merchant_acceptance | This event is triggered when the system is waiting for the merchant to accept the order. Refer GoFood Awaiting Merchant Acceptance. |
gofood.order.merchant_accepted | This event is triggered when the merchant accepted new GoFood order. Refer GoFood Merchant Accepted. |
gofood.order.driver_otw_pickup | This event is triggered when the driver is on the way to the restaurant. Refer GoFood Driver OTW Pickup. |
gofood.order.driver_arrived | This event is triggered when the driver arrives at the restaurant. Refer GoFood Driver Arrived. |
gofood.order.completed | This event is triggered when the order is completed. Refer GoFood Order Completed. |
gofood.order.cancelled | This event is triggered when the order is cancelled. Refer GoFood Order Cancelled. |
gofood.order.webhook_error | This event is triggered when our system found unmet requirements during gofood.order.* webhook processing. Refer GoFood Order Webhook Error |
gofood.catalog.menu_mapping_updated | This event is triggered when the menu mapping is done being processed by GoBiz. Refer GoFood Menu Mapping Updated. |
payment.transaction.settlement | This event is triggered when the payment transaction is completed. Refer Payment Transaction Settlement. |
GoFood Awaiting Merchant Acceptance Event
Code Sample
{
"header": {
"event_name": "gofood.order.awaiting_merchant_acceptance",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "AWAITING_MERCHANT_ACCEPTANCE",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
This event triggered when an order starts to await the merchant to accept. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Awaiting Merchant Acceptance Event - Header Parameters
Code Sample
{
"event_name": "gofood.order.awaiting_merchant_acceptance",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.awaiting_merchant_acceptance |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which the event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Awaiting Merchant Acceptance Event - Body Parameters
Code Sample
{
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "AWAITING_MERCHANT_ACCEPTANCE",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"applied_promotions": [
{
"scope": "sku",
"detail": {
"item": {
"id": "e91a3493-71c2-4ceb-9d87-4ab7794aab72",
"external_id": "F789315F-3ECA-4D31-983C-62ADD8E8325F"
},
"id": "b688aba2-ba96-4ed1-a241-56cedc7f022d"
}
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
customer | Information about the customer. | Object | Required |
» id | ID of the customer. | String | Required |
» name | Customer name. | String | Required |
driver | Information about the driver. | Object | Required |
» name | Name of the driver. | String | Required |
service_type | Type of GoFood order. Possible Values: gofood , gofood_pickup |
String | Required |
outlet | Details of the outlet. | Object | Required |
» id | ID of the outlet on GoBiz side. | String | Required |
» external_outlet_id | ID of the outlet on partner side. | String | Required |
order | Details of the order. | Object | Required |
» status | Status of the order. Value: AWAITING_MERCHANT_ACCEPTANCE |
String | Required |
» pin | Personal Identification Number for the verification of driver. | String | Required |
» order_number | Order number of the order. | String | Required |
» order_total | Total amount of the order. | Float | Required |
» order_items | Details about the ordered items. | Array(Object) | Required |
» applied_promotions | Information about applied promos. | Array(Object) | Required |
» cutlery_requested | Boolean value to indicate whether the customer requests cutlery. | Boolean | Optional |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» takeaway_charges | Take-away charges of the order. | Float | Required |
» created_at | The date and time at which order is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Merchant Accepted Event
Code Sample
{
"header": {
"event_name": "gofood.order.merchant_accepted",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "MERCHANT_ACCEPTED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
This event triggered when the merchant accepted an order. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Merchant Accepted Event - Header Parameters
Code Sample
{
"event_name": "gofood.order.merchant_accepted",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.merchant_accepted |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which the event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Merchant Accepted Event - Body Parameters
Code Sample
{
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "MERCHANT_ACCEPTED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"applied_promotions": [
{
"scope": "sku",
"detail": {
"item": {
"id": "e91a3493-71c2-4ceb-9d87-4ab7794aab72",
"external_id": "F789315F-3ECA-4D31-983C-62ADD8E8325F"
},
"id": "b688aba2-ba96-4ed1-a241-56cedc7f022d"
}
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
customer | Information about the customer. | Object | Required |
» id | ID of the customer. | String | Required |
» name | Customer name. | String | Required |
driver | Information about the driver. | Object | Required |
» name | Name of the driver. | String | Required |
service_type | Type of GoFood order. Possible Values: gofood , gofood_pickup |
String | Required |
outlet | Details of the outlet. | Object | Required |
» id | ID of the outlet on GoBiz side. | String | Required |
» external_outlet_id | ID of the outlet on partner side. | String | Required |
order | Details of the order. | Object | Required |
» status | Status of the order. Value: MERCHANT_ACCEPTED |
String | Required |
» pin | Personal Identification Number for the verification of driver. | String | Required |
» order_number | Order number of the order. | String | Required |
» order_total | Total amount of the order. | Float | Required |
» order_items | Details about the ordered items. | Array(Object) | Required |
» applied_promotions | Information about applied promos. | Array(Object) | Required |
» cutlery_requested | Boolean value to indicate whether the customer requests cutlery. | Boolean | Optional |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» takeaway_charges | Take-away charges of the order. | Float | Required |
» created_at | The date and time at which order is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Driver Pickup Event
Code Sample
{
"header": {
"event_name": "gofood.order.driver_otw_pickup",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "DRIVER_OTW_PICKUP",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
This event triggered when driver is on the way to the restaurant. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Driver Pickup Event - Header Parameters
Code Sample
{
"event_name": "gofood.order.driver_otw_pickup",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.driver_otw_pickup |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which the event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Driver Pickup Event - Body Parameters
Code Sample
{
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "DRIVER_OTW_PICKUP",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"applied_promotions": [
{
"scope": "sku",
"detail": {
"item": {
"id": "e91a3493-71c2-4ceb-9d87-4ab7794aab72",
"external_id": "F789315F-3ECA-4D31-983C-62ADD8E8325F"
},
"id": "b688aba2-ba96-4ed1-a241-56cedc7f022d"
}
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
customer | Information about the customer. | Object | Required |
» id | ID of the customer. | String | Required |
» name | Customer name. | String | Required |
driver | Information about the driver. | Object | Required |
» name | Name of the driver. | String | Required |
service_type | Type of GoFood order. Possible Values: gofood , gofood_pickup |
String | Required |
outlet | Details of the outlet. | Object | Required |
» id | ID of the outlet on GoBiz side. | String | Required |
» external_outlet_id | ID of the outlet on partner side. | String | Required |
order | Details of the order. | Object | Required |
» status | Status of the order. Value: DRIVER_OTW_PICKUP |
String | Required |
» pin | Personal Identification Number for the verification of driver. | String | Required |
» order_number | Order number of the order. | String | Required |
» order_total | Total amount of the order. | Float | Required |
» order_items | Details about the ordered items. | Array(Object) | Required |
» applied_promotions | Information about applied promos. | Array(Object) | Required |
» cutlery_requested | Boolean value to indicate whether the customer requests cutlery. | Boolean | Optional |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» takeaway_charges | Take-away charges of the order. | Float | Required |
» created_at | The date and time at which order is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Driver Arrived Event
Code Sample
{
"header": {
"event_name": "gofood.order.driver_arrived",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "DRIVER_ARRIVED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
This event triggered when driver arrived at the restaurant. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Driver Arrived Event - Header Parameters
Code Sample
{
"event_name": "gofood.order.driver_arrived",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.driver_arrived |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which the event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Driver Arrived Event- Body Parameters
Code Sample
{
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "DRIVER_ARRIVED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"applied_promotions": [
{
"scope": "sku",
"detail": {
"item": {
"id": "e91a3493-71c2-4ceb-9d87-4ab7794aab72",
"external_id": "F789315F-3ECA-4D31-983C-62ADD8E8325F"
},
"id": "b688aba2-ba96-4ed1-a241-56cedc7f022d"
}
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
customer | Information about the customer. | Object | Required |
» id | ID of the customer. | String | Required |
» name | Customer name. | String | Required |
driver | Information about the driver. | Object | Required |
» name | Name of the driver. | String | Required |
service_type | Type of GoFood order. Possible Values: gofood , gofood_pickup |
String | Required |
outlet | Details of the outlet. | Object | Required |
» id | ID of the outlet on GoBiz side. | String | Required |
» external_outlet_id | ID of the outlet on partner side. | String | Required |
order | Details of the order. | Object | Required |
» status | Status of the order. Value: DRIVER_ARRIVED |
String | Required |
» pin | Personal Identification Number for the verification of driver. | String | Required |
» order_number | Order number of the order. | String | Required |
» order_total | Total amount of the order. | Float | Required |
» order_items | Details about the ordered items. | Array(Object) | Required |
» applied_promotions | Information about applied promos. | Array(Object) | Required |
» cutlery_requested | Boolean value to indicate whether the customer requests cutlery. | Boolean | Optional |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» takeaway_charges | Take-away charges of the order. | Float | Required |
» created_at | The date and time at which order is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Order Completed Event
Code Sample
{
"header": {
"event_name": "gofood.order.completed",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "COMPLETED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Triggered when the order has been completed. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Order Completed Event - Header Parameters
Code Sample
{
"event_name": "gofood.order.completed",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.completed |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Order Completed Event - Body Parameters
Code Sample
{
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "COMPLETED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"applied_promotions": [
{
"scope": "sku",
"detail": {
"item": {
"id": "e91a3493-71c2-4ceb-9d87-4ab7794aab72",
"external_id": "F789315F-3ECA-4D31-983C-62ADD8E8325F"
},
"id": "b688aba2-ba96-4ed1-a241-56cedc7f022d"
}
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
customer | Information about the customer. | Object | Required |
» id | ID of the customer. | String | Required |
» name | Customer name. | String | Required |
driver | Information about the driver. | Object | Required |
» name | Name of the driver. | String | Required |
service_type | Type of GoFood order. Possible Values: gofood , gofood_pickup |
String | Required |
outlet | Details of the outlet. | Object | Required |
» id | ID of the outlet on GoBiz side. | String | Required |
» external_outlet_id | ID of the outlet on partner side. | String | Required |
order | Details of the order. | Object | Required |
» status | Status of the order. Value: COMPLETED |
String | Required |
» pin | Personal Identification Number for the verification of driver. | String | Required |
» order_number | Order number of the order. | String | Required |
» order_total | Total amount of the order. | Float | Required |
» order_items | Details about the ordered items. | Array(Object) | Required |
» applied_promotions | Information about applied promos. | Array(Object) | Required |
» cutlery_requested | Boolean value to indicate whether the customer requests cutlery. | Boolean | Optional |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» takeaway_charges | Take-away charges of the order. | Float | Required |
» created_at | The date and time at which order is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Order Cancelled Event
Code Sample
{
"header": {
"event_name": "gofood.order.cancelled",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "CANCELLED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
}
Triggered when the order got cancelled. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Order Cancelled Event - Header Parameters
Code Sample
{
"event_name": "gofood.order.cancelled",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.cancelled |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Order Cancelled Event - Body Parameters
Code Sample
{
"customer": {
"id": "536D5047BBBC0D5C7A51437C28CABCDE",
"name": "GoFood Customer"
},
"driver": {
"name": "GoFood Driver"
},
"service_type": "gofood",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"order": {
"status": "CANCELLED",
"pin": "1234",
"order_number": "F-123456789",
"order_total": 4.0e4,
"order_items": [
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
],
"applied_promotions": [
{
"scope": "sku",
"detail": {
"item": {
"id": "e91a3493-71c2-4ceb-9d87-4ab7794aab72",
"external_id": "F789315F-3ECA-4D31-983C-62ADD8E8325F"
},
"id": "b688aba2-ba96-4ed1-a241-56cedc7f022d"
}
}
],
"cutlery_requested": true,
"currency": "IDR",
"takeaway_charges": 0,
"created_at": "2019-08-24T14:15:22Z"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
customer | Information about the customer. | Object | Required |
» id | ID of the customer. | String | Required |
» name | Customer name. | String | Required |
driver | Information about the driver. | Object | Required |
» name | Name of the driver. | String | Required |
service_type | Type of GoFood order. Possible Values: gofood , gofood_pickup |
String | Required |
outlet | Details of the outlet. | Object | Required |
» id | ID of the outlet on GoBiz side. | String | Required |
» external_outlet_id | ID of the outlet on partner side. | String | Required |
order | Details of the order. | Object | Required |
» status | Status of the order. Value: CANCELLED |
String | Required |
» pin | Personal Identification Number for the verification of driver. | String | Required |
» order_number | Order number of the order. | String | Required |
» order_total | Total amount of the order. | Float | Required |
» order_items | Details about the ordered items. | Array(Object) | Required |
» applied_promotions | Information about applied promos. | Array(Object) | Required |
» cutlery_requested | Boolean value to indicate whether the customer requests cutlery. | Boolean | Optional |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» takeaway_charges | Take-away charges of the order. | Float | Required |
» created_at | The date and time at which order is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Order Webhook Error Event
Code Sample
{
"body": {
"error_type": "mapping_not_found",
"mapping_not_found": {
"items": [],
"variants": [{
"name": "Paha atas"
}, {
"name": "Paha bawah"
}]
},
"order": {
"number": "F-12345678"
},
"outlet": {
"external_outlet_id": "external-outlet-id",
"id": "G12345678"
}
},
"header": {
"event_type": "gofood.order.webhook_error",
"event_id": "67235bd0-c963-4c32-aca1-27a52ec963e5",
"version": 1,
"timestamp": "2023-03-29T14:15:22Z"
}
}
There’s a possibility that the normal GoFood order webhook can’t be sent due to unmet requirements (e.g. missing menu mapping). When that happened, this webhook will be sent instead.
This event triggered to notify partners when that case happened. Due to the nature of the internet network, there is no guarantee that the event will only be sent exactly once (e.g retry due to intermitten network). Thus, there might be a event duplication, and receiving end needs to be able to handle the duplication.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Webhook Error Event - Header Parameters
Code Sample
{
"event_type": "gofood.order.webhook_error",
"event_id": "67235bd0-c963-4c32-aca1-27a52ec963e5",
"version": 1,
"timestamp": "2023-03-29T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.order.webhook_error |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which the event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Webhook Error Event - Body Parameters
Code Sample
{
"error_type": "mapping_not_found",
"mapping_not_found": {
"items": [{
"name": "Fried chicken"
}],
"variants": [{
"name": "Paha atas"
},
{
"name": "Paha bawah"
}
]
},
"order": {
"number": "F-12345678"
},
"outlet": {
"external_outlet_id": "external-outlet-id",
"id": "G12345678"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
error_type | Indicating what kind of error causing webhook to be not sent. Values: mapping_not_found . |
String | Required |
order | Information about related failing order webhook. | Object | Required |
» number | Order number. | String | Required |
outlet | Information about related outlet. | Object | Required |
» id | GoBiz Outlet identifier. | String | Required |
» external_outlet_id | Partner’s outlet identifier. | String | Optional |
mapping_not_found | More information about related error. In this case this field is required when error_type is mapping_not_found . |
Object | Required |
» items | Information about missing mappings of items. | Array | Required |
» [] » name | Information about missing item name. | String | Required |
» variants | Information about missing mappings of variants. | Array | Required |
» [] » name | Information about missing variant name. | Required | Required |
GoFood Catalog Menu Mapping Event
Code Sample
{
"header": {
"event_name": "gofood.catalog.menu_mapping_updated",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"request_id": "string",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"menus": [
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc9",
"external_menu_id": "sample-abc-12345"
}
]
}
}
This event is triggered when the previous Menu Catalog Update process has been completed.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
GoFood Catalog Menu Mapping Event - Header Parameters
Code Sample
{
"event_name": "gofood.catalog.menu_mapping_updated",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: gofood.catalog.menu_mapping_updated |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
GoFood Catalog Menu Mapping Event - Body Parameters
Code Sample
{
"request_id": "string",
"outlet": {
"id": "G123456789",
"external_outlet_id": "outlet01"
},
"menus": [
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc9",
"external_menu_id": "sample-abc-12345"
}
]
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
request_id | ID of the request. | String | Required |
outlet | Details of the outlet. | Object | Required |
»id | ID of an outlet on GoBiz side. | String | Required |
»external_outlet_id | ID of an outlet on partner side. | String | Required |
menus | Details of the menu. | Array(Object) | Required |
»id | ID of the menu on GoBiz side. | String | Required |
»external_menu_id | ID of the menu on partner side. | String | Required |
Transaction Settlement Event
Code Sample
{
"header": {
"event_name": "payment.transaction.settlement",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
},
"body": {
"outlet": {
"id": "G123456789"
},
"transaction": {
"id": "string",
"order_id": "string",
"settlement_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"currency": "IDR",
"gross_amount": 0,
"payment_type": "qris",
"status": "settlement",
"terminal_label": "string"
}
}
}
Triggered when the transaction got settled.
JSON Attribute | Description | Type | Required |
---|---|---|---|
header | Details of the header object. |
Object | Required |
body | Details of the body object. |
Object | Required |
Transaction Settlement Event - Header Parameters
Code Sample
{
"event_name": "payment.transaction.settlement",
"event_id": "c1be7fa1-645e-3d57-9ca3-f2cb54212345",
"version": 1,
"timestamp": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
event_name | Name of the event. Value: payment.transaction.settlement |
String | Required |
event_id | ID of the event. | String | Required |
version | Data structure version of the body parameter. |
Integer | Required |
timestamp | The date and time at which event occurred. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
Transaction Settlement Event - Body Parameters
Code Sample
{
"outlet": {
"id": "G123456789"
},
"transaction": {
"id": "string",
"order_id": "string",
"settlement_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"currency": "IDR",
"gross_amount": 0,
"payment_type": "qris",
"status": "settlement",
"terminal_label": "string"
}
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
outlet | Information about an outlet. | Object | Required |
» id | ID of an outlet. | String | Required |
transaction | Details of the transaction. | Object | Required |
» id | ID of the transaction. | String | Required |
» order_id | ID of the order. | String | Required |
» settlement_at | The date and time at which transaction is successful. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
» created_at | The date and time at which transaction is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String | Required |
» currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
» gross_amount | Total amount of the transaction in IDR. | Integer | Required |
» payment_type | Type of payment method used. Value: QRIS |
String | Required |
» status | Status of the request. Value: settlement |
String | Required |
Objects
Subscriptions
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"event": "gofood.order.driver_arrived",
"url": "https://sample-endpoint.com/notifications",
"active": true,
"created_at": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the subscription. | String(UUID) |
event | Type of event notification to subscribe. Note: For the list of available events, refer Events List. |
String |
url | URL at which notification is received. | String(uri) |
active | Status of the subscription. | Boolean |
created_at | The date and time at which subscription is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String |
Transaction Details
{
"order_id": "order-1234",
"gross_amount": 3000,
"currency": "IDR"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
order_id | Order ID of the transaction. Note: Allowed symbols are hyphen(-), underscore(_), tilde(~), and dot(.) |
String | Required |
gross_amount | Total amount of the transaction in IDR. Note: Decimal values are not supported. |
Integer | Required |
currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String | Required |
Customer Details
{
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"phone": "+628111000123"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
first_name | First name of the customer. | String | Optional |
last_name | Last name of the customer. | String | Optional |
Email address of the customer. | String | Optional | |
phone | Phone number of the customer. | String | Optional |
Item Details
{
"id": "SKU-000123",
"price": 3000,
"quantity": 1,
"name": "Item sample no.1",
"brand": "sample brand",
"category": "others"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
id | ID of the item. | String | Optional |
price | Price of the item in IDR. Note: Decimal values are not supported. |
Integer | Required |
quantity | Quantity of the item. | Integer | Required |
name | Name of the item. | String | Required |
brand | Brand of the item. | String | Optional |
category | Category of the item. | String | Optional |
Outlet
{
"id": "G000012345",
"pop_id": "fa6082ea-06da-4483-9c7e-eeb0447ed53e"
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
id | ID of your outlet. | String | Required |
pop_id | ID of the POP machine, given by GoBiz. | String | Required |
Transaction - Response
{
"id": "71839e9c-944b-40ce-bd31-8a76db666f36",
"payment_type": "qris",
"status": "pending",
"qris_string": "00020101021226610014COM.GO-JEK.WWW01189360091430438058080210G7641517890303UMI51440014ID.CO.QRIS.WWW0215ID10190450190010303UMI5204581253033605802ID5907Circlek6015Bandung deket r61054025762470703A015036c98a2234-f6d1-46f6-91d3-2597ee7863bc5406122.0063044447",
"order_id": "order-1234",
"gross_amount": 3000,
"currency": "IDR",
"created_at": "2020-03-09T11:33:08Z",
"settlement_at": null
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the transaction. | String(UUID) |
payment_type | Mode of the payment. Value: qris |
String |
status | Status of the request. Possible Values: Pending , Settlement |
String |
qris_string | QR data to display the QR image on customer side. | String |
order_id | Order ID of the transaction. Note: Allowed symbols are hyphen(-), underscore(_), tilde(~), and dot(.) |
String |
gross_amount | Total amount of the transaction in IDR. | String |
currency | Three-letter alphabetic currency code as per ISO-4217 format. Value: IDR |
String |
created_at | The date and time at which transaction is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String |
settlement_at | The date and time at which transaction is successful. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String |
Actions
{
"name": "generate-qr-code",
"method": "GET",
"url": "https://api.sandbox.gobiz.co.id/transactions/71839e9c-944b-40ce-bd31-8a76db666f36/qr-code"
}
JSON Attribute | Description | Type |
---|---|---|
name | Name of the action that can be performed on transaction. Value: generate-qr-code |
String |
method | HTTP method used to perform the action. Value: GET |
String |
url | URL at which QR image is received. | String |
Payment Transaction - Failed Response
{
"message_title": "Not found",
"message": "Transaction not found"
}
JSON Attribute | Description | Type |
---|---|---|
message_title | Title of the error message. | String |
message | Description of the error message. | String |
Create Promotion Request
{
"start_date": "2020-09-04",
"end_date": "2020-09-04",
"selling_price": 2500,
"percentage_discount": 25,
"external_menu_id": "external-menu-id",
"start_time": "14:25:00",
"end_time": "14:55:00",
"applicable_days": ["monday", "sunday"]
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
start_date | Start date of the promotion. Format: YYYY-MM-DD. | String | Required |
end_date | Last date of the promotion. Format: YYYY-MM-DD. | String | Required |
selling_price | Selling price of the item in IDR. Note: Decimal values are not supported. |
Integer | Optional |
external_menu_id | ID of the menu item on the partner side. | String | Required |
start_time | Start time of the promotion. Format: HH:mm:ss. | String | Optional |
percentage_discount | Discount percentage of the item. | Integer | Optional |
end_time | End time of the promotion. Format: HH:mm:ss. | String | Optional |
applicable_days | List of promotion applicable days. Format: Day name in english. | Array(String) | Optional |
Create Promotion Detail Response
{
"success":
[
{
"id": "promotion_id",
"external_menu_id": "external-menu-id",
"errors": null
}
],
"failure":
[
{
"id": null,
"external_menu_id": "external-menu-id",
"errors": "Item is not active"
}
]
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the promotion. Note: Value is null if response fails. |
String |
external_menu_id | ID of the menu item on the partner side. | String |
errors | Details of the error. Note: Value is null if response is successful. |
String |
Promotions
{
"start_date": "2020-09-04",
"end_date": "2020-09-04",
"status": "created",
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8"
}
JSON Attribute | Description | Type |
---|---|---|
start_date | Start date of the promotion. Format: YYYY-MM-DD | String |
end_date | Last date of the promotion. Format: YYYY-MM-DD. | String |
status | Current status of the promotion. Possible values: created , activated , deactivated , deleted , completed |
String |
id | ID of the promotion. | String(UUID) |
SKU Promotion Detail
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"start_date": "2020-09-04",
"end_date": "2020-09-04",
"start_time": "14:25:00",
"end_time": "14:55:00",
"status": "activated",
"promo_type": "sku_promo",
"details":
{
"menu_item":
{
"id": "45ba745f-745e-4568-ad68-c0c8e9ba8dc8",
"external_menu_id": "external-menu-id",
"name": "Kopi",
"price": 4500,
"discounted_price": 2500,
}
},
"applicable_days" : ["sunday", "monday"]
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the promotion. | String(UUID) |
start_date | Start date of the promotion. Format: YYYY-MM-DD. | String |
end_date | Last date of the promotion. Format: YYYY-MM-DD | String |
status | Status of the promotion. Possible values: created , activated , deactivated , completed |
String |
promo_type | Type of the promotion. Value: sku_promo |
String |
details | Details of the menu item. | Object |
» menu_item | Menu item object. | Object |
end_time | End time of the promotion. Format: HH:mm:ss. | String |
applicable_days | List of promotion applicable days. Format: Day name in english. | Array(String) |
Menu Item - SKU Promotion
{
"id": "96f614f6-745e-47f5-ad68-c0c8e9ba8dc8",
"external_menu_id": "external-menu-id",
"name": "Kopi",
"price": 4500,
"discounted_price": 2500
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the menu item on GoBiz side. | String |
external_menu_id | ID of the menu item on the partner side. | String |
name | Name of the menu item to be displayed. | String |
price | Price of the menu item in IDR. Note: Decimal values are not supported. |
Integer |
discounted_price | Price of the menu item after applying a promotion. Note: Decimal values are not supported. |
Integer |
Get All Outlets - Response
{
"id": "G000012345",
"external_outlet_id": "sample-abc-12345",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of an outlet on GoBiz side. | String |
external_outlet_id | ID of an outlet on the partner side. | String |
created_at | The date and time at which outlet is registered. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String |
updated_at | The date and time at which information about an outlet (external_outlet_id ) is last modified. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). |
String |
Linked Outlet - Response
{
"id": "G000012345",
"external_outlet_id": "sample-abc-12345",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"linked_at": "2019-08-24T14:15:22Z"
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of an outlet on GoBiz side. | String |
external_outlet_id | ID of an outlet on the partner side. | String |
created_at | The date and time at which outlet is linked. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String |
updated_at | The date and time at which information about an outlet (external_outlet_id ) is last modified. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). |
String |
linked_at | The date and time at which outlet is linked. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS±hh:mm). | String |
Order Items
{
"quantity": 1,
"price": 1.5e4,
"notes": "pedas",
"name": "Hamburger",
"id": "e44495da-ebc2-493a-913a-b10d3a123456",
"external_id": "1773640",
"variants": [
{
"id": "e44495da-ebc2-493a-913a-b10d3a654321",
"name": "Hamburger keju",
"external_id": "11223344"
}
]
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
quantity | Quantity of the ordered item. | Integer | Required |
price | Price of the item. | Float | Required |
notes | Additional information about the order. | String | Required |
name | Name of the ordered item. | String | Required |
id | ID of the ordered item on GoBiz side. | String | Required |
external_id | ID of the ordered item on partner side. | String | Optional |
variants | Details about the variants. | Array(Object) | Optional |
» id | ID of the variant on GoBiz side. | String | Required |
» name | Name of the variant. | String | Required |
» external_id | ID of the variant on partner side. | String | Optional |
Menu Items
{
"description": "string",
"external_id": "string",
"image": "string",
"in_stock": true,
"name": "string",
"operational_hours":
{
"sunday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"monday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"tuesday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"wednesday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"thursday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"friday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"saturday":
[
{
"start": "10:00",
"end": "22:30"
}
]
},
"variant_category_external_ids":
[
"string"
],
"price": 0
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
description | Description of the menu item. Maximum limit: 250 characters | String | Optional |
external_id | ID of the menu item on the partner side. Maximum limit: 200 characters | String | Required |
image | URL of the image of the menu item. The image is in jpeg/png format. | String(URI) | Optional |
in_stock | Status indicating whether the menu item is in stock or not. The default value is true . Note: If the value is false , the menu item is out of stock. |
Boolean | Optional |
name | Name of the menu item. Maximum limit: 150 characters | String | Required |
operational_hours | Daily availability hours of the menu item. | Object | Optional |
variant_category_external_ids | Array of variant category IDs on the partner side. | Array(String) | Optional |
price | Price of the menu item in IDR. Note: The minimum value is -2.000.000 IDR and the maximum value is 2.000.000 IDR. Decimal values are not supported. | Integer | Required |
Operational Hours
{
"sunday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"monday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"tuesday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"wednesday": [
{
"start": "10:00",
"end": "22:30"
}
],
"thursday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"friday":
[
{
"start": "10:00",
"end": "22:30"
}
],
"saturday":
[
{
"start": "10:00",
"end": "22:30"
}
]
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
sunday | First day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
monday | Second day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
tuesday | Third day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
wednesday | Fourth day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
thursday | Fifth day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
friday | Sixth day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
saturday | Last day of the week. | Array(Object) | Optional |
» start | The time of the day from which the menu item is available. Format: HH:MM (24-hour) | String | Required |
» end | The time of the day until which the menu item is available. Format: HH:MM (24-hour) | String | Required |
Variant Categories
{
"external_id": "external-menu-id",
"internal_name": "string",
"name": "external-menu-id",
"rules":
{
"selection":
{
"max_quantity": 1,
"min_quantity": 0
}
},
"variants":
[
{
"external_id": "external-menu-id",
"in_stock": true,
"name": "string",
"price": -2000000
}
]
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
external_id | ID of the variant category on the partner side. Maximum limit: 200 characters | String | Required |
internal_name | Variant category identifier to be shown in the GoBiz application. Maximum limit: 200 characters | String | Optional |
name | Name of the variant category to be displayed on the Gojek application. Maximum limit: 50 characters | String | Optional |
rules | Rules for selection of the variant category. | Object | Optional |
» selection | Object to select maximum and minimum quantity of the variant category. | Object | Optional |
»» max_quantity | Maximum quantity of the variant category. | Integer | Optional |
»» min_quantity | Minimum quantity of the variant category. | Integer | Optional |
variants | Array of variants object. | Array(Object) | Optional |
Variants
{
"external_id": "external-menu-id",
"in_stock": true,
"name": "string",
"price": -2000000
}
JSON Attribute | Description | Type | Required |
---|---|---|---|
external_id | ID of the variant on the partner side. Maximum limit: 200 characters | String | Optional |
in_stock | Status indicating whether the variant is in stock or not. The default value is true .Note: If the value is false , the variant is out of stock. |
Boolean | Optional |
name | Name of the variant. Maximum limit: 50 characters | String | Optional |
price | The price of the variant. This price is added to the price of the menu item. Note: The minimum value is -2.000.000 IDR and the maximum value is 2.000.000 IDR. Decimal values are not supported. | Integer | Optional |
Authenticated Outlet
{
"id": "string",
"name": "string",
"address": "string",
"email": "string",
"phone": "string"
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the authenticated outlet. | String |
name | Name of the outlet. | String |
address | Location of the outlet. | String |
Registered email address of the outlet. | String | |
phone | Contact number of the outlet. | String |
Outlet Information
{
"id": "G916309315",
"merchant_name": "Name",
"name": "Name",
"status": "active",
"email": "user@example.com",
"payment_settings":
{
"gopay":
{
"active": true
},
"qris":
{
"active": true
}
},
"applications":
{
"midtrans":
{
"active": true
},
"gopay":
{
"active": true
}
}
}
JSON Attribute | Description | Type |
---|---|---|
id | ID of the outlet to be linked. | String |
merchant_name | Name of the outlet. Please note, this field is deprecated. | String |
name | Name of the outlet. | String |
status | Status of the outlet. | String |
Registered email address of the outlet. | String | |
payment_settings | Modes of payment supported by the outlet. | Object |
applications | Applications that the outlet uses for payment. | Object |
Payment Settings
{
"gopay":
{
"active": true
},
"qris":
{
"active": true
}
}
JSON Attribute | Description | Type |
---|---|---|
gopay | Mode of payment. | Object |
» active | Status of GoPay. | Boolean |
qris | Mode of payment. | Object |
» active | Status of QRIS. | Boolean |
Applications
{
"midtrans":
{
"active": true
},
"gopay":
{
"active": true
}
}
JSON Attribute | Description | Type |
---|---|---|
midtrans | Payment application. | Object |
» active | Status of Midtrans. | Boolean |
gopay | Payment application. | Object |
» active | Status of GoPay. | Boolean |
Notifications
{
"entity_id": "F-704173354",
"created_at": "2023-05-03T16:11:50.446+00:00",
"partner_id": "c5fbc785-629a-463f-b6f9-da1106a29fa1",
"event_type": "gofood.order.merchant_accepted",
"delivery_status": "dead",
"endpoint": "https://webhook.site/5b8922ed-b310-456c-8ea2-9d7a0a9ba0f0",
"headers": {
"X-Go-Signature": "1158ebcb7e821406f0b4993a504d6d561177c494662dad890d651f94f3f08216",
"X-Go-Idempotency-Key": "446cb8ae-8fe3-3c2c-9e9f-c677f37c5e5c",
"Content-Type": "application/json",
"Accept": "application/json"
},
"payload": "stringified JSON of notification payload",
"history": [
{
"time": "2023-05-03T16:11:50.446+00:00",
"exception_message": "URL not found",
"delivered": false
},
{
"time": "2023-05-03T16:15:50.446+00:00",
"exception_message": "URL not found",
"delivered": false
},
{
"time": "2023-05-03T16:19:50.446+00:00",
"exception_message": "URL not found",
"delivered": false
},
{
"time": "2023-05-03T16:19:50.446+00:00",
"exception_message": "Failed after automatic attempts.",
"delivered": false
}
]
}
JSON Attribute | Description | Type |
---|---|---|
entity_id | ID of the notification’s entity. | String |
created_at | The date and time at which notification is created. It is in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ ) |
String |
partner_id | Your identification number as our partner. | String(UUID) |
event_type | Type of event notification. Note: For the list of available events, refer Events List. |
String |
delivery_status | Status of the notification delivery. Available states are: queue , working , complete , failed , and dead . |
String |
endpoint | URL at which notification is received. | String(URI) |
headers | Contains the API request header metadata of the notification being sent. | Object |
payload | The actual payload of the notification being sent. | String(JSON) |
history | Historical delivery states of the notification. You can use this to trace each notification’s delivery. | Array(object) |
Errors - 404/406/415
Errors 415/406 Unsupported Accept Type
{
"errors": [
{
"message_title": "UnsupportedAcceptType",
"message": "Invalid Accept header: application/vnd.eim.v0+json"
}
]
}
Errors 404 Unregistered Outlet
{
"errors": [
{
"message_title": "Requested resource not found",
"message": "The outlet is not yet registered for integration. Please contact the support team."
}
]
}
Errors 404 Outlet Not Found
{
"errors": [
{
"message_title": "Not found",
"message": "Outlet with id: de829e5b-72a5-49bc-a5f3-f0d83edb9daf is not found"
}
]
}
JSON Attribute | Description | Type |
---|---|---|
message_title | Title of the error message. | String |
message | Description of the error message. | String |
Errors - 401 - Unauthorized
{
"errors": [
{
"code": "HTTP_401",
"message": "Your session is expired. Please login again.",
"message_title": "Session Expired",
"message_severity": "error"
}
]
}
JSON Attribute | Description | Type |
---|---|---|
code | HTTP error code. | String |
message_title | Title of the error message. | String |
message | Description of the error message. | String |
message_severity | Severity of the error. | String |