ChargebeeAPI

Retrieve usage file upload URL

Try in API Explorer

This endpoint returns an upload URL for uploading usage events files, allowing you to upload files in supported formats. The file is processed asynchronously, and its status can be tracked using the retrieve_file_processing_status endpoint.

Before uploading, review the following guidelines and constraints:

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/usage_files/upload_url

Input Parameters

file_name
required, string, max chars=150

Name of the file being uploaded.

Note: No special characters are allowed in the file_name except for underscores _ and hyphens - .Example:

Valid file nameInvalid file name
merchant_data.csvmerchant@data.csv
sales_report-2024.csvsales&report-2024.csv
customer_details_file.csvcustomer!details#file.csv
mime_type
required, string, max chars=100

Indicates the format of a file.

Note: Currently, only text/csv is supported.

Returns

usage_fileUsage file object

Resource object representing usage_file