Skip to navigation

Create or replace the Business Event Definition

This endpoint is an idempotent upsert of your single Business Event Definition. It is a full replace: attributes and validations omitted from the body are removed.

To create the Business Event Definition, send no If-Match, or send If-None-Match: * to make the request fail if a Business Event Definition already exists. To replace it, If-Match is required and must carry the ETag from your last read - omitting it is rejected with 428, and a stale value with 412.

Validations can be created only for attributes defined in the Business Event Definition. A change is refused with 409 if accounting rules still use on an attribute that the change removes in their configuration, or if the attribute’s type or role it changes.

The change takes effect immediately and does not go through an approval workflow, so the response is always 201 or 200. Your user also needs permission to view and edit data structures.

If part of the setup could not be completed straight away, the response lists it in warnings. The Business Event Definition is saved and the setup finishes by itself, so you do not need to resend the request.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Headers

If-MatchstringOptional

The ETag from your last read of the resource. Required when replacing an existing resource, and omitted when creating one.

If-None-MatchenumOptional

Send * for create-only semantics - the request then fails if the resource already exists.

Allowed values:

Request

This endpoint expects an object.
effectiveFromstringOptionalformat: "date"
Date from which the definition applies. When omitted, today's date is used on create and the stored date is kept on replace.
attributeslist of objectsOptional
Every attribute of a business event, in order. A write replaces the whole list.
primaryKeyslist of stringsOptional
Names of the attributes that together identify an event. Each must be one of the attributes.
validationslist of objectsOptional
Rules every incoming event must satisfy. Every attribute a rule refers to must be one of the attributes above. A write replaces the whole list, so omitting it or sending an empty list removes every validation.

Response headers

ETagstringOptional

Current entity tag of the resource. Supply it as If-Match on a subsequent update or deactivation.

Response

OK
effectiveFromstringOptionalformat: "date"
Date from which the definition applies. When omitted, today's date is used on create and the stored date is kept on replace.
attributeslist of objectsOptional
Every attribute of a business event, in order. A write replaces the whole list.
primaryKeyslist of stringsOptional
Names of the attributes that together identify an event. Each must be one of the attributes.
validationslist of objectsOptional
Rules every incoming event must satisfy. Every attribute a rule refers to must be one of the attributes above. A write replaces the whole list, so omitting it or sending an empty list removes every validation.
warningslist of objectsOptionalRead-only
Parts of the setup that could not be completed straight away when you saved. The definition is saved and the setup finishes by itself. Absent when there is nothing to report.

Errors

400
Bad Request Error
401
Unauthorized Error
409
Conflict Error
412
Precondition Failed Error
428
Precondition Error
429
Too Many Requests Error
5XX
Server Error
503
Service Unavailable Error