cURL
curl --request DELETE \
--url https://public.api.live.turrisfi.com/v2/upstream/policies/{policyId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.api.live.turrisfi.com/v2/upstream/policies/{policyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v2/upstream/policies/{policyId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Policy Ingestion
Delete Policy
Permanently delete a policy and its transactions
DELETE
/
v2
/
upstream
/
policies
/
{policyId}
cURL
curl --request DELETE \
--url https://public.api.live.turrisfi.com/v2/upstream/policies/{policyId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://public.api.live.turrisfi.com/v2/upstream/policies/{policyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://public.api.live.turrisfi.com/v2/upstream/policies/{policyId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}{
"statusCode": 123,
"requestId": "<string>",
"errorType": "validation_error",
"errorMessage": [
"<string>"
],
"timestamp": "<string>",
"details": {}
}Permanently deletes a policy and every transaction linked to it. This is a hard delete, not a soft delete. The policy must belong to the authenticated upstream entity.
This action cannot be undone. Deleting a policy also deletes all of its transactions.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
policyId | string | Yes | Unique identifier of the policy (MongoDB ObjectId) |
Response
Returns204 No Content on success with an empty body.
Error Scenarios
Bad Request (400)
Returned whenpolicyId is not a valid MongoDB ObjectId format.
{
"statusCode": 400,
"errorType": "validation_error",
"errorMessage": ["policyId must be a mongodb id"],
"requestId": "dev-abc123",
"timestamp": "2025-01-15T10:30:00.000Z"
}
Policy Not Found (404)
Returned whenpolicyId does not exist or belongs to a different upstream entity.
{
"statusCode": 404,
"errorType": "not_found",
"errorMessage": ["Policy not found"],
"requestId": "dev-abc123",
"timestamp": "2025-01-15T10:30:00.000Z"
}
Unauthorized (401)
Missing or invalid authentication token. See Authentication.Authorizations
bearerrestricted-access-token
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the policy
Example:
"6650a1b2c3d4e5f6a7b8c9d0"
Response
Policy and its transactions permanently deleted
Was this page helpful?