Get a List of Corrections

The Get a List of Corrections method returns the List of Corrections for the Reseller.

 GET /api/vendor/v1/corrections.json?api_token={api_token}

Arguments

Name

Parameter Type

Data type

Required/ 
Optional

Description

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication)

page

query

integer

Optional

Returning a list of Corrections by current page number

per_page

query

integer

Optional

Setting a number of items in the page

sorting[field]

query

string

Optional

Sorting the list by the specified field

sorting[reversed]

query

string

Optional

Set the reversed sorting mode by the specified field:

  • true — descending sorting.
  • false — ascending sorting (by default).

filters[is_included_in_invoice]

querybooleanOptional

If Corrections were marked as included in the Invoice:

  • true — corrections are included in the Invoice.
  • false corrections are not included in the Invoice.

filters[subscription_id]

query

integer

Optional

Filtering the list by a Subscription ID

filters[created_at]

query

date

Optional

Filtering the list by a creation date

filters[status]

query

string

Optional

Filtering the list by a status

Response model

Название

Тип данных

Описание

id

integerCorrection ID
account_idintegerAccount ID that balance was corrected
manager_idintegerManager ID who created the Correction

status

stringOne of the following statuses of the Correction:
  • declined — a Correction has been declined by a Manager.
  • waiting for approval — a Correction has been added, but hasn't been approved yet.
  • approved — a Correction has been successfully processed (added and approved).

total

floatTotal amount of the correction
is_included_in_invoiceboolean

If the Correction is marked as included in the Invoice:

  • true — the Correction is included in the Invoice.
  • false — the Correction is not included in the Invoice.
subscription_idstringSubscription ID that was selected during the Correction creation, displayed if is_included_in_invoice=true

description

stringDetails information about the Correction, displayed if is_included_in_invoice=true
stringAdditional information about the Correction

created_at

dataDate and time when the Correction was created

approved_at

dataDate and time when the Correction was approved by a Manager

Request example

 GET http://billing.activeplatform.com:80/api/vendor/v1/corrections.json?api_token=654321

Response example

[ 
 { 
   "id": 22520, 
   "account_id": 2000177, 
   "manager_id": 2000199, 
   "status": "approved",
   "total": "-1.1", 
   "is_included_in_invoice": true, 
   "subscription_id": 2000133, 
   "description": "Correction for subscription #2008449 "1 day plan" from 01.05.2017 to 02.05.2017", 
   "сomment": null,
   "created_at": "2014-12-03T11:56:49.457668+0300", 
   "approved_at": "2015-08-01T11:09:11.132108+0300" 
 }
]