Updated on 2023-04-03 GMT+08:00

Querying the Invoice List

Function

Customers can query the invoice list.

Log in to Billing Center, and choose Invoices in the left navigation pane. The invoice list is displayed.

Constraints

This API can be invoked using the customer AK/SK or token.

Debugging

You can debug the API in API Explorer. Automatic authentication is supported. API Explorer can automatically generate and debug example SDK code.

URI

GET /v1.0/{domain_id}/payments/intl-invoices

Parameter

Mandatory

Value Range

Description

domain_id

Yes

A maximum of 64 characters

Customer account ID. For details, see How Do I Obtain Customer's customer_id and domain_id Values?

Table 1 Request parameters

Parameter

Mandatory

Type

Value Range

Description

start_time

Yes

String

A maximum of 64 characters

Invoice application start time

UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, for example, 2019-05-06T08:05:01Z.

end_time

Yes

String

A maximum of 64 characters

Invoice application end time

UTC time in "yyyy-MM-dd'T'HH:mm:ss'Z'" format, for example, 2019-05-06T08:05:01Z.

offset

Yes

Integer

[1-99999]

Page number.

limit

Yes

Integer

[1-100]

Number of records displayed per page.

Request Message

Request parameters

None

Example Request

GET https://bss-intl.myhuaweicloud.com/v1.0/{domain_id}/payments/intl-invoices?start_time=2019-01-28T11:48:41Z&end_time=2019-12-28T11:48:41Z&offset=1&limit=10
Content-Type: application/json
X-Auth-Token: MIIPAgYJKoZIhvcNAQcCo...ggg1BBIINPXsidG9rZ 

Response Message

Response Parameters

Parameter

Type

Value Range

Description

error_code

String

A maximum of 20 characters

Error code. For details, see Returned Values. This parameter is returned only when the query failed.

error_msg

String

A maximum of 1000 characters

Error description. This parameter is returned only when the query failed.

count

Integer

-

Number of records. This parameter is returned only when the query is successful.

invoices

List<IntlInvoiceRequestInfo>

-

Invoice list. For details, see Table 2.

Table 2 IntlInvoiceRequestInfo

Parameter

Type

Value Range

Description

requestId

String

A maximum of 64 characters

Request ID

cancelReason

String

A maximum of 256 characters

Rejection reason

titleType

Integer

[0-1]

Title type

  • 0: Individual customer
  • 1: Corporate customer

channelType

Integer

-

Channel type

0: HUAWEI CLOUD

invoiceType

Integer

[0-1]

Invoice type

  • 0: Special VAT invoice
  • 1: General VAT invoice

invoiceTitle

String

A maximum of 1024 characters

Invoice title

invoiceAmount

Number

-

Invoiced amount (USD)

invoiceMethod

Integer

[0-2]

Invoicing method

  • 0: Invoicing by bill
  • 1: Invoicing by payment
  • 2: Invoicing by order

invoiceClass

Integer

[0-1]

Invoice type

  • 0: Tax invoice
  • 1: Business invoice

invoiceState

Integer

-

Invoicing state

  • 0: Draft
  • 1: Waiting for the first trial
  • 4: Waiting for the export invoice file
  • 5: Waiting for the invoice file backfile
  • 6: Waiting for the mail confirmation
  • 7: Waiting for receipt confirmation
  • 8: Complete
  • 9: Refunded
  • 11: Waiting for rebut audit
  • 13: Invoice return audit
  • 14: Waiting return cis notify
  • 15: Invoice return failed

applyOpera

String

A maximum of 32 characters

Invoice applicant

addressInfo

PostAddressInfoIntl

-

Address information. For details, see Table 3.

applyTime

String

A maximum of 64 characters

Application time (UTC time)

invoiceMode

String

0

Invoice type

0: Paper invoice

email

String

A maximum of 400 characters

Email receiving the electronic invoice

requestMode

String

[0-2]

Application type

  • 0: Invoice creation application
  • 1: Invoice return application
  • 2: Invoice change application

srcRequestId

String

A maximum of 64 characters

Original application ID when the invoice is returned

salesId

String

A maximum of 64 characters

Signing entity ID

invoiceNo

String

A maximum of 32 characters

Invoice number

tradeType

Integer

-

Transaction type

  • 3: Settlement by credit card
  • 4: Settlement by billing
  • 5: Invoicing by payment
  • 6: BP settle by billing
  • 7: Invoicing by recharge
  • 8: Order payment online
  • 10: Invoicing by refund

billCycle

String

A maximum of 64 characters

Billing cycle

taxList

List<TaxInfo>

-

Tax information list. For details, see Table 4.

Table 3 PostAddressInfoIntl

Parameter

Type

Value Range

Description

address

String

A maximum of 1024 characters

Recipient address

recipients

String

A maximum of 1024 characters

Recipient

zipCode

String

A maximum of 256 characters

Post code of the recipient address

mobilePhone

String

A maximum of 256 characters

Recipient mobile number

Table 4 TaxInfo

Parameter

Type

Value Range

Description

taxClass

String

A maximum of 64 characters

Tax type

  • VAT
  • ISS
  • WHT
  • GST

taxRate

String

A maximum of 64 characters

Tax rate

subTaxClass

String

A maximum of 64 characters

Tax subtype

  • PIS
  • COFINS
  • CGST
  • SGST
  • IGST
  • ISS
  • WHT
  • VAT

taxAmount

Number

-

Tax amount

Unit: USD ($)

Example Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: length
Date: response time 
{
    "count": 2,
    "invoices": [
        {
            "requestId": "IV19122807N6S5",
            "cancelReason": null,
            "titleType": 1,
            "channelType": 0,
            "invoiceType": 1,
            "invoiceTitle": "Dream666",
            "invoiceAmount": 102.0,
            "invoiceMethod": 1,
            "invoiceClass": 1,
            "invoiceState": 8,
            "applyOpera": "*******",
            "addressInfo": {
                "address": "********",
                "recipients": "Wang**",
                "zipCode": "10****",
                "mobilePhone": "188****8888"
            },
            "applyTime": "2019-12-28T07:02:03Z",
            "invoiceMode": "1",
            "email": "***@163.com",
            "requestMode": "0",
            "srcRequestId": null,
            "salesId": "1351",
            "invoiceNo": "CSER191001322",
            "tradeType": 5,
            "billCycle": "201912",
            "taxList": [
                {
                    "taxClass": "WHT",
                    "taxRate": "0.01",
                    "subTaxClass": "WHT",
                    "taxAmount": 1.0
                },
                {
                    "taxClass": "VAT",
                    "taxRate": "0.01",
                    "subTaxClass": "VAT",
                    "taxAmount": 1.0
                }
            ]
        },
        {
            "requestId": "IV19122806VJF8",
            "cancelReason": null,
            "titleType": 1,
            "channelType": 0,
            "invoiceType": 1,
            "invoiceTitle": "Dream666",
            "invoiceAmount": 384.4,
            "invoiceMethod": 1,
            "invoiceClass": 1,
            "invoiceState": 8,
            "applyOpera": "*******",
            "addressInfo": {
                "address": "********",
                "recipients": "Wang**",
                "zipCode": "10****",
                "mobilePhone": "188****8888"
            },
            "applyTime": "2019-12-28T06:20:41Z",
            "invoiceMode": "1",
            "email": "***@163.com",
            "requestMode": "0",
            "srcRequestId": null,
            "salesId": "1351",
            "invoiceNo": "CSER191001321",
            "tradeType": 7,
            "billCycle": "201912",
            "taxList": [
                {
                    "taxClass": "WHT",
                    "taxRate": "0.15",
                    "subTaxClass": "WHT",
                    "taxAmount": 54.4
                },
                {
                    "taxClass": "VAT",
                    "taxRate": "0.06",
                    "subTaxClass": "VAT",
                    "taxAmount": 21.76
                }
            ]
        }
    ]
}

Returned Values

  • 4xx: This class of HTTP status code is intended for situations in which the error seems to have been caused by the client, for example, the request contains bad syntax or incorrect parameters. You must ensure the request is correct.
  • 5xx: This class of HTTP status code is intended for cases in which the Huawei Cloud server is aware that it has encountered an error or is otherwise incapable of performing the request. In this case, contact Huawei Cloud customer service.

HTTP Value

Error Code

Description

400

CBC.0100

Parameter error.

403

CBC.0151

Access denied.

500

CBC.0999

Other errors.