Skip to main content
PATCH
/
connections
/
{connection_id}
Update Connection
curl --request PATCH \
  --url https://api.example.com/connections/{connection_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": "8a46e581-48ba-498a-9ad0-2ee72582e1af",
  "email": "[email protected]",
  "mobile": "+1234567890",
  "status": "disconnected"
}
'
import requests

url = "https://api.example.com/connections/{connection_id}"

payload = {
"customer_id": "8a46e581-48ba-498a-9ad0-2ee72582e1af",
"email": "[email protected]",
"mobile": "+1234567890",
"status": "disconnected"
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: '8a46e581-48ba-498a-9ad0-2ee72582e1af',
email: '[email protected]',
mobile: '+1234567890',
status: 'disconnected'
})
};

fetch('https://api.example.com/connections/{connection_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.example.com/connections/{connection_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => '8a46e581-48ba-498a-9ad0-2ee72582e1af',
'email' => '[email protected]',
'mobile' => '+1234567890',
'status' => 'disconnected'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/connections/{connection_id}"

payload := strings.NewReader("{\n \"customer_id\": \"8a46e581-48ba-498a-9ad0-2ee72582e1af\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+1234567890\",\n \"status\": \"disconnected\"\n}")

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

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.patch("https://api.example.com/connections/{connection_id}")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"8a46e581-48ba-498a-9ad0-2ee72582e1af\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+1234567890\",\n \"status\": \"disconnected\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/connections/{connection_id}")

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

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"8a46e581-48ba-498a-9ad0-2ee72582e1af\",\n \"email\": \"[email protected]\",\n \"mobile\": \"+1234567890\",\n \"status\": \"disconnected\"\n}"

response = http.request(request)
puts response.read_body
{
  "connection_id": "<string>",
  "customer_id": "<string>",
  "retailer_id": "<string>",
  "email": "[email protected]",
  "mobile": "+1234567890"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Headers

authorization
string | null
x-api-key
string | null

Path Parameters

connection_id
string
required

Body

application/json
customer_id
string | null

A unique identifier used to map connections to customer records in external systems.

Maximum string length: 64
Example:

"8a46e581-48ba-498a-9ad0-2ee72582e1af"

email
string | null

The email of the user

Maximum string length: 64
mobile
string | null

The customer's mobile phone number

Maximum string length: 16
Example:

"+1234567890"

status
enum<string> | null

The new status of the connection. Currently can only be used to disconnect a connection.

Available options:
disconnected
Example:

"disconnected"

Response

Successful Response

connection_id
string
required

A unique identifier for the connection

Example:

"01J51S0JYV6N7K1030CV1ZKSCA"

customer_id
string
required

A unique identifier used to map connections to customer records in external systems.

Example:

"8a46e581-48ba-498a-9ad0-2ee72582e1af"

retailer_id
string
required

The unique identifier for the retailer in the connection

Example:

"01J7SC0NN73R6F5VVSP3ZKPDA3"

status
enum<string>
required

The status of the connection

Available options:
active,
initialized,
unauthenticated,
disconnected
Example:

"active"

email
string | null
required

The customer's email address

mobile
string | null
required

The customer's mobile phone number

Example:

"+1234567890"