All URIs are relative to https://partner-api.grab.com/grabfood-sandbox
Method | HTTP request | Description |
---|---|---|
get_dinein_voucher | GET /partner/v1/dinein/voucher | Get Dine In Voucher |
GetDineInVoucherResponse get_dinein_voucher(authorization, merchant_id, voucher_code=voucher_code, certificate_id=certificate_id)
Get Dine In Voucher
import grabfood
from grabfood.models.get_dine_in_voucher_response import GetDineInVoucherResponse
from grabfood.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://partner-api.grab.com/grabfood-sandbox
# See configuration.py for a list of all supported configuration parameters.
configuration = grabfood.Configuration(
host = "https://partner-api.grab.com/grabfood-sandbox"
)
# Enter a context with an instance of the API client
with grabfood.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = grabfood.GetDineinVoucherApi(api_client)
authorization = 'Bearer <ACCESS_TOKEN_HERE>' # str | Specify the generated authorization token of the bearer type.
merchant_id = 'merchant_id_example' # str |
voucher_code = 'voucher_code_example' # str | A short code for the dine-in voucher purchased by the user. Required if `certificateID` is not specified. (optional)
certificate_id = 'certificate_id_example' # str | This certificateID is decoded from scanning the QR code, and 1:1 mapping with voucherCode. Required if `voucherCode` is not specified. (optional)
try:
# Get Dine In Voucher
api_response = api_instance.get_dinein_voucher(authorization, merchant_id, voucher_code=voucher_code, certificate_id=certificate_id)
print("The response of GetDineinVoucherApi->get_dinein_voucher:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling GetDineinVoucherApi->get_dinein_voucher: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
authorization | str | Specify the generated authorization token of the bearer type. | |
merchant_id | str | ||
voucher_code | str | A short code for the dine-in voucher purchased by the user. Required if `certificateID` is not specified. | [optional] |
certificate_id | str | This certificateID is decoded from scanning the QR code, and 1:1 mapping with voucherCode. Required if `voucherCode` is not specified. | [optional] |
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 |
[Back to top] [Back to API list] [Back to Model list] [Back to README]