GET

Description

Retrieves a list of modes of payments or a single mode of payment.

URL structure

https://api.fortnox.se/3/modesofpayments/{Code}

Method

GET

Version

3

Response

The modes of payments register can return a list of records or a single record. By specifying a Code in the URL, a single record will be returned. Not specifying a Code will return a list of records.

<ModesOfPayments TotalResources="2" TotalPages="1" CurrentPage="1">
	<ModeOfPaymentSubset url="https://api.fortnox.se/3/modesofpayment/BG">
		<Code>BG</Code>
		<Description>Bankgiro</Description>
		<AccountNumber>1930</AccountNumber>
	</ModeOfPaymentSubset>
	<ModeOfPaymentSubset url="https://api.fortnox.se/3/modesofpayment/PG">
		<Code>PG</Code>
		<Description>Plusgiro</Description>
		<AccountNumber>1920</AccountNumber>
	</ModeOfPaymentSubset>
</ModesOfPayments>
<?xml version="1.0" encoding="UTF-8"?>
<ModeOfPayment url="https://api.fortnox.se/3/modesofpayment/BG">
	<Code>BG</Code>
	<Description>Bankgiro</Description>
	<AccountNumber>1930</AccountNumber>
</ModeOfPayment>
{
  "MetaInformation": {
    "@TotalResources": 2,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "ModesOfPayments": [
    {
      "@url": "https://api.fortnox.se/3/modesofpayment/BG",
      "Code": "BG",
      "Description": "Bankgiro",
      "AccountNumber": "1930"
    },
    {
      "@url": "https://api.fortnox.se/3/modesofpayment/PG",
      "Code": "PG",
      "Description": "Plusgiro",
      "AccountNumber": "1920"
    }
  ]
}
{
  "ModeOfPayment": {
    "@url": "https://api.fortnox.se/3/modesofpayment/BG",
    "Code": "BG",
    "Description": "Bankgiro",
    "AccountNumber": 1930
  }
}

POST

Description

Creates a mode of payment.

URL structure

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

Method

POST

Version

3

Request

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

<?xml version="1.0" encoding="UTF-8"?>
<ModeOfPayment>
  <Code>LB</Code>
  <Description>Bankgiro LB</Description>
  <AccountNumber>1930</AccountNumber>
</ModeOfPayment>
{
  "ModeOfPayment": {
    "Code": "LB",
    "Description": "Bankgiro LB"
  }
}

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<ModeOfPayment url="https://api.fortnox.se/3/modesofpayments/LB">
    <Code>LB</Code>
    <Description>Bankgiro LB</Description>
    <AccountNumber>1930</AccountNumber>
</ModeOfPayment>
{
    "ModeOfPayment": {
        "@url": "https://api.fortnox.se/3/modesofpayments/LB",
        "Code": "LB",
        "Description": "Bankgiro LB",
        "AccountNumber": 1930
    }
}

PUT

Description

Updates a mode of payment.

URL structure

https://api.fortnox.se/3/modesofpayments/{Code}

Method

PUT

Version

3

Request

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

<?xml version="1.0" encoding="UTF-8"?>
<ModeOfPayment>
  <Code>BG</Code>
  <Description>Bankgiro OCR</Description>
  <AccountNumber>1930</AccountNumber>
</ModeOfPayment>
{
  "ModeOfPayment": {
    "Code": "BG",
    "Description": "Bankgiro OCR",
    "AccountNumber": 1930
  }
}

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<ModeOfPayment url="https://api.fortnox.se/3/modesofpayments/BG">
    <Code>BG</Code>
    <Description>Bankgiro OCR</Description>
    <AccountNumber>1930</AccountNumber>
</ModeOfPayment>
{
    "ModeOfPayment": {
        "@url": "https://api.fortnox.se/3/modesofpayments/BG",
        "Code": "BG",
        "Description": "Bankgiro OCR"
    }
}

Fields

Field Description Limits Type Searchable Sortable Permissions
Url Direct url to the record  – String R
Code Code for mode of payment String Yes Yes R/W*
Description Description of mode of payment  – String R/W
AccountNumber Account number 4 digits Integer R/W

* Only writable during POST.