The Get list of invoices method returns the list of invoices for the current reseller or for any of its downstream resellers.
GET {base_url}/api/v3/resellers/{reseller_id}/invoices
Arguments
|
Name |
Parameter Type |
Data type |
Required/Optional |
Description |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
X-Api-Token |
header |
string |
Required |
API token of a manager that performs the operation (see
) |
||||||||||||
|
Content-Type |
header |
string |
Required |
Media type of the request. Specify the following: application/vnd.api+json |
||||||||||||
|
Accept |
header |
string |
Required |
Supported media types of the answer. Specify the following: application/vnd.api+json |
||||||||||||
|
base_url |
path |
string |
Required |
ActivePlatform URL |
||||||||||||
|
reseller_id |
path |
integer |
Required |
ID of current reseller or of any its downline resellers (see
) |
||||||||||||
|
filter[created_at] |
query |
string |
Optional |
Filter the list by the invoice creation date in the YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339) |
||||||||||||
|
filter[updated_at] |
query |
string |
Optional |
Filter the list by the invoice update date in the YYYY-MM-DDTHH:MM:SS format for the platform time zone or in the specified time zone (for example, YYYY-MM-DDTHH:MM:SSZ for UTC, see RFC 3339) |
||||||||||||
|
filter[status] |
query |
string |
Optional |
|||||||||||||
|
filter[account_id] |
query |
string |
Optional |
Filter the list by the account ID |
||||||||||||
|
filter[from_date] |
query |
string |
Optional |
Filter the list by beginning date of the period covered by the invoice (YYYY-MM-DD) |
||||||||||||
|
filter[to_date] |
query |
string |
Optional |
Filter the list by end date of the period covered by the invoice (YYYY-MM-DD) |
||||||||||||
|
filter[payment_model] |
query |
string |
Optional |
Filter the list by the
|
||||||||||||
|
filter[charges] |
query |
bool |
Optional |
Filter the list of closed invoices by charges (see
|
||||||||||||
|
page[size] |
query |
integer |
Optional |
Page navigation: number of elements per page. The default value is 50 |
||||||||||||
|
page[number] |
query |
integer |
Optional |
Page navigation: page number |
||||||||||||
|
include |
query |
string |
Optional |
Returns additional information about objects related to the invoice. The parameter can be a comma-separated list if information about several objects is required. The following objects and possible values are supported:
|
Response model
|
Name |
Data type |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
data |
array of objects |
Response data |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
id |
string |
Invoice ID |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
type |
string |
Data type |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
attributes |
object |
Invoice information |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
created_at |
string |
Date and time of invoice creation |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
updated_at |
string |
Data and time of invoice last update |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
document_id |
string |
Invoice number (see
) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
status |
string |
Invoice status |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
total |
string |
Invoice total amount |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
account_id |
integer |
ID of the account for which an invoice was issued |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
from_date |
string |
Start date of the period covered by an invoice (YYYY-MM-DD) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
to_date |
string |
End date of the period covered by an invoice (YYYY-MM-DD) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
payment_model |
string |
Invoice payment model:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
approved |
bool |
Indicates whether it is an approved postpaid invoice with external management (see Invoices with external management):
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
relationships |
object |
Related objects |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
subscriptions |
object |
List of subscriptions included in an invoice |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
data |
array |
Related object information:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
payments |
object |
List of payments included in an invoice |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
data |
array |
Related object information:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
charges |
object |
List of charges included in an invoice |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
data |
array |
Related object information:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
corrections |
object |
List of corrections included in an invoice |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
data |
array |
Related object information:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
taxes |
object |
List of taxes for charges included in an invoice |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
data |
array |
Related object information:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
included |
array |
Additional information about objects listed in the request:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
links |
object |
Page navigation links that use the defined page navigation parameters |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
self |
string |
Current page link |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
first |
string |
First page link |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
prev |
string |
Previous page link |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
next |
string |
Next page link |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
last |
string |
Last page link |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Request example
GET /api/v3/resellers/1/invoices?filter[status]=closed&filter[from_date]=2021-02-01&filter[to_date]=2021-03-01&page[size]=2&page[number]=36&include=subscriptions,payments,charges,corrections,taxes
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": [
{
"id": "3974",
"type": "invoices",
"attributes": {
"created_at": "2021-03-02T01:13:01.886407+0300",
"updated_at": "2021-03-02T01:13:02.080438+0300",
"document_id": "003662",
"status": "closed",
"total": "30.0",
"account_id": 893,
"from_date": "2021-02-01",
"to_date": "2021-03-01",
"payment_model": "prepay",
"approved": "false"
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "3007326",
"type": "subscriptions"
}
]
},
"payments": {
"data": []
},
"charges": {
"data": [
{
"id": "83106",
"type": "charges"
}
]
},
"corrections": {
"data": []
},
"taxes": {
"data": []
}
}
},
{
"id": "3975",
"type": "invoices",
"attributes": {
"created_at": "2021-03-02T01:19:12.771065+0300",
"updated_at": "2021-03-02T01:19:12.992596+0300",
"document_id": "003663",
"status": "closed",
"total": "54.0",
"account_id": 108,
"from_date": "2021-02-01",
"to_date": "2021-03-01",
"payment_model": "prepay",
"approved": "false"
},
"relationships": {
"subscriptions": {
"data": [
{
"id": "3002769",
"type": "subscriptions"
},
{
"id": "3002770",
"type": "subscriptions"
},
{
"id": "3002771",
"type": "subscriptions"
}
]
},
"payments": {
"data": []
},
"charges": {
"data": [
{
"id": "22719",
"type": "charges"
},
{
"id": "22840",
"type": "charges"
},
{
"id": "22962",
"type": "charges"
},
{
"id": "23083",
"type": "charges"
},
{
"id": "23204",
"type": "charges"
},
{
"id": "23326",
"type": "charges"
},
{
"id": "23447",
"type": "charges"
},
{
"id": "23568",
"type": "charges"
},
{
"id": "23690",
"type": "charges"
}
]
},
"corrections": {
"data": []
},
"taxes": {
"data": []
}
}
}
],
"included": [
{
"id": "3007326",
"type": "subscriptions",
"attributes": {
...
}
},
{
"id": "83106",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "3002769",
"type": "subscriptions",
"attributes": {
...
}
},
{
"id": "3002770",
"type": "subscriptions",
"attributes": {
...
}
},
{
"id": "3002771",
"type": "subscriptions",
"attributes": {
...
}
},
{
"id": "22719",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "22840",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "22962",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "23083",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "23204",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "23326",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "23447",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "23568",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
},
{
"id": "23690",
"type": "charges",
"attributes": {
...
},
"relationships": {
...
}
}
],
"links": {
"self": "https://test.activeplatform.com/api/v3/resellers/1/invoices?filter%5Bfrom_date%5D=2021-02-01&filter%5Bstatus%5D=closed&filter%5Bto_date%5D=2021-03-01&include=subscriptions%2Cpayments%2Ccharges%2Ccorrections%2Ctaxes&page%5Bnumber%5D=36&page%5Bsize%5D=2",
"first": "https://test.activeplatform.com/api/v3/resellers/1/invoices?filter%5Bfrom_date%5D=2021-02-01&filter%5Bstatus%5D=closed&filter%5Bto_date%5D=2021-03-01&include=subscriptions%2Cpayments%2Ccharges%2Ccorrections%2Ctaxes&page%5Bnumber%5D=1&page%5Bsize%5D=2",
"prev": "https://test.activeplatform.com/api/v3/resellers/1/invoices?filter%5Bfrom_date%5D=2021-02-01&filter%5Bstatus%5D=closed&filter%5Bto_date%5D=2021-03-01&include=subscriptions%2Cpayments%2Ccharges%2Ccorrections%2Ctaxes&page%5Bnumber%5D=35&page%5Bsize%5D=2",
"next": null,
"last": "https://test.activeplatform.com/api/v3/resellers/1/invoices?filter%5Bfrom_date%5D=2021-02-01&filter%5Bstatus%5D=closed&filter%5Bto_date%5D=2021-03-01&include=subscriptions%2Cpayments%2Ccharges%2Ccorrections%2Ctaxes&page%5Bnumber%5D=36&page%5Bsize%5D=2"
}
}