For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inGet Paid
DocumentationAPI ReferenceCLI
DocumentationAPI ReferenceCLI
  • Introduction
    • Overview
  • API Reference
      • GETList products
      • POSTCreate a new product
      • GETGet product
      • PUTUpdate product
      • GETGet product by external ID
      • PUTUpdate product by external ID
LogoLogo
Log inGet Paid
API Referenceproducts

Update product by external ID

PUT
https://api.agentpaid.io/api/v2/products/external/:externalId
PUT
/api/v2/products/external/:externalId
1import { PaidClient } from "@paid-ai/paid-node";
2
3async function main() {
4 const client = new PaidClient({
5 token: "YOUR_TOKEN_HERE",
6 });
7 await client.products.updateProductByExternalId("externalId", {
8 body: {},
9 });
10}
11main();
1{
2 "id": "prod_001",
3 "name": "API Pro",
4 "description": "Professional API plan",
5 "createdAt": "2025-01-01T00:00:00.000Z",
6 "updatedAt": "2025-01-15T00:00:00.000Z",
7 "active": true,
8 "productCode": "api-pro",
9 "externalId": "my-product-123",
10 "archivedAt": "2024-01-15T09:30:00Z",
11 "metadata": {},
12 "productAttributes": [
13 {
14 "productAttributeId": "pa_001",
15 "name": "Monthly subscription",
16 "active": true,
17 "pricing": {
18 "pricingType": "RecurringPerUnit",
19 "chargeType": "recurring",
20 "pricePoints": [
21 {
22 "currency": "USD",
23 "unitPrice": 99
24 }
25 ],
26 "pricingModel": "PerUnit",
27 "billingFrequency": "Monthly",
28 "billingType": "Advance"
29 },
30 "creditBenefits": [
31 {
32 "id": "cb_001",
33 "creditsCurrencyId": "cc_123",
34 "amount": 1000,
35 "recipient": "organization",
36 "isInfiniteTotal": false,
37 "allocationCadence": "upfront"
38 }
39 ]
40 }
41 ]
42}
Update a product by external ID. Optionally upsert product attributes with pricing.
Was this page helpful?
Previous

List customers

Next
Built with

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Path parameters

externalIdstringRequired

Request

Body
namestringOptional>=1 character
descriptionstring or nullOptional
activebooleanOptional
productCodestring or nullOptional
externalIdstring or nullOptional
metadatamap from strings to any or nullOptional
productAttributeslist of objectsOptional

Response

200
idstring
namestring
descriptionstring or null
createdAtdatetime
updatedAtdatetime
activeboolean
productCodestring or null
externalIdstring or null
archivedAtdatetime or null
metadatamap from strings to any or null
productAttributeslist of objects

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error