POST Apply GTM bulk update
Base URL: https://server-url-from-token-page.endpoint. Version: 1.2.0.
POST /api/v1/public/gtm/bulk-updates — Apply GTM bulk update
Read/write token required
Apply the exact GTM bulk change with its previewToken. Reject stale previews and non-excluded blocked records before any write. Returns updated, unchanged and explicitly excluded IDs. Preserves unrelated contexts and enforces parent dependencies. Preview and apply are callable with existing write permissions; no extra human approval gate.
Send the documented JSON object. Workspace scope comes exclusively from the bearer credential. Requires a read/write API credential. Check receipts before retrying a timed-out write.
JSON body fields
input(body, object, required)See the JSON schema for this field’s contract.
change(body, object | object | object, required)See the JSON schema for this field’s contract.
previewToken(body, string, required)See the JSON schema for this field’s contract.
- Minimum length: 64
- Maximum length: 64
excludedIds(body, string[], optional)See the JSON schema for this field’s contract.
- Default: []
- Minimum items: 0
- Maximum items: 100
JSON request body schema
{
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {
"change": {
"anyOf": [
{
"type": "object",
"properties": {
"entity": {
"type": "string",
"enum": [
"ACCOUNT"
]
},
"entityIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 1,
"maxItems": 100
},
"offeringId": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"operation": {
"type": "string",
"enum": [
"ADD"
]
},
"segmentIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"entity",
"entityIds",
"offeringId",
"operation",
"segmentIds"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"entity": {
"type": "string",
"enum": [
"ACCOUNT"
]
},
"entityIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 1,
"maxItems": 100
},
"offeringId": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"operation": {
"type": "string",
"enum": [
"REMOVE"
]
},
"segmentIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 1,
"maxItems": 100
}
},
"required": [
"entity",
"entityIds",
"offeringId",
"operation",
"segmentIds"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"entity": {
"type": "string",
"enum": [
"ACCOUNT"
]
},
"entityIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 1,
"maxItems": 100
},
"offeringId": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"operation": {
"type": "string",
"enum": [
"REPLACE"
]
},
"segmentIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 0,
"maxItems": 100,
"default": []
}
},
"required": [
"entity",
"entityIds",
"offeringId",
"operation"
],
"additionalProperties": false
}
]
},
"previewToken": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"excludedIds": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-f\\d]{24}$"
},
"minItems": 0,
"maxItems": 100,
"default": []
}
},
"required": [
"change",
"previewToken"
],
"additionalProperties": false
}
},
"required": [
"input"
],
"additionalProperties": false
}JSON response schema
{
"type": "object",
"properties": {
"updatedIds": {
"type": "array",
"items": {
"type": "string"
}
},
"unchangedIds": {
"type": "array",
"items": {
"type": "string"
}
},
"excludedIds": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"updatedIds",
"unchangedIds",
"excludedIds"
],
"additionalProperties": false
}Responses
200: Operation receipt or read result. Arrays are returned under items; scalar and null results under value.
RateLimit-Policy(header, value, optional)Response header
RateLimit-Limit(header, value, optional)Response header
RateLimit-Remaining(header, value, optional)Response header
RateLimit-Reset(header, value, optional)Response header
400: Invalid operation input or record identifiers.
400 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}401: Bearer credential is missing, expired or invalid.
401 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}402: Insufficient research credits. Add credits before retrying.
402 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}403: Write access or resource permission is required.
403 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}404: Record is not available in the credential workspace.
404 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}405: Use the documented HTTP method.
405 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}409: Revision conflict or a record has dependencies. Refetch and reconcile links before retrying.
409 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}413: Request exceeds the permitted JSON body size.
413 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}429: Rate limit exceeded. Observe Retry-After.
RateLimit-Policy(header, value, optional)Response header
RateLimit-Limit(header, value, optional)Response header
RateLimit-Remaining(header, value, optional)Response header
RateLimit-Reset(header, value, optional)Response header
429 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}500: Internal server error.
500 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}503: Service temporarily unavailable. Observe Retry-After when present.
503 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}504: Execution timed out. A write may have committed; check receipts or progress before retrying.
504 response schema
{
"type": "object",
"additionalProperties": false,
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
}
},
"required": [
"message",
"code"
]
}Apply GTM bulk update
curl -X POST "https://server-url-from-token-page.endpoint/api/v1/public/gtm/bulk-updates" \
-H "Authorization: Bearer $DOE_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data-raw '{
"input": {
"change": {
"entity": "ACCOUNT",
"entityIds": [
"507f1f77bcf86cd799439011"
],
"operation": "ADD",
"offeringId": "507f1f77bcf86cd799439012",
"segmentIds": [
"507f1f77bcf86cd799439013"
]
},
"previewToken": "0000000000000000000000000000000000000000000000000000000000000000",
"excludedIds": []
}
}'Response example
No response example is supplied. See the JSON response schema.