> 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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tabs External API
  version: 1.0.0
paths:
  /v3/contracts/{id}/billing-term-groups/{groupId}/event-type:
    patch:
      operationId: >-
        integrators-api-contractsv-3-controller-change-billing-term-group-event-type
      summary: Change event type for selected billing terms and POBs in a group
      tags:
        - contracts
      parameters:
        - name: id
          in: path
          description: Contract Id
          required: true
          schema:
            type: string
        - name: groupId
          in: path
          description: Billing Term Group Id
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            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.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Contracts_IntegratorsApiContractsv3Controller_changeBillingTermGroupEventType_Response_200
        '400':
          description: Invalid request, or a provided BT/POB does not belong to the group
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: Contract, billing term group, or target event type not found
          content:
            application/json:
              schema:
                description: Any type
        '409':
          description: Change would break the event-type invariant for the group
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangeBillingTermGroupEventTypeDto'
servers:
  - url: https://integrators.prod.api.tabsplatform.com
    description: https://integrators.prod.api.tabsplatform.com
components:
  schemas:
    ChangeBillingTermGroupEventTypeDto:
      type: object
      properties:
        billingTermIds:
          type: array
          items:
            type: string
          description: >-
            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:
          type: array
          items:
            type: string
          description: >-
            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:
          type: string
          format: uuid
          description: >-
            The event type to assign to the selected billing terms and
            performance obligations. Must belong to the merchant.
      required:
        - billingTermIds
        - performanceObligationIds
        - toEventTypeId
      title: ChangeBillingTermGroupEventTypeDto
    ChangeBillingTermGroupEventTypeResponseDto:
      type: object
      properties:
        message:
          type: string
          description: Human-readable summary of what was updated
        updatedBillingTermIds:
          type: array
          items:
            type: string
          description: IDs of the billing terms whose event type was changed
        updatedPerformanceObligationIds:
          type: array
          items:
            type: string
          description: IDs of the performance obligations whose event type was changed
      required:
        - message
        - updatedBillingTermIds
        - updatedPerformanceObligationIds
      title: ChangeBillingTermGroupEventTypeResponseDto
    IntegratorsApiErrorDetails:
      type: object
      properties: {}
      description: Additional details about the error
      title: IntegratorsApiErrorDetails
    IntegratorsApiError:
      type: object
      properties:
        code:
          type: number
          format: double
          description: API response code
        message:
          type: string
          description: API response message
        details:
          $ref: '#/components/schemas/IntegratorsApiErrorDetails'
          description: Additional details about the error
      required:
        - code
        - message
      title: IntegratorsApiError
    Contracts_IntegratorsApiContractsv3Controller_changeBillingTermGroupEventType_Response_200:
      type: object
      properties:
        payload:
          $ref: '#/components/schemas/ChangeBillingTermGroupEventTypeResponseDto'
          description: Response payload, will be empty when success is false
        success:
          type: boolean
          description: Boolean with true=success, false=failure
        message:
          type: string
          description: Plain-text description of the result
        error:
          $ref: '#/components/schemas/IntegratorsApiError'
          description: json element with any error messages or warnings
      required:
        - payload
        - success
        - message
        - error
      title: >-
        Contracts_IntegratorsApiContractsv3Controller_changeBillingTermGroupEventType_Response_200
  securitySchemes:
    custom-header:
      type: apiKey
      in: header
      name: Authorization

```

## Examples



**Request**

```json
{
  "billingTermIds": [
    "a1b2c3d4-e5f6-7890-ab12-cdef34567890"
  ],
  "performanceObligationIds": [
    "b2c3d4e5-f678-90ab-12cd-ef34567890ab"
  ],
  "toEventTypeId": "c3d4e5f6-7890-ab12-cdef-34567890abcd"
}
```

**Response**

```json
{
  "payload": {
    "message": "Updated event type for 1 billing term(s) and 1 performance obligation(s) in group 123e4567-e89b-12d3-a456-426614174000",
    "updatedBillingTermIds": [
      "a1b2c3d4-e5f6-7890-ab12-cdef34567890"
    ],
    "updatedPerformanceObligationIds": [
      "b2c3d4e5-f678-90ab-12cd-ef34567890ab"
    ]
  },
  "success": true,
  "message": "Event type update successful",
  "error": {
    "code": 0,
    "message": "",
    "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": ["a1b2c3d4-e5f6-7890-ab12-cdef34567890"],
    "performanceObligationIds": ["b2c3d4e5-f678-90ab-12cd-ef34567890ab"],
    "toEventTypeId": "c3d4e5f6-7890-ab12-cdef-34567890abcd"
}
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":["a1b2c3d4-e5f6-7890-ab12-cdef34567890"],"performanceObligationIds":["b2c3d4e5-f678-90ab-12cd-ef34567890ab"],"toEventTypeId":"c3d4e5f6-7890-ab12-cdef-34567890abcd"}'
};

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    \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\"\n  ],\n  \"performanceObligationIds\": [\n    \"b2c3d4e5-f678-90ab-12cd-ef34567890ab\"\n  ],\n  \"toEventTypeId\": \"c3d4e5f6-7890-ab12-cdef-34567890abcd\"\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    \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\"\n  ],\n  \"performanceObligationIds\": [\n    \"b2c3d4e5-f678-90ab-12cd-ef34567890ab\"\n  ],\n  \"toEventTypeId\": \"c3d4e5f6-7890-ab12-cdef-34567890abcd\"\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    \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\"\n  ],\n  \"performanceObligationIds\": [\n    \"b2c3d4e5-f678-90ab-12cd-ef34567890ab\"\n  ],\n  \"toEventTypeId\": \"c3d4e5f6-7890-ab12-cdef-34567890abcd\"\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": [
    "a1b2c3d4-e5f6-7890-ab12-cdef34567890"
  ],
  "performanceObligationIds": [
    "b2c3d4e5-f678-90ab-12cd-ef34567890ab"
  ],
  "toEventTypeId": "c3d4e5f6-7890-ab12-cdef-34567890abcd"
}',
  '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    \"a1b2c3d4-e5f6-7890-ab12-cdef34567890\"\n  ],\n  \"performanceObligationIds\": [\n    \"b2c3d4e5-f678-90ab-12cd-ef34567890ab\"\n  ],\n  \"toEventTypeId\": \"c3d4e5f6-7890-ab12-cdef-34567890abcd\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "billingTermIds": ["a1b2c3d4-e5f6-7890-ab12-cdef34567890"],
  "performanceObligationIds": ["b2c3d4e5-f678-90ab-12cd-ef34567890ab"],
  "toEventTypeId": "c3d4e5f6-7890-ab12-cdef-34567890abcd"
] 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()
```