Update Adjustment
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/subscriptions/{subscription_id}/adjustments/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"adjustment": {
"amount": 123,
"concept": "<string>",
"start_period": "2023-12-25",
"total_cycles": 123
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
adjustment: {
amount: 123,
concept: '<string>',
start_period: '2023-12-25',
total_cycles: 123
}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/subscriptions/{subscription_id}/adjustments/{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/subscriptions/{subscription_id}/adjustments/{id}"
payload = { "adjustment": {
"amount": 123,
"concept": "<string>",
"start_period": "2023-12-25",
"total_cycles": 123
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"adjustment_type": "debit",
"recurrence_type": "fixed_cycles",
"amount": 123,
"concept": "<string>",
"start_period": "2023-12-25",
"end_period": "2023-12-25",
"total_cycles": 123,
"cycles_applied": 123,
"active": true,
"remaining_cycles": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": 123,
"name": "<string>"
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Treasury Adjustments
Update Adjustment
Update an existing adjustment in a subscription
PATCH
/
api
/
v1
/
accounts
/
{account_id}
/
treasury
/
subscriptions
/
{subscription_id}
/
adjustments
/
{id}
Update Adjustment
curl --request PATCH \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/subscriptions/{subscription_id}/adjustments/{id} \
--header 'Content-Type: application/json' \
--header 'api_access_token: <api-key>' \
--data '
{
"adjustment": {
"amount": 123,
"concept": "<string>",
"start_period": "2023-12-25",
"total_cycles": 123
}
}
'const options = {
method: 'PATCH',
headers: {api_access_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
adjustment: {
amount: 123,
concept: '<string>',
start_period: '2023-12-25',
total_cycles: 123
}
})
};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/treasury/subscriptions/{subscription_id}/adjustments/{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/subscriptions/{subscription_id}/adjustments/{id}"
payload = { "adjustment": {
"amount": 123,
"concept": "<string>",
"start_period": "2023-12-25",
"total_cycles": 123
} }
headers = {
"api_access_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": 123,
"adjustment_type": "debit",
"recurrence_type": "fixed_cycles",
"amount": 123,
"concept": "<string>",
"start_period": "2023-12-25",
"end_period": "2023-12-25",
"total_cycles": 123,
"cycles_applied": 123,
"active": true,
"remaining_cycles": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": 123,
"name": "<string>"
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}Authorizations
Path Parameters
ID of the adjustment
The numeric ID of the account
The numeric ID of the subscription
Body
application/json
Show child attributes
Show child attributes
Response
Success
Available options:
debit, credit Available options:
fixed_cycles, infinite Show child attributes
Show child attributes