All URIs are relative to https://partner-api.grab.com/grabfood-sandbox
| Method | HTTP request | Description |
|---|---|---|
| generateStoQrCode | GET /partner/v1/dinein/sto/qrcode | Generate STO QR code |
GenerateSTOQRCodeResponse generateStoQrCode(authorization, contentType, merchantID, qrType, tableNumber)
Generate STO QR code
// Import classes:
import com.grab.grabfood.client.ApiClient;
import com.grab.grabfood.client.ApiException;
import com.grab.grabfood.client.Configuration;
import com.grab.grabfood.client.models.*;
import com.grab.grabfood.client.api.GenerateStoQrCodeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://partner-api.grab.com/grabfood-sandbox");
GenerateStoQrCodeApi apiInstance = new GenerateStoQrCodeApi(defaultClient);
String authorization = "Bearer <ACCESS_TOKEN_HERE>"; // String | Specify the generated authorization token of the bearer type.
String contentType = "application/json"; // String | The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats.
String merchantID = "merchantID_example"; // String |
String qrType = "qrType_example"; // String |
String tableNumber = "tableNumber_example"; // String |
try {
GenerateSTOQRCodeResponse result = apiInstance.generateStoQrCode(authorization, contentType, merchantID, qrType, tableNumber);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling GenerateStoQrCodeApi#generateStoQrCode");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| authorization | String | Specify the generated authorization token of the bearer type. | |
| contentType | String | The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats. | |
| merchantID | String | ||
| qrType | String | ||
| tableNumber | String |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The API request is successfully processed. | - |
| 400 | invalid_argument | Code |
| 404 | not_found | Code |
| 500 | internal | Code |