bill_export_create
Requests export files for a bill your account owns: the category summary, the cost summary or the charges list. The files are generated in the background; read the bill's bill_exports until the export is completed and has a file_url. A charges list export also emails the requester when it is done. If an export of a file type is already queued or exporting for the bill, that export is returned and no new one is started; a charges list the customer requested is not shared, and the request fails until that export is completed. Bills that are still calculating cannot be exported. If the request fails, some of the files may have been started anyway; repeating it returns those that are still in progress. Repeating it does not restart an export that stopped progressing. Requires the billing update permission.
Arguments
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
data | CreateBillExportInput! | Yes |
Return Type
Mutation
mutation bill_export_create(
$data: CreateBillExportInput!
) {
bill_export_create(
data: $data
) {
request_id
complexity
bill_exports {
id
legacy_id
status
file_type
created_at
file_url
}
}
}Variables
{
"data": {
"customer_account_id": "QWNjb3VudDoxMjM0",
"bill_id": "QmlsbDoxMjM0",
"file_types": ["CATEGORY_SUMMARY", "CHARGES_LIST"]
}
}Response
{
"data": {
"bill_export_create": {
"request_id": "UmVjb3JkOjEyMzQ=",
"complexity": 100,
"bill_exports": [[{id: "QmlsbEV4cG9ydHM6MTIzNA==", file_type: "CHARGES_LIST"}]]
}
}
}