Update product
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/products/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"product": {
"name": "<string>",
"reference": "<string>",
"price": 1,
"tax_rule_id": 123,
"ledger_auxiliary_account_id": 123,
"active": true
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product: {
name: '<string>',
reference: '<string>',
price: 1,
tax_rule_id: 123,
ledger_auxiliary_account_id: 123,
active: true
}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/products/{id}"
payload = { "product": {
"name": "<string>",
"reference": "<string>",
"price": 1,
"tax_rule_id": 123,
"ledger_auxiliary_account_id": 123,
"active": True
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"payload": {
"id": 123,
"name": "<string>",
"reference": "<string>",
"price": 123,
"tax_rule_id": 123,
"ledger_auxiliary_account_id": 123,
"income_kind": "<string>",
"active": true,
"in_use": true
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Treasury Rules
Update product
Update a product or service of the agency’s catalog.
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
treasury
/
products
/
{id}
Update product
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/products/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"product": {
"name": "<string>",
"reference": "<string>",
"price": 1,
"tax_rule_id": 123,
"ledger_auxiliary_account_id": 123,
"active": true
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product: {
name: '<string>',
reference: '<string>',
price: 1,
tax_rule_id: 123,
ledger_auxiliary_account_id: 123,
active: true
}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/products/{id}"
payload = { "product": {
"name": "<string>",
"reference": "<string>",
"price": 1,
"tax_rule_id": 123,
"ledger_auxiliary_account_id": 123,
"active": True
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"payload": {
"id": 123,
"name": "<string>",
"reference": "<string>",
"price": 123,
"tax_rule_id": 123,
"ledger_auxiliary_account_id": 123,
"income_kind": "<string>",
"active": true,
"in_use": true
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Was this page helpful?