All URIs are relative to https://partner-api.grab.com/grabfood-sandbox
Method | HTTP request | Description |
---|---|---|
GetStoreHour | Get /partner/v2/merchants/{merchantID}/store/hours | Get Store Hours |
StoreHourResponse GetStoreHour(ctx, merchantID).Authorization(authorization).Execute()
Get Store Hours
package main
import (
"context"
"fmt"
"os"
grabfood "github.com/grab/grabfood-api-sdk-go"
)
func main() {
authorization := "Bearer <ACCESS_TOKEN_HERE>" // string | Specify the generated authorization token of the bearer type.
merchantID := "1-CYNGRUNGSBCCC" // string | The merchant's ID that is in GrabFood's database.
configuration := grabfood.NewConfiguration()
apiClient := grabfood.NewAPIClient(configuration)
resp, r, err := apiClient.GetStoreHourAPI.GetStoreHour(context.Background(), merchantID).Authorization(authorization).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GetStoreHourAPI.GetStoreHour``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStoreHour`: StoreHourResponse
fmt.Fprintf(os.Stdout, "Response from `GetStoreHourAPI.GetStoreHour`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
merchantID | string | The merchant's ID that is in GrabFood's database. |
Other parameters are passed through a pointer to a apiGetStoreHourRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
authorization | string | Specify the generated authorization token of the bearer type. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]