Table of Contents
Table of Contents | ||
---|---|---|
|
Changelogs
Version | Date | Changes by | Description of change |
V1.0.0 | Que Nguyen |
|
REC Transaction History Resource
TransactionId text Transaction unique identifier |
TransactionTime datetime Transaction time |
Type object Transaction Type object includes Value Description |
Code Block | ||
---|---|---|
| ||
{
"TransactionId": "TRANS-IREC-RETI-20240522-50N5-00004",
"TransactionTime": "2024-05-22T06:54:51.863",
"Type": {
"Value": "Retirement",
"Description": "Retirement"
},
"Registry": {
"Value": "IREC",
"Description": "I-REC"
},
"Notes": "",
"Details": [
{
"AssetName": "Khanh Hoa K1234 Looming",
"SerialNumber": "IREC-KHANES20001-VN-2020-0101-0530-1.066602 to 1.069015",
"CountryCode": "VN",
"Energy": "Wind",
"Vintage": "2020",
"Total": 0.002414,
"RecPrefix": "IREC-KHANES20001-VN-2020-0101-0530",
"VintageFrom": "2020-01-01T17:00:00",
"VintageTo": "2020-05-30T17:00:00"
}
]
} |
Meta Pagination Resource
CurrentPage - integer Current page returned |
TotalPage - integer Total pages by items per page |
TotalItems - integer Total items number |
ItemsPerPage - integer Total items per page |
Code Block |
---|
{
"CurrentPage": 1,
"TotalPage": 6,
"TotalItems": 576,
"ItemsPerPage": 100
|
API Definitions
Status | ||||
---|---|---|---|---|
|
/public/v2/inventories/recs/transaction-histories
Request
Headers
Content-Type |
|
Authorization |
|
Query Parameters
Types (optional) text - enum Transaction
|
DeviceId (optional) uuid Device unique identifier for approved Device or Grouped Device |
Registry (optional) text Registry value (IREC, TIGR) |
CountryCodes (optional) array[text] Country alpha codes, ISO3166 (VN, CN, …) |
CurrentPage (optional) integer The page number to retrieve the next set of inverters. The number has to be greater than 1, and will default to 1. |
ItemsPerPage (optional) integer The maximum number of inverter brands to return per page. This number can range from 10 to 100 and defaults to 100. |
Code Block |
---|
curl --location 'https://uat-api.redex.eco/public/v2/inventories/recs/transaction-histories?CurrentPage=1&ItemsPerPage=100&Types=Retirement&Registry=IREC&DeviceId=7ea1e5a2-f4d8-4e4f-8cc8-b2eeaca5cad7&CountryCodes=VN' \
--header 'Authorization: Bearer {{access_token}}' |
Response
Response Body |
Errors list of error objects Please see "Getting Started - #Error Object" for more details |
Meta pagination resource Return Pagination Resource |
StatusCode integer Http Status codes standard. Example |
Message text Response message: Success or error message. |
Data array[object] - array object of The System Power Station Resource A collection of The System Power Station Resource |
Info |
---|
200 OK |
Code Block | ||
---|---|---|
| ||
{
"Data": [
{
"TransactionId": "TRANS-IREC-RETI-20240522-50N5-00004",
"TransactionTime": "2024-05-22T06:54:51.863",
"Type": {
"Value": "Retirement",
"Description": "Retirement"
},
"Registry": {
"Value": "IREC",
"Description": "I-REC"
},
"Notes": "",
"Details": [
{
"AssetName": "Khanh Hoa K1234 Looming",
"SerialNumber": "IREC-KHANES20001-VN-2020-0101-0530-1.066602 to 1.069015",
"CountryCode": "VN",
"Energy": "Wind",
"Vintage": "2020",
"Total": 0.002414,
"RecPrefix": "IREC-KHANES20001-VN-2020-0101-0530",
"VintageFrom": "2020-01-01T17:00:00",
"VintageTo": "2020-05-30T17:00:00"
}
]
}
],
"Meta": {
"CurrentPage": 1,
"TotalPage": 46,
"TotalItems": 46,
"ItemsPerPage": 1
},
"Errors": null,
"StatusCode": 200,
"Message": "Success"
} |
Warning |
---|
401 Unauthorized |
Code Block | ||
---|---|---|
| ||
{
"Data": null,
"StatusCode": 401,
"Meta": null,
"Errors": [],
"Message": "Unauthorized"
} |
Warning |
---|
403 Forbidden |
Code Block |
---|
{
"Data": null,
"StatusCode": 403,
"Meta": null,
"Errors": [],
"Message": "Forbidden"
} |
Rate limit
Rate Limit Algorithm: Fixed Window
In fixed window rate limiting, a fixed time window (e.g., one minute, one hour) is used to track the number of requests or actions allowed within that window. Requests exceeding the limit are either rejected or throttled until the window resets.
Rate Limiting Overview
Our API employs rate limiting to ensure fair usage and protect the performance and availability of the service. Combination of Global Policy and Operation Policy
Global Policy
Rate Limit: 3000 requests per 5 minute(s)
Renewal Period: 300 second(s)
Key: IP Address
Increment Condition: Any Request
Operation Policy
Rate Limit: 60 requests per 1 minute(s)
Renewal Period: 60 second(s)
Key:
accound-id
business account Id.Increment Condition: Any Request.
Rate Limit Details
Rate Limit by Key:
Key: This ensures that rate limits are applied uniquely for each business account id.
Request Limit: Each key is allowed to make up to 60 requests per minute.
Reset Interval: The limit resets every 60 seconds.
Response Headers:
Retry-After: Sent when the rate limit is exceeded, indicating how long to wait before making another request.
Exceeding the Rate Limit
When the rate limit is exceeded, the API will return a 429 Too Many Requests
status code. The response will include a Retry-After
header specifying the number of seconds to wait before making a new request.
Example Response When Rate Limit is Exceeded
Code Block | ||
---|---|---|
| ||
HTTP/1.1 429 Too Many Requests
Retry-After: 60
Content-Type: application/json
{
"Data": null,
"Errors": null,
"StatusCode": 429,
"Message": "Rate limit exceeded",
"Meta": null
} |