Skip to content

Create doctor letter ​

Creates a new doctor letter.

Note: This endpoint requires a user-scoped OAuth token. A pure client_credentials token without user context will be rejected. The treating user is automatically derived from the token and cannot be set manually.

Request ​

POST /api/oauth/v2/resource/doctor-letters

HeaderValue
AuthorizationBearer {access_token}
Content-Typeapplication/json

Body parameters ​

FieldTypeRequiredDescription
customerUuidstringYesUUID of the assigned customer
namestringNoName of the doctor letter
textstringNoContent of the doctor letter
printedbooleanNoWhether the letter has been printed
datestringNoDate of the doctor letter (YYYY-MM-DD, default: today)
receiverobjectNoRecipient of the doctor letter
receiver.titlestringNoTitle
receiver.firstNamestringNoFirst name
receiver.lastNamestringNoLast name
receiver.institutestringNoInstitute or facility
receiver.streetstringNoStreet
receiver.zipstringNoPostal code
receiver.citystringNoCity
receiver.countrystringNoCountry (ISO 3166-1 alpha-2)
receiver.telstringNoPhone number
receiver.telCodestringNoPhone country code
receiver.faxstringNoFax number
receiver.emailstringNoEmail address

Response ​

Success (201 Created) ​

json
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Referral letter",
    "text": "Dear colleague, I am writing to report on the patient Anna Muster...",
    "date": "2026-06-09",
    "printed": false,
    "customer": {
      "id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
      "firstName": "Anna",
      "lastName": "Muster"
    },
    "treatingUser": {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "firstName": "Dr. Maria",
      "lastName": "Huber"
    },
    "receiver": {
      "title": "Dr.",
      "firstName": "Klaus",
      "lastName": "Berger",
      "institute": "Internal Medicine Specialist Practice",
      "street": "Hauptstraße 12",
      "zip": "4020",
      "city": "Linz",
      "country": "AT",
      "tel": "0732123456",
      "telCode": "+43",
      "fax": null,
      "email": "k.berger@example.at"
    }
  }
}

Response fields ​

See Get doctor letter for the full field description.

Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/doctor-letters" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "customerUuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "name": "Muster GmbH",
    "text": "beispiel",
    "printed": "beispiel",
    "date": "2026-04-15T10:00:00",
    "receiver.title": "beispiel",
    "receiver.firstName": "Muster GmbH",
    "receiver.lastName": "Muster GmbH",
    "receiver.institute": "beispiel",
    "receiver.street": "Musterstraße 1",
    "receiver.zip": "4020",
    "receiver.city": "Linz",
    "receiver.country": "AT",
    "receiver.tel": "+43 664 1234567",
    "receiver.telCode": "+43 664 1234567",
    "receiver.fax": "beispiel",
    "receiver.email": "anna.muster@example.com"
  }'
Parameter
Zuerst Token anfordern

Possible errors ​

StatusCodeDescription
400validation_errorInvalid request data (e.g. customerUuid missing)
401invalid_clientInvalid or missing access token
403insufficient_scopeScope medicals not present
404not_foundCustomer not found

Offisy GmbH