Attribute Name | Type | Required | Default | Comment |
city | String | No | ||
country | String | No | 2 letter ISO code, e.g. DE, CH, AT, US | |
created_at | Timestamp | No | generated | |
String | No | |||
external_reference | String | No | ||
firstname | String | No | ||
id | Integer | No | generated | |
lastname | String | Yes | ||
notes | Text | No | ||
organization | String | Yes | ||
phone | String | No | ||
prefix | String | No | Values allowed: Dr. Prof. Dr. | |
sex | Integer | No | 0 | Values allowed: 1 => male 2 => female |
street | String | No | ||
updated_at | Timestamp | No | generated | |
website | String | No | ||
zip | String | No |
# create
curl -H "Content-Type: application/json" -H 'Authorization: Token token="api_key"' http://subdomain.getgrip.de/api/v1/clients -d '{ "firstname": "Jason", "lastname": "Ruby", "organization": "Ruby Team" }'
# read
curl -H "Content-Type: application/json" -H 'Authorization: Token token="api_key"' https://subdomain.getgrip.de/api/v1/clients/73
# returns:
{
"city": "Ort",
"country": "LI",
"created_at": "2015-01-26T07:33:57+01:00",
"email": "email@firmenname.com",
"external_reference": "Referenznummer / Kundennummer",
"firstname": "Vorname",
"id": 70,
"lastname": "Nachname",
"notes": "Bemerkungen",
"organization": "Kundenfirma",
"phone": "Telefonnummer",
"prefix": "Prof. Dr.",
"sex": 2,
"street": "Stra\u00dfe",
"updated_at": "2015-01-31T15:57:18+01:00",
"website": "http://www.firmenname.com",
"zip": "PLZ"
}
# list
curl -H "Content-Type: application/json" -H 'Authorization: Token token="api_key"' https://subdomain.getgrip.de/api/v1/clients
# update
curl -H "Content-Type: application/json" -H 'Authorization: Token token="api_key"' https://subdomain.getgrip.de/api/v1/clients/73 -X PUT -d '{ "external_reference": "client_1234" }'
# delete
curl -H "Content-Type: application/json" -H 'Authorization: Token token="api_key"' https://subdomain.getgrip.de/api/v1/clients/72 -X DELETE
JSON content must be encoded in Unicode, be it UTF-8, UTF-16, or UTF-32 (big or little endian)