[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fbooking-resource-types\u002Fupdate":3,"docs-tabs-entities\u002Fbooking-resource-types\u002Fupdate":6},{"content":4,"lastmod":5},"# Update: Booking resource types\n\n`PATCH \u002Fv1\u002Fbooking-resource-types\u002F:id`\n\nChanges the fields of a booking resource type that are passed in the request. Fields missing from the request body keep their previous values.\n\nFields go at the root of the JSON, without a `fields` wrapper. Every request needs a new `code` — see \"Known specifics\".\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `id` (path) | number | yes | Type identifier. List: [`GET \u002Fv1\u002Fbooking-resource-types`](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `code` | string | yes | New symbolic code of the type. Must differ from the current code and from the codes of other types |\n| `name` | string | no | Type name |\n| `isInfoNotificationOn` | boolean \\| string | no | Booking info message to the client. `true` \u002F `false` or `\"Y\"` \u002F `\"N\"` |\n| `isConfirmationNotificationOn` | boolean \\| string | no | Booking confirmation request |\n| `isReminderNotificationOn` | boolean \\| string | no | Booking reminder |\n| `isFeedbackNotificationOn` | boolean \\| string | no | Feedback request |\n| `isDelayedNotificationOn` | boolean \\| string | no | Message to a client who is running late |\n| `isCancellationNotificationOn` | boolean \\| string | no | Booking cancellation message to the client |\n| `senderCode` | string \\| null | no | Service that sends messages to the client, for example `bitrix24` |\n| `infoNotificationDelay` | number \\| null | no | How many seconds after the booking is made to send the booking info message |\n| `confirmationNotificationDelay` | number \\| null | no | How many seconds before the booking to send the first confirmation request |\n| `confirmationNotificationRepetitions` | number \\| null | no | How many times to repeat the confirmation request, not counting the first one |\n| `confirmationNotificationRepetitionsInterval` | number \\| null | no | Interval between repeats of the confirmation request, in seconds |\n| `confirmationCounterDelay` | number \\| null | no | How many seconds before the booking an unconfirmed booking enters the counter |\n| `reminderNotificationDelay` | number \\| null | no | How many seconds before the booking to send the reminder. `-1` — on the morning of the booking day |\n| `delayedNotificationDelay` | number \\| null | no | After how many seconds of lateness to send the message to the client |\n| `delayedCounterDelay` | number \\| null | no | After how many seconds of lateness the booking enters the calendar counter |\n| `cancellationNotificationDelay` | number \\| null | no | Delay of the booking cancellation message, in seconds |\n| `templateTypeInfo` | string | no | Booking message template: `inanimate`, `animate`, `inanimate_long`. Saved, but not returned in the type card |\n| `templateTypeConfirmation` | string | no | Confirmation request template: `inanimate`, `animate`, `inanimate_long` |\n| `templateTypeReminder` | string | no | Reminder template. The only value is `base` |\n| `templateTypeFeedback` | string | no | Feedback request template: `inanimate`, `animate` |\n| `templateTypeDelayed` | string | no | Late-arrival message template: `inanimate`, `animate` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types\u002F31\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Nail technicians\",\n    \"code\": \"master-2\"\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types\u002F31\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Nail technicians\",\n    \"code\": \"master-2\"\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types\u002F31', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    name: 'Nail technicians',\n    code: 'master-2',\n  }),\n})\n\nconst { data } = await res.json()\nconsole.log(data.name, data.code)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types\u002F31', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    name: 'Nail technicians',\n    code: 'master-2',\n  }),\n})\n\nconst { data } = await res.json()\nconsole.log(data.name, data.code)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | object | Card of the type after the change. The card fields are listed in the \"Response fields\" section of the [Get a booking resource type](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fget) page |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 31,\n    \"code\": \"master-2\",\n    \"name\": \"Nail technicians\",\n    \"senderCode\": null,\n    \"isInfoNotificationOn\": false,\n    \"isConfirmationNotificationOn\": false,\n    \"isReminderNotificationOn\": false,\n    \"isFeedbackNotificationOn\": false,\n    \"isDelayedNotificationOn\": false,\n    \"isCancellationNotificationOn\": false,\n    \"infoNotificationDelay\": null,\n    \"confirmationNotificationDelay\": 86400,\n    \"confirmationNotificationRepetitions\": null,\n    \"confirmationNotificationRepetitionsInterval\": 10800,\n    \"confirmationCounterDelay\": 10800,\n    \"reminderNotificationDelay\": -1,\n    \"delayedNotificationDelay\": 300,\n    \"delayedCounterDelay\": 300,\n    \"cancellationNotificationDelay\": 600,\n    \"templateTypeConfirmation\": \"inanimate\",\n    \"templateTypeReminder\": \"base\",\n    \"templateTypeFeedback\": \"inanimate\",\n    \"templateTypeDelayed\": \"inanimate\"\n  }\n}\n```\n\n## Error response example\n\n422 — the current `code` is passed in the body:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Resource type with code \\\"master\\\" already exists\",\n    \"b24Code\": \"1011\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 404 | `ENTITY_NOT_FOUND` | No type with this `id`. Message `Booking record not found` |\n| 422 | `BITRIX_ERROR` | `code` matches the current code or the code of another type, `b24Code` `1011` |\n| 422 | `BITRIX_ERROR` | The body has no `code`. Message `Internal server error.` |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message `id must be a positive safe integer` |\n| 400 | `INVALID_PARAMS` | Empty body. Message `Provide a non-empty object of fields` |\n| 400 | `INVALID_PARAMS` | A field not listed in the \"Request fields (body)\" table. Message `Unknown booking field` |\n| 400 | `INVALID_PARAMS` | A field value is an object or an array. Message `Fields must contain scalar values` |\n| 400 | `READONLY_FIELD` | `id` is passed in the body. Message `id is read-only` |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 429 | `RATE_LIMITED` | Request rate limit exceeded. The effective cap is in the `x-ratelimit-limit` header |\n| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned a response of an unexpected shape. If this happened while re-reading the card after the write, the changes are already saved — check the type with a [get request](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fget) before retrying |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**An update requires a new `code`.** A request without `code` is rejected with `422 BITRIX_ERROR` and the message `Internal server error.`; a request with the current code is rejected with `422 BITRIX_ERROR` saying that this code already exists. To change other fields and keep the original code, make two requests: the first with a temporary `code`, the second with the original one.\n\n## See also\n\n- [Get a booking resource type](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fget)\n- [List booking resource types](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Flist)\n- [Create a booking resource type](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fcreate)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-13",{},1795415177538]