Billing Management(UBill)

Generate the URL for downloading the billing data file - GetBillDataFileUrl


Generate the URL for downloading the billing data file, which includes three types of files, 1. Paid overview bill (supports CSV and PDF, PDF is supported from March 2023); 2. Unpaid overview file (supports CSV, only the current month's billing period can be viewed); 3. Bill detail file (supports CSV). Note: File generation is delayed, if the return value is IsValid='no', the user needs to initiate a retry.


Public Parameters

Parameter NameTypeDescription InformationRequired
ActionstringCorresponding API command name, the current API is GetBillDataFileUrl.Yes
PublicKeystringThe user's public key can be obtained from Console (opens in a new tab)Yes
SignaturestringUser signature generated based on public key and API command, see Signature AlgorithmYes

Request Parameters

Parameter NameTypeDescription InformationRequired
BillTypeintBill type, enumeration values:

> 0: Bill Overview Report;

> 1: Bill Detail Report
BillingCyclestringBilling Period: A string in the format of YYYY-MM, for example, '2021-08'.Yes
BillPeriodintBilling Period: Timestamp format, deprecated, please use BillingCycle.No
PaidTypeintBill Payment Status, (To get the bill details report, this parameter is not required), Enumerated values:

> 0: 0 Pending payment overview bill (only supports the current month's billing period);

> 1: Paid bill overview
RequireVersionstringBill language version, enumeration values:

> '': Default Chinese;

> 'EN': English version
VersionstringFile version, fixed value "v1".No
FormatstringFile format, enumeration values:

> "csv": csv format;

> "pdf": pdf format (Total paid overview file supports PDF from March 2023 onwards)

Response Field

Field NameTypeDescription InformationRequired
RetCodeintReturn status code. If it is 0, it means successful return. If it is not 0, it means failure.Yes
ActionstringOperation command name.Yes
MessagestringReturns an error message, providing detailed description when RetCode is non-zero.No
FileUrlstringTransaction bill file download URLNo
IsValidstringIs there a corresponding data file? (If this parameter returns 'no', it means the file is being generated and the user needs to initiate a retry to obtain it.No


Request Example

Response Example

  "Action": "GetBillDataFileUrlResponse",
  "FileUrl": "\u0026Expires=1640163358\u0026Signature=0IfhSgJl2SrYbMl6bAnNW7kmhYw=",
  "IsValid": "yes",
  "RetCode": 0
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved
  • Contact our sales to help your business.
  • Contact our sales to help your business.