Skip to content

Duplicate price list

POST
/rest/billing/price-lists/{id}/duplicate
curl --request POST \
--url https://api.shypr.app/rest/billing/price-lists/example/duplicate \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <X-API-KEY>' \
--data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example" }'

Creates a PriceList resource.

id
required
string

PriceList identifier

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
id
required
string format: uuid
name
required
string
<= 160 characters

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"name": "example"
}

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
name
string
isDefault

The list of a record in this currency when the customer has no list in it. At most one for each currency.

boolean
basePriceList

The list that gives the price of a product without a row in this list, minus the discount.

string | null format: iri-reference
discountPercentage

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
scale

The scale (number of digits after the decimal point) of this decimal number.

integer
sign
integer
unscaledValue

Returns the unscaled value of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
precision

Returns the number of significant digits in the number.

integer
integralPart

Returns the integral part of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
fractionalPart

Returns the fractional part of this decimal number.

object
scale

The scale (number of digits after the decimal point) of this decimal number.

integer
sign
integer
unscaledValue

Returns the unscaled value of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
precision

Returns the number of significant digits in the number.

integer
integralPart

Returns the integral part of this decimal number.

object
bitLength

Returns the number of bits in the minimal two’s-complement representation of this BigInteger, excluding a sign bit.

integer
lowestSetBit

Returns the index of the rightmost (lowest-order) one bit in this BigInteger.

integer | null
even

Returns whether this number is even.

boolean
odd

Returns whether this number is odd.

boolean
sign
integer
one
boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
fractionalPart
object recursive
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
zero

Checks if this number equals zero.

boolean
negative

Checks if this number is strictly negative.

boolean
negativeOrZero

Checks if this number is negative or zero.

boolean
positive

Checks if this number is strictly positive.

boolean
positiveOrZero

Checks if this number is positive or zero.

boolean
version

The edit counter.

integer
default: 1
currency

A list has one currency, one of the workspace. It does not change: the prices are in it.

object
currencyCode

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.

string
numericCode

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.

integer | null
name

The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.

string
defaultFractionDigits

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.

integer
currencyType

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
name
string
archivedAt
string | null format: date-time
creator
string format: iri-reference
createdAt
string format: date-time
updatedAt
string | null format: date-time
id

More information

string format: uuid
uid
string
notes
Array<string>
archived
boolean

Example

{
"isDefault": false,
"basePriceList": "https://example.com/",
"discountPercentage": 0,
"version": 1,
"creator": "https://example.com/",
"notes": [
"https://example.com/"
]
}

Invalid input

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

Forbidden

A representation of common errors.

object
title

A short, human-readable summary of the problem.

string | null
detail

A human-readable explanation specific to this occurrence of the problem.

string | null
status
integer | null
default: 400
instance

A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

string | null
type

A URI reference that identifies the problem type

string

Example

{
"status": 400
}

An error occurred

Unprocessable entity

object
status
integer
default: 422
violations
Array<object>
object
propertyPath
required

The property path of the violation

string
message
required

The message associated with the violation

string
code

The code of the violation

string
hint

An extra hint to understand the violation

string
payload

The serialized payload of the violation

object
key
additional properties
any
detail
string
type
string
title
string | null
instance
string | null

Example

{
"status": 422
}