Articles

List all articles

GET /api/articles
<!--?xml version="1.0" encoding="UTF-8"?-->
<articles type="array" page="1" per_page="100" total="2">
</articles>
<article>
        ...
    </article>
<article>
        ...
    </article>

The list can be filtered with parameters:

GET /articles?title=layout

Shows all clients with the term “layout” in their name. It doesn’t matter if you use upper– or lowercase.
The following parameters can be used:

ParameterDescription
article_numberArticle number
titleTitle
descriptionDescription
currency_codeISO code of the currency
unit_idID of the chosen unit
tagsComma separated list of tags
supplier_idID of the chosen supplier

Show a specific article

GET /api/articles/{id}
<!--?xml version="1.0" encoding="UTF-8"?-->
<article>
    <id type=""integer"">1</id>
    <created type=""datetime"">2007-12-13T12:12:00+01:00</created>
    <article_number>ART123
    <number type=""integer"">123</number>
    <number_pre>KD</number_pre>
    <number_length type=""integer"">0</number_length>
    <title>Webdesign</title>
    <description>This is the description. What else?</description>
    <sales_price type=""float"">123.45</sales_price>
    <sales_price2 type=""float"">110.45
    <sales_price3 type=""float"">99.99
    <sales_price4 type=""float"">
    <sales_price5 type=""float"">
    <currency_code>EUR</currency_code>
    <unit_id type=""integer"">123</unit_id>
    <tax_id type=""integer"">1</tax_id>
    <purchase_price type=""float""></purchase_price>
    <purchase_price_net_gross>NET</purchase_price_net_gross>
    <supplier_id type=""integer"">1</supplier_id>
</sales_price5></sales_price4></sales_price3></sales_price2></article_number></article>

Create article

POST /api/articles
XML elementDescriptionTypeDefault valueMandatory
number_prePrefixALNUMValue from settings
numberSequential numberINTnext free number
number_lengthMinimum length of the customer number (to be filled with leading zeros)INTValue from settings
titleTitleALNUMEmpty string
descriptionDescriptionALNUMEmpty string
sales_pricePriceFLOAT0.0
sales_price2Price for clients which are members of pricegroup 2. The normal price is used if no price is defined.FLOAT
sales_price3Price for clients which are members of pricegroup 3. The normal price is used if no price is defined.FLOAT
sales_price4Price for clients which are members of pricegroup 4. The normal price is used if no price is defined.FLOAT
sales_price5Price for clients which are members of pricegroup 5. The normal price is used if no price is defined.FLOAT
currency_codeCurrencyISO currency codeDefault currency from settings
unit_idID of the chosen unitINTnull
tax_idID of the chosen tax rateINTnull
purchase_pricePurchase priceFLOATnull
purchase_price_net_grossPrice basis of purchase price (gross or net prices)ALNUM (“NET”, “GROSS”)NET
supplier_idID of the chosen supplierINTnull
typeType (product/service)ENUM (PRODUCT/SERVICE)
<article>
    <title>Webdesign</title>
    <sales_price>12.34</sales_price>
    <currency_code>USD</currency_code>
    <unit_id>123</unit_id>
</article>

<!--?xml version="1.0" encoding="UTF-8"?-->
<article>
    <id type=""integer"">1234</id>
    <created type=""datetime"">2007-12-13T12:12:00+01:00</created>
    <number type=""integer"">1235</number>
    <number_pre>ART</number_pre>
    <number_length type=""integer"">0</number_length>
    <title>Webdesign</title>
    <description></description>
    <sales_price type=""float"">12.34</sales_price>
    <currency_code>USD</currency_code>
    <unit_id type=""integer"">123</unit_id>
    <tax_id type=""integer"">1</tax_id>
</article>

Edit article

PUT /api/articles/{id}
<article>
    <description>Excessive Photoshop manipulations</description>
</article>

Delete article

DELETE /api/articles/{id}