All URIs are relative to https://partner-api.stg-myteksi.com/grabfood-sandbox
Method | HTTP request | Description |
---|---|---|
EditOrder | Put /partner/v1/orders/{orderID} | Edit Order |
EditOrder(ctx, orderID).ContentType(contentType).Authorization(authorization).EditOrderRequest(editOrderRequest).Execute()
Edit Order
package main
import (
"context"
"fmt"
"os"
grabfood "github.com/grab/grabfood-api-sdk-go"
)
func main() {
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.
authorization := "Bearer <ACCESS_TOKEN_HERE>" // string | Specify the generated authorization token of the bearer type.
orderID := "orderID_example" // string |
editOrderRequest := *grabfood.NewEditOrderRequest("123-CYNKLPCVRN5", []grabfood.EditOrderItem{*grabfood.NewEditOrderItem("IDGFSTI000004qy1490868132306763533", "UPDATED")}) // EditOrderRequest |
configuration := grabfood.NewConfiguration()
apiClient := grabfood.NewAPIClient(configuration)
r, err := apiClient.EditOrderAPI.EditOrder(context.Background(), orderID).ContentType(contentType).Authorization(authorization).EditOrderRequest(editOrderRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EditOrderAPI.EditOrder``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orderID | string |
Other parameters are passed through a pointer to a apiEditOrderRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
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. | |
authorization | string | Specify the generated authorization token of the bearer type. |
editOrderRequest | EditOrderRequest | |
(empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]