PUT
Update a currency
Company space User accounts only For: Administrator · Permission: currencies.update Conditions
  • Agent accounts are refused.
  • Only the company’s own currencies can be changed; shared currencies are refused.
  • The resulting pair code and name (compared in uppercase, the currency itself excluded) must not already exist among the company’s own currencies.
  • Fields that are not sent keep their stored value.
Part of Company profile, settings and currencies.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

currencyId
string
required

Identifier of the currency to change (27-character KSUID string). It must be one of the company's own currencies.

Query Parameters

response
enum<string>
default:none

Response mode. Default none; none answers 204 No Content.

Available options:
none,
resource
fields
string

Comma-separated JSON keys of the root resource (id is always rendered). Available: id, exponent, code, name, company_id, created_at, updated_at.

include
string

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: .

Body

application/json
exponent
integer
required

Number of decimal places of the currency, an integer from 0 to 30 (0 for XOF). Required when creating; optional on update, where the stored value is kept when omitted.

Required range: 0 <= x <= 30
code
string
required

Three-character currency code; it is trimmed and stored in uppercase. Required when creating; optional on update. Together with name it must be unique among the company's own currencies.

Required string length: 3
name
string
required

Name of the currency, 3 to 120 characters; it is trimmed and stored in uppercase. Required when creating; optional on update. Together with code it must be unique among the company's own currencies.

Required string length: 3 - 120

Response

Resource (only with response=resource).

id

Identifier of the currency (27-character KSUID string).

exponent
integer

Number of decimal places of the currency (0 for XOF); an amount in minor units divided by 10 to this power gives the amount in the currency.

code

3-character currency code, stored in uppercase.

name

Name of the currency, stored in uppercase.

company_id

Identifier of the company the record belongs to.

created_at

Date and time the record was created (ISO 8601, UTC).

updated_at

Date and time the record was last changed (ISO 8601, UTC).