List Paid Orders - ListPaidOrders
Overview
Query detailed list of completed (paid) orders, StartTime/EndTime are required; the data range is [StartTime, EndTime), meaning that data whose billing start time is greater than or equal to StartTime and less than EndTime will be retrieved.
Definition
Public Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| Action | string | Corresponding API command name, the current API is ListPaidOrders. | Yes |
| PublicKey | string | The user’s public key can be obtained from Console  | Yes |
| Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
| Parameter Name | Type | Description Information | Required |
|---|---|---|---|
| StartTime | int | Query start time (Unix timestamp, seconds). When provided with EndTime, enables custom time range query; EndTime must be greater than StartTime | Yes |
| EndTime | int | Query end time (Unix timestamp, seconds). Must be provided together with StartTime | Yes |
| Page | int | Page number, starting from 1 | Yes |
| PageSize | int | Page size (min 10, max 100) | Yes |
| ResourceIds.N | string | Resource ID list (optional) | No |
| ModelIds.N | string | Model ID list (optional) | No |
| PricingUnits.N | int | Pricing unit list (optional) | No |
| OrderTypes.N | int | Order type list (optional) | No |
| PricingSkus.N | string | Billing SKU list (optional) | No |
| ProductCodes.N | string | Product code list (optional). Enum: modelverse, sandbox | No |
| Regions.N | string | Region list (optional). See Region and Zone List | No |
| OrganizationIds.N | int | Organization ID list (optional) | No |
Response Field
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| RetCode | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. | Yes |
| Action | string | Operation command name. | Yes |
| Message | string | Returns an error message, providing detailed description when RetCode is non-zero. | No |
| Page | int | Current page number | Yes |
| PageSize | int | Page size | No |
| Total | int | Total record count | No |
| Orders | array[OrderItemDetail] | Paid order detail list | No |
Data Model
OrderItemDetail
| Field Name | Type | Description Information | Required |
|---|---|---|---|
| Region | string | Region | No |
| ProductCode | string | Product code | No |
| ProductCodeDisplay | string | Product code display name | No |
| StarCardAccount | string | Star Card deduction amount | No |
| OrderNo | string | Order number | No |
| CompanyID | int | Company ID | No |
| OrganizationID | int | Organization ID | No |
| OrganizationName | string | Organization name | No |
| UserEmail | string | User email | No |
| ChargeType | int | Charge type | No |
| ChargeTypeDisplay | string | Charge type display name | No |
| Channel | int | Channel | No |
| Currency | string | Currency (e.g., CNY, USD) | No |
| CurrencyDisplay | string | Currency display name | No |
| ResourceID | string | Resource ID | No |
| ModelID | string | Model ID | No |
| ModelName | string | Model name | No |
| OrderType | int | Order type | No |
| OrderTypeDisplay | string | Order type display name | No |
| PricingSKU | string | Billing unit (SKU) name | No |
| Quantity | int | Usage quantity | No |
| QuantityDisplay | string | Usage display (with unit) | No |
| PricingUnit | int | Pricing unit (measurement unit) | No |
| PricingUnitDisplay | string | Pricing unit display name (e.g., K Tokens, Image, Second) | No |
| ListPrice | string | List price (original unit price) | No |
| DiscountPrice | string | Discounted unit price | No |
| OrderTotalPrice | string | Order total amount | No |
| OriginalPrice | string | Original price | No |
| Status | int | Order status | No |
| StatusDisplay | string | Order status display name | No |
| StartTime | int | Start billing time (Unix timestamp, seconds) | No |
| EndTime | int | End billing time (Unix timestamp, seconds) | No |
| PaidTime | int | Payment completion time (Unix timestamp, seconds) | No |
| CashAccount | string | Cash account deduction amount | No |
| BonusAccount | string | Bonus account deduction amount | No |
| Coupon | string | Coupon deduction amount | No |
| UnpaidOrderNo | string | Associated unpaid order number (empty string if none) | No |
| RegionDisplay | string | Region display name | No |
Example
Request Example
https://api.dezai.com/?Action=ListPaidOrders
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=IDsbKUjo
&Page=6
&PageSize=9
&ResourceIds.N=AeFSrUzZ
&ModelIds.N=kfUPLHaN
&PricingUnits.N=4
&OrderTypes.N=1
&StartTime=4
&EndTime=5
&PricingSkus.N=ueOIxKoz
&ProductCodes.N=PcpOcCXZ
&Regions.N=IVigjwbh
&OrganizationIds.N=8Response Example
{
"Action": "ListPaidOrdersResponse",
"Data": {},
"Orders": [
{
"BonusAccount": "AgXuWXUE",
"CashAccount": "dvsJvKeb",
"Channel": 5,
"ChargeType": 8,
"ChargeTypeDisplay": "BzeIdKsp",
"CompanyID": 5,
"Coupon": "bYZilSNV",
"CreditAccount": "ddqZVbbL",
"Currency": "OcSKWFHV",
"CurrencyDisplay": "JfLOksHY",
"DiscountPrice": "yqGjZsVq",
"EndTime": 1,
"ListPrice": "QoIypZbG",
"ModelID": "KdJndPFe",
"ModelName": "PuNopUfo",
"OrderNo": "dPfZKSHW",
"OrderTotalPrice": "dKQVVWHo",
"OrderType": 6,
"OrderTypeDisplay": "mhpQYHbO",
"OrganizationID": 5,
"OrganizationName": "TsIIjvmL",
"OriginalPrice": "UElWQRCf",
"PaidTime": 9,
"PricingItemID": 5,
"PricingSKU": "kGHeOOsB",
"PricingUnit": 5,
"PricingUnitDisplay": "mBfpOMCm",
"Quantity": 9,
"QuantityDisplay": "nnnhBEHV",
"ResourceID": "nhULypVv",
"ResourceType": 2,
"ResourceTypeDisplay": "QGWVsrLb",
"StartTime": 3,
"Status": 4,
"StatusDisplay": "AcQIUtuY",
"UnpaidOrderNo": "qBHrxRBp",
"UserEmail": "OOFVHQds"
}
],
"PageSize": 3,
"RetCode": 0,
"Total": 6
}