Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Table of Contents

Changelogs

Version

Date

Changes by

Description of change

V1.0

Mar 29, 2024

Que Nguyen

  • Add Table of Contents.

  • Add Changelogs.

V1.0.1

Apr 11, 2024

Que Nguyen

  • Add Release Status

Release status

Environment

Status

Released Date

Version

DEV

RELEASED

Apr 23, 2024

V1.0.1

UAT

RELEASED

Apr 26, 2024

V1.0.1

PROD

NOT RELEASED

N/A

N/A

API Definition

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}}

Query Parameters

ItemsPerPage

  • numeric

  • query

The total items that return in the response

CurrentPage

  • numeric

  • query

Request field for pagination. The Page that you wish to view

Registries

  • array[string]

  • query

Filter the items by Registry

  • IREC

  • TIGR

DeviceIds

  • array[uuid]

  • string(36)

Device unique identifier

Returns

Get REC Inventory

Response Header

Content-Type

application/json

Response Body

Field

Type

Description

Id

uuid

REC Unique Identifier

DeviceId

uuid

Device Unique Identifier

DeviceName

text

Name Of Device

DeviceUniqueId

text

Human readable device Unique Id

RegistryId

text

Registry Device Unique ID

Registry:Value

text

Value of Registry (IREC, TIGR)

Registry:Description

text

Description of Registry (I-REC, TIGR)

SerialNumber

text

REC Serial Number

Serial number is combination of RecPrefix

Total

decimal(18,6)

REC Quantity

Retired

decimal(18,6)

Retired REC Quantity: number of RECs retired

OnSale

decimal(18,6)

On Sale: number of RECs on sale

OnRetirement

decimal(18,6)

On Retirement: number of RECs on retirement

OnExporting

decimal(18,6)

On Exporting: number of RECs on exporting

Exported

decimal(18,6)

Exported: number of RECs Exported

OnAuction

decimal(18,6)

On Auction: number of RECs on auction

Available

decimal(18,6)

Available RECs: number of available RECs

Available numbers = Total - OnSale - OnRetirement - On Retired - OnExporting - Exported - OnAuction

Balance

decimal(18,6)

Balance of REC items:

Balance = Available + On Sale + On Retirement + On OnExporting + On Auction

VintageFrom

Datetime

Date Time UTC

VintageTo

Datetime

Date Time UTC

CountryCode

string

Country Code. Ex: SG

FuelType

text

Fuel Type

EnergyValue

text

Energy Type

VintageYear

int

Vintage Year

TradingCount

int

Trading’s total count number

RecItemType

  • enum

  • text

(Issued, Imported)

Request

GET/public/v2/inventories/recs

Parameter

?CurrentPage=5&ItemsPerPage=10&Registries=IREC&Registries=TIGR

Response

200 Success

{
  "Data": [
    {
      "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"
      }
    }
  ],
  "Meta": {
    "CurrentPage": 5,
    "TotalPage": 7,
    "ItemsPerPage": 1,
    "TotalItems": 64,
  },
  "Errors": null,
  "StatusCode": 200,
  "Message": "Success"
}

404 Not Found

{
  "Data": null,
  "Errors": null,
  "Meta": null,
  "StatusCode": 404,
  "Message": "Not found"
}

401 Unauthorized

{
  "Data": null,
  "Errors": null,
  "Meta": null,
  "StatusCode": 401,
  "Message": "Unauthorized"
}

403 Forbidden

{
  "Data": null,
  "Errors": null,
  "Meta": null,
  "StatusCode": 403,
  "Message": "Forbidden"
}
  • No labels