curl --request PUT \
--url https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"price": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"vat_price_behavior": "<string>",
"tax_settings": [
"<unknown>"
],
"tax_configuration": {}
}{
"message": "<string>",
"errors": {}
}Change a price
Changes the name or amount of an existing item price.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/stockables/{stockable}/prices/{price}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"price": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"vat_price_behavior": "<string>",
"tax_settings": [
"<unknown>"
],
"tax_configuration": {}
}{
"message": "<string>",
"errors": {}
}variant_prices.update, bundle_prices.update
Conditions
- The permission depends on the type of item: variant_prices.update or bundle_prices.update.
- The new name must stay unique among the company’s prices of the same unit; the price amount must stay unique among the company’s prices of the item.
- The price is a decimal in major units, at least 0, with at most currency_exponent decimals.
- When the amount, tax_settings or vat_price_behavior changes, the resulting tax setup must allow the price to be calculated. A plain rename is accepted even when the tax configuration is currently broken.
- When tax_settings is sent it replaces the stored inclusion settings of the price; when vat_price_behavior is sent it rewrites the setting of the item’s VAT tax.
- Stored settings that no longer apply are kept when tax_settings is not resent.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the sellable item (stockable): the stockable record of a product variant or of a bundle, not the variant or bundle identifier itself.
Identifier of the price, which must belong to the item in the URL and to the caller's company.
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: vat_price_behavior, tax_settings, tax_configuration, id, name, stockable_id, stockable_unit_id, price, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .
Response
Resource (only with response=resource).
Identifier of the price (27-character KSUID string).
Name of the price, for example retail; stored in lower case and unique per unit for the company.
Identifier of the item the price belongs to.
Identifier of the unit of sale the price applies to.
Selling price in major units (stored internally in minor units and divided by 10 to the power currency_exponent).
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
inclusive when the price includes VAT, exclusive when VAT is added on top. exclusive when no VAT setting is stored for the price.
Explicit tax inclusion settings of the price: a list of objects with tax_id and inclusion_policy (inclusive or exclusive). Taxes without a setting use their default inclusion policy.
Resolved tax calculation context of the price (tax_resolution, rounding_favor, taxes, inapplicable_tax_settings, calculation_error); fixed tax amounts in major units. Only present when the request sends include_tax_configuration=true.