Skip to main content
POST
/
v1
/
credit-pools
Create credit pool
curl --request POST \
  --url https://api.useaira.com/v1/credit-pools/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "currencyUnitCode": "<string>",
  "startDate": "2023-12-25",
  "renewalCreditAmount": "<string>",
  "topUpSettings": {
    "creditPackageAmount": "<string>",
    "price": 2
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "currencyUnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "startDate": "2023-12-25",
  "renewalCreditAmount": "<string>",
  "availableAmount": "<string>",
  "scheduleRenewalDate": "2023-12-25",
  "topUpSettings": {
    "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "creditPackageAmount": "<string>",
    "price": 2
  },
  "currencyUnit": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "code": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.useaira.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Body

application/json

A credit pool object with initial configuration and top-up settings.

customerId
string<uuid>
required
currencyUnitCode
string
required
startDate
string<date>
required
renewalCreditAmount
string
required
Pattern: ^\d+(\.\d{1,6})?$
topUpSettings
object
required

Response

The request was successfully processed, and the credit pool has been created.

id
string<uuid>
required
customerId
string<uuid>
required
currencyUnitId
string<uuid>
required
startDate
string<date>
required
renewalCreditAmount
string
required
Pattern: ^\d+(\.\d{1,6})?$
availableAmount
string
required
Pattern: ^\d+(\.\d{1,6})?$
scheduleRenewalDate
string<date>
required
topUpSettings
object
required

Schema representing credit pool top up settings.

currencyUnit
object
required

Schema representing a currency unit.