Previous Topic

Next Topic

Inhoudsopgave

Book Index

Creating Purchase Day Book Page and Lines

By using this Isah Finance API, you can create a new purchase day book page with one or more lines. If the call is successful, the day book processing will be started.

Call

finance-api/PurchaseDayBooks/

Content

A JSON object containing a daybook page and one or more lines as nested JSON objects:

{

"Company": {string},

"FiscalYear": {string},

"DayBook": {string},

"Period": {integer},

"Creditor": {string},

"InvoiceReference": {string},

"PaymentReference": {string},

"PageDescription": {string},

"InvoiceDate": {string that represents a date},

"InvoiceCurrencyCode": {string},

"CostCenterCode": {string},

"PaymentTerm": {string},

"PaymentTermDays": {integer},

"InvoiceDueDate": {string that represents a date},

"PaymentConditionDiscountDays": {integer},

"InvoiceDiscountDueDate": {string that represents a date},

"InvoiceDiscountPercentage": {floating point},

"Lines": [

{

"Account": {string},

"Description": {string},

"CostCenterCode": {string},

"CostCategoryCode": {string},

"VATFinCode": {string}

"CurrencyVATAmount": {floating point},

"CurrencyAmount": {floating point},

},

]

Some of the members are mandatory and others are optional, as indicated in the tables below:

Page

Field

Description

Mandatory

Validations

Company

Company code

Y

Company code exists

FiscalYear

Fiscal year

Y

  • Fiscal year exists
  • Fiscal year is not closed

DayBook

Day book code

Y

  • Day book code exists
  • Type is set to purchase
  • VAT input type is set to gross
  • Blocked for manual changes is set to true

Period

Period

Y

  • Period exists
  • Period is not closed

Creditor

Creditor code

Y

Creditor is present in the company/fiscal year

InvoiceReference

Invoice reference

Y

Invoice reference does not exist

PaymentReference

Payment reference

Y

 

PageDescription

Page description

Y

 

InvoiceDate

Invoice date

Y

 

InvoiceCurrenyCode

Invoice currency code

Y

Currency code exists

CostCenterCode

Cost center code

 

Cost center code exists

PaymentTerm

Payment term code

 

Payment term code exists

PaymentTermDays

Payment term days

 

 

InvoiceDueDate

Invoice due date

 

 

PaymentConditionDiscountDays

Payment term discount days

 

 

InvoiceDiscountDueDate

Invoice discount due date

 

 

InvoiceDiscountPercentage

Invoice discount percentage

 

 

Lines

Field

Description

Mandatory

Validations

Account

Ledger account

Y

  • Ledger account exists
  • Ledger account is not blocked for manual changes
  • Ledger account is not blocked

Description

Description

 

 

CostCenterCode

Cost center code

Y, when set to mandatory

  • Cost center code exists
  • If the cost center of the specified account is set to required, the CostCenterCode is mandatory

CostCategoryCode

Cost category code

 

Line cost category code exists

VATFinCode

VAT code

Y, when set to mandatory

  • Line VAT code exists
  • If VAT Code of the specified account is set to required, the VATFinCode is mandatory

CurrencyVATAmount

Line VAT amount

 

 

CurrencyAmount

Line amount incl. VAT

Y

 

Http Method

POST

Return value

The return value of the call depends on the outcome: