No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.1.3
- Package version: 1.0.1
- Generator version: 7.8.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://developer.grab.com
Python 3.7+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/grab/grabfood-api-sdk-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/grab/grabfood-api-sdk-python.git
)
Then import the package:
import grabfood
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import grabfood
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import grabfood
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.AcceptRejectOrderApi(api_client)
authorization = 'Bearer <ACCESS_TOKEN_HERE>' # str | Specify the generated authorization token of the bearer type.
content_type = 'application/json' # str | The content type of the request body. You must use `application/json` for this header as GrabFood API currently does not support other formats.
accept_order_request = grabfood.AcceptOrderRequest() # AcceptOrderRequest |
try:
# Manually accept/reject orders
api_instance.accept_reject_order(authorization, content_type, accept_order_request)
except ApiException as e:
print("Exception when calling AcceptRejectOrderApi->accept_reject_order: %s\n" % e)
All URIs are relative to https://partner-api.grab.com/grabfood-sandbox
Class | Method | HTTP request | Description |
---|---|---|---|
AcceptRejectOrderApi | accept_reject_order | POST /partner/v1/order/prepare | Manually accept/reject orders |
CancelOrderApi | cancel_order | PUT /partner/v1/order/cancel | Cancel an order |
CheckOrderCancelableApi | check_order_cancelable | GET /partner/v1/order/cancelable | Check order cancelable |
CreateCampaignApi | create_campaign | POST /partner/v1/campaigns | Create campaign |
CreateSelfServeJourneyApi | create_self_serve_journey | POST /partner/v1/self-serve/activation | Create self serve journey |
DeleteCampaignApi | delete_campaign | DELETE /partner/v1/campaigns/{campaign_id} | Delete campaigns |
EditOrderApi | edit_order | PUT /partner/v1/orders/{orderID} | Edit Order |
GetDineinVoucherApi | get_dinein_voucher | GET /partner/v1/dinein/voucher | Get Dine In Voucher |
GetOauthGrabApi | get_oauth_grab | POST /grabid/v1/oauth2/token | Get Oauth access token |
GetStoreHourApi | get_store_hour | GET /partner/v2/merchants/{merchantID}/store/hours | Get Store Hours |
GetStoreStatusApi | get_store_status | GET /partner/v1/merchants/{merchantID}/store/status | Get Store Status |
ListCampaignApi | list_campaign | GET /partner/v1/campaigns | List campaigns |
ListOrdersApi | list_orders | GET /partner/v1/orders | List orders |
MarkOrderReadyApi | mark_order_ready | POST /partner/v1/orders/mark | Mark order as ready |
NotifyMembershipWebviewApi | notify_membership_webview | POST /partner/v1/membership/notify | Notify Membership |
PauseStoreApi | pause_store | PUT /partner/v1/merchant/pause | Pause store |
RedeemDineinVoucherApi | redeem_dinein_voucher | POST /partner/v1/dinein/voucher/redeem | Redeem Dine In Voucher |
TraceMenuSyncApi | trace_menu_sync | GET /partner/v1/merchant/menu/trace | Trace menu sync |
UpdateCampaignApi | update_campaign | PUT /partner/v1/campaigns/{campaign_id} | Update campaign |
UpdateDeliveryStateApi | update_delivery_state | POST /partner/v1/order/delivery | Update delivery state |
UpdateMenuNotificationApi | update_menu_notification | POST /partner/v1/merchant/menu/notification | Notify Grab of updated menu |
UpdateMenuRecordApi | batch_update_menu | PUT /partner/v1/batch/menu | Batch Update Menu |
UpdateMenuRecordApi | update_menu | PUT /partner/v1/menu | Update menu record |
UpdateOrderReadyTimeApi | update_order_ready_time | PUT /partner/v1/order/readytime | Update new order ready time |
UpdateStoreDeliveryHourApi | update_store_delivery_hour | PUT /partner/v1/merchants/{merchantID}/store/opening-hours | Update Store Delivery Hours |
UpdateStoreDineInHourApi | update_store_dine_in_hour | PUT /partner/v1/merchants/{merchantID}/store/dine-in-hours | Update Store Dine-in Hours |
UpdateStoreSpecialHourApi | update_store_special_hour | PUT /partner/v2/merchants/{merchantID}/store/special-opening-hour | Update Store Special Hours |
- AcceptOrderRequest
- Address
- AdvancedPricing
- BatchUpdateMenuItem
- BatchUpdateMenuResponse
- BindMembershipNativeRequest
- BindMembershipNativeResponse
- Campaign
- CampaignConditions
- CampaignDiscount
- CampaignQuotas
- CampaignScope
- CancelCode
- CancelOrderLimitType
- CancelOrderRequest
- CancelOrderResponse
- CancelReason
- CheckOrderCancelableResponse
- Coordinates
- CreateCampaignRequest
- CreateCampaignResponse
- CreateSelfServeJourneyRequest
- CreateSelfServeJourneyRequestPartner
- CreateSelfServeJourneyResponse
- Currency
- DineIn
- EditOrderItem
- EditOrderRequest
- Error
- GetDineInVoucherResponse
- GetMembershipNativeResponse
- GetMembershipNativeResponsePointInfo
- GetMembershipRequest
- GetMembershipWebviewResponse
- GetMenuNewResponse
- GetMenuOldResponse
- GetRewardNativeRequest
- GetRewardNativeResponse
- GrabOauthRequest
- GrabOauthResponse
- ListCampaignResponse
- ListOrdersResponse
- MarkOrderRequest
- MenuCategory
- MenuEntity
- MenuEntityError
- MenuItem
- MenuModifier
- MenuSection
- MenuSectionCategory
- MenuSectionCategoryItem
- MenuSyncFail
- MenuSyncFailCategory
- MenuSyncFailItem
- MenuSyncFailModifier
- MenuSyncFailModifierGroup
- MenuSyncFailServiceHours
- MenuSyncResponse
- MenuSyncWebhookRequest
- ModifierGroup
- NewOrderTimeRequest
- NotifyMembershipWebviewRequest
- OpenPeriod
- Order
- OrderCampaign
- OrderDeliveryRequest
- OrderFeatureFlags
- OrderFreeItem
- OrderItem
- OrderItemModifier
- OrderPrice
- OrderPromo
- OrderReadyEstimation
- OrderStateRequest
- OutOfStockInstruction
- PartnerOauthRequest
- PartnerOauthResponse
- PauseStoreRequest
- Purchasability
- PushIntegrationStatusWebhookRequest
- Receiver
- RedeemDineInVoucherRequest
- RedeemDineInVoucherResponse
- RedeemResult
- RegisterMembershipNativeRequest
- RegisterMembershipNativeResponse
- RewardItem
- SellingTime
- ServiceHour
- ServiceHours
- SpecialOpeningHour
- SpecialOpeningHourMetadata
- SpecialOpeningHourOpeningHours
- StoreHour
- StoreHourResponse
- StoreStatusResponse
- SubmitOrderRequest
- UnbindMembershipNativeRequest
- UnlinkMembershipWebviewRequest
- UpdateAdvancedPricing
- UpdateCampaignRequest
- UpdateDeliveryHourRequest
- UpdateDeliveryHourResponse
- UpdateDineInHourRequest
- UpdateDineInHourResponse
- UpdateMenuItem
- UpdateMenuModifier
- UpdateMenuNotifRequest
- UpdateMenuRequest
- UpdatePurchasability
- UpdateSpecialHourRequest
- UpdateSpecialHourResponse
- Voucher
- VoucherDescriptionInfo
- WorkingHour
- WorkingHourDay
Endpoints do not require authorization.