Transaction Objects

Create Transaction

POST /(company_code)/v2/transaction

Create new Transaction

Заголовки запроса:
 
  • AuthorizationBearer <сессионный_токен>, либо Signature <подпись>
JSON-объект запроса:
 
  • entry_code (string/null) – (Optional) Entry code for transaction. Entry mnemocode is accepted for all users. If user role is PARTNER, entry external ID is checked before mnemocode.
  • profile_code (string/null) – (Optional) Profile code for transaction. Profile mnemocode is accepted for all users. If user role is PARTNER, profile external ID is checked before mnemocode.
  • transaction_class (string) – Name of transaction class for new transaction
  • transaction_date (string/null) – (Optional) Date for new transaction, ISO-formatted: YYYY-MM-DD. If omitted, current date is used.
  • transaction_currency (string) – Currency code for new transaction
  • transaction_amount (string) – Amount (in one-hundredths of currency) for new transaction
  • attributes (array) – (Необязательно) Объекты данных атрибутов экземпляра (см. ниже)
  • details (string/null) – (Optional) Text of transaction details
JSON-объект ответа:
 
  • status (string) – success или error
  • data (object) – Data object of created transaction
  • error_code (string) – (Необязательно) Если status содержит error: один из перечисленных ниже кодов ошибки

Поля данных атрибута в запросе

У каждого объекта в массиве запроса attributes есть следующие поля:

Имя поля Тип Описание
seq integer Последовательный номер атрибута, от 1 до 20
value string Новое значение атрибута

Sequential numbers must be the same as in attribute objects returned by API in transaction data.

Используемые коды ошибки

  • auth.apikey.missing
  • auth.apikey.invalid
  • auth.header.missing
  • auth.header.invalid
  • auth.token.invalid
  • auth.token.expired
  • auth.session.invalid
  • auth.user.restricted
  • auth.user.closed
  • auth.user.denied
  • auth.restricted
  • request.validation.failed

Подробнее см. Коды ошибок.