GET
/
parent
/
billing-history
Billing History
curl --request GET \
  --url https://api.authiqa.com/parent/billing-history \
  --header 'Authorization: <authorization>'

Overview

This endpoint allows parent accounts to retrieve their billing history with filtering capabilities by date range and pagination support.

API Details

Authentication

Authorization
string
required
Bearer YOUR_JWT_TOKEN

Query Parameters

startDate
string
Start date in YYYY-MM format
endDate
string
End date in YYYY-MM format
limit
number
default:"10"
Number of records (max: 100)

Try It Out

Test the API by providing your parameters:

startDate
Start date (YYYY-MM)
endDate
End date (YYYY-MM)
limit
Records per page

Code Examples

curl -X GET \
  'https://api.authiqa.com/parent/billing-history?startDate=2024-01&endDate=2024-12' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN'

Response Examples

200: Success
{
  "success": true,
  "data": {
    "billingRecords": [
      {
        "monthYear": "2024-01",
        "totalAccounts": 5,
        "costAssociatedWithAccounts": 0.15,
        "totalIOInteractions": 1000,
        "costAssociatedWithIO": 0.25,
        "totalFinalCost": 0.40,
        "timestamp": 1704067200000
      }
    ],
    "summary": {
      "totalCost": 0.40,
      "averageMonthlySpend": 0.40
    }
  }
}
400: Invalid Date Format
{
  "success": false,
  "error": {
    "code": "INVALID_DATE_FORMAT",
    "message": "Start date must be in YYYY-MM format"
  }
}
401: Unauthorized
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Only parent accounts can access billing history"
  }
}

Error Codes

400 Bad Request
  • INVALID_DATE_FORMAT - Date must be in YYYY-MM format
  • INVALID_DATE_RANGE - End date cannot be before start date
  • INVALID_LIMIT - Limit must be between 1 and 100
401 Unauthorized
  • UNAUTHORIZED - Missing/invalid token
  • UNAUTHORIZED_ACCESS - Only parent accounts can access

Usage Notes

Date Range

  • Dates must be in YYYY-MM format
  • Maximum range: 12 months
  • Default: Current month if no dates provided

Pagination

  • Default limit: 10 records
  • Maximum limit: 100 records
  • Records sorted by date (newest first)

Cost Components

Account Costs

  • Based on number of child accounts
  • Prorated for partial months
  • Includes account storage

Operation Costs

  • I/O interactions
  • API calls
  • Storage operations