Skip to main content
PUT
/
v1
/
products
/
{product_id}
Update a Specific Product by ID
curl --request PUT \
  --url https://api.trata.ai/v1/products/{product_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "pro.1731301754.OZSMSU1S",
  "orgId": "org.1726902940.GZChqlpU",
  "active": true,
  "defaultPrice": 1299,
  "currency": "USD",
  "description": "Spicy Korean Chicken Wings",
  "name": "Spicy Korean Chicken Wings",
  "shippable": true,
  "features": [],
  "scheduleAppointment": false,
  "props": {},
  "status": "active",
  "createdBy": "trata-system",
  "createdAt": "2024-11-11T05:09:14.979287",
  "updatedBy": "trata-system",
  "updatedAt": "2024-11-11T05:09:14.979289"
}'
{
  "id": "pro.1731301754.OZSMSU1S",
  "orgId": "org.1726902940.GZChqlpU",
  "active": true,
  "defaultPrice": 1299,
  "currency": "USD",
  "description": "Spicy Korean Chicken Wings",
  "name": "Spicy Korean Chicken Wings",
  "shippable": true,
  "features": [],
  "scheduleAppointment": false,
  "props": {},
  "status": "active",
  "createdBy": "trata-system",
  "createdAt": "2024-11-11T05:09:14.979287",
  "updatedBy": "trata-system",
  "updatedAt": "2024-11-11T05:09:14.979289"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

product_id
string
required

ID of the product

Body

application/json
active
boolean
required

Product is active or not

defaultPrice
integer
required

Default price of the product this is represented in the lowest currency denomination. Eg: 1000 for $10

currency
enum<string>
required

Currency of the product

Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BOV,
BRL,
BSD,
BTN,
BWP,
BYN,
BZD,
CAD,
CDF,
CHE,
CHF,
CHW,
CLF,
CLP,
CNY,
COP,
COU,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRU,
MUR,
MVR,
MWK,
MXN,
MXV,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLE,
SLL,
SOS,
SRD,
SSP,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
USN,
UYI,
UYU,
UYW,
UZS,
VED,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XOF,
XPF,
XSU,
XUA,
YER,
ZAR,
ZMW,
ZWL
description
string
required

Description of the product

Required string length: 1 - 512
Example:

"High-quality gardening tools"

name
string
required

Name of the product

Required string length: 1 - 512
Example:

"Garden Tool Set"

status
enum<string>
required
Available options:
active,
inactive
shippable
boolean
default:false

Product is shippable or not. Service is not shippable

features
string[] | null

List of features of the product

scheduleAppointment
boolean
default:false

Product requires appointment scheduling or not

props
object | null

Properties of the product

Example:

"stainless steel"

tags
string[] | null

Tags for the product. This is used for grouping purpose. Eg: ["gardening", "tools"]

Example:

"gardening"

agentIds
string[] | null

List of agent ids which are accessible for this product

Response

Product updated successfully

Product and services offered by the business

status
string
required
id
string
orgId
string
active
boolean
default:false

Product is active or not

defaultPrice
integer | null

Default price of the product this is represented in the lowest currency denomination. Eg: 1000 for $10

currency
string | null
description
string | null

Description of the product

Required string length: 1 - 256
name
string

Name of the product

Required string length: 1 - 256
shippable
boolean
default:false

Product is shippable or not. Service is not shippable

features
string[] | null

List of features of the product

scheduleAppointment
boolean
default:false

Product requires appointment scheduling or not

props
object | null

Properties of the product

tags
string[] | null
createdBy
string
createdAt
string<date-time>
updatedBy
string
updatedAt
string<date-time>
I