> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.tabs.com/_mcp/server.

# Change event type for selected billing terms and POBs in a group

PATCH https://integrators.prod.api.tabsplatform.com/v3/contracts/{id}/billing-term-groups/{groupId}/event-type
Content-Type: application/json

Reference: https://docs.tabs.com/api-reference/contracts/changeBillingTermGroupEventType

## Authentication

- `Authorization` header (required) — API Key authentication via header

## Request

### Path parameters

- `id` (string, required) — Contract Id
- `groupId` (string, required) — Billing Term Group Id

### Body (application/json)

This endpoint expects a ChangeBillingTermGroupEventTypeDto.

- `billingTermIds` (list of string, required) — IDs of the billing terms (within the group) whose event type should be set to toEventTypeId. Pick exactly the rows to change — in a many-to-many group the others are left untouched. May be empty when only performance obligations are being changed.
- `performanceObligationIds` (list of string, required) — IDs of the performance obligations (within the group) whose event type should be set to toEventTypeId. May be empty when only billing terms are being changed.
- `toEventTypeId` (string, required) — The event type to assign to the selected billing terms and performance obligations. Must belong to the merchant.

## Response

### 200

Event type changed for the selected billing terms and performance obligations within the group; any rows not listed in the request are left untouched. The change is applied atomically and is only accepted if the group's event types stay in sync afterward.

- `payload` (ChangeBillingTermGroupEventTypeResponseDto, required) — Response payload, will be empty when success is false
- `success` (boolean, required) — Boolean with true=success, false=failure
- `message` (string, required) — Plain-text description of the result
- `error` (IntegratorsApiError, optional) — json element with any error messages or warnings

## Errors

### 400 Bad Request Error

Invalid request, or a provided BT/POB does not belong to the group

- `any`

### 404 Not Found Error

Contract, billing term group, or target event type not found

- `any`

### 409 Conflict Error

Change would break the event-type invariant for the group

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

## Types

### ChangeBillingTermGroupEventTypeResponseDto

- `message` (string, required) — Human-readable summary of what was updated
- `updatedBillingTermIds` (list of string, required) — IDs of the billing terms whose event type was changed
- `updatedPerformanceObligationIds` (list of string, required) — IDs of the performance obligations whose event type was changed

### IntegratorsApiError

- `code` (double, required) — API response code
- `message` (string, required) — API response message
- `errorCode` (string, optional) — Machine-readable error code
- `details` (IntegratorsApiErrorDetails, optional) — Additional details about the error

### IntegratorsApiErrorDetails

Additional details about the error

## Examples

**Request**

```json
{
  "billingTermIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "performanceObligationIds": [
    "123e4567-e89b-12d3-a456-426614174001"
  ],
  "toEventTypeId": "123e4567-e89b-12d3-a456-426614174002"
}
```

**Response**

```json
{
  "payload": {
    "message": "Updated event type for 1 billing term(s) and 1 performance obligation(s) in group ...",
    "updatedBillingTermIds": [
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "updatedPerformanceObligationIds": [
      "123e4567-e89b-12d3-a456-426614174000"
    ]
  },
  "success": true,
  "message": "string",
  "error": {
    "code": 1.1,
    "message": "string",
    "errorCode": "string",
    "details": {}
  }
}
```

**SDK Code**

```python
import requests

url = "https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type"

payload = {
    "billingTermIds": ["123e4567-e89b-12d3-a456-426614174000"],
    "performanceObligationIds": ["123e4567-e89b-12d3-a456-426614174001"],
    "toEventTypeId": "123e4567-e89b-12d3-a456-426614174002"
}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type';
const options = {
  method: 'PATCH',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"billingTermIds":["123e4567-e89b-12d3-a456-426614174000"],"performanceObligationIds":["123e4567-e89b-12d3-a456-426614174001"],"toEventTypeId":"123e4567-e89b-12d3-a456-426614174002"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type"

	payload := strings.NewReader("{\n  \"billingTermIds\": [\n    \"123e4567-e89b-12d3-a456-426614174000\"\n  ],\n  \"performanceObligationIds\": [\n    \"123e4567-e89b-12d3-a456-426614174001\"\n  ],\n  \"toEventTypeId\": \"123e4567-e89b-12d3-a456-426614174002\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"billingTermIds\": [\n    \"123e4567-e89b-12d3-a456-426614174000\"\n  ],\n  \"performanceObligationIds\": [\n    \"123e4567-e89b-12d3-a456-426614174001\"\n  ],\n  \"toEventTypeId\": \"123e4567-e89b-12d3-a456-426614174002\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"billingTermIds\": [\n    \"123e4567-e89b-12d3-a456-426614174000\"\n  ],\n  \"performanceObligationIds\": [\n    \"123e4567-e89b-12d3-a456-426614174001\"\n  ],\n  \"toEventTypeId\": \"123e4567-e89b-12d3-a456-426614174002\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type', [
  'body' => '{
  "billingTermIds": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "performanceObligationIds": [
    "123e4567-e89b-12d3-a456-426614174001"
  ],
  "toEventTypeId": "123e4567-e89b-12d3-a456-426614174002"
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"billingTermIds\": [\n    \"123e4567-e89b-12d3-a456-426614174000\"\n  ],\n  \"performanceObligationIds\": [\n    \"123e4567-e89b-12d3-a456-426614174001\"\n  ],\n  \"toEventTypeId\": \"123e4567-e89b-12d3-a456-426614174002\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "billingTermIds": ["123e4567-e89b-12d3-a456-426614174000"],
  "performanceObligationIds": ["123e4567-e89b-12d3-a456-426614174001"],
  "toEventTypeId": "123e4567-e89b-12d3-a456-426614174002"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://integrators.prod.api.tabsplatform.com/v3/contracts/123e4567-e89b-12d3-a456-426614174000/billing-term-groups/123e4567-e89b-12d3-a456-426614174000/event-type")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```