Block a contact person (tenant:masterdata:write)
POST /api/masterdata/addresses/{id}/contacts/{cid}/block
Module: Master data · operationId: blockContactPerson · Tag: Contact persons · Auth: access token (Authorization: Bearer <accessToken>)
The reason is required (400 "Bitte einen Grund angeben."). A blocked contact is left out of the phone contacts and the platform notification list. Bumps the address version and emits masterdata.address.updated.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes | |
cid |
path | string (uuid) | yes | Contact person id |
Request body
application/json (required)
reason(string): Required except forDUNNING(max length 255)type(string): Block type of an address (not used for contact persons) (one ofGENERAL,PAYMENT,DELIVERY,DUNNING)
Example:
{
"reason": "Zwei Rechnungen über 60 Tage offen",
"type": "PAYMENT"
}
Responses
- 200 Blocked (
application/json) - 400 Malformed body or query parameter (
application/json) - 401 Missing, invalid or expired token (empty body)
- 403 The token lacks the permission or carries no tenant (
application/json) - 404 Not found in the caller's tenant (or merged, see
code) (application/json)
Fields of the 200 answer:
aspNr(integer): Number within the address; assignedavailableFrom1(string, nullable): Reachable from (HH:MM)availableFrom2(string, nullable): Second time window: reachable from (HH:MM)availableTo1(string, nullable): AfteravailableFrom1availableTo2(string, nullable): AfteravailableFrom2birthday(string (date), nullable): Birthday (YYYY-MM-DD)blockReason(string, read-only): Reason of the blockblockedAt(string (date-time), read-only): Time of the blockblockedBy(string, read-only): Actor of the blockcustomFields(CustomFields): Values of tenant-defined fields (/api/masterdata/field-defs) by key. On write the map is merged into the stored values;nullremoves a key, an omitted map keeps all values. Unknown or archived keys and missing required fields answer400.department(string): DepartmentdoNotCall(boolean): Do not callemail1(string (email)): First e-mail addressemail2(string (email)): Second e-mail addressemailOptOut(boolean): No marketing e-mailsfax(string): E.164firstName(string): First name (max length 128)gdprConsent(string): GDPR consent state (one ofUNKNOWN,GRANTED,DENIED,REVOKED; default"UNKNOWN")gdprConsentDate(string (date), nullable): Required whengdprConsentis GRANTEDid(string (uuid)): Id of the contact personinfo(string): Info textisActive(boolean): False whenleftAtis set (defaulttrue)isBlocked(boolean, read-only): Blocked contact: left out of phone contacts and the platform notification list. Set withPOST /addresses/{id}/contacts/{cid}/blockisDefault(boolean): Default contact of the address (at most one)languageCode(string): Language (ISO 639-1)lastName(string): Last name (max length 128)leftAt(string (date), nullable): Date the person left the company; setsisActivefalseletterSalutation(string): Salutation line of letterslinkedinUrl(string (uri)): LinkedIn profile (max length 255)mobile(string): E.164namePrefix(string): Name prefixnameSuffix(string): Name suffixphone1(string): E.164phone2(string): E.164portalUserId(string): Linked desk portal user (max length 255)position(string): PositionpostalAddressAnsNr(integer, nullable):ansNrof a postal address of the same addresspreferredChannel(string): Preferred contact channel (one ofEMAIL,PHONE,MOBILE,LETTER,PORTAL)reportsToAspNr(integer, nullable):aspNrof the manager within the same address (no cycles)roles(array of string): Roles in the buying centre or for ticket routingsalutationCode(string): Code ofsalutationstimezone(string): IANA time zonetitle(string): Titleversion(integer): Version of this contact (child updates)addressVersion(integer, required): New version of the address
Example 200 answer:
{
"addressVersion": 8,
"aspNr": 2,
"email1": "katrin.stadler@alpenhotel-seeblick.example",
"firstName": "Katrin",
"gdprConsent": "UNKNOWN",
"id": "8b0d2f4b-6c8e-4a0c-9e2a-4c6e8a0c2e4a",
"isActive": true,
"isBlocked": false,
"isDefault": false,
"lastName": "Stadler",
"letterSalutation": "Sehr geehrte Frau Stadler",
"phone1": "+498652987612",
"position": "Empfangsleitung und IT",
"postalAddressAnsNr": 1,
"roles": [
"TECHNICAL",
"SUPPORT"
],
"salutationCode": "FRAU",
"version": 3
}
Example request
curl -X POST 'https://api.mbcom.cloud/api/masterdata/addresses/3f6c1a52-7b1e-4d2a-9c8e-2b5f0d6a91e4/contacts/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/block' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
--data '{"reason":"Zwei Rechnungen über 60 Tage offen","type":"PAYMENT"}'