Skip to content

Latest commit

 

History

History
70 lines (49 loc) · 2.51 KB

ListOrdersApi.md

File metadata and controls

70 lines (49 loc) · 2.51 KB

Grab\GrabfoodApiSdk\ListOrdersApi

All URIs are relative to https://partner-api.grab.com/grabfood-sandbox, except if the operation defines another base path.

Method HTTP request Description
listOrders() GET /partner/v1/orders List orders

listOrders()

listOrders($authorization, $merchant_id, $date, $page, $order_ids): \Grab\GrabfoodApiSdk\Model\ListOrdersResponse

List orders

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Grab\GrabfoodApiSdk\Api\ListOrdersApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$authorization = Bearer <ACCESS_TOKEN_HERE>; // string | Specify the generated authorization token of the bearer type.
$merchant_id = 1-CYNGRUNGSBCCC; // string | The merchant's ID that is in GrabFood's database.
$date = 'date_example'; // string
$page = 1; // int | Specify the page number for the report. Required if orderIDs is not provided.
$order_ids = ["123-CYNKLPCVRN5","456-PCVRN5CYNKL"]; // string[] | List of order IDs. If provided, date and page are not required.

try {
    $result = $apiInstance->listOrders($authorization, $merchant_id, $date, $page, $order_ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ListOrdersApi->listOrders: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
authorization string Specify the generated authorization token of the bearer type.
merchant_id string The merchant's ID that is in GrabFood's database.
date string [optional]
page int Specify the page number for the report. Required if orderIDs is not provided. [optional]
order_ids string[] List of order IDs. If provided, date and page are not required. [optional]

Return type

\Grab\GrabfoodApiSdk\Model\ListOrdersResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]