{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telnyx/json-schema/telnyx-telco-data-post-usage-report-response-schema.json",
  "title": "TelcoDataPostUsageReportResponse",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telnyx-telco-data-usage-reports-api-openapi.yml#/components/schemas/TelcoDataPostUsageReportResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/TelcoDataUsageReportResponse"
    }
  },
  "type": "object",
  "$defs": {
    "TelcoDataAggregation": {
      "properties": {
        "currency": {
          "description": "Currency code",
          "type": "string"
        },
        "total_cost": {
          "description": "Total cost for this aggregation",
          "type": "number"
        },
        "total_dips": {
          "description": "Total number of lookups performed",
          "type": "integer"
        },
        "type": {
          "description": "Type of telco data lookup",
          "type": "string"
        }
      },
      "type": "object"
    },
    "TelcoDataUsageRecord": {
      "properties": {
        "aggregations": {
          "description": "List of aggregations by lookup type",
          "items": {
            "$ref": "#/$defs/TelcoDataAggregation"
          },
          "type": "array"
        },
        "record_type": {
          "description": "Record type identifier",
          "type": "string"
        },
        "user_id": {
          "description": "User ID",
          "format": "uuid",
          "type": "string"
        }
      },
      "type": "object"
    },
    "TelcoDataUsageReportResponse": {
      "description": "Telco data usage report response",
      "properties": {
        "aggregation_type": {
          "description": "Type of aggregation used in the report",
          "type": "string"
        },
        "created_at": {
          "description": "Timestamp when the report was created",
          "format": "date-time",
          "type": "string"
        },
        "end_date": {
          "description": "End date of the report period",
          "format": "date",
          "type": "string"
        },
        "id": {
          "description": "Unique identifier for the report",
          "format": "uuid",
          "type": "string"
        },
        "managed_accounts": {
          "description": "List of managed account IDs included in the report",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "record_type": {
          "description": "Record type identifier",
          "type": "string"
        },
        "report_url": {
          "description": "URL to download the complete report",
          "type": "string"
        },
        "result": {
          "description": "Array of usage records",
          "items": {
            "$ref": "#/$defs/TelcoDataUsageRecord"
          },
          "type": "array"
        },
        "start_date": {
          "description": "Start date of the report period",
          "format": "date",
          "type": "string"
        },
        "status": {
          "description": "Current status of the report",
          "type": "string"
        },
        "updated_at": {
          "description": "Timestamp when the report was last updated",
          "format": "date-time",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}