Skip to content

Create Customer

Creates a new customer.

Request

POST /api/oauth/v2/resource/customers

HeaderValue
AuthorizationBearer {access_token}
Content-Typeapplication/json

Body parameters

Note: At least one of the fields firstName, lastName, or companyName is required.

FieldTypeRequiredDescription
firstNamestringNoFirst name
lastNamestringNoLast name
companyNamestringNoCompany name
titlestringNoTitle (e.g. Dr., Mag.)
emailstringNoEmail address
telstringNoPhone number
telCodestringNoCountry dialing code (e.g. +43)
streetstringNoStreet and house number
zipstringNoPostal code
citystringNoCity
countrystringNoCountry code (ISO 3166-1 alpha-2, e.g. AT)
birthdaystringNoDate of birth (YYYY-MM-DD)
sexintegerNoSex
noticestringNoInternal note
customerNumberstringNoCustomer number
socialNumberstringNoSocial security number

Response

Success (201 Created)

json
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": null,
    "firstName": "Max",
    "lastName": "Mustermann",
    "email": "max.mustermann@example.com",
    "phone": "+43 676 9876543",
    "birthday": "1990-08-23",
    "socialNumber": null,
    "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 POST "https://my.offisy.at/api/oauth/v2/resource/customers" \
  -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

StatusCodeDescription
400validation_errorInvalid request data (e.g. no name provided)
401invalid_clientInvalid or missing access token
403insufficient_scopeScope customers not present

Offisy GmbH