Client
Field guide
The following fields are available in a client object
Name | Type | Example | Notes |
---|
id | int | 3 | Client id |
type | int | 2 | See Client Types |
gender | int | 1 | Gender of client, applicable with type 1 only. See Client Genders |
number | int | 250 | Your client number |
name | string | My client | Client name |
addition | string | | Additional name line |
vat_id | string | CHExxx.xxx.xxx | Client vat number |
language | string | de | Two-letter language code |
phone | string | 012 345 67 89 | Phone |
fax | string | 012 345 67 89 | Fax |
email | string | email#client.com | Email |
website | string | ww.website.net | Website |
notes | string | my notes! | Notes about client |
main_contact_id | int | 0 | Client's main contact id |
main_address_id | int | 2 | Client's main address id |
street | string | My Street | Street |
streetno | string | 3B | Number of street |
code | string | 3122 | Postal code |
city | string | Bern | City |
country | string | CH | Two-letter country code |
addresses | collection | | Collection of Address Objects |
contacts | collection | | Collection of Contact Objects |
assigns | collection | | Collection 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
Type | Meaning of type |
---|
1 | Company client |
2 | Private client |
Gender
Gender | Meaning of gender |
---|
1 | Male |
2 | Female |