Update
curl --request PATCH \
--url https://api.paygentic.io/v0/sources/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {},
"description": "<string>",
"enabled": true,
"metadata": {},
"name": "<string>"
}
'import requests
url = "https://api.paygentic.io/v0/sources/{id}"
payload = {
"config": {},
"description": "<string>",
"enabled": True,
"metadata": {},
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {},
description: '<string>',
enabled: true,
metadata: {},
name: '<string>'
})
};
fetch('https://api.paygentic.io/v0/sources/{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.paygentic.io/v0/sources/{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([
'config' => [
],
'description' => '<string>',
'enabled' => true,
'metadata' => [
],
'name' => '<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.paygentic.io/v0/sources/{id}"
payload := strings.NewReader("{\n \"config\": {},\n \"description\": \"<string>\",\n \"enabled\": true,\n \"metadata\": {},\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.paygentic.io/v0/sources/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {},\n \"description\": \"<string>\",\n \"enabled\": true,\n \"metadata\": {},\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/sources/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {},\n \"description\": \"<string>\",\n \"enabled\": true,\n \"metadata\": {},\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "src_t1u2v3w4x5y6z7a8",
"config": {
"ampersandProjectId": "proj_345678"
},
"createdAt": "2024-01-10T08:00:00Z",
"description": "Data warehouse query tracking",
"enabled": false,
"metadata": {
"billableMetricMapping": {
"revenue": "bm_j7k8l9m0n1o2p3q4"
}
},
"name": "Data Processing Monitor",
"planId": "plan_b9c0d1e2f3g4h5i6",
"processingMode": "automatic",
"type": "stripe_revenue",
"updatedAt": "2024-03-05T16:45:00Z"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Sources
Update
PATCH
/
v0
/
sources
/
{id}
Update
curl --request PATCH \
--url https://api.paygentic.io/v0/sources/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"config": {},
"description": "<string>",
"enabled": true,
"metadata": {},
"name": "<string>"
}
'import requests
url = "https://api.paygentic.io/v0/sources/{id}"
payload = {
"config": {},
"description": "<string>",
"enabled": True,
"metadata": {},
"name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
config: {},
description: '<string>',
enabled: true,
metadata: {},
name: '<string>'
})
};
fetch('https://api.paygentic.io/v0/sources/{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.paygentic.io/v0/sources/{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([
'config' => [
],
'description' => '<string>',
'enabled' => true,
'metadata' => [
],
'name' => '<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.paygentic.io/v0/sources/{id}"
payload := strings.NewReader("{\n \"config\": {},\n \"description\": \"<string>\",\n \"enabled\": true,\n \"metadata\": {},\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.paygentic.io/v0/sources/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {},\n \"description\": \"<string>\",\n \"enabled\": true,\n \"metadata\": {},\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/sources/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {},\n \"description\": \"<string>\",\n \"enabled\": true,\n \"metadata\": {},\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "src_t1u2v3w4x5y6z7a8",
"config": {
"ampersandProjectId": "proj_345678"
},
"createdAt": "2024-01-10T08:00:00Z",
"description": "Data warehouse query tracking",
"enabled": false,
"metadata": {
"billableMetricMapping": {
"revenue": "bm_j7k8l9m0n1o2p3q4"
}
},
"name": "Data Processing Monitor",
"planId": "plan_b9c0d1e2f3g4h5i6",
"processingMode": "automatic",
"type": "stripe_revenue",
"updatedAt": "2024-03-05T16:45:00Z"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Path Parameters
The unique identifier of the source Unique identifier for a source
Pattern:
^src_[a-zA-Z0-9]+$Body
application/json
Configuration specific to the source type
Description of the source
Whether the source is enabled
Metadata for the source
Display name for the source
How events are processed - automatic (immediate) or manual (requires approval)
Available options:
automatic, manual Response
Source updated successfully
Unique identifier for a source
Pattern:
^src_[a-zA-Z0-9]+$Available options:
source Unique identifier for an organization
Pattern:
^org_[a-zA-Z0-9]+$Unique identifier for a plan
Pattern:
^plan_[a-zA-Z0-9]+$Available options:
automatic, manual Available options:
stripe_revenue Was this page helpful?
⌘I