[GET] Query retirement applications

Query retirement applications

Table of Contents

Changelogs

Version

Date

Changes by

Description of change

v1.0

Jul 19, 2024

Tam Tran

  • Add Table of Contents.

  • Add Changelogs.

  • Add Resource

  • Add Definition

 

Retirement Applications Resource

Id uuid

Retirement Application Unique Identifier

核销申请 id

ApplicationNumber text

Application Number

申请号,用于前端使用

Amount deicmal

Value Redemption

核销数目

BeneficiaryId uuid

Beneficiary Id

受益人 id

BeneficiaryName text

Beneficiary Name

受益人名字

Energy text

Energy Type

能源类型

CountryCode text

Country Alpha 2 Code

国家编号

VintageYear number

Vintage Year

核销年份

Status:Value text

Value of Status (InProgress, WaitingForPayment, Returned, Cancelled, Rejected, Completed)

核销状态

Status:Description text

Description of Status (In-Progress, Completed, ..)

状态的描述

Registry:Value text

Value of Registry (IREC, TIGR)

注册处(IREC 或 TIGR)

Registry:Description text

Description of Registry (I-REC, TIGR)

注册处描述

NameToAppearOnCertificate text

Name display on certificate

展示在证书上的名字

CompletedTime datetime

Completed Time

完成时间

DecisionTime datetime

Decision Time

决定时间

CreatedTime datetime

Created Time

创建时间

UpdatedTime datetime

Updated Time

更新时间

RetiredItems:CountryCode text

Country Code

核销设备的国家编号

RetiredItems:FuelType text

Fuel Type

核销设备的能源类型

RetiredItems:AssetName text

Asset Name

核销设备的设备名称

RetiredItems: DeviceUniqueId text

Device Unique Identifier

核销设备的设备唯一id

RetiredItems:ProvinceCode text

Province Code

核销设备的省份

RetiredItems: IsOwnerAsset text

Is Owner Asset (true,false)

核销设备是否自用设备

RetiredItems: VintageYear int

Vintage Year

核销设备的发行年份

RetiredItems:RecItemId uuid

Rec Item Unique Identifier

核销设备的绿证申请 id

RetiredItems:RecItemType text

Type of Rec (Issued, Imported)

核销设备的绿证类型(已发行,已导出)

RetiredItems:TradingCount int

Number of trading

核销设备的交易数量

RetiredItems:SerialNumbers text

Serial Numbers

核销设备的绿证序列号

RetiredItems:Quantity decimal

Quantity

核销设备的绿证数量

{ "Id": "326be15c-795e-4c33-26f0-08dbf7dca95f", "ApplicationNumber": "1000001802142963", "Amount": 10, "BeneficiaryId": "68c36977-3a6f-4f5f-5b88-08db564c5896", "BeneficiaryName": "Redex Company", "Energy": "Hydro", "CountryCode": "SG", "VintageYear": 2023, "Status": { "Value": "InProgress", "Description": "In-Progress" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "NameToAppearOnCertificate": "YENLE7", "CompletedTime": "2024-07-17T10:43:52.9410618Z", "DecisionTime": "2024-07-17T10:03:58.7996582Z", "CreatedTime": "2024-07-17T10:43:49.0126791", "UpdatedTime": "2024-07-17T10:43:50.0126791", "RetiredItems": [ { "CountryCode": "CN", "FuelType": "Solar", "AssetName": "Grouped_Q_2", "DeviceUniqueId": "CN-SOLAR-01012000-0872912616", "ProvinceCode": "CN-HN", "IsOwnerAsset": true, "VintageYear": 2023, "RecItemId": "9c36dd29-427d-4297-966a-08dcad1f97d5", "RecItemType": "Issued", "TradingCount": 0, "SerialNumbers": "IREC-GROUES11032-CN-2023-0630-0730", "Quantity": 5.375213 } ] }

API Definition

GET/public/v2/retirement-applications

Request

Headers

Content-Type

application/json

Authorization

Bearer {{access_token}}

Parameters

Parameters

ItemsPerPage - integer

The maximum number of retirement applications 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 retirement applications. 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

注册处类型

  • IREC

  • TIGR

CountryCodes (optional) - array[string]

Filter the items by Country Code Value

国家编号

Energies (optional) - array[string]

Filter the items by Energy Value

能源类型

Statuses (optional) - array[string]

Filter the items by Status Value

通过状态筛选

  • InProgress

  • WaitingForPayment

  • Returned

  • Cancelled

  • Rejected

  • Completed

Example request

curl -X GET https://uat-api.redex.eco/public/v2/retirement-applications?ItemsPerPage=10&CurrentPage=1 \ -H 'Authorization: Bearer <access_token>'

 

 

Response

Response Body

Data array[object] - objects of Retirement Applications REC Resource

A collection of Retirement Applications 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 200, 201, 404.

http状态码,如 200,201,404

Message text

Response message: Success or error message.

返回成功或错误的信息。

200 Success

{ "Data": [ { "Id": "4897e999-2a91-4293-bf1b-08dcaac0b999", "ApplicationNumber": "1000001940599385", "Amount": 3.234120, "DeviceId": "00000000-0000-0000-0000-000000000000", "DeviceName": "", "BeneficiaryId": "20b459ec-fb58-4902-f242-08dcaac09f37", "BeneficiaryName": "Jack TTT", "Energy": "", "CountryCode": "", "VintageYear": 2023, "Status": { "Value": "Completed", "Description": "Completed" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "NameToAppearOnCertificate": "Jack TTT", "CompletedTime": "2024-07-23T02:43:06.9867583Z", "DecisionTime": "2024-07-23T02:43:06.9867580Z", "CreatedTime": "2024-07-23T02:43:06.47", "UpdatedTime": "2024-07-23T02:43:19.937", "RetiredItems": [ { "CountryCode": "CN", "FuelType": "Solar", "AssetName": "Grouped_Q_2", "DeviceUniqueId": "CN-SOLAR-01012000-0872912616", "ProvinceCode": "CN-HN", "IsOwnerAsset": true, "VintageYear": 2023, "RecItemId": "6cb259d5-4603-4d56-cecd-08dcaac0baa9", "RecItemType": "Issued", "TradingCount": 0, "SerialNumbers": "IREC-GROUES11032-CN-2023-0630-0730", "Quantity": 3.234120 } ] }, { "Id": "aa8c8c9e-4cac-45c2-bf1a-08dcaac0b999", "ApplicationNumber": "1000001544958851", "Amount": 2.234120, "DeviceId": "00000000-0000-0000-0000-000000000000", "DeviceName": "", "BeneficiaryId": "fe09fe2e-2d1e-432f-f241-08dcaac09f37", "BeneficiaryName": "Toni TTT", "Energy": "", "CountryCode": "", "VintageYear": 2023, "Status": { "Value": "Completed", "Description": "Completed" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "NameToAppearOnCertificate": "Toni TTT", "CompletedTime": "2024-07-23T02:41:58.8905394Z", "DecisionTime": "2024-07-23T02:41:58.8905390Z", "CreatedTime": "2024-07-23T02:41:58.37", "UpdatedTime": "2024-07-23T02:42:12.697", "RetiredItems": [ { "CountryCode": "CN", "FuelType": "Solar", "AssetName": "Grouped_Q_2", "DeviceUniqueId": "CN-SOLAR-01012000-0872912616", "ProvinceCode": "CN-HN", "IsOwnerAsset": true, "VintageYear": 2023, "RecItemId": "f031ba32-6728-47b8-cecc-08dcaac0baa9", "RecItemType": "Issued", "TradingCount": 0, "SerialNumbers": "IREC-GROUES11032-CN-2023-0630-0730", "Quantity": 2.234120 } ] }, { "Id": "82787367-6c8c-46b1-bf19-08dcaac0b999", "ApplicationNumber": "1000001594217658", "Amount": 1.234120, "DeviceId": "00000000-0000-0000-0000-000000000000", "DeviceName": "", "BeneficiaryId": "a016b768-f9aa-4ae1-f240-08dcaac09f37", "BeneficiaryName": "David TTT", "Energy": "", "CountryCode": "", "VintageYear": 2023, "Status": { "Value": "Completed", "Description": "Completed" }, "Registry": { "Value": "IREC", "Description": "I-REC" }, "NameToAppearOnCertificate": "David TTT", "CompletedTime": "2024-07-23T02:39:52.9410618Z", "DecisionTime": "2024-07-23T02:39:52.9410613Z", "CreatedTime": "2024-07-23T02:39:51.273", "UpdatedTime": "2024-07-23T02:40:11.83", "RetiredItems": [ { "CountryCode": "CN", "FuelType": "Solar", "AssetName": "Grouped_Q_2", "DeviceUniqueId": "CN-SOLAR-01012000-0872912616", "ProvinceCode": "CN-HN", "IsOwnerAsset": true, "VintageYear": 2023, "RecItemId": "a9f92594-8468-476c-cecb-08dcaac0baa9", "RecItemType": "Issued", "TradingCount": 0, "SerialNumbers": "IREC-GROUES11032-CN-2023-0630-0730", "Quantity": 1.234120 } ] } ], "Meta": { "CurrentPage": 1, "TotalPage": 3, "TotalItems": 9, "ItemsPerPage": 3 }, "Errors": null, "StatusCode": 200, "Message": "Success" }

404 Not Found

 

401 Unauthorized

 

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

  1. Rate Limit by Key:

    1. Key: This ensures that rate limits are applied uniquely for each business account id.

    2. Request Limit: Each key is allowed to make up to 60 requests per minute.

    3. Reset Interval: The limit resets every 60 seconds.

  2. Response Headers:

    1. 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