The Update correction status method is used for approving or declining a correction. 1C can use this method to automate the accounting of payments cancelled in the platform or paid from the account balance (see also Create correction). A correction can be approved or declined for the current reseller or any of its downstream resellers. Additionally, the Correction approved event handler can be configured for approving a correction (see ).
PATCH {base_url}/api/v3/resellers/{reseller_id}/corrections/{correction_id}
JSON
{
"data": {
"attributes": {
"status" : "{status}"
}
}
}
Arguments
Response model
If no errors are encountered, the method returns data as the information about the correction (see the response model in Create correction).
Request example
XML
PATCH /api/v3/resellers/1/corrections/correction/738
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
JSON
{
"data": {
"attributes": {
"status" : "approved"
}
}
}
Response example
JSON
{
"data": {
"id": "738",
"type": "corrections",
"attributes": {
"created_at": "2021-08-10T12:18:42.721974+0300",
"updated_at": "2021-08-10T12:19:36.144666+0300",
"account_id": 710,
"manager_id": 225,
"status": "approved",
"total": "100.25",
"included_invoice": true,
"subscription_id": 3008954,
"period_from": "2021-12-01",
"period_to": "2021-12-31",
"comment": "top-up payment",
"approved_at": "2021-08-10"
}
}
}