CRUD: Create an export

Use this operation to create a data source export. After you have created a data source export, use CRUD: Retrieve an export to check the status of the data source export and access the exported data.

Limits

Zuora system enforces the following limits on data source exports:

  • The maximum processing time per export is 3 hours. If an export is executed for longer than 3 hours, it will be killed automatically.
  • The maximum number of concurrent exports is 50 per tenant. Exports in Pending and Processing status are counted towards the concurrent export limit. Zuora system will reject the subsequent data source export requests once the concurrent export limit is reached.

When you export data from Zuora, each exported file is available for download for 7 days. Data source exports (Export objects) older than 90 days are automatically deleted.

Note: This operation supports the Export ZOQL query language. However, this operation does not support some data sources, objects, and fields in Export ZOQL queries. For full compatibility with Export ZOQL, Zuora recommends that you use the AQuA API instead of this operation.

Request
query Parameters
rejectUnknownFields
boolean
Default: false

Specifies whether the call fails if the request body contains unknown fields. With rejectUnknownFields set to true, Zuora returns a 400 response if the request body contains unknown fields. The body of the 400 response is:

{
    "message": "Error - unrecognised fields"
}

By default, Zuora ignores unknown fields in the request body.

header Parameters
Idempotency-Key
string <= 255 characters

Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types.

With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.

Accept-Encoding
string

Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.

If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.

Content-Encoding
string

Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.

Authorization
string

The value is in the Bearer {token} format where {token} is a valid OAuth token generated by calling Create an OAuth token.

Zuora-Entity-Ids
string

An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.

Zuora-Track-Id
string <= 64 characters

A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.

The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').

X-Zuora-WSDL-Version
string

Set the value to 80 if you want to export data about Debit Taxation Item and Credit Taxation Item.

Request Body schema: application/json
required
ConvertToCurrencies
string

The currencies that you want to convert transaction amounts into. You can specify any number of currencies. Specify the currencies using their Foreign Currency Conversion enabled to use this field. Character limit: Values: a list of valid currency codes

Encrypted
boolean

Exports a secure version of encrypted data source fields. such as the AchAccountNumber field of the PaymentMethod object and the DefaultPaymentMethod data souce objects. Character limit: 5 Values: true, false

FileId
string

The ID of the file generated by an export query. This file is automatically generated when an Export object is created. Use this file ID with Get files to download the export file. Character limit: 32 Values: automatically generated

Format
required
string

The format that you want the export file to use. Character limit: 5

Enum: "csv" "html" "Excel"
Name
string

The name of the export. Character limit: 255 Values: a string of 255 characters or fewer

Query
required
string

Export ZOQL query.

Size
integer <int32>

The number of records or rows exported. This field value is null until the export status is Completed. Character limit: Values: automatically generated

Status
string

The status of the export. Type: string (enum) Character limit: 10 Values: automatically generated to be one of the following values:

  • Pending
  • Processing
  • Completed
  • Canceled
  • Failed
StatusReason
string

The reason for the given status. Use this information to help ascertain why an export failed. Character limit: 255 Values: automatically generated

Zip
boolean

Indicates if you want the resulting export file to be compressed into a zip file. Character limit: Values: true, false (default)

Responses
200
400
401
post/v1/object/export
Request samples
application/json
{
  • "Query": "select AccountNumber, BillCycleDay from Account",
  • "Format": "csv"
}
Response samples
application/json
{
  • "Success": true,
  • "Id": "2c93808457d787030157e03222184fae"
}