import requests
url = "https://api.example.com/api/v1/pacts/{pact_id}/completion-conditions"
payload = { "completion_conditions": [{ "threshold": "<string>" }] }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.example.com/api/v1/pacts/{pact_id}/completion-conditions \
--header 'Content-Type: application/json' \
--data '
{
"completion_conditions": [
{
"threshold": "<string>"
}
]
}
'{
"result": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"intent": "<string>",
"spec": {
"policies": [
{
"name": "<string>",
"type": "transfer",
"rules": {},
"priority": 0,
"is_active": true
}
],
"completion_conditions": [
{
"type": "time_elapsed",
"threshold": "<string>"
}
],
"execution_plan": "<string>"
},
"status": "pending_approval",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"operator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"type": "human",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"is_temporary": false,
"owner_principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"onboarding_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"original_intent": "<string>",
"approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_key": "<string>",
"activated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"progress_tx_count": 0,
"progress_usd_spent": "0",
"is_default": false,
"effective_policies": [
{}
],
"recipe_slugs": [
"<string>"
],
"recent_txs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"operation_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"request_id": "<string>"
}
]
},
"success": true,
"suggestion": "",
"message": "",
"meta": {
"total": 123,
"offset": 123,
"limit": 123,
"has_more": true,
"after": "<string>",
"before": "<string>"
}
}{
"success": false,
"error": {
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
}Update completion conditions
Update the completion conditions of an active pact. Only tx_count, amount_spent, and amount_spent_usd conditions may be modified, and thresholds can only be increased — decreasing a threshold could cause the pact to complete prematurely.
import requests
url = "https://api.example.com/api/v1/pacts/{pact_id}/completion-conditions"
payload = { "completion_conditions": [{ "threshold": "<string>" }] }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.example.com/api/v1/pacts/{pact_id}/completion-conditions \
--header 'Content-Type: application/json' \
--data '
{
"completion_conditions": [
{
"threshold": "<string>"
}
]
}
'{
"result": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"operator_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"intent": "<string>",
"spec": {
"policies": [
{
"name": "<string>",
"type": "transfer",
"rules": {},
"priority": 0,
"is_active": true
}
],
"completion_conditions": [
{
"type": "time_elapsed",
"threshold": "<string>"
}
],
"execution_plan": "<string>"
},
"status": "pending_approval",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"operator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"external_id": "<string>",
"type": "human",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {},
"is_temporary": false,
"owner_principal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"onboarding_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"original_intent": "<string>",
"approval_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"api_key": "<string>",
"activated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"progress_tx_count": 0,
"progress_usd_spent": "0",
"is_default": false,
"effective_policies": [
{}
],
"recipe_slugs": [
"<string>"
],
"recent_txs": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"operation_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"request_id": "<string>"
}
]
},
"success": true,
"suggestion": "",
"message": "",
"meta": {
"total": 123,
"offset": 123,
"limit": 123,
"has_more": true,
"after": "<string>",
"before": "<string>"
}
}{
"success": false,
"error": {
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
}Headers
Path Parameters
The UUID of the active pact whose completion conditions to update, as returned by the submit or list endpoints.
Body
Request body for PATCH /pacts/{pact_id}/completion-conditions.
Only TX_COUNT, AMOUNT_SPENT, and AMOUNT_SPENT_USD conditions may be supplied. Thresholds can only be increased relative to the current value to avoid accidentally completing an active pact.
New completion conditions (only tx_count / amount_spent / amount_spent_usd allowed).
1Show child attributes
Show child attributes
Response
Successful Response
Public pact detail response without delegation internals.
Show child attributes
Show child attributes
Pagination metadata for list responses.
Supports both legacy offset-based and cursor-based pagination.
Cursor fields (has_more, after, before) are populated for
cursor-paginated endpoints. Legacy fields (offset, limit) are
populated when the caller uses the deprecated offset parameter.
Show child attributes
Show child attributes