GET

Description

Retrieves a list of terms of deliveries or a single terms of delivery.

URL structure

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

Method

GET

Version

3

Response

The terms of deliveries 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.

<?xml version="1.0" encoding="UTF-8"?>
<TermsOfDeliveries>
  <TermsOfDeliverySubset url="https://api.fortnox.se/3/termsofdeliveries/10">
    <Code>10</Code>
    <Description>10</Description>
  </TermsOfDeliverySubset>

  [...]

  <TermsOfDeliverySubset url="https://api.fortnox.se/3/termsofdeliveries/FK">
    <Code>FK</Code>
    <Description>Fritt kund</Description>
  </TermsOfDeliverySubset>
</TermsOfDeliveries>
<?xml version="1.0" encoding="UTF-8"?>
<TermsOfDelivery url="https://api.fortnox.se/3/termsofdeliveries/FK">
  <Code>FK</Code>
  <Description>Fritt kund</Description>
</TermsOfDelivery>
{
    "TermsOfDeliveries": [
        {
            "@url": "https://api.fortnox.se/3/termsofdeliveries/10",
            "Code": "10",
            "Description": "10"
        },

        [...]

        {
            "@url": "https://api.fortnox.se/3/termsofdeliveries/FK",
            "Code": "FK",
            "Description": "Fritt kund"
        }
    ]
}
{
  "TermsOfDelivery": {
    "@url": "https://api.fortnox.se/3/termsofdeliveries/FK",
    "Code": "FK",
    "Description": "Fritt kund"
  }
}

POST

Description

Creates a terms of delivery.

URL structure

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

Method

POST

Version

3

Request

The request body should contain a structure of a terms of delivery, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TermsOfDelivery>
  <Code>FVL</Code>
  <Description>Fritt vårt lager</Description>
</TermsOfDelivery>
{
  "TermsOfDelivery": {
    "Code": "FVL",
    "Description": "Fritt vårt lager"
  }
}

Response

The response should contain the created terms of delivery in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TermsOfDelivery url="https://api.fortnox.se/3/termsofdeliveries/FVL">
  <Code>FVL</Code>
  <Description>Fritt vårt lager</Description>
</TermsOfDelivery>
{
  "TermsOfDelivery": {
    "@url": "https://api.fortnox.se/3/termsofdeliveries/FVL",
    "Code": "FVL",
    "Description": "Fritt vårt lager"
  }
}

PUT

Description

Updates a terms of delivery.

URL structure

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

Method

PUT

Version

3

Request

The request body should contain a structure of a terms of delivery, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TermsOfDelivery>
  <Code>FVL</Code>
  <Description>Fritt lager</Description>
</TermsOfDelivery>
{
  "TermsOfDelivery": {
    "Code": "FVL",
    "Description": "Fritt lager"
  }
}

Response

The response should contain the updated terms of delivery in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TermsOfDelivery url="https://api.fortnox.se/3/termsofdeliveries/FVL">
  <Code>FVL</Code>
  <Description>Fritt lager</Description>
</TermsOfDelivery>
{
  "TermsOfDelivery": {
    "@url": "https://api.fortnox.se/3/termsofdeliveries/FVL",
    "Code": "FVL",
    "Description": "Fritt lager"
  }
}

Fields

Field Description Limits Type Searchable Sortable Required R/W
Url Direct url to the record  – String No No R
Code Code of the term of delivery  – String Yes Yes Yes R/W*
Description Description of the term of delivery  – String No No R/W

* Only writable during POST.