Export

From API Documentation

Jump to: navigation, search

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:

  1. Define your data set (the fields to use)
  2. Pass your request (query) to Zuora via create() Export
  3. Zuora will then process your request asynchronously, and will usually finish with a few minutes
  4. Query Zuora for the status of your request
  5. 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
○ Update
○ Delete
● Filter

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
○ Update
○ Delete
● Filter

This field is not editable. The Zuora system automatically generates this, and denotes when the objects was first created.
Encrypted No boolean ● Create

● Query
○ Update
● Delete
● Filter

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
○ Update
● Delete
● Filter

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
○ Update
● Delete
● Filter

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
○ Update
● Delete
● Filter

255 characters maximum An optional name given to the export created.
Query Yes string ● Create

● Query
○ Update
● Delete
○ Filter

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
○ Update
● Delete
● Filter

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
○ Update
● Delete
● Filter

Pending, Processing, Completed, Canceled, Failed The status of the export.
StatusReason No string ● Create

● Query
○ Update
● Delete
● Filter

255 characters maximum The reason for the given status. Useful when exports fail.
UpdatedDate System generated, always exists dateTime ○ Create

● Query
○ Update
○ Delete
● Filter

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
○ Update
○ Delete
● Filter

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
○ Update
● Delete
● Filter

true or false Specifies whether or not the resulting Export should be compressed into a ZIP formatted file. The default value is false.