OpenMeter Currencies

Create cost basis

Changed on

Pre-release Endpoint This endpoint is currently in beta and is subject to change.

Create a cost basis for a currency.

post/v3/openmeter/currencies/custom/{currencyId}/cost-bases

Request

  • Base URL: https://global.api.konghq.com
  • URL: https://global.api.konghq.com/v3/openmeter/currencies/custom/{currencyId}/cost-bases
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

currencyIdstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

fiat_codestring required

The fiat currency code for the cost basis.

ratestring required

The cost rate for the currency.

effective_fromstring date-time

An ISO-8601 timestamp representation of the date from which the cost basis is effective. If not provided, it will be effective immediately and will be set to now by the system.

effective_tostring date-time

An ISO-8601 timestamp representation of the date until which the cost basis is effective. If provided, it must be later than effective_from. If not provided, it remains effective until superseded.

Example request

{
  "fiat_code": "USD",
  "effective_from": "2023-01-01T01:01:01.001Z",
  "effective_to": "2023-01-01T01:01:01.001Z"
}

Response

CostBasis created response.

idstring required

ULID (Universally Unique Lexicographically Sortable Identifier).

fiat_codestring required

The fiat currency code for the cost basis.

ratestring required

The cost rate for the currency.

effective_fromstring date-time

An ISO-8601 timestamp representation of the date from which the cost basis is effective. If not provided, it will be effective immediately and will be set to now by the system.

effective_tostring date-time

An ISO-8601 timestamp representation of the date until which the cost basis is effective. If provided, it must be later than effective_from. If not provided, it remains effective until superseded.

created_atstring date-time required

An ISO-8601 timestamp representation of entity creation date.

Example response

{
  "id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "fiat_code": "USD",
  "effective_from": "2023-01-01T01:01:01.001Z",
  "effective_to": "2023-01-01T01:01:01.001Z",
  "created_at": "2023-01-01T01:01:01.001Z"
}

Changes

    • breaking

      added to the / response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the ////// response property for the response status

    • warning

      added the new unique enum value to the ////// response property for the response status

    • info

      endpoint added