Update
curl --request PATCH \
--url https://api.paygentic.io/v0/products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.paygentic.io/v0/products/{id}"
payload = {
"description": "<string>",
"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({description: '<string>', name: '<string>'})
};
fetch('https://api.paygentic.io/v0/products/{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/products/{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([
'description' => '<string>',
'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/products/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\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/products/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/products/{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 \"description\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "prod_d3e4f5g6h7i8j9k0",
"object": "product",
"createdAt": "2024-01-05T09:00:00Z",
"description": "Language model API access",
"merchantId": "org_l1m2n3o4p5q6r7s8",
"metadata": {
"category": "ai_services",
"tier": "standard"
},
"name": "LLM API Service",
"updatedAt": "2024-03-10T14:20: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"
}Products
Update
PATCH
/
v0
/
products
/
{id}
Update
curl --request PATCH \
--url https://api.paygentic.io/v0/products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "<string>"
}
'import requests
url = "https://api.paygentic.io/v0/products/{id}"
payload = {
"description": "<string>",
"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({description: '<string>', name: '<string>'})
};
fetch('https://api.paygentic.io/v0/products/{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/products/{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([
'description' => '<string>',
'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/products/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\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/products/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/products/{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 \"description\": \"<string>\",\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "prod_d3e4f5g6h7i8j9k0",
"object": "product",
"createdAt": "2024-01-05T09:00:00Z",
"description": "Language model API access",
"merchantId": "org_l1m2n3o4p5q6r7s8",
"metadata": {
"category": "ai_services",
"tier": "standard"
},
"name": "LLM API Service",
"updatedAt": "2024-03-10T14:20: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 product Unique identifier for a product
Pattern:
^prod_[a-zA-Z0-9]+$Body
application/json
Revised product summary shown to customers. Sample values: 'Language model API access', 'Data processing and analytics service', 'AI-powered content creation platform'
Updated product title visible to customers. Sample values: 'LLM API Service', 'Data Platform', 'AI Content Generator'
Response
Product updated successfully
Unique identifier for a product
Pattern:
^prod_[a-zA-Z0-9]+$Available options:
product The merchant organization that owns this product
Pattern:
^org_[a-zA-Z0-9]+$Show child attributes
Show child attributes
Was this page helpful?
⌘I