Docs › API Reference › Billing Service › POST /internal/billing/export-user-data
POST /internal/billing/export-user-data
Internal service call (compliance-service): Export all associated data of a specified user in the billing service, including subscriptions, billing records, credit balance, usage statistics, usage alerts, and metering records
Billing Service - Internal None application/json
Responses
Status Description Schema
200 User data export successful dto.ExportUserDataResponse400 Invalid request parameters object401 Unauthorized object500 Internal server error object
Referenced Schemas
dto.BillingRecordResponse
Field Type Required Example Constraints Description
amount
number
No
99
app_id
string
No
app_001
created_at
string
No
2026-04-01T00:00:00Z
currency
string
No
CNY
description
string
No
Professional Monthly Subscription
invoice_number
string
No
INV-2026-001
line_items
array ofSee dto.InvoiceLineItemResponse
No
record_id
string
No
rec_001
status
string
No
paid
tenant_id
string
No
tnt_xyz789
type
string
No
subscription
dto.CreditBalanceResponse
Field Type Required Example Constraints Description
balance
number
No
150
currency
string
No
CNY
tenant_id
string
No
tnt_xyz789
updated_at
string
No
2026-05-12T10:00:00Z
dto.CreditTransactionResponse
Field Type Required Example Constraints Description
amount
number
No
50
balance
number
No
150
created_at
string
No
2026-05-12T10:00:00Z
id
string
No
ctr_001
remark
string
No
Plan downgrade prorated credit
source
string
No
proration
source_id
string
No
sub_xyz789
tenant_id
string
No
tnt_xyz789
type
string
No
credit
dto.ExportUserDataResponse
Field Type Required Example Constraints Description
code
integer
No
data
dto.ExportUserDataResult
No
message
string
No
timestamp
string
No
dto.ExportUserDataResult
dto.InvoiceLineItemResponse
Field Type Required Example Constraints Description
amount
number
No
99
description
string
No
Professional Monthly Subscription
quantity
integer
No
1
resource_type
string
No
subscription
tax_amount
number
No
5.94
tax_rate
number
No
0.06
unit_price
number
No
99
dto.MeteredBillingExportItem
Field Type Required Example Constraints Description
included_units
integer
No
overage_amount
string
No
overage_units
integer
No
period_end
string
No
period_start
string
No
resource_type
string
No
status
string
No
total_usage
integer
No
dto.SubscriptionResponse
Field Type Required Example Constraints Description
admin_user_id
string
No
usr_abc123
amount
number
No
499
auto_renew
boolean
No
True
billing_cycle
string
No
monthly
cancel_at_period_end
boolean
No
False
currency
string
No
CNY
current_period_end
string
No
2026-02-01T00:00:00Z
current_period_start
string
No
2026-01-01T00:00:00Z
grace_period_days
integer
No
7
plan_id
string
No
pro
status
string
No
active
tenant_id
string
No
tnt_xyz789
trial_end_date
string
No
2026-01-15T00:00:00Z
dto.UsageAlertResponse
Field Type Required Example Constraints Description
app_id
string
No
app_001
created_at
string
No
2026-05-01T00:00:00Z
id
string
No
ua_001
last_triggered_at
string
No
2026-05-10T08:00:00Z
name
string
No
API call volume alert
notification_channels
string
No
email,in_app
resource_type
string
No
api_calls
status
string
No
active
tenant_id
string
No
tnt_xyz789
threshold_percent
integer
No
80
updated_at
string
No
2026-05-05T10:00:00Z
dto.UsageStatsExportItem
Field Type Required Example Constraints Description
api_requests
integer
No
bandwidth_used
integer
No
date
string
No
failed_logins
integer
No
login_attempts
integer
No
mfa_verifications
integer
No
storage_used
integer
No
user_count
integer
No