GET
Description
Retrieves a list of invoice accruals or a single invoice accrual.
URL structure
https://api.fortnox.se/3/invoiceaccruals/{InvoiceNumber}
Method
GET
Version
3
Response
The invoice accruals register can return a list of records or a single record. By specifying a InvoiceNumber in the URL, a single record will be returned. Not specifying a InvoiceNumber will return a list of records.
<?xml version="1.0" encoding="UTF-8"?> <InvoiceAccruals TotalResources="3" TotalPages="1" CurrentPage="1"> <InvoiceAccrualSubset url="https://api.fortnox.se/3/invoiceaccruals/6"> <Description>Periodisering av kundfaktura 6</Description> <InvoiceNumber>6</InvoiceNumber> <Period>MONTHLY</Period> </InvoiceAccrualSubset> [...] <InvoiceAccrualSubset url="https://api.fortnox.se/3/invoiceaccruals/8"> <Description>Periodisering av kundfaktura 7</Description> <InvoiceNumber>8</InvoiceNumber> <Period>MONTHLY</Period> </InvoiceAccrualSubset> </InvoiceAccruals>
<?xml version="1.0" encoding="UTF-8"?> <InvoiceAccrual url="https://api.fortnox.se/3/invoiceaccruals/6"> <AccrualAccount>2990</AccrualAccount> <Description>Periodisering av kundfaktura 6</Description> <EndDate>2014-06-25</EndDate> <InvoiceAccrualRows> <InvoiceAccrualRow> <Account>2990</Account> <CostCenter></CostCenter> <Credit>0</Credit> <Debit>1720</Debit> <Project>0</Project> <TransactionInformation></TransactionInformation> </InvoiceAccrualRow> <InvoiceAccrualRow> <Account>3990</Account> <CostCenter></CostCenter> <Credit>1720</Credit> <Debit>0</Debit> <Project>0</Project> <TransactionInformation></TransactionInformation> </InvoiceAccrualRow> </InvoiceAccrualRows> <InvoiceNumber>6</InvoiceNumber> <Period>MONTHLY</Period> <RevenueAccount>3990</RevenueAccount> <StartDate>2014-03-25</StartDate> <Times>3</Times> <Total>5160</Total> <VATIncluded>false</VATIncluded> </InvoiceAccrual>
{ "MetaInformation": { "@TotalResources": 3, "@TotalPages": 1, "@CurrentPage": 1 }, "InvoiceAccruals": [ { "@url": "https://api.fortnox.se/3/invoiceaccruals/6", "Description": "Periodisering av kundfaktura 6", "InvoiceNumber": 6, "Period": "MONTHLY" }, [...] { "@url": "https://api.fortnox.se/3/invoiceaccruals/8", "Description": "Periodisering av kundfaktura 8", "InvoiceNumber": 8, "Period": "MONTHLY" } ] }
{ "InvoiceAccrual": { "@url": "https://api.fortnox.se/3/invoiceaccruals/6", "AccrualAccount": 2990, "Description": "Periodisering av kundfaktura 6", "EndDate": "2014-06-25", "InvoiceAccrualRows": [ { "Account": 2990, "CostCenter": "", "Credit": 0, "Debit": 1720, "Project": "0", "TransactionInformation": "" }, { "Account": 3990, "CostCenter": "", "Credit": 1720, "Debit": 0, "Project": "0", "TransactionInformation": "" } ], "InvoiceNumber": 6, "Period": "MONTHLY", "RevenueAccount": 3990, "StartDate": "2014-03-25", "Times": 3, "Total": 5160, "VATIncluded": false } }
POST
Description
Creates an invoice accrual.
URL structure
https://api.fortnox.se/3/invoiceaccruals
Method
POST
Version
3
Request
The request body should contain a structure of an invoice accrual, either in JSON or XML.
<?xml version="1.0" encoding="UTF-8"?> <InvoiceAccrual> <AccrualAccount>2990</AccrualAccount> <Description>Periodisering</Description> <EndDate>2014-06-25</EndDate> <InvoiceAccrualRows> <InvoiceAccrualRow> <Account>2990</Account> <Credit>0</Credit> <Debit>2000</Debit> </InvoiceAccrualRow> <InvoiceAccrualRow> <Account>3990</Account> <Credit>2000</Credit> <Debit>0</Debit> </InvoiceAccrualRow> </InvoiceAccrualRows> <InvoiceNumber>4</InvoiceNumber> <Period>MONTHLY</Period> <RevenueAccount>3990</RevenueAccount> <StartDate>2014-03-25</StartDate> <Total>6000</Total> </InvoiceAccrual>
{ "InvoiceAccrual": { "AccrualAccount": 2990, "EndDate": "2014-06-25", "InvoiceAccrualRows": [ { "Account": 2990, "Credit": 0, "Debit": 2000 }, { "Account": 3990, "Credit": 2000, "Debit": 0 } ], "InvoiceNumber": 4, "Period": "MONTHLY", "RevenueAccount": 3990, "StartDate": "2014-03-25", "Total": 6000 } }
Response
The response should contain the created currency in either JSON or XML.
<?xml version="1.0" encoding="UTF-8"?> <InvoiceAccrual url="https://api.fortnox.se/3/invoiceaccruals/4"> <AccrualAccount>2990</AccrualAccount> <Description>Periodisering</Description> <EndDate>2014-06-25</EndDate> <InvoiceAccrualRows> <InvoiceAccrualRow> <Account>2990</Account> <CostCenter></CostCenter> <Credit>0</Credit> <Debit>2000</Debit> <Project>0</Project> <TransactionInformation></TransactionInformation> </InvoiceAccrualRow> <InvoiceAccrualRow> <Account>3990</Account> <CostCenter></CostCenter> <Credit>2000</Credit> <Debit>0</Debit> <Project>0</Project> <TransactionInformation></TransactionInformation> </InvoiceAccrualRow> </InvoiceAccrualRows> <InvoiceNumber>4</InvoiceNumber> <Period>MONTHLY</Period> <RevenueAccount>3990</RevenueAccount> <StartDate>2014-03-25</StartDate> <Times>3</Times> <Total>6000</Total> <VATIncluded>false</VATIncluded> </InvoiceAccrual>
{ "InvoiceAccrual": { "@url": "https://api.fortnox.se/3/invoiceaccruals/3", "AccrualAccount": 2990, "Description": null, "EndDate": "2014-06-25", "InvoiceAccrualRows": [ { "Account": 2990, "CostCenter": "", "Credit": 0, "Debit": 2000, "Project": "0", "TransactionInformation": "" }, { "Account": 3990, "CostCenter": "", "Credit": 2000, "Debit": 0, "Project": "0", "TransactionInformation": "" } ], "InvoiceNumber": 3, "Period": "MONTHLY", "RevenueAccount": 3990, "StartDate": "2014-03-25", "Times": 3, "Total": 6000, "VATIncluded": false } }
PUT
Description
Updates an invoice accrual.
URL structure
https://api.fortnox.se/3/invoiceaccruals/{InvoiceNumber}
Method
PUT
Version
3
Request
The request body should contain a structure of an invoice accrual, either in JSON or XML.
<?xml version="1.0" encoding="UTF-8"?> <InvoiceAccrual> <AccrualAccount>2990</AccrualAccount> <EndDate>2014-09-30</EndDate> <InvoiceAccrualRows> <InvoiceAccrualRow> <Account>2990</Account> <CostCenter>ETT</CostCenter> <Credit>0</Credit> <Debit>18428.571429</Debit> </InvoiceAccrualRow> <InvoiceAccrualRow> <Account>3990</Account> <CostCenter>ETT</CostCenter> <Credit>18428.571429</Credit> <Debit>0</Debit> </InvoiceAccrualRow> </InvoiceAccrualRows> <InvoiceNumber>12</InvoiceNumber> <Period>MONTHLY</Period> <RevenueAccount>3990</RevenueAccount> <StartDate>2014-03-31</StartDate> </InvoiceAccrual>
{ "InvoiceAccrual": { "AccrualAccount": 2990, "EndDate": "2014-09-30", "InvoiceAccrualRows": [ { "Account": 2990, "CostCenter":"ETT", "Credit": 0, "Debit": 18428.571429 }, { "Account": 3990, "CostCenter":"ETT", "Credit": 18428.571429, "Debit": 0 } ], "InvoiceNumber": 12, "Period": "MONTHLY", "RevenueAccount": 3990, "StartDate": "2014-03-31" } }
Response
The response should contain the updated invoice accrual in either JSON or XML.
<?xml version="1.0" encoding="UTF-8"?> <InvoiceAccrual url="https://api.fortnox.se/3/invoiceaccruals/12"> <AccrualAccount>2990</AccrualAccount> <Description>Periodisering av kundfaktura 12</Description> <EndDate>2014-09-30</EndDate> <InvoiceAccrualRows> <InvoiceAccrualRow> <Account>2990</Account> <CostCenter>ETT</CostCenter> <Credit>0</Credit> <Debit>18428.571429</Debit> <Project>0</Project> <TransactionInformation></TransactionInformation> </InvoiceAccrualRow> <InvoiceAccrualRow> <Account>3990</Account> <CostCenter>ETT</CostCenter> <Credit>18428.571429</Credit> <Debit>0</Debit> <Project>0</Project> <TransactionInformation></TransactionInformation> </InvoiceAccrualRow> </InvoiceAccrualRows> <InvoiceNumber>12</InvoiceNumber> <Period>MONTHLY</Period> <RevenueAccount>3990</RevenueAccount> <StartDate>2014-03-31</StartDate> <Times>7</Times> <Total>129000</Total> <VATIncluded>false</VATIncluded> </InvoiceAccrual>
{ "InvoiceAccrual": { "@url": "https://api.fortnox.se/3/invoiceaccruals/12", "AccrualAccount": 2990, "Description": "Periodisering av kundfaktura 12", "EndDate": "2014-09-30", "InvoiceAccrualRows": [ { "Account": 2990, "CostCenter": "ETT", "Credit": 0, "Debit": 18428.571429, "Project": "0", "TransactionInformation": "" }, { "Account": 3990, "CostCenter": "ETT", "Credit": 18428.571429, "Debit": 0, "Project": "0", "TransactionInformation": "" } ], "InvoiceNumber": 12, "Period": "MONTHLY", "RevenueAccount": 3990, "StartDate": "2014-03-31", "Times": 7, "Total": 129000, "VATIncluded": false } }
DELETE
Description
Removes an invoice accrual.
URL structure
https://api.fortnox.se/3/invoiceaccruals/{InvoiceNumber}
Method
DELETE
Version
3
Request
The request body should be empty.
Response
The response body should be empty.
Fields
Invoice Accrual
Field | Description | Limits | Type | Searchable | Sortable | Required | R/W |
---|---|---|---|---|---|---|---|
Url | Direct URL to the record | – | String | – | – | – | R |
AccrualAccount | Account for the accrual | 4 digits | Integer | – | – | Yes | R/W |
Description | Description of the accrual | – | String | – | – | Yes | R/W |
EndDate | End date | – | Date | – | – | Yes | R/W |
InvoiceAccrualRows | – | – | – | – | – | Yes | – |
InvoiceNumber | Invoice number | – | Integer | – | – | Yes | R/W |
Period | Type of period | MONTHLY / BIMONTHLY / QUARTERLY / SEMIANNUALLY / ANNUALLY / {X}_MONTHS | String | – | – | – | R/W |
RevenueAccount | Account for the revenue | 4 digits | Integer | – | – | Yes | R/W |
StartDate | Start date | – | Date | – | – | – | R/W |
Times | Total times of accruals | – | Integer | – | – | – | R |
Total | Total of the accrual | – | Float | – | – | Yes | R/W |
VATIncluded | Is VAT included | – | Boolean | – | – | – | R/W |
Invoice Accrual Row
Field | Description | Limits | Type | Searchable | Sortable | Required | R/W |
---|---|---|---|---|---|---|---|
Account | Account number | 4 digits | Integer | – | – | – | R/W |
CostCenter | Code of the cost center | – | String | – | – | – | R/W |
Credit | Credit | – | Float | – | – | – | R/W |
Debit | Debit | – | Float | – | – | – | R/W |
Project | Project number | – | String | – | – | – | R/W |
TransactionInformation | Transaction information | – | String | – | – | – | R/W |