Articles

List all articles

GET /api/articles
<?xml version="1.0" encoding="UTF-8"?>
<articles type="array">
    <article>
        ...
    </article>
    <article>
        ...
    </article>
</articles>

The list can be fil­te­red with parameters:

GET /articles?title=layout

Shows all cli­ents with the term “lay­out” in their name. It doesn’t mat­ter if you use upper– or lowercase.

The fol­lo­wing para­me­ters can be used:

Para­me­ter Descrip­tion
article_number Arti­cle number
title Title
descrip­tion Descrip­tion
currency_code ISO code of the currency
unit_id ID of the cho­sen unit

Show a spe­ci­fic 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</client_number>
    <number type="integer">123</number>
    <number_pre>KD</number_pre>
    <title>Webdesign</title>
    <description>This is the description. What else?</description>
    <sales_price type="float">123.45</sales_price>
    <currency_code>EUR</currency_code>
    <unit_id type="integer">123</unit_id>
    <tax_id type="integer">1</tax_id>
</article>

Create arti­cle

POST /api/articles
XML ele­ment Descrip­tion Type Default value Man­datory
number_pre Pre­fix ALNUM Value from settings
num­ber Sequen­tial number INT next free number
number_length Mini­mum length of the cust­o­mer num­ber (to be fil­led with lea­ding zeros) INT Value from settings
title Title ALNUM Empty string
descrip­tion Descrip­tion ALNUM Empty string
sales_price Price FLOAT 0.0
currency_code Cur­rency ISO cur­rency code Default cur­rency from set­tings
unit_id ID of the cho­sen unit INT null
tax_id ID of the cho­sen tax rate INT null
<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_pre>ART</number_pre>
    <number type="integer">1235</number>
    <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 arti­cle

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

Delete arti­cle

DELETE /api/articles/{id}