Run my Accounts API: Beispiel B2.1 - Gutschrift mit Artikel einbuchen

An diesem Beispiel zeigen wir Ihnen, wie Sie eine Gutschrift mit Artikeln über das Run my Accounts API einbuchen können:

Aufruf:

POST https://service.runmyaccounts.com/api/latest/clients/{mandant}/invoices

XML:

<?xml version="1.0" encoding="UTF-8"?>
<invoice>
   <invnumber>B2.1</invnumber>
   <ordnumber />
   <status>OVERDUE</status>
   <currency>CHF</currency>
   <ar_accno>1100</ar_accno>
   <transdate>2012-08-06T00:00:00+02:00</transdate>
   <duedate>2012-08-06T00:00:00+02:00</duedate>
   <description>Gutschriften September 2011</description>
   <notes />
   <intnotes />
   <taxincluded>false</taxincluded>
   <dcn />
   <customernumber>K-001</customernumber>
   <parts>
      <part>
         <partnumber>ART-1</partnumber>
         <description>Gutschrift</description>
         <unit />
         <quantity>1.0</quantity>
         <sellprice>-400.0</sellprice>
         <discount>0.0</discount>
         <itemnote />
      </part>
   </parts>
</invoice>

JSON:

    {
       "invnumber": "B2.1",
       "ordnumber": "",
       "status": "OVERDUE",
       "currency": "CHF",
       "ar_accno": "1100",
       "transdate": "2012-08-06T00:00:00+02:00",
       "duedate": "2012-08-06T00:00:00+02:00",
       "description": "Gutschriften September 2011",
       "notes": "",
       "intnotes": "",
       "taxincluded": "false",
       "dcn": "",
       "customernumber": "K-001",
       "parts":
       {
           "part":
           {
               "partnumber": "ART-1",
               "description": "Gutschrift",
               "unit": "",
               "quantity": "1.0",
               "sellprice": "-400.0",
               "discount": "0.0",
               "itemnote": "",
           }
       }
    }

Antwort:

204 No Content