[POST] Create Retirement Application

Table of Contents

Changelogs

Version

Date

Changes by

Description of change

V1.0

Jul 19, 2024

Tam Tran

Initial documentation

API Definition

POST/public/v2/retirement-applications

Request

Headers

Content-Type

application/json

Authorization

Bearer {{access_token}}

Payload

Payload

BeneficiaryId (required) uuid

Beneficiary Unique Identifier

受益人 ID

VintageYear (required) integer

Year Redemption

核销年份

Quantity (required) decimal (18,6)

Quantity Redemption

核销的绿证数目

Reason (required) text, max length 500

Reason Redemption

核销原因

Registry (required) enum - text

Registry Value (IREC, TIGR)

注册处(IREC或TIGR)

ConsumptionStartTime (required) datetime

Consumed Energy’s period start time.

核销开始时间

支持的格式如下:

Support formats:

  • YYYY-MM-DD

  • YYYY-MM-DDThh:mm:ssTZD [RFC2822/RFC5322/ISO8601 full format]

Examples:

  • 2010-01-01

  • 2010-01-01 00:00

  • 2010-01-01 00:00:00

  • 2010-01-01T00:00

  • 2010-01-01T00:00:00

  • 2010-01-01T00:00:00Z

  • 2010-01-01T00:00:00+00:00

ConsumptionEndTime (required) datetime

Consumed Energy’s period end time.

核销结束时间

支持的格式如下:

Support formats:

  • YYYY-MM-DD

  • YYYY-MM-DDThh:mm:ssTZD [RFC2822/RFC5322/ISO8601 full format]

Examples:

  • 2010-01-01

  • 2010-01-01 00:00

  • 2010-01-01 00:00:00

  • 2010-01-01T00:00

  • 2010-01-01T00:00:00

  • 2010-01-01T00:00:00Z

  • 2010-01-01T00:00:00+00:00

Countries (optional) - array[string]

Filter available RECs by Country Value. 2-character country alpha code. ISO-3166

{ "Countries": [ "VN", "MY", "CN" ] }

国家

EnergyValues (optional) - array[string]

Filter available RECs by Energy Value. Please find the values in below table.

能源类型

Example request

curl --location 'https://uat-api.redex.eco/public/v2/retirement-applications' \ --header 'Authorization: Bearer {{access_token}}' \ --header 'Content-Type: application/json' \ --data '{ "BeneficiaryId": "510eb542-f59d-406f-02be-08dc6f09550a", "VintageYear": 2023, "Quantity": 10, "Reason": "Retire 10MWh for charging Electric Vehicles", "Registry": "IREC", "ConsumptionStartTime": "2023-01-01T00:01:00Z", "ConsumptionEndTime": "2023-01-31T00:01:00Z", "Countries": [ "VN" ], "EnergyValues": [ "Solar" ] }'

 

Response

Response Body

Data object

Application object with Id

具有设备注册 ID 的对象

Data.Id uuid

Object with application Id

{ "Id": "56861cc4-0ab8-4a5f-c574-08dc5a883338" }

设备注册ID

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.

返回成功或错误的信息。

201 Success

 

400 BadRequest

 

401 Unauthorized

 

Energy Values

Value

Short Code

Value

Short Code

Biogas

BGS

Biomass

BMS

Co-fired with fossil

CFF

Geothermal

GTM

Hydro

HYD

Marine Current

MRC

Marine Tidal

MRT

Marine Vertical Pressure

MRP

Marine Wave

MRW

Nuclear

NUC

Solar

SLR

Wind

WND

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