Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Mass Updater > Perform Mass Action

Perform Mass Action

This reference describes how to perform a mass action through the REST API. See Mass Updater for more information about performing mass actions.

Using this API method, you send a multipart/form-data request containing a .csv file with data about the mass action you want to perform. Zuora returns a key and then asynchronously processes the mass action. You can use the key to get details about the result of the mass action.

Request

  • Production: POST https://api.zuora.com/rest/v1/bulk
  • API Sandbox: POST https://apisandbox-api.zuora.com/rest/v1/bulk

Request Header

Content-Type

required

Must be multipart/form-data.

Accept

optional

Optionally enter application/json. Only JSON is returned.

Request Body

file

required

File containing data about the mass action you want to perform. The file requirements are the same as when uploading a file through the Mass Updater on the Zuora UI.

The file must be a .csv file or a zipped .csv file. 

The maximum file size is 4 MB.

The data in the file must be formatted according to the mass action type you want to perform. Refer to the articles listed in the actionType field below for the requirements of each mass action type.

See the Uploaded File section of the Mass Updater article for more information about the upload file.

params

required

Container for the following fields. You must format the params field as a JSON object.

actionType

required

Type of mass action you want to perform. The following mass actions are supported:

checksum

optional

An MD5 checksum that is used to validate the integrity of the uploaded file. The checksum is a 32-character string.

Response

Response Body

success

Returns true if the request is successful. Otherwise, returns false.

reasons

Information describing the reason for the result. Returned only if success is false.

code

An eight-digit numeric error code.

message

A description of the error.

bulkKey

String of 32 characters that identifies the mass action. The bulkKey is generated before the mass action is processed. You can use the bulkKey to Get the Mass Action Result.

Example

CURL Request

curl
-H "apiAccessKeyId:Username" 
-H "apiSecretAccessKey:Password"
-H "Accept:application/json"
--form "file=@CreateRevenueSchedules.csv"
--form "params={actionType:CreateRevenueSchedule}"
-X POST https://api.zuora.com/rest/v1/bulk

JSON Response

{
  "success" : true,
  "bulkKey" : "402892f04c97b89a014c97bb30a50003"
}
Last modified
23:09, 20 Jan 2016

Tags

This page has no custom tags.

Classifications

(not set)