Update site attributes for items
PUT /v1/items/{id}/sites/{siteCode}
Updates the site/store-level attributes, such as availability and price, for a menu item that exists in the FoodStorm OMS.
For more information, see Sites.
Security
Name | In | Description |
---|---|---|
Authorization | header | Standard Authorization header using the Bearer scheme. Example: "bearer {token}" |
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | A unique identifier for this menu item, defined by the retailer. | |
siteCode | path | string | The code of the site this data relates to. |
Request
Field | Type | Required | Description |
---|---|---|---|
available | boolean | Whether the item is available at this site. | |
price | number | The price of the item at this site. | |
tax | Tax | The tax details for the adjustment. |
Tax Object
Field | Type | Required | Description |
---|---|---|---|
sales_tax | number | The sales tax for the item represented as a decimal percentage, such as 0.1 for 10%. |
Request Examples
- cURL
- Java
- Python
- Go
curl --request PUT \
--url 'https://connect.instacart.com/v1/items/{id}/sites/{siteCode}' \
--header 'Accept: application/json' \
--header 'Authorization: string' \
--header 'Content-Type: application/json' \
--data '{
"available": true,
"price": 1,
"tax": {
"sales_tax": 1
}
}'
HttpResponse<String> response = Unirest.put("https://connect.instacart.com/v1/items/{id}/sites/{siteCode}")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.header("Authorization", "string")
.body("{\n \"available\": true,\n \"price\": 1,\n \"tax\": {\n \"sales_tax\": 1\n }\n}")
.asString();
import http.client
conn = http.client.HTTPSConnection("connect.instacart.com")
payload = "{\n \"available\": true,\n \"price\": 1,\n \"tax\": {\n \"sales_tax\": 1\n }\n}"
headers = {
'Accept': "application/json",
'Content-Type': "application/json",
'Authorization': "string"
}
conn.request("PUT", "/v1/items/{id}/sites/{siteCode}", 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/v1/items/{id}/sites/{siteCode}"
payload := strings.NewReader("{\n \"available\": true,\n \"price\": 1,\n \"tax\": {\n \"sales_tax\": 1\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Accept", "application/json")
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "string")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Response Examples
200 Success
200
Request has been processed
{
// Empty
}
4XX Errors
Error responses return either a single error or multiple errors.
HTTP Code | Cause | Error Message | Error Code | Error Meta |
---|---|---|---|---|
400 | Item Category Not Found | "" | "" | Not applicable |
404 | Item not found | "" | "" | Not applicable |