# update_services

Update one or more services for a building. Each entry requires a serviceId and at least one field to update; fields
left out keep their current value.

<!-- INPUT_BLOCK_START -->

## Input

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `buildingId` | `string` | Yes | The ID of the building the services belong to |
| `services` | `Service[]` | Yes | Array of services to update - [Service](#service) |

### Service

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceId` | `string` | Yes | The ID of the service to update |
| `name` | `string` | No | Display name of the service (3-64 characters) |
| `amountCents` | `number` | No | Price in the smallest currency unit (e.g., pence, cents). Includes VAT unless the service was set up net outside the API. |
| `amountCurrency` | `string` | No | ISO 4217 currency code (e.g., GBP, EUR) |
| `amountType` | `AmountType` | No | Set to GROSS to move a net service to gross pricing. A service cannot be moved back to net. - [AmountType](#amounttype) |
| `applicationUnit` | `ApplicationUnit` | No | How the service is charged. A per-billing-period service can be moved to one of these, but not back. Moving a service to another application unit clears its schedule. - [ApplicationUnit](#applicationunit) |
| `occurrenceUnit` | `OccurrenceUnit` | No | How often the service recurs. Only for PER_UNIT_OF_SERVICE services, which must end up with both or neither of occurrenceUnit and occurrenceFrequency. - [OccurrenceUnit](#occurrenceunit) |
| `occurrenceFrequency` | `number` | No | The number of occurrence units between charges, at least 1. Only for PER_UNIT_OF_SERVICE services. |
| `prorationPolicy` | `ProrationPolicy` | No | What a partial final occurrence charges. Only for PER_UNIT_OF_SERVICE services. - [ProrationPolicy](#prorationpolicy) |
| `vatCodeId` | `string` | No | The ID of a VAT code from the building's workspace |
| `generalLedgerId` | `string` | No | The uuid of a general ledger from the building's workspace, as get_service returns it. When invoicing is enabled for the workspace, any update to a service without a ledger must give one. |
| `chargeTypeId` | `string` | No | The ID of a finance charge type available to the workspace's organisation, used to classify the service |

### AmountType

| Value | Description |
| --- | --- |
| `GROSS` | Amount includes VAT |

### ApplicationUnit

| Value | Description |
| --- | --- |
| `PER_BOOKING` | Charged once per booking |
| `PER_UNIT_OF_SERVICE` | Charged on a recurring schedule, such as monthly |

### OccurrenceUnit

| Value | Description |
| --- | --- |
| `DAYS` | Recurs every given number of days |
| `WEEKS` | Recurs every given number of weeks |
| `MONTHS` | Recurs every given number of months, on the day of the month the service starts |

### ProrationPolicy

| Value | Description |
| --- | --- |
| `FULL_OCCURRENCE` | Every occurrence is charged in full |
| `PRO_RATA` | A partial final occurrence is charged for the share of its days within the booking |

<!-- INPUT_BLOCK_END -->

<!-- OUTPUT_BLOCK_START -->

## Output

| Field | Type | Description |
| --- | --- | --- |
| `content` | `ContentItem[]` | Array of content items returned by the tool - [ContentItem](#contentitem) |
| `isError` | `boolean` | Whether the tool execution resulted in an error |

### ContentItem

| Field | Type | Description |
| --- | --- | --- |
| `type` | `'text'` | Content type (currently only 'text' is supported) |
| `text` | `string` | The text content to display |

<!-- OUTPUT_BLOCK_END -->
