[POST] Create retirement beneficiary

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/beneficiaries

Request

Headers

Content-Type

application/json

Authorization

Bearer {{access_token}}

Corporate information Request

BeneficiaryType (required) text - enum

受益人类型 (必须)文本 - 枚举

Beneficiary enum type - Use 'Corporate' for companies, 'Building' for properties, and 'Personal' for individual beneficiaries

受益人枚举类型 - 'Corporate' 代表公司, 'Building' 代表资产, and 'Personal' 代表独立受益人

  • Corporate

  • 公司

  • Building

  • 建筑

  • Personal

  • 个人

BeneficiaryName (required) text - max length (150)

受益人名称 (必须)文本

Beneficiary name. The name is used to appear on the Renewable Energy certificate.

受益人名称。显示在绿证认证上的名字

CountryCode (required) text - max length (2)

国家代码 (必须)文本

2-character country alpha code. ISO-3166

国家两位代码

CorporateName (required) text - max length (255)

公司名称 (必须)

Corporate name. This will be required when choose Beneficiary Type as Corporate

公司名称。当受益人为公司类型时必须填写。

CorporateAddress (required) text - max length (255)

公司地址

Corporate address. This will be required when choose Beneficiary Type as Corporate

公司地址,当受益人为公司类型时必须填写。

Building information Request

建筑信息请求

BeneficiaryType (required) text - enum

受益人类型 (必须)

Beneficiary enum type

受益人枚举类型

  • Corporate

  • 公司

  • Building

  • 建筑

  • Personal

  • 个人

BeneficiaryName (required) text - max length (150)

受益人名称

Beneficiary name. The name is used to appear on the Renewable Energy certificate.

受益人名称。显示在绿证认证上的名字

CountryCode (required) text - max length (2)

国家代码(必须)

2-character country alpha code. ISO-3166

国家两位代码

BuildingName (required) text - max length (255)

Building name. This will be required when choose Beneficiary Type as Building

建筑名称,当受益人为建筑时必须填写。

BuildingAddress (required) text - max length (255)

Building address. This will be required when choose Beneficiary Type as Building

建筑地址,当受益人为建筑时必须填写。

Personal information Request

BeneficiaryType (required) text - enum

受益人类型 (必须)

Beneficiary enum type

受益人枚举类型

  • Corporate

  • 公司

  • Building

  • 建筑

  • Personal

  • 个人

BeneficiaryName (required) text - max length (150)

受益人名称

Beneficiary name. The name is used to appear on the Renewable Energy certificate.

受益人名称。显示在绿证认证上的名字

CountryCode (required) text - max length (2)

国家代码(必须)

2-character country alpha code. ISO-3166

国家两位代码

NameToAppearOnCertificate (required) text - max length (255)

The name is used to appear on the Renewable Energy certificate.

显示在绿证认证上的名字

PersonalName (required) text - max length (255)

个人名称 (必须)

Personal name. This will be required when choose Beneficiary Type as Personal

个人名称,当受益人为个人时必须填写。

PersonalAddress (required) text - max length (255)

Personal address. This will be required when choose Beneficiary Type as Personal

个人地址,当受益人为个人时必须填写。

 

cURL to create Corporate Beneficiary

curl --location 'https://uat-api.redex.eco/public/v2/retirement-applications/beneficiaries' \ --header 'Authorization: Bearer {{access_token}}' \ --header 'Content-Type: application/json' \ --data '{ "BeneficiaryType": "Corporate", "BeneficiaryName": "Redex Company", "CountryCode": "SG", "CorporateName": "Redex Company", "CorporateAddress": "Blk 71 Ayer Rajah Crescent#06-15 Singapore 139951", }'

 

cURL to create Building Beneficiary

curl --location 'https://uat-api.redex.eco/public/v2/retirement-applications/beneficiaries' \ --header 'Authorization: Bearer {{access_token}}' \ --header 'Content-Type: application/json' \ --data '{ "BeneficiaryType": "Building", "BeneficiaryName": "Redex Company", "CountryCode": "SG", "BuildingOwnerName": "Redex Company", "BuildingName": "US Building", "BuildingAddress": "Blk 71 Ayer Rajah Crescent#06-15 Singapore 139951", }'

 

cURL to create Personal Beneficiary

curl --location 'https://uat-api.redex.eco/public/v2/retirement-applications/beneficiaries' \ --header 'Authorization: Bearer {{access_token}}' \ --header 'Content-Type: application/json' \ --data '{ "BeneficiaryType": "Personal", "BeneficiaryName": "Redex Company", "CountryCode": "SG", "PersonalName": "Redex Company", "PersonalAddress": "Blk 71 Ayer Rajah Crescent#06-15 Singapore 139951", }'

 

Response

Response Body

Data:Id - uuid

Beneficiary Unique Identifier

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, 400, 422.

http状态码,如200,201,400, 422

Message text

Response message: Success or error message.

返回成功或错误的信息。

 

 

 

 

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