Edara API v3

Edara API v3: Cash In/Out

Read the guide first: authentication, paging, errors, rate limits and the shared PagedResult, BatchResult and *Reference shapes.

Endpoints

POST /v3/cash-in: Records a cash-in.

Operation CreateCashIn · permission create:cash-transaction

Body: CashTransactionRequest

field type default validation description
mainAccountId int? GreaterThan(0) The main cash account identifier.
documentDate DateTime? NotNull() The accounting document date.
paperNumber string The external paper number.
responsibleId int? GreaterThan(0) .When(x => x.ResponsibleId.HasValue) The responsible user identifier.
notes string Optional document notes.
currencyId int? GreaterThan(0) .When(x => x.CurrencyId.HasValue) The optional document currency identifier.
exchangeRate decimal? GreaterThan(0m) .When(x => x.ExchangeRate.HasValue) The exchange rate when a currency is supplied.
accountingDocumentDetails List<CashTransactionDetailRequest> NotNull() .NotEmpty(); each: SetValidator(new CashTransactionDetailRequestValidator()); Must((request, details) => details == null || details.All(detail => detail.AccountId != request.MainAccountId)) .When(x => x.AccountingDocumentDetails != null && x.MainAccountId.HasValue) The detail lines making up the transaction.

Responses: Created CashTransactionResponse: Cash transaction created.

Business errors (HTTP 409, match on errorCode):

Notes


POST /v3/cash-out: Records a cash-out.

Operation CreateCashOut · permission create:cash-transaction

Body: CashTransactionRequest

field type default validation description
mainAccountId int? GreaterThan(0) The main cash account identifier.
documentDate DateTime? NotNull() The accounting document date.
paperNumber string The external paper number.
responsibleId int? GreaterThan(0) .When(x => x.ResponsibleId.HasValue) The responsible user identifier.
notes string Optional document notes.
currencyId int? GreaterThan(0) .When(x => x.CurrencyId.HasValue) The optional document currency identifier.
exchangeRate decimal? GreaterThan(0m) .When(x => x.ExchangeRate.HasValue) The exchange rate when a currency is supplied.
accountingDocumentDetails List<CashTransactionDetailRequest> NotNull() .NotEmpty(); each: SetValidator(new CashTransactionDetailRequestValidator()); Must((request, details) => details == null || details.All(detail => detail.AccountId != request.MainAccountId)) .When(x => x.AccountingDocumentDetails != null && x.MainAccountId.HasValue) The detail lines making up the transaction.

Responses: Created CashTransactionResponse: Cash transaction created.

Business errors (HTTP 409, match on errorCode):

Notes

Types

CashTransactionDetailRequest

Request describing a cash transaction detail line.

field type validation description
accountId int? GreaterThan(0) The detail account identifier.
costCenterId int? GreaterThan(0) .When(x => x.CostCenterId.HasValue) The optional cost center identifier.
amount decimal GreaterThan(0m) The line amount.
comments string Optional line comments.
customerId int? GreaterThan(0) .When(x => x.CustomerId.HasValue) The optional customer identifier for receivable accounts.
supplierId int? GreaterThan(0) .When(x => x.SupplierId.HasValue) The optional supplier identifier for payable accounts.

CashTransactionResponse

Response describing a created cash transaction.

field type description
documentCode string The generated accounting document code.