Skip to content

Create measurement

Creates a new measurement.

Note: This endpoint requires a user-scoped OAuth token. A pure client_credentials token without user context will be rejected.

Request

POST /api/oauth/v2/resource/customer-values

HeaderValue
AuthorizationBearer {access_token}
Content-Typeapplication/json

Body parameters

FieldTypeRequiredDescription
customerUuidstringYesUUID of the assigned customer (must belong to the same company)
valueTypeUuidstringYesUUID of the measurement type (must exist in the company)
valuestringNoMeasured value. The expected format depends on the value type: for a boolean type, pass a JSON boolean (true/false). Value types of type group are not supported via this endpoint.
datestringNoMeasurement date (YYYY-MM-DD, default: today)

Response

Success (201 Created)

json
{
  "data": {
    "id": "3c7e2a1f-9b4d-4e6a-8f2c-1a5b6c7d8e9f",
    "value": "98.6",
    "date": "2026-06-09",
    "valueType": {
      "id": "7a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
      "name": "Body temperature",
      "color": "#007e87",
      "unit": "°C",
      "abbreviation": "Temp",
      "type": "number",
      "format": "decimal",
      "groupSeparator": ".",
      "showFirstOptionNull": false,
      "showAllCustomerOverview": true,
      "useMotherChildPass": true,
      "isDeleted": false,
      "enumOptionsList": []
    },
    "customer": {
      "id": "f0e1d2c3-b4a5-6789-fedc-ba9876543210",
      "firstName": "Anna",
      "lastName": "Muster"
    }
  }
}

Response fields

See Get measurement for the full field description.

Beispiele
bash
curl -X POST "https://my.offisy.at/api/oauth/v2/resource/customer-values" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "customerUuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "valueTypeUuid": "b2c3d4e5-f6a7-8901-bcde-f01234567890",
    "value": "beispiel",
    "date": "2026-04-15T10:00:00"
  }'
Parameter
Zuerst Token anfordern

Possible errors

StatusCodeDescription
400validation_errorInvalid request data (e.g. customerUuid or valueTypeUuid missing) — error message: "valueTypeUuid is required."
400validation_errorThe measurement type is of type group, which is not supported via this endpoint
401invalid_clientInvalid or missing access token
403insufficient_scopeScope customers not present
404not_foundCustomer or measurement type not found

Offisy GmbH