Create or update vehicle information
PUT /v2/post_checkout/orders/{order_id}/pickup/vehicle_info
Creates or updates the information about the customer's vehicle, such as the model, color, and license plate. When the customer arrives for curbside pickup, retailer employees use the vehicle information to locate the customer and fulfill the order.
Security
Name | In | Description |
---|---|---|
Authorization | header | The Authorization header with the bearer token acquired during authentication. |
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
order_id | path | string | The order ID. |
Request
Field | Type | Required | Description |
---|---|---|---|
model | string | The vehicle's make/model. | |
vehicle_type | string | The vehicle's type. | |
license_plate | string | The vehicle's license plate number. | |
color | string | The vehicle's color. One of 'black', 'blue', 'brown', 'gray', 'green', 'yellow', 'orange', 'red', 'silver', or 'white'. |
Request examples
- cURL
- Java
- Python
- Go
curl --request PUT \
--url 'https://connect.instacart.com/v2/post_checkout/orders/{order_id}/pickup/vehicle_info' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "string",
"vehicle_type": "hatchback",
"license_plate": "string",
"color": "black"
}'
HttpResponse<String> response = Unirest.put("https://connect.instacart.com/v2/post_checkout/orders/{order_id}/pickup/vehicle_info")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "Bearer <token>")
.body("{\n \"model\": \"string\",\n \"vehicle_type\": \"hatchback\",\n \"license_plate\": \"string\",\n \"color\": \"black\"\n}")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
payload = "{\n \"model\": \"string\",\n \"vehicle_type\": \"hatchback\",\n \"license_plate\": \"string\",\n \"color\": \"black\"\n}"
headers = {
'Accept': "application/json",
'Content-Type': "application/json",
'Authorization': "Bearer <token>"
}
conn.request("PUT", "/v2/post_checkout/orders/{order_id}/pickup/vehicle_info", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://connect.instacart.com/v2/post_checkout/orders/{order_id}/pickup/vehicle_info"
payload := strings.NewReader("{\n \"model\": \"string\",\n \"vehicle_type\": \"hatchback\",\n \"license_plate\": \"string\",\n \"color\": \"black\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response
Field | Type | Required | Description |
---|---|---|---|
vehicle_info | VehicleInfo | The created/updated vehicle info. |
VehicleInfo Object
Field | Type | Required | Description |
---|---|---|---|
id | integer | The ID of the vehicle. | |
model | string | The model of the vehicle. | |
vehicle_type | string | The type of vehicle. | |
license_plate | string | The license plate of the vehicle. | |
color | string | The vehicle color. | |
color_hex | string | The vehicle color in hexadecimal. |
Response examples
200 Success
200
Vehicle created/updated
{
"vehicle_info": {
"id": 123,
"model": "SomeCarModel",
"vehicle_type": "sedan",
"license_plate": "F4K3L1C3NC3",
"color": "silver",
"color_hex": "#E8E8E8"
}
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
400 | Invalid params | "Pickup unavailable for non-pickup orders" | 4001 | Not applicable |
400 | Color is not valid | "is not included in the list" | 1001 | {"key":"color"} |
400 | Vehicle type is not valid | "is not included in the list" | 1001 | {"key":"vehicle_type"} |
404 | Order not found | "Resource not found" | 4000 | Not applicable |