Skip to main content
PUT
/
customers
/
{customer_id}
/
watchlists
/
subscriptions
/
{subscription_id}
Update watchlist monitoring subscription
curl --request PUT \
  --url https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_consent": true,
  "auto_renew": true,
  "created": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "period_end": "2023-12-25",
  "period_start": "2023-12-25",
  "provider_subscription_id": "<string>"
}
'
import requests

url = "https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id}"

payload = {
"customer_consent": True,
"auto_renew": True,
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"period_end": "2023-12-25",
"period_start": "2023-12-25",
"provider_subscription_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_consent: true,
auto_renew: true,
created: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
period_end: '2023-12-25',
period_start: '2023-12-25',
provider_subscription_id: '<string>'
})
};

fetch('https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customer_consent' => true,
'auto_renew' => true,
'created' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'period_end' => '2023-12-25',
'period_start' => '2023-12-25',
'provider_subscription_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id}"

payload := strings.NewReader("{\n \"customer_consent\": true,\n \"auto_renew\": true,\n \"created\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"period_end\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"provider_subscription_id\": \"<string>\"\n}")

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

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_consent\": true,\n \"auto_renew\": true,\n \"created\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"period_end\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"provider_subscription_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.synctera.com/v0/customers/{customer_id}/watchlists/subscriptions/{subscription_id}")

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

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_consent\": true,\n \"auto_renew\": true,\n \"created\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"period_end\": \"2023-12-25\",\n \"period_start\": \"2023-12-25\",\n \"provider_subscription_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "customer_consent": true,
  "auto_renew": true,
  "created": "2023-11-07T05:31:56Z",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "period_end": "2023-12-25",
  "period_start": "2023-12-25",
  "provider_subscription_id": "<string>"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}
{
"code": "BAD_REQUEST_BODY",
"detail": "missing required fields: first_name, dob",
"status": 400,
"title": "Bad Request Body",
"type": "https://dev.synctera.com/errors/bad-request-body"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

subscription_id
string<uuid>
required

Watchlist monitoring subscription ID

Example:

"7d943c51-e4ff-4e57-9558-08cab6b963c7"

customer_id
string<uuid>
required

The customer's unique identifier

Example:

"7d943c51-e4ff-4e57-9558-08cab6b963c7"

Body

application/json

Watchlist monitoring subscription to be updated. The only field that matters is status; all other fields are ignored.

Whether this customer has consented to being enrolled for watchlist monitoring

auto_renew
boolean

Whether this subscription should automatically renew when the subscription period is over (default: vendor-dependent).

created
string<date-time>

When this subscription was created

id
string<uuid>

Unique identifier for this subscription

period_end
string<date>

The date when monitoring of this individual should end.

period_start
string<date>

The date when monitoring of this individual should begin (default: today).

provider_subscription_id
string

External provider subscription id

status
enum<string>
Available options:
ACTIVE,
INACTIVE

Response

Updated watchlist subscription

Whether this customer has consented to being enrolled for watchlist monitoring

auto_renew
boolean

Whether this subscription should automatically renew when the subscription period is over (default: vendor-dependent).

created
string<date-time>

When this subscription was created

id
string<uuid>

Unique identifier for this subscription

period_end
string<date>

The date when monitoring of this individual should end.

period_start
string<date>

The date when monitoring of this individual should begin (default: today).

provider_subscription_id
string

External provider subscription id

status
enum<string>
Available options:
ACTIVE,
INACTIVE