Skip to main content
POST
Create currency
  • Name and Code are required and must be unique within the company. Code is at most 5 characters.
  • SubunitName is the name of the currency subunit (e.g. KURUŞ) and is optional.
  • If IsDefault is true, the previous default currency loses the flag; a company has at most one default currency.

Error codes

Codes this endpoint can return. The general errors that apply to every endpoint (authentication, permissions, request headers, request limits) are not repeated here.

Authorizations

Authorization
string
header
required

Access token obtained from the Noyax auth service with your API key.

Headers

X-UserID
integer<int32>
required

ID of the Noyax user the request is made on behalf of. Written to the audit fields of created, updated and deleted records.

Required range: x >= 1
X-CompanyID
integer<int32>
required

ID of the company. The user must be assigned to this company. All reads and writes are limited to this company.

Required range: x >= 1
X-PeriodID
integer<int32>

ID of the accounting period. Optional; if sent, it is written to created records.

Required range: x >= 1

Body

Name
null | string
required

Required. Currency name, unique within the company. At most 50 characters.

Example:

"TÜRK LİRASI"

Code
null | string
required

Required. Short code of the currency, unique within the company. At most 5 characters.

Example:

"TRY"

SubunitName
null | string

Name of the currency subunit. At most 20 characters.

Example:

"KURUŞ"

IsDefault
boolean

Whether this is the company's default currency. Setting it to true removes the flag from the previous default currency.

Example:

true

Response

Created

Success
boolean
required

Whether the operation succeeded.

Example:

true

ResultCode
string
required

"0000" on success. On failure, the code of the first error; all errors are listed in Errors.

Example:

"0000"

Data
object
required
Message
null | string

Error message when Success is false. Messages of all errors are joined into a single text.