ItemsPerPage
numeric
query
The total items that return in the response
Page
numeric
query
Request field for pagination. The Page that you wish to view
Registries
array[string]
query
Filter the items by Registry
IREC
TIGR
Returns
Get REC Inventory
Response Header
Content-Type
application/json
Response Body
Field
Type
Description
Id
Query REC Inventory
Resource information
Response format(s)
JSON
Requires authentication?
Yes using API key
Request Header
Name
Value
Content-Type
application/json
Authorization
Bearer {{token}}
Parameters
Table of Contents
Table of Contents | ||
---|---|---|
|
Changelogs
Version | Date | Changes by | Description of change |
V1.0 |
| Que Nguyen |
|
V1.0.1 | Que Nguyen |
|
Release status
Environment | Status | Released Date | Version | ||||||
DEV |
|
| V1.0.1 | ||||||
UAT |
|
| V1.0.1 | ||||||
PROD |
|
| V1.0.1 |
The Inventory’s REC Resource
Id uuid REC Unique Identifier |
---|
AssetId
绿证唯一标识符 |
---|
DeviceId uuid Device Unique Identifier |
AssetName
设备唯一标识符 |
string
DeviceName text Name on Registry Of Registered Device 设备名称 |
DeviceUniqueId text Human readable device Unique Id 设备前端 id |
RegistryId text Registry Device |
RegistryName
string
Unique ID - the ID managed by Registry 注册处的设备 id - 此 Id 由注册处维护管理 |
Registry: Value text Value of Registry (IREC, TIGR) 注册处(IREC 或 TIGR) |
Registry:Description text Description of Registry (I-REC, TIGR) |
OwnerName
string
string
注册处描述 |
SerialNumber |
To
text REC Serial Number |
From
decimal(18,6)
From REC Index
Serial number is combination of 绿证序列号 |
Total number - decimal(18,6) |
REC |
Total |
decimal(18,6)
REC Quantity
Retired
Quantity 绿证总数量 |
Retired number - decimal(18,6) Retired REC Quantity: number of RECs retired 已核销的绿证数量 |
OnSale |
number - decimal(18,6) On Sale |
OnBlock
Available
: number of RECs on sale 挂单出售的绿证数量 |
OnRetirement number - decimal(18,6) |
OnBlock
On Retirement: number of RECs on retirement 处于核销阶段的绿证数量 |
OnExporting number - decimal(18,6) |
Available RECs
OnRetirement
On Exporting: number of RECs on exporting 正在导出到 evident 的绿证数目 |
Exported number - decimal(18,6) |
On Retirement
OnDelisting
Exported: number of RECs Exported 已导出到 evident 的绿证数目 |
OnAuction - number - decimal(18,6) On |
Delisted
OnAuction
Auction: number of RECs on auction 处于拍卖中的绿证数目 |
Available number - decimal(18,6) |
Delisted
Available RECs: number of available RECs Formular: 可用的绿证数目 可用数目= 总量-出售中-核销中-导出中-拍卖中-已核销-已导出 |
Balance number - decimal(18,6) |
On Auction
VintageFrom
Datetime
Datetime
Balance of REC items: Formular: 绿证余额 绿证余额 = 可用的+出售中 +核销中 +导出中 +拍卖中 |
VintageFrom datetime Date Time UTC 发行开始时间 |
VintageTo |
string
datetime Date Time UTC 发行结束时间 |
CountryCode |
text 2-character country alpha code. ISO-3166. Supported list below: Country Code i. |
FuelType
string
e. SG, CN, VN, MY, TH, ID 国家代码 |
FuelType text Fuel Type 燃料类型 |
EnergyValue text |
string
Energy Type |
Vintage Year
int
Value: Solar, Wind… 能源类型 |
VintageYear text Vintage Year |
Balance
string
Balance
TradingCount
int
Trading Count
RecItemType
Fuel Name (Marine Wave…)
Energy
Energy Value (Marine Wave…)
CommercialOperationDate
Date Time UTC
Status
Draft
New
Verified
Submitted
Resubmitted
Returned
Approved
Rejected
StatusDescription
Request
绿证签发的年 |
TradingCount text Trading’s total count number. Default = 0. 交易中数量 |
RecItemType enum text REC Item’s origination type (Issued, Imported) 绿证类型(Issued 已发行,Imported 已导入) |
Code Block | ||
---|---|---|
| ||
{
"Id": "326be15c-795e-4c33-26f0-08dbf7dca95f",
"DeviceId": "f26be15c-795e-4c33-26f0-08dbf7dca95f",
"DeviceName": "Sentosa Fun Pass Singapore",
"DeviceUniqueId": "SG-SOLAR-11012021-2540515487",
"RegistryId": "GFNIES10001",
"SerialNumber": "IREC-GFNIES10001-SG-2021-1106-1110-1767.250000 to 1768.249999",
"Total": 1,
"Balance": 1,
"Available": 1,
"OnSale": 0,
"OnRetirement": 0,
"OnExporting": 0,
"OnAuction": 0,
"Retired": 0,
"Exported": 0,
"VintageFrom": "2021-11-06T00:00:00",
"VintageTo": "2021-11-10T00:00:00",
"CountryCode": "SG",
"FuelType": "Solar",
"EnergyValue": "Solar",
"VintageYear": 2021,
"TradingCount": 1,
"RecItemType": "Issued",
"Registry": {
"Value": "IREC",
"Description": "I-REC"
}
} |
API Definition
Status | ||||
---|---|---|---|---|
|
/public/v2/inventories/recs
Request
codeHeaders
languageContent-Type |
|
Authorization |
|
Parameters
Parameters |
---|
ItemsPerPage - integer The maximum number of inverter brands to return per page. This number can range from 10 to 100 and defaults to 100. 每页最多返回数在 10 - 100 之间,默认为 100。 |
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. 检索下一组逆变器的页码。该数字必须大于 1,并且默认为 1。 |
Registries (optional) - array[string] Filter the items by Registry Value |
|
---|
DeviceIds (optional) - array[uuid] Array uuid of Device unique identifier |
Example request
Code Block |
---|
curl -X GET https://uat-api.redex.eco/public/v2/inventories/recs?Registries=IREC&CurrentPage=1&ItemsPerPage=10&RegistryName=IREC |
DeviceIds=8948180e-b531-4442-b1b1-d303f20ec8bd \
-H 'Authorization: Bearer <access_token>'
|
Response
Response Body |
Data array[object] - objects of Inventory REC Resource A collection of Inventory REC Resource |
Errors list of error objects Please see "Getting Started - #Error Object" for more details 请查看 Getting Started - #Error Object 以获得更多信息。 |
Meta pagination resource Return Pagination Resource 返回分页信息 |
StatusCode integer Http Status codes standard. Example http状态码,如 200,201,404 |
Message text Response message: Success or error message. 返回成功或错误的信息。 |
Info |
---|
200 Success |
Code Block | ||
---|---|---|
| ||
{ "Data": [ { "RegistryIdId": "GFNIES10001326be15c-795e-4c33-26f0-08dbf7dca95f", "RetiredDeviceId": 0, "Id": "326be15c"f26be15c-795e-4c33-26f0-08dbf7dca95f", "AssetIdDeviceName": null,"Sentosa Fun "RegistryName": "IREC"Pass Singapore", "OwnerNameDeviceUniqueId": "Nam Song Tien CompanySG-SOLAR-11012021-2540515487", "AssetNameRegistryId": "Sentosa Fun Pass SingaporeGFNIES10001", "SerialNumber": "IREC-GFNIES10001-SG-2021-1106-1110-1767.250000 to 1768.249999", "FromTotal": 1767.251, "ToBalance": 1768.2499991, "TotalAvailable": 1, "OnSale": 0, "OnBlockOnRetirement": 0, "AvailableOnExporting": 10, "OnRetirementOnAuction": 0, "OnDelistingRetired": 0, "DelistedExported": 0, "OnAuctionVintageFrom": 0"2021-11-06T00:00:00", "CountryCodeVintageTo": "SG2021-11-10T00:00:00", "FuelTypeCountryCode": "SolarSG", "EnergyValueFuelType": "Solar", "VintageYearEnergyValue": 2021"Solar", "BalanceVintageYear": 12021, "TradingCount": 1, "RecItemType": "Issued", "DeviceUniqueIdRegistry": "SG-SOLAR-11012021-2540515487",{ "IsOwnerAsset": false, "ProvinceCodeValue": null, "ProvinceNameIREC": null, "TickerId": "N/A", "VintageFromDescription": "2021-11-06T00:00:00",I-REC" "VintageTo": "2021-11-10T00:00:00", } } ], "Meta": { "CurrentPage": 5, "TotalPage": 7, "ItemsPerPage": 1, "TotalItems": 64, }, "Errors": null, "StatusCode": 200, "Message": "Success" } |
Warning |
---|
404 Not Found |
Code Block |
---|
{ "Data": null, "Errors": null, "Meta": null, "StatusCode": 404, "Message": "Not found" } |
Warning |
---|
401 Unauthorized |
Code Block | ||
---|---|---|
| ||
{ "Data": null, "Errors": null, "Meta": null, "StatusCode": 401, "Message": "Unauthorized" } |
Warning |
---|
403 Forbidden |
Code Block | ||
---|---|---|
| ||
{
"Data": null,
"Errors": null,
"Meta": null,
"StatusCode": 403,
"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 } |