Export
From API Documentation
Exports mimic the export functionality in Z-Billing and Z-Payments, and are intended for:
- Large data sets
- Objects joined with other objects not readily attainable via Z-Commerce API
- MS-Excel and other applications. You can readily import the files into Microsoft Excel or other applications for charting, reporting, accounting or other business intelligence applications.
The Export framework works in a similar was as the Z-Billing and Z-Payments export:
- Define your data set (the fields to use)
- Pass your request (query) to Zuora via create() Export
- Zuora will then process your request asynchronously, and will usually finish with a few minutes
- Query Zuora for the status of your request
- Once the status of the export is completed, download the export via the REST API
Using the Export Object
This object is used to create exports via the API. Please see Creating an Export and Export ZOQL for information about creating Exports.
Fields
| Name | Required? | Type | Allowed Operations: ● Yes ○ No | Allowable Values | Description |
|---|---|---|---|---|---|
| CreatedById | System generated, always exists | ZNS:Id | ○ Create
● Query | This field is not editable. 32 characters maximum. | The Zuora system automatically generates this Id of the user who created the object. |
| CreatedDate | System generated, always exists | dateTime | ○ Create
● Query | This field is not editable. | The Zuora system automatically generates this, and denotes when the objects was first created. |
| Encrypted | No | boolean | ● Create
● Query | true, false | Export a secure version of encrypted data source fields. Currently, you can view and export the AchAccountNumber field of any of PaymentMethod and DefaultPaymentMethod data source objects. To use this feature, when creating an Export object, set the Encrypted field to "true." This field was added in version 32.0. See Encrypted Data Source Option for more information. |
| FileId | No, generated by Zuora. | ZNS:id | ● Create
● Query | 40 characters | The id of the file generated by the export query. Zuora will populate this field once the export has been generated. Use this file ID when downloading the generated export. |
| Format | Yes | string | ● Create
● Query | csv, html | Format of the export. Note that this is case sensitive, and must be lowercased. Specify "csv" to create a comma-separated value file, or "html" to create HTML-formatted output. |
| Name | No | string | ● Create
● Query | 255 characters maximum | An optional name given to the export created. |
| Query | Yes | string | ● Create
● Query | Valid ZOQL (export) | The query of the fields contained in the export. Please note that export ZOQL differs slightly from Z-Commerce ZOQL. Please see additional documentation for differences. |
| Size | No, system generated | int | ● Create
● Query | If status is Completed, this will give the number of records (rows) exported. Otherwise, this will be null. | |
| Status | Always exists, system generated | string | ● Create
● Query | Pending, Processing, Completed, Canceled, Failed | The status of the export. |
| StatusReason | No | string | ● Create
● Query | 255 characters maximum | The reason for the given status. Useful when exports fail. |
| UpdatedDate | System generated, always exists | dateTime | ○ Create
● Query | This field is not editable. | The Zuora system automatically generates this, and denotes when the objects was last updated. |
| UpdatedBy | System generated, always exists | ZNS:Id | ○ Create
● Query | This field is not editable. 32 characters maximum. | The Zuora system automatically generates this Id of the user who last updated the object. |
| Zip | No | boolean | ● Create
● Query | true or false | Specifies whether or not the resulting Export should be compressed into a ZIP formatted file. The default value is false. |
