Skip to content

upsertCurrency

WRITE

Upsert currency.

POST /api/v1/accounting/upsertCurrency
curl -X POST '<your-host>/api/v1/accounting/upsertCurrency' \
  -H 'Authorization: Bearer <api-key>' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "string",
    "decimalPlaces": 0,
    "_operation": "create"
  }'
Response
{
  "id": "string"
}

Parameters

ParameterType

Required. 'create' inserts a new record, 'update' modifies the existing record with this id.

"create""update"
min length 1
min 0max 4
> 0

Input schema

schema
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "minLength": 1
    },
    "decimalPlaces": {
      "type": "number",
      "minimum": 0,
      "maximum": 4
    },
    "historicalExchangeRate": {
      "type": "number",
      "exclusiveMinimum": 0
    },
    "customFields": {},
    "id": {
      "type": "string"
    },
    "_operation": {
      "type": "string",
      "enum": [
        "create",
        "update"
      ],
      "description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
    }
  },
  "required": [
    "code",
    "decimalPlaces",
    "_operation"
  ]
}