currencies

Store a new currency

Creates a new currency. The data required can be submitted as a JSON body or as a list of parameters.

post/v1/currencies

Headers

X-Trace-Idstring uuid
Example:40c71bbb-c676-4f24-83cf-cc725d7d7a00

Unique identifier associated with this request.

Request body

enabledboolean

Defaults to true

primaryboolean

Make this currency the primary currency for the current administration. You can set this value to FALSE, in which case nothing will change to the primary currency. If you set it to TRUE, the current primary currency will no longer be the primary currency.

codestring string required
namestring string required
symbolstring string required
decimal_placesinteger

Supports 0-16 decimals.

Example request

{
  "enabled": true,
  "primary": true,
  "code": "AMS",
  "name": "Ankh-Morpork dollar",
  "symbol": "AM$",
  "decimal_places": 2
}

Response

New currency stored, result in response.

Changes

No recorded changes to this endpoint across all 1 revision of this API.