Edara API v3

Edara API v3: Journal Entries

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

Endpoints

GET /v3/journal-entries: Lists journal entries.

Operation GetJournalEntries · permission read:journal-entry

Query string: GetJournalEntriesQuery

field type default validation description
offset int? 0 GreaterThanOrEqualTo(0) .When(x => x.Offset.HasValue) Number of items to skip before returning results. Defaults to 0.
limit int? 100 InclusiveBetween(1, PaginatedQuery.MaxLimit) .When(x => x.Limit.HasValue) Maximum number of items to return. Defaults to 100, maximum 1000.
code string The journal entry code.
paperNumber string The journal entry paper number.
relatedIOCode string The related issue-offering code.
accountId int? GreaterThan(0) .When(x => x.AccountId.HasValue) Returns journal entries where any detail line hits this general-ledger account.
customerId int? GreaterThan(0) .When(x => x.CustomerId.HasValue) Narrows to journal entries whose matched account line carries this customer.
supplierId int? GreaterThan(0) .When(x => x.SupplierId.HasValue) Narrows to journal entries whose matched account line carries this supplier.
costCenterId int? GreaterThan(0) .When(x => x.CostCenterId.HasValue) Narrows to journal entries whose matched account line is tagged with this cost center.
dateFrom DateTime? Only journal entries on or after this document date.
dateTo DateTime? Only journal entries on or before this document date.
isPostedOnly bool? true When false, unposted/draft journal entries are also included. Defaults to true.
currencyId int? GreaterThan(0) .When(x => x.CurrencyId.HasValue) Only journal entries recorded in this currency.
(object rule) RuleFor(x => x) .Must(HaveOrderedDateRange) .WithMessage("dateFrom must be on or before dateTo.")

Responses: OK PagedResult<JournalEntryResponse>: The matching journal entries.

Notes


POST /v3/journal-entries: Creates a journal entry.

Operation CreateJournalEntry · permission create:journal-entry

Body: CreateJournalEntryRequest

field type default validation description
isInvoicingJE bool? Whether this journal entry was generated by Invoicing 3.0. Optional; defaults to false.
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 Document notes.
currencyId int? GreaterThan(0).When(x => x.CurrencyId.HasValue) The optional currency identifier.
exchangeRate decimal? GreaterThan(0m).When(x => x.ExchangeRate.HasValue) The exchange rate when a currency is supplied.
relatedDocumentCode string The code of a related document.
linkedDocumentCode string The code of an additional linked document.
accountingDocumentDetails List<CreateJournalEntryDetailRequest> NotNull().NotEmpty(); each: SetValidator(new CreateJournalEntryDetailRequestValidator()) The detail lines.

Responses: Created JournalEntryMutationResponse: Journal entry created.

Business errors (HTTP 409, match on errorCode):

Notes


PUT /v3/journal-entries/code/{code}: Updates a journal entry by code.

Operation UpdateJournalEntryByCode · permission update:journal-entry

Parameters

name in type default description
code route string The journal entry code.

Body: UpdateJournalEntryRequest

field type default validation description
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 Document notes.
currencyId int? GreaterThan(0).When(x => x.CurrencyId.HasValue) The optional currency identifier.
exchangeRate decimal? GreaterThan(0m).When(x => x.ExchangeRate.HasValue) The exchange rate when a currency is supplied.
accountingDocumentDetails List<UpdateJournalEntryDetailRequest> NotNull().NotEmpty(); each: SetValidator(new UpdateJournalEntryDetailRequestValidator()) The detail lines.

Responses: NoContent: Journal entry updated.

Business errors (HTTP 409, match on errorCode):

Notes


DELETE /v3/journal-entries/code/{code}: Deletes a journal entry by code.

Operation DeleteJournalEntryByCode · permission delete:journal-entry

Parameters

name in type default description
code route string The journal entry code.

Responses: NoContent: (not declared; read from the method body)

Business errors (HTTP 409, match on errorCode):

Notes


POST /v3/journal-entries/payment: Creates a payment journal entry.

Operation CreatePaymentJournalEntry · permission create:journal-entry

Body: CreatePaymentJournalEntryRequest

field type default validation description
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 Document notes.
currencyId int? GreaterThan(0).When(x => x.CurrencyId.HasValue) The optional currency identifier.
exchangeRate decimal? GreaterThan(0m).When(x => x.ExchangeRate.HasValue) The exchange rate when a currency is supplied.
salesOrderToPay string NotEmpty() The code of the sales order being paid. Required.
linkedDocumentCode string The code of an additional linked document.
accountingDocumentDetails List<PaymentJournalEntryDetailRequest> NotNull().NotEmpty(); each: SetValidator(new PaymentJournalEntryDetailRequestValidator()) The detail lines.

Responses: Created JournalEntryResponse: Payment journal entry created.

Business errors (HTTP 409, match on errorCode):

Notes

Types

AccountReference

Lightweight account reference (id + code + name).

field type description
id int The account id.
code string The account code.
name string The account name.

CostCenterReference

Lightweight cost-center reference (id + code + name).

field type description
id int The cost-center id.
code string The cost-center code.
name string The cost-center name.

CreateJournalEntryDetailRequest

Request describing a new journal entry detail line.

field type validation description
accountId int? GreaterThan(0) The account identifier.
costCenterId int? GreaterThan(0) .When(x => x.CostCenterId.HasValue) The optional cost center identifier.
amount decimal GreaterThan(0m) The line amount.
amountStatus DebitCreditSide? NotNull(); Must(value => !value.HasValue || Enum.IsDefined(typeof(DebitCreditSide), value.Value)) The amount status.
comments string Optional line comments.
customerId int? GreaterThan(0) .When(x => x.CustomerId.HasValue) The optional customer identifier.
supplierId int? GreaterThan(0) .When(x => x.SupplierId.HasValue) The optional supplier identifier.

CurrencyReference

Lightweight currency reference (id + ISO code + name).

field type description
id int The currency id.
code string The ISO 4217 currency code.
name string The currency name.

CustomerReference

Lightweight customer reference (id + code + name).

field type description
id int The customer id.
code string The customer code.
name string The customer name.

DebitCreditSide

Debit/credit side for accounting lines.

Values (sent/returned as the name): Debit=0, Credit=1

DocumentRowState

Row-state for mutable document detail lines.

Values (sent/returned as the name): Added=0, Modified=1, Deleted=2

JournalEntryDetailResponse

Response describing a journal entry detail line.

field type description
id int The detail identifier.
account AccountReference The account reference.
costCenter CostCenterReference The optional cost center reference.
amount decimal The line amount.
amountStatus DebitCreditSide? The amount status.
comments string Optional line comments.
customer CustomerReference The optional customer reference.
supplier SupplierReference The optional supplier reference.

JournalEntryMutationResponse

Response describing a created journal entry.

field type description
documentCode string The generated document code.

JournalEntryResponse

Response describing a journal entry.

field type description
id int The document identifier.
documentCode string The document code.
jeCode string The journal entry's own general-ledger code.
documentType string The source document type code (for example SI, CI, or JE).
isPosted bool Whether the journal entry is posted.
documentDate DateTime The accounting document date.
paperNumber string The external paper number.
responsibleId int? The responsible user identifier.
notes string Document notes.
currency CurrencyReference The optional currency reference.
exchangeRate decimal The exchange rate.
isSystemDocument bool Whether the journal entry is system-generated.
isInvoicingJE bool Whether this journal entry was generated by Invoicing 3.0.
relatedOrder string The related sales or purchase order code.
relatedWarehouseDoc string The related warehouse issue or receipt document code.
accountingDocumentDetails List<JournalEntryDetailResponse> The detail lines.

PaymentJournalEntryDetailRequest

Request describing a payment journal entry detail line.

field type validation description
accountId int? GreaterThan(0) The account identifier.
costCenterId int? GreaterThan(0) .When(x => x.CostCenterId.HasValue) The optional cost center identifier.
amount decimal GreaterThan(0m) The line amount.
amountStatus DebitCreditSide? NotNull(); Must(value => !value.HasValue || Enum.IsDefined(typeof(DebitCreditSide), value.Value)) The amount status.
comments string Optional line comments.

SupplierReference

Lightweight supplier reference (id + code + name).

field type description
id int The supplier id.
code string The supplier code.
name string The supplier name.

UpdateJournalEntryDetailRequest

Request describing a journal entry detail line on update.

field type validation description
id int The detail identifier.
accountId int? GreaterThan(0) The account identifier.
costCenterId int? GreaterThan(0) .When(x => x.CostCenterId.HasValue) The optional cost center identifier.
amount decimal GreaterThan(0m) The line amount.
amountStatus DebitCreditSide? NotNull(); Must(value => !value.HasValue || Enum.IsDefined(typeof(DebitCreditSide), value.Value)) The amount status.
comments string Optional line comments.
customerId int? GreaterThan(0) .When(x => x.CustomerId.HasValue) The optional customer identifier.
supplierId int? GreaterThan(0) .When(x => x.SupplierId.HasValue) The optional supplier identifier.
rowState DocumentRowState? Must(value => !value.HasValue || Enum.IsDefined(typeof(DocumentRowState), value.Value)) The row state for the update.