The Get closing document method is used for getting information about a closing document of an account of the current reseller or any of its downstream resellers.
GET {base_url}/api/v3/resellers/{reseller_id}/accounts/{account_id}/external_invoices?filter[key]=key
Arguments
Response model
|
Name |
Data type |
Description |
||||
|---|---|---|---|---|---|---|
|
data |
object |
Response data |
||||
|
|
id |
string |
Closing document ID in the platform |
|||
|
|
type |
string |
Data type |
|||
|
|
attributes |
object |
Closing document information |
|||
|
|
|
created_at |
string |
Date and time of closing document creation |
||
|
|
|
updated_at |
string |
Data and time of closing document last update |
||
|
|
|
key |
string |
Closing document GUID in a third-party ERP system |
||
|
|
|
name |
string |
Closing document name |
||
|
|
|
amount |
object |
Information about the amount and currency of the closing document in a third-party ERP system |
||
|
|
|
|
total |
string |
The amount of the closing document in a third-party ERP system. The value can be less than or equal to 0. Example: 123.45 |
|
|
|
|
|
currency |
string |
The ISO code of the currency of the closing document in a third-party ERP system |
|
|
|
|
start_date |
string |
Start date of the billing period for which the closing document is issued (YYYY-MM-DD) |
||
|
|
|
end_date |
string |
End date of the billing period for which the closing document is issued (YYYY-MM-DD) |
||
|
|
|
file |
string |
Closing document in the base64 encoding |
||
|
|
|
type |
string |
Closing document type:
|
||
Request example
GET/api/v3/resellers/1/accounts/505/external_invoices?filter[key]=0493e78a-e8ef-11e9-81b4-2a2ae2dbcce4
Host: test.activeplatform.com
Content-Type: application/vnd.api+json
X-Api-Token: vY5fwetestK3gJXZH5uHCw
Accept: application/vnd.api+json
Response example
{
"data": {
"id": "11",
"type": "external_invoices",
"attributes": {
"created_at": "2019-10-18T13:45:38.333297+0300",
"updated_at": "2019-10-18T13:45:38.333297+0300",
"key": "0493e78a-e8ef-11e9-81b4-2a2ae2dbcce4",
"name": "New invoice",
"amount": {
"total": "123.45",
"currency": "EUR"
},
"start_date": "2019-09-01",
"end_date": "2019-10-01",
"file": "data:application/pdf;base64,SSBob2xkIHRoZSBwb3NpdGlvbiBvZiBhIHFhIGVuZ2luZWVyLiBRQSBlbmdp\nbmVlciByZXNwb25zaWJpbGl0aWVzIGluY2x1ZGUgZGVzaWduaW5nIGFuZCBp\nbXBsZW1lbnRpbmcgdGVzdHMsIGRlYnVnZ2luZyBhbmQgZGVmaW5pbmcgY29y\ncmVjdGl2ZSBhY3Rpb25zLiBJIGFsc28gcmV2aWV3IHN5c3RlbSByZXF1aXJl\nbWVudHMgYW5kIHRyYWNrIHF1YWxpdHkgYXNzdXJhbmNlIG1ldHJpY3MgKGUu\nZy4gZGVmZWN0IGRlbnNpdGllcyBhbmQgb3BlbiBkZWZlY3QgY291bnRzLikg\nVGhlIFFBIHRlY2huaWNpYW4gcm9sZSBwbGF5cyBhbiBpbXBvcnRhbnQgcGFy\ndCBpbiBvdXIgY29tcGFueeKAmXMgcHJvZHVjdCBkZXZlbG9wbWVudCBwcm9j\nZXNzLg==\n",
"type": "invoice"
}
}
}