Skip to main content

Import

Zuora

Import

An import function uploads content, especially when you have a large amount of content. The Import object contains all of the information you need to upload content, such as a large number of usage records. 

Supported Calls

You can use this object with the following calls:

Walkthroughs and Use Cases

A common use case for the Import object is:

  • Upload a large number of usage records
    Use the Import object with an asynchronous create() call to upload a CSV file that contains as much as 4 MB of usage records. You need to:
    • Set the SOAP request property to enable MTOM to true
    • Add the imported CSV file to Attachments

See Import Mass Usage Records for detail information and examples.

Field Descriptions

All field names are case sensitive. Check enumerated values in descriptions to confirm capitalization and spacing. See Field Types for additional information.

Name Required to Create? Allowed Operations Description
CreatedById optional

Query
Filter

The user ID of the person who created the import.

Type: zns:ID

Character limit: 32

Version notes: WSDL 37.0+

Values: automatically generated

CreatedDate optional

Query
Filter

The date when the import was created.

Type: dateTime

Character limit: 29

Version notes: WSDL 37.0+

Values: automatically generated

FileContent required Create

A Base 64-encoded file that contains the contents of the import.

Type: DataHandler

Character limit: n/a

Version notes: WSDL 37.0+

Values: Base64-encoded file

Id optional Query
Filter

The ID of this object. Upon creation, the ID for this object is Import.Id.

Type: zns:ID

Character limit: 32

Version notes: WSDL 37.0+

Values: automatically generated

ImportedCount optional Query
Filter
The number of records successfully imported.

Type: int

Character limit

Version notes: WSDL 37.0+

Values: automatically generated

ImportType required Create
Query
Filter

The type of item imported.

Type: string (enum)

Character limit

Version notes: WSDL 37.0

Values: One of the following values:

  • usage
  • payment
  • quote
  • taxationDetail
  • updateAccountingCode
  • createRevenueSchedule
  • updateRevenueSchedule
  • deleteRevenueSchedule
  • importFXRate
Md5 optional Create
Query
Filter

A check to validate the import file's integrity.

Type: string

Character limit: 32

Version notes: WSDL 37.0+

System-generated: no

Values: a string of 32 characters or fewer

Name required Create
Query
Filter

A descriptive name for the import.

Type: string

Character limit: 100

Version notes: WSDL 37.0+

Values: one of the following:

  • a string of 100 characters or fewer
  • if NULL default is: import <ImportType_value>
OriginalResourceUrl optional Query
Filter

The URL for your import file, which contains your records for upload. When you upload the file, Zuora assigns it to this address.

Type: string

Character limit

Version notes: WSDL 37.0+

Values: automatic dynamically-generated URL

ResultResourceUrl optional Query
Filter

The URL for the import result file, which is a zipped CSV file.

Type: string

Character limit

Version notes: WSDL 37.0+

Values: automatic dynamically-generated URL

Status optional Query
Filter
The status of the import process.

Type: string (enum)

Character limit: 10

Version notes: WSDL 37.0+

Values: automatically generated using one of the following values:

  • Pending
  • Processing
  • Completed
  • Failed
StatusReason optional Query
Filter

The reason for the system-generated status. Use this information if the import fails.

Type: string

Character limit: 2000

Version notes: WSDL 37.0+

Values: automatically generated error message

TotalCount optional Query
Filter

The number of records in the import file.

Type: int

Character limit

Version notes: WSDL 37.0+

Values: automatically generated

UpdatedById optional Query
Filter

The ID of the user who last updated the import.

Type: zns:ID

Character limit: 32

Version notes: WSDL 37.0+

Values: automatically generated

UpdatedDate optional Query
Filter

The date when the import was last updated.

Type: dateTime

Character limit: 29

Version notes: WSDL 37.0+

Values: automatically generated

Additional Field Detail

Here's more information we think you might like to have about some of these fields. Use the Comments form at the bottom of this page if you have more questions.

Id

The ID of this object. Every object has a unique identifier that Zuora automatically assigns upon creation. You use this ID later when you work with the object. For example, if you send a query() call to query the import, then you need to include the specific Import object's ID with the call.

The ID for the Import object is ImportId.

Examples

Sample Request

The following is a sample SOAP request for importing a usage file.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:api="http://api.zuora.com/" xmlns:obj="http://object.api.zuora.com/">
<soapenv:Header>
<api:SessionHeader></api:SessionHeader>
<api:CallOptions><!-Optional: -></api:CallOptions>
</soapenv:Header>
<soapenv:Body>
<ns2:create xmlns:ns2="http://api.zuora.com/" xmlns:ns3="http://fault.api.zuora.com/" xmlns:ns4="http://object.api.zuora.com/">
<ns2:zObjects xsi:type="ns4:Import" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns4:FileContent>cid:CSV_file_example.csv</ns4:FileContent>
<ns4:ImportType>Usage</ns4:ImportType>
<ns4:Name>CSV_file_example.csv</ns4:Name>
</ns2:zObjects>
</ns2:create>
</soapenv:Body>
</soapenv:Envelope>

Sample Response 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns1:createResponse xmlns:ns1="http://api.zuora.com/">
<ns1:result>
<ns1:Id>402881ee57185868015718ae58a40146</ns1:Id>
<ns1:Success>true</ns1:Success>
</ns1:result>
</ns1:createResponse>
</soapenv:Body>
</soapenv:Envelope>