Invoice

Field guide

The following fields are available in an invoice object

NameTypeExampleNotes
idint43Invoice id
numberstring4633Your invoice number
client_idint1Client's id
client_namestringJane DoeName of client
client_address_idint1Client's address id
client_contact_idint0Client's contact id
currencystringEURThree-letter currency code
titlestringMy new invoiceTitle of the invoice
periodstringPeriod of service
datedate2012-03-25Date of invoice in YYYY-MM-DD format
duedate2012-04-22Latest payment date in YYYY-MM-DD format
account_idint0Id for Account Object
esrint0If invoice has ESR
esr_numberint243ESR number
esr_positionint0Positioning of ESR. 0 = additional page, 1 = first page, 2 = last page
lsvplusint1If LSV+ is active
ddint1If DebitDirect is active
discountfloat5Discount amount
discount_typeint1See Discount Types
introductionstringtextIntroduction text printed above positions
conditionsstringtextText printed below positions
languagestringdeTwo-letter language code
paypalint0PayPal account payment
paypal_urlstringhttp://bit.ly/x4geSAPayPal pay URL
vat_includedint1If VAT is included in positions' prices
totalamountfloat140.15Total sum of all positions
statusint7See Status Types
pagesint2Number of pages
positionscollectionCollection of Position Objects

Example content of data variable:

    {
        "error":false,
        "item":{
            "id":77,
            "number":10000,
            "client_id":16,
            "client_name":"Jane Doe",
            "client_address_id":11,
            "client_contact_id":0,
            "currency":"CHF",
            "title":"Rechnung Nr. {1} \/ Kunden Nr. {2}",
			"period":"",
            "date":"2013-02-25",
            "due":"2013-03-27",
            "account_id":0,
            "esr":0,
            "esr_number":"",
            "esr_position":0,
			"lsvplus":0,
			"dd":0,
            "discount":0,
            "discount_type":0,
            "conditions":"",
            "introduction":"",
            "language":"de",
            "paypal":0,
            "paypal_url":"",
            "vat_included":0,
            "totalamount":0,
            "status":7,
            "pages":1,
            "positions":[
                {
                    "type":1,
                    "number":null,
                    "name":"Service Y",
                    "description":"Cleaning house",
                    "cost":0,
                    "unit":1,
                    "amount":1,
                    "vat":8,
                    "discount":null
                },
                {
                    "type":2,
                    "number":null,
                    "name":"Product X",
                    "description":"Repairing car",
                    "cost":0,
                    "unit":7,
                    "amount":1,
                    "vat":8,
                    "discount":null
                }
            ]
        }
    }
    

Status

StatusMeaning of status
1Sent / Open
2Paid
31st Reminder
42nd Reminder
53rd Reminder
6Cancelled
7Draft
11Partially paid
12Reminder
99Deleted

Discount

DiscountType
0Percent
1Value