Update price list
const url = 'https://api.shypr.app/rest/billing/price-lists/update';const options = { method: 'POST', headers: {'X-API-KEY': '<X-API-KEY>', 'Content-Type': 'application/json'}, body: '{"iri":"example","version":1,"name":"example","isDefault":false,"basePriceListId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","discountPercentage":0}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shypr.app/rest/billing/price-lists/update \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <X-API-KEY>' \ --data '{ "iri": "example", "version": 1, "name": "example", "isDefault": false, "basePriceListId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "discountPercentage": 0 }'Creates a PriceList resource.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The new PriceList resource
The prices of products for sales records in one currency. A new line takes its price from the list of the customer, else from the default list of the workspace, and keeps it: a later change of the list changes no record. It is never deleted, only archived (the generic archive and publish endpoints), and an archived list gives no prices.
A list with a base list gives the price of the base list minus its discount for a product without a row of its own: “Wholesale = Standard - 15%”. A base list has no base list itself.
object
The version that the client read ({@see PriceList::getVersion()}). An update fails with a 409 when the list has another version. Without it, the update does not check.
The list that gives the price of a product without a row in this list, minus the discount.
The percentage off the prices of the base list. Only with a base list.
The prices of products for sales records in one currency. A new line takes its price from the list of the customer, else from the default list of the workspace, and keeps it: a later change of the list changes no record. It is never deleted, only archived (the generic archive and publish endpoints), and an archived list gives no prices.
A list with a base list gives the price of the base list minus its discount for a product without a row of its own: “Wholesale = Standard - 15%”. A base list has no base list itself.
object
The version that the client read ({@see PriceList::getVersion()}). An update fails with a 409 when the list has another version. Without it, the update does not check.
The list that gives the price of a product without a row in this list, minus the discount.
The percentage off the prices of the base list. Only with a base list.
Responses
Section titled “Responses”PriceList resource created
The prices of products for sales records in one currency. A new line takes its price from the list of the customer, else from the default list of the workspace, and keeps it: a later change of the list changes no record. It is never deleted, only archived (the generic archive and publish endpoints), and an archived list gives no prices.
A list with a base list gives the price of the base list minus its discount for a product without a row of its own: “Wholesale = Standard - 15%”. A base list has no base list itself.
object
The list of a record in this currency when the customer has no list in it. At most one for each currency.
The list that gives the price of a product without a row in this list, minus the discount.
The percentage off the prices of the base list, from 0 to 100. The rows of this list get no discount: they are the prices of this list.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the fractional part of this decimal number.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
The edit counter.
A list has one currency, one of the workspace. It does not change: the prices are in it.
object
The currency code. For ISO currencies this will be the 3-letter uppercase ISO 4217 currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes.
The numeric currency code. For ISO currencies this will be the ISO 4217 numeric currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes. Set to null if the currency does not have a numeric code.
The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.
The default number of fraction digits (typical scale) used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it is 0. This cannot be a negative number.
The type of the currency. For ISO currencies, this indicates whether the currency is currently in use (IsoCurrent) or has been withdrawn (IsoHistorical). For non-ISO currencies defined by the application, the type is Custom.
object
Example
{ "isDefault": false, "basePriceList": "https://example.com/", "discountPercentage": 0, "version": 1, "creator": "https://example.com/", "notes": [ "https://example.com/" ]}The prices of products for sales records in one currency. A new line takes its price from the list of the customer, else from the default list of the workspace, and keeps it: a later change of the list changes no record. It is never deleted, only archived (the generic archive and publish endpoints), and an archived list gives no prices.
A list with a base list gives the price of the base list minus its discount for a product without a row of its own: “Wholesale = Standard - 15%”. A base list has no base list itself.
object
The list of a record in this currency when the customer has no list in it. At most one for each currency.
The list that gives the price of a product without a row in this list, minus the discount.
Example
https://example.com/The percentage off the prices of the base list, from 0 to 100. The rows of this list get no discount: they are the prices of this list.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the fractional part of this decimal number.
object
The scale (number of digits after the decimal point) of this decimal number.
Returns the unscaled value of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Returns the number of significant digits in the number.
Returns the integral part of this decimal number.
object
Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.
Returns the index of the rightmost (lowest-order) one bit in this BigInteger.
Returns whether this number is even.
Returns whether this number is odd.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
Checks if this number equals zero.
Checks if this number is strictly negative.
Checks if this number is negative or zero.
Checks if this number is strictly positive.
Checks if this number is positive or zero.
The edit counter.
A list has one currency, one of the workspace. It does not change: the prices are in it.
object
The currency code. For ISO currencies this will be the 3-letter uppercase ISO 4217 currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes.
The numeric currency code. For ISO currencies this will be the ISO 4217 numeric currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes. Set to null if the currency does not have a numeric code.
The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.
The default number of fraction digits (typical scale) used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it is 0. This cannot be a negative number.
The type of the currency. For ISO currencies, this indicates whether the currency is currently in use (IsoCurrent) or has been withdrawn (IsoHistorical). For non-ISO currencies defined by the application, the type is Custom.
object
Example
https://example.com/Invalid input
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}Forbidden
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}An error occurred
Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}