Interface Specifications
Updated at:2025-10-27
Request response format standard
- The HTTP request, the key of the parameter in Querystring, must follow the camelcase convention with the first letter lowercase, Such as productType, serviceType, etc.
- In addition to the standard Header specified in RFC 2616, other Headers are defined in the format of x-bce-*.
- The RESTful API of the financial system only supports the JSON format.
- In all JSON data, keys must follow the camelCase convention with the first letter lowercase.
- Header fields like date, content-MD5, content-Type, and content-length must comply with the rules of RFC 2616.
- In accordance with the provisions of the HTTP protocol, content-MD5 requires both MD5 calculation and Base64 encoding. Its calculation method is as follows: Content-MD5 = "Content-MD5" ":" md5-digest md5-digest = <base64 of 128 bit MD5 digest as per RFC 1864>
Common request headers
| Header | Description | Required or not |
|---|---|---|
| Authorization | Certification information for verifying the validity of the request. For more details, see Authentication | Required |
| x-bce-date | The request creation time should be specified in the YYYY-MM-DD format. For instance, 2014-06-01 signifies June 1, 2014. If adhering to the standard Date field, the header can remain blank. Should both Date and x-bce-date be present, x-bce-date takes precedence. | Optional |
| Content-Length | The length of HTTP request content as defined in RFC 2616 | Optional |
| Content-Type | The type of HTTP request content as defined in RFC 2616 | Optional |
| Content-MD5 | The MD5 digest of the HTTP request content as defined in RFC 2616 | Optional |
| Date | The GMT time specified in the HTTP 1.1 protocol, such as Wed, 06 Apr 2016 06:34:40 GMT |
Optional |
| Host | The access Host value, which is set to billing.baidubce.com |
Optional |
Common response headers
| Name | Types | Description |
|---|---|---|
| Content-Length | String | The HTTP request content length is defined by RFC 2616. |
| Content-Type | String | The HTTP request content type is defined by RFC 2616. |
| Connection | String | Whether the server disconnects, with values being close or keep-alive. |
| Date | String | The GMT time specified in the HTTP 1.1 protocol, such as Wed, 06 Apr 2016 06:34:40 GMT. |
| x-bce-request-id | String | Created by the financial service, it is a unique identifier for requesting BCE Billing and is used to help troubleshoot issues. If you encounter problems while using the financial service, you can provide this field in the work order to facilitate quick problem location. |
The request ID is generated by the financial service using UUID Version 4.
