Update Customer
Updates the data of an existing customer.
Request
PUT /api/oauth/v2/resource/customers/{uuid}
Header
| Header | Value |
|---|---|
Authorization | Bearer {access_token} |
Content-Type | application/json |
URL parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
uuid | string | Yes | Unique customer ID |
Body parameters
Note: All fields are optional. After the update, at least one of the fields
firstName,lastName, orcompanyNamemust be set.
| Field | Type | Required | Description |
|---|---|---|---|
firstName | string | No | First name |
lastName | string | No | Last name |
companyName | string | No | Company name |
title | string | No | Title (e.g. Dr., Mag.) |
email | string | No | Email address |
tel | string | No | Phone number |
telCode | string | No | Country dialing code (e.g. +43) |
street | string | No | Street and house number |
zip | string | No | Postal code |
city | string | No | City |
country | string | No | Country code (ISO 3166-1 alpha-2, e.g. AT) |
birthday | string | No | Date of birth (YYYY-MM-DD) |
sex | integer | No | Sex |
notice | string | No | Internal note |
customerNumber | string | No | Customer number |
socialNumber | string | No | Social security number |
Response
Success (200 OK)
json
{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"title": null,
"firstName": "Anna",
"lastName": "Muster",
"email": "anna.neu@example.com",
"phone": "+43 664 1234567",
"birthday": "1985-04-12",
"socialNumber": "1234 120485",
"tenancies": [
{
"id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
"name": "Ordination Muster",
"abbreviation": "OM",
"color": "#00adba"
}
]
}
}Response fields
See Customer Details for the full field description.
Beispiele
bash
curl -X PUT "https://my.offisy.at/api/oauth/v2/resource/customers/b2c3d4e5-f6a7-8901-bcde-f01234567890" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{
"firstName": "Max",
"lastName": "Mustermann",
"companyName": "Muster GmbH",
"title": "beispiel",
"email": "anna.muster@example.com",
"tel": "+43 664 1234567",
"telCode": "+43 664 1234567",
"street": "Musterstraße 1",
"zip": "4020",
"city": "Linz",
"country": "AT",
"birthday": "beispiel",
"sex": "1",
"notice": "beispiel",
"customerNumber": "beispiel",
"socialNumber": "1234010190"
}'Parameter
Zuerst Token anfordern
Possible errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Invalid request data (e.g. no name set) |
| 401 | invalid_client | Invalid or missing access token |
| 403 | insufficient_scope | Scope customers not present |
| 404 | not_found | Customer not found |