docs
api
Billing Management(UBill)
GetBillDataFileUrl

Generate the URL for downloading the billing data file - GetBillDataFileUrl

Overview

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.

Definition

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
Yes
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
No
RequireVersionstringBill language version, enumeration values:

> '': Default Chinese;

> 'EN': English version
No
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)
No

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

Example

Request Example

https://api.surfercloud.com/?Action=GetBillDataFileUrl
&BillingCycle="2021-12"
&BillType=1
&PaidType=1
&RequireVersion="EN"
&Version="v1"
&Format=fzBtbbkp
&BillPeriod=6
&BillPeriod=7

Response Example

{
  "Action": "GetBillDataFileUrlResponse",
  "FileUrl": "https://channel-1.cn-bj.ufileos.com/order-detail-1-2021-12-en.v1.csv?SurferCloudPublicKey=TOKEN_6ecddc1d-96c3-49a0-bfa6-ef1621f075fa\u0026Expires=1640163358\u0026Signature=0IfhSgJl2SrYbMl6bAnNW7kmhYw=",
  "IsValid": "yes",
  "RetCode": 0
}
  • Company
  • ContactUs
  • Blog
Copyright © 2024 SurferCloud All Rights Reserved