1. Introduction
This document contains generated documentation for AMPnet report-service-eth
. Report service contains all endpoints
for generating reports in PDF
Source code is available on Github.
2. Transaction History API
All requests need header: Authorization: Bearer JWT
.
Chain ID (e.g. 80001) and issuer address must be provided in the request path, .
2.1. Get transaction history
Query parameters from
and to
are both optional.
-
RESERVE_INVESTMENT - Refers to the investment placed into the campaign before it is finalized. Can be cancelled.
-
CANCEL_INVESTMENT - Refers to the cancellation of the reserved investments.
-
COMPLETED_INVESTMENT - Refers to the investment claimed when the campaign is finalized.
-
CREATE_PAYOUT - Refers to the payout manager transferring a certain amount of tokens to its contract, making it eligible for individual addresses which invested into the asset to collect its share.
-
REVENUE_SHARE - Refers to the investor addresses collecting revenue share.
GET /tx_history/80001/0xissuer-address?from=2022-04-23&to=2022-04-27 HTTP/1.1
Host: localhost:8080
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 550
{
"transactions" : [ {
"from_address" : "0x8f52b0cc50967fc59c6289f8fdb3e356edeebd23",
"to_address" : "0xfec646017105fa2a4ffdc773e9c539eda5af724a",
"contract" : "0xfec646017105fa2a4ffdc773e9c539eda5af724a",
"chain_id" : 80001,
"hash" : "9111e492-3d46-4712-9284-ae7f8c679c10",
"type" : "COMPLETED_INVESTMENT",
"asset" : "project_name",
"timestamp" : 1650901831000,
"token_symbol" : "symbol",
"token_value" : 70230000,
"token_amount" : 70230000000000000000,
"payout_id" : 50,
"revenue" : 500
} ]
}
3. Reporting API
All requests need header: Authorization: Bearer JWT
.
Chain ID must be provided in the request path, e.g. 80001.
3.1. Get user transactions report
Query parameters from
and to
are both optional.
Path variable issuer
is the contract address of the issuer.
GET /report/80001/issuer-contract-address/user/transactions?from=2019-10-10&to=2022-04-29 HTTP/1.1
Host: localhost:8080
Response is a PDF file data.
3.2. Get user transaction report
Query parameters txHash
, fromTxHash
and toTxHash
are required.
Path variable issuer
is the contract address of the issuer.
GET /report/80001/issuer-contract-address/user/transaction?txHash=0x07b12471d1eac43a429cd38df96671621763f03bdde047697c62c22f5ff9bd37 HTTP/1.1
Host: localhost:8080
Response is a PDF file data.
4. Admin Reporting API
All requests need header: Authorization: Bearer JWT
. Only owner of the issuer contract can access this API.
Chain ID must be provided in the request path, e.g. 80001.
4.1. Get active users accounts summary report
Query parameters from
and to
are both optional.
GET /admin/80001/issuer-contract-address/report/user?from=2019-10-10&to=2022-04-30 HTTP/1.1
Host: localhost:8080
Response is a PDF file data.
4.2. User stats report
Issuer owner can download the xlsx report with users list.
GET /admin/80001/issuer-contract-address/report/xlsx HTTP/1.1
Host: localhost:8080
Response is xlsx file data.
4.3. Campaign investors report
Issuer owner can download the xlsx report with investors list for some campaign.
GET /admin/80001/issuer-contract-address/campaign-contract-address/report/xlsx HTTP/1.1
Host: localhost:8080
Response is xlsx file data.