GET

Description

Retrieves a list of invoice payments or a single invoice payment.

URL structure

https://api.fortnox.se/3/invoicepayments/{Number}

Method

GET

Version

3

Response

The invoice payments register can return a list of records or a single record. By specifying a Number in the URL, a single record will be returned. Not specifying a Number will return a list of records sorted on payment date.

<?xml version="1.0" encoding="UTF-8"?>
<InvoicePayments TotalResources="3" TotalPages="1" CurrentPage="1">
  <InvoicePaymentSubset url="https://api.fortnox.se/3/invoicepayments/3">
    <Amount>1337</Amount>
    <Booked>true</Booked>
    <Currency>SEK</Currency>
    <CurrencyRate>1</CurrencyRate>
    <CurrencyUnit>1</CurrencyUnit>
    <InvoiceNumber>1</InvoiceNumber>
    <Number>3</Number>
    <Source>direct</Source>
  </InvoicePaymentSubset>

  [...]

  <InvoicePaymentSubset url="https://api.fortnox.se/3/invoicepayments/1">
    <Amount>1599</Amount>
    <Booked>true</Booked>
    <Currency>SEK</Currency>
    <CurrencyRate>1</CurrencyRate>
    <CurrencyUnit>1</CurrencyUnit>
    <InvoiceNumber>1</InvoiceNumber>
    <Number>1</Number>
    <Source>direct</Source>
  </InvoicePaymentSubset>
</InvoicePayments>
<?xml version="1.0" encoding="UTF-8"?>
<InvoicePayment url="https://api.fortnox.se/3/invoicepayments/2">
  <Amount>999</Amount>
  <AmountCurrency>999</AmountCurrency>
  <Booked>true</Booked>
  <Currency>SEK</Currency>
  <CurrencyRate>1</CurrencyRate>
  <CurrencyUnit>1</CurrencyUnit>
  <ExternalInvoiceReference1></ExternalInvoiceReference1>
  <ExternalInvoiceReference2></ExternalInvoiceReference2>
  <InvoiceCustomerName>Stefan Andersson</InvoiceCustomerName>
  <InvoiceCustomerNumber>1</InvoiceCustomerNumber>
  <InvoiceNumber>1</InvoiceNumber>
  <InvoiceDueDate>2014-01-18</InvoiceDueDate>
  <InvoiceOCR>133</InvoiceOCR>
  <InvoiceTotal>3935</InvoiceTotal>
  <ModeOfPayment>BG</ModeOfPayment>
  <ModeOfPaymentAccount>1930</ModeOfPaymentAccount>
  <Number>2</Number>
  <PaymentDate>2014-01-18</PaymentDate>
  <VoucherNumber>2</VoucherNumber>
  <VoucherSeries>C</VoucherSeries>
  <VoucherYear>1</VoucherYear>
  <Source>direct</Source>
  <WriteOffs/>
</InvoicePayment>
{
  "MetaInformation": {
    "@TotalResources": 3,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "InvoicePayments": [
    {
      "@url": "https://api.fortnox.se/3/invoicepayments/3",
      "Amount": 1337,
      "Booked": true,
      "Currency": "SEK",
      "CurrencyRate": 1,
      "CurrencyUnit": 1,
      "InvoiceNumber": 1,
      "Number": "3",
      "Source": "direct"
    },

    [...]

    {
      "@url": "https://api.fortnox.se/3/invoicepayments/1",
      "Amount": 1599,
      "Booked": true,
      "Currency": "SEK",
      "CurrencyRate": 1,
      "CurrencyUnit": 1,
      "InvoiceNumber": 1,
      "Number": "1",
      "Source": "direct"
    }
  ]
}
{
  "InvoicePayment": {
    "@url": "https://api.fortnox.se/3/invoicepayments/1",
    "Amount": 999,
    "AmountCurrency": 999,
    "Booked": true,
    "Currency": "SEK",
    "CurrencyRate": 1,
    "CurrencyUnit": 1,
    "ExternalInvoiceReference1": "",
    "ExternalInvoiceReference2": "",
    "InvoiceCustomerName": "Stefan Andersson",
    "InvoiceCustomerNumber": "1",
    "InvoiceNumber": 1,
    "InvoiceDueDate": "2014-01-18",
    "InvoiceOCR": "133",
    "InvoiceTotal": "3935",
    "ModeOfPayment": "BG",
    "ModeOfPaymentAccount": 1930,
    "Number": "2",
    "PaymentDate": "2014-01-18",
    "VoucherNumber": "1",
    "VoucherSeries": "C",
    "VoucherYear": "2",
    "Source": "direct",
    "WriteOffs": []
  }
}

POST

Description

Creates an invoice payment.

URL structure

https://api.fortnox.se/3/invoicepayments/

Method

POST

Version

3

Request

The request body should contain a structure of an invoice payment, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<InvoicePayment>
  <Amount>99</Amount>
  <AmountCurrency>99</AmountCurrency>
  <InvoiceNumber>2</InvoiceNumber>
</InvoicePayment>
{
  "InvoicePayment": {
    "Amount": 99,
    "AmountCurrency": 99,
    "InvoiceNumber": "2"
  }
}

Response

The response should contain the created invoice payment in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<InvoicePayment url="https://api.fortnox.se/3/invoicepayments/6">
  <Amount>99</Amount>
  <AmountCurrency>99</AmountCurrency>
  <Booked>false</Booked>
  <Currency>SEK</Currency>
  <CurrencyRate>1</CurrencyRate>
  <CurrencyUnit>1</CurrencyUnit>
  <ExternalInvoiceReference1></ExternalInvoiceReference1>
  <ExternalInvoiceReference2></ExternalInvoiceReference2>
  <InvoiceCustomerName>Stefan Andersson</InvoiceCustomerName>
  <InvoiceCustomerNumber>1</InvoiceCustomerNumber>
  <InvoiceNumber>2</InvoiceNumber>
  <InvoiceDueDate>2014-01-18</InvoiceDueDate>
  <InvoiceOCR>232</InvoiceOCR>
  <InvoiceTotal>1195</InvoiceTotal>
  <ModeOfPayment></ModeOfPayment>
  <ModeOfPaymentAccount>1930</ModeOfPaymentAccount>
  <Number>6</Number>
  <PaymentDate>2014-01-18</PaymentDate>
  <VoucherNumber></VoucherNumber>
  <VoucherSeries></VoucherSeries>
  <VoucherYear></VoucherYear>
  <Source>manual</Source>
  <WriteOffs/>
</InvoicePayment>
{
  "InvoicePayment": {
    "@url": "https://api.fortnox.se/3/invoicepayments/6",
    "Amount": 99,
    "AmountCurrency": 99,
    "Booked": false,
    "Currency": "SEK",
    "CurrencyRate": 1,
    "CurrencyUnit": 1,
    "ExternalInvoiceReference1": "",
    "ExternalInvoiceReference2": "",
    "InvoiceCustomerName": "Stefan Andersson",
    "InvoiceCustomerNumber": "1",
    "InvoiceNumber": 2,
    "InvoiceDueDate": "2014-01-18",
    "InvoiceOCR": "232",
    "InvoiceTotal": "1195",
    "ModeOfPayment": "",
    "ModeOfPaymentAccount": 1930,
    "Number": "6",
    "PaymentDate": "2014-01-18",
    "VoucherNumber": null,
    "VoucherSeries": null,
    "VoucherYear": null,
    "Source": "manual",
    "WriteOffs": []
  }
}

PUT

Description

Updates an invoice payment.

URL structure

https://api.fortnox.se/3/invoicepayments/{Number}

Method

PUT

Version

3

Request

The request body should contain a structure of a invoice payment, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<InvoicePayment>
  <Amount>999</Amount>
  <AmountCurrency>999</AmountCurrency>
  <Number>4</Number>
</InvoicePayment>
{
  "InvoicePayment": {
    "Amount": 999,
    "AmountCurrency": 999,
    "Number": "4"
  }
}

Response

The response should contain the updated invoice payment in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<InvoicePayment url="https://api.fortnox.se/3/invoicepayments/4">
  <Amount>999</Amount>
  <AmountCurrency>999</AmountCurrency>
  <Booked>false</Booked>
  <Currency>SEK</Currency>
  <CurrencyRate>1</CurrencyRate>
  <CurrencyUnit>1</CurrencyUnit>
  <ExternalInvoiceReference1></ExternalInvoiceReference1>
  <ExternalInvoiceReference2></ExternalInvoiceReference2>
  <InvoiceCustomerName>Stefan Andersson</InvoiceCustomerName>
  <InvoiceCustomerNumber>1</InvoiceCustomerNumber>
  <InvoiceNumber>2</InvoiceNumber>
  <InvoiceDueDate>2014-01-18</InvoiceDueDate>
  <InvoiceOCR>232</InvoiceOCR>
  <InvoiceTotal>1195</InvoiceTotal>
  <ModeOfPayment></ModeOfPayment>
  <ModeOfPaymentAccount>1930</ModeOfPaymentAccount>
  <Number>4</Number>
  <PaymentDate>2014-01-18</PaymentDate>
  <VoucherNumber></VoucherNumber>
  <VoucherSeries></VoucherSeries>
  <VoucherYear></VoucherYear>
  <Source>manual</Source>
  <WriteOffs/>
</InvoicePayment>
{
  "InvoicePayment": {
    "@url": "https://api.fortnox.se/3/invoicepayments/4",
    "Amount": 999,
    "AmountCurrency": 1199,
    "Booked": false,
    "Currency": "SEK",
    "CurrencyRate": 1,
    "CurrencyUnit": 1,
    "ExternalInvoiceReference1": "",
    "ExternalInvoiceReference2": "",
    "InvoiceCustomerName": "Stefan Andersson",
    "InvoiceCustomerNumber": "1",
    "InvoiceNumber": 2,
    "InvoiceDueDate": "2014-01-18",
    "InvoiceOCR": "232",
    "InvoiceTotal": "1195",
    "ModeOfPayment": "BG",
    "ModeOfPaymentAccount" 1930,
    "Number": "4",
    "PaymentDate": "2014-01-18",
    "VoucherNumber": 4,
    "VoucherSeries": "C",
    "VoucherYear": 1,
    "Source": "manual",
    "WriteOffs": []
  }
}

DELETE

Description

Removes an invoice payment.

URL structure

https://api.fortnox.se/3/invoicepayments/{Number}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response body should be empty.

Actions

Action name Description
bookkeep Bookkeeps the invoice payment

For information about how to use actions, please read this article.

Fields

Invoice payment

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
Amount Amount of the payment Float Yes R/W
AmountCurrency Amount in the specified currency of the payment. Required if Currency is other than SEK Float R/W
Booked If the payment is booked or not Boolean R
Currency Currency of the payment 3 characters String R
CurrencyRate The currency rate Float R/W
CurrencyUnit The currency unit Float R
ExternalInvoiceReference1 External invoice reference String R
ExternalInvoiceReference2 External invoice reference String R
InvoiceCustomerName Customer name of the invoice String R
InvoiceCustomerNumber Customer number of the invoice String R
InvoiceNumber Invoice number Integer Yes Yes R/W
InvoiceDueDate Due date of the invoice Date R
InvoiceOCR OCR of the invoice String R
InvoiceTotal Invoice total Float R
ModeOfPayment Code of the mode of payment String R/W
ModeOfPaymentAccount Account for the mode of payment 4 characters Integer R/W
Number Payment number Integer R
PaymentDate Date of the payment Date R/W
VoucherNumber Number of the voucher Integer R
VoucherSeries Series of the voucher String R
VoucherYear Id of the voucher year Integer R
Source Payment source manual / direct String R
WriteOffs[WriteOff]

Write off

Field Description Limits Type Searchable Sortable Required R/W
Amount Amount of the writeoff Float R/W
AccountNumber Account number of the write off 4 characters Integer R/W
CostCenter Code of the cost center String R/W
Currency Currency of the payment 3 characters String R
Description Description of the write off String R
TransactionInformation The transaction information String R/W
Project Project number of the write off String R/W