GET

Prices in a price list

Description

Retrieves a list of prices in a price list

URL structure

https://api.fortnox.se/3/prices/sublist/{PriceList}/{ArticleNumber}

Method

GET

Version

3

Response

This request should return a list of articles with all their prices in the specified PriceList. Or if an ArticleNumber is specified, the list will contain all the prices for that article in the specified price list.

<?xml version="1.0" encoding="UTF-8"?>
<Prices>
  <PriceSubset url="https://api.fortnox.se/3/prices/A/16370/0">
    <ArticleNumber>16370</ArticleNumber>
    <FromQuantity>0</FromQuantity>
    <PriceList>A</PriceList>
    <Price>10</Price>
  </PriceSubset>

  [...]

  <PriceSubset url="https://api.fortnox.se/3/prices/A/16370/5">
    <ArticleNumber>16370</ArticleNumber>
    <FromQuantity>5</FromQuantity>
    <PriceList>A</PriceList>
    <Price>1</Price>
  </PriceSubset>
</Prices>
{
  "Prices": [
    {
      "@url": "https://api.fortnox.se/3/prices/A/16370/0",
      "ArticleNumber": "16370",
      "FromQuantity": 0,
      "PriceList": "A",
      "Price": 10
    },

    [...]

    {
      "@url": "https://api.fortnox.se/3/prices/A/16370/5",
      "ArticleNumber": "16370",
      "FromQuantity": 5,
      "PriceList": "A",
      "Price": 1
    }
  ]
}

Price for a specific article

Description

Retrives a price for a specified article.

URL structure

https://api.fortnox.se/3/prices/{PriceList}/{ArticleNumber}/{FromQuantity}

Method

GET

Version

3

Response

This request should return a list of articles with all their prices in the specified price list. If FromQuantity is not provided, the prices for all quantities will be returned.

<?xml version="1.0" encoding="UTF-8"?>
<Price url="https://api.fortnox.se/3/prices/A/16370/5">
  <ArticleNumber>16370</ArticleNumber>
  <Date></Date>
  <FromQuantity>5</FromQuantity>
  <Percent>10</Percent>
  <Price>1</Price>
  <PriceList>A</PriceList>
</Price>
{
    "Price": {
        "@url": "https://api.fortnox.se/3/prices/A/16370/5",
        "ArticleNumber": "16370",
        "Date": null,
        "FromQuantity": 5,
        "Percent": 10,
        "Price": 1,
        "PriceList": "A"
    }
}

POST

Description

Creates a price.

URL structure

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

Method

POST

Version

3

Request

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

<?xml version="1.0" encoding="UTF-8"?>
<Price>
  <ArticleNumber>1</ArticleNumber>
  <FromQuantity>10</FromQuantity>
  <Price>1</Price>
  <PriceList>A</PriceList>
</Price>
{
    "Price": {
        "ArticleNumber": "1",
        "FromQuantity": 10,
        "Price": 99,
        "PriceList": "A"
    }
}

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<Price url="https://api.fortnox.se/3/prices/A/1/10">
  <ArticleNumber>1</ArticleNumber>
  <Date>2014-03-24 13:53:05</Date>
  <FromQuantity>10</FromQuantity>
  <Percent>33.11</Percent>
  <Price>1</Price>
  <PriceList>A</PriceList>
</Price>
{
  "Price": {
    "@url": "https://api.fortnox.se/3/prices/A/1/10",
    "ArticleNumber": "1",
    "Date": "2014-03-24 13:51:19",
    "FromQuantity": 10,
    "Percent": 33.11,
    "Price": 99,
    "PriceList": "A"
  }
}

PUT

Description

Updates a price.

URL structure

https://api.fortnox.se/3/prices/{PriceList}/{ArticleNumber}/{FromQuantity}

Method

PUT

Version

3

Request

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

<?xml version="1.0" encoding="UTF-8"?>
<Price>
  <Price>129</Price>
</Price>
{
    "Price": {
        "Price": 129
    }
}

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<Price url="https://api.fortnox.se/3/prices/A/1/10">
  <ArticleNumber>1</ArticleNumber>
  <Date>2014-03-24 14:02:54</Date>
  <FromQuantity>10</FromQuantity>
  <Percent>43.14</Percent>
  <Price>129</Price>
  <PriceList>A</PriceList>
</Price>
{
  "Price": {
    "@url": "https://api.fortnox.se/3/prices/A/1/10",
    "ArticleNumber": "1",
    "Date": "2014-03-24 14:02:54",
    "FromQuantity": 10,
    "Percent": 43.14,
    "Price": 129,
    "PriceList": "A"
  }
}

DELETE

Description

Removes a price.

URL structure

https://api.fortnox.se/3/prices/{PriceList}/{ArticleNumber}/{FromQuantity}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response body should be empty.

Fields

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
ArticleNumber The article number String Yes Yes Yes R/W
Date Date of the last modification Date R
FromQuantity The quantity from where the price isĀ applicable. Float Yes Yes R/W
Percent Percent of original price Float R/W
Price The price Float R/W
PriceList Price list of the price String Yes Yes R/W

* Only writable during POST.