Field guide

The following fields are available in a client object

NameTypeExampleNotes
idint3Client id
typeint2See Client Types
genderint1Gender of client, applicable with type 1 only. See Client Genders
numberint250Your client number
namestringMy clientClient name
additionstringAdditional name line
vat_idstringCHExxx.xxx.xxxClient vat number
languagestringdeTwo-letter language code
phonestring012 345 67 89Phone
faxstring012 345 67 89Fax
emailstringemail#client.comEmail
websitestringww.website.netWebsite
notesstringmy notes!Notes about client
main_contact_idint0Client's main contact id
main_address_idint2Client's main address id
streetstringMy StreetStreet
streetnostring3BNumber of street
codestring3122Postal code
citystringBernCity
countrystringCHTwo-letter country code
addressescollectionCollection of Address Objects
contactscollectionCollection of Contact Objects
assignscollectionCollection of Assign Objects

Example content of data variable:

    {
        "error":false,
        "item":{
            "id":16,
            "type":1,
            "gender":0,
            "number":1000,
            "name":"John Doe",
            "addition":"",
            "vat_id":"",
            "language":"de",
            "phone":"",
            "fax":"",
            "email":"",
            "website":"",
            "notes":"",
            "main_contact_id":0,
            "main_address_id":11,
            "street":"Address",
            "streetno":"",
            "street2":"",
            "code":123,
            "city":"Atlantis",
            "country":"EG",
            "addresses":[
                {
                    "id":11,
                    "street":"Address",
                    "streetno":"",
                    "street2":"",
                    "code":123,
                    "city":"Atlantis",
                    "country":"EG"
                }
            ],
            "contacts":[
                {
                    "id":1,
                    "surname":"Doe",
                    "name":"John",
                    "email":"john.doe@gmail.com",
                    "phone":"",
                    "gender":1
                }
            ],
            "assigns":[
                {
                    "id":3,
                    "employee":"Jane Doe",
                    "comment":"My wife",
                    "hours":3,
                    "year":2013,
                    "month":2,
                    "day":27,
                    "billed":0
                }
            ]
        }
    }
    

Types

TypeMeaning of type
1Company client
2Private client

Gender

GenderMeaning of gender
1Male
2Female