Get the Status of the Bulk Read Job

Retrieve the details of a bulk read job performed earlier using Create Bulk Read Job API.

Request URL

{api-domain}/bigin/bulk/v2/read/{job_id}

Choose domain-specific URL to replace {api-domain}

You can use the domain-specific URL to access Bigin resources. Based on the data center in which the Bigin account's resources are available, replace {api-domain} in the preceding request with one of the following API domain URLs:

  • For US, https://www.zohoapis.com
  • For EU, https://www.zohoapis.eu
  • For AU, https://www.zohoapis.com.au
  • For IN, https://www.zohoapis.in
  • For CN, https://www.zohoapis.com.cn
  • For JP, https://www.zohoapis.jp

For more information, see Multi DC Support.

 

Authorization

For this endpoint, pass the access token as an authorization header. See OAuth Authentication for more information about access tokens.

Authorization: Zoho-oauthtoken <ACCESS_TOKEN>

You must authenticate using an access token that is associated with the following scope:

  • ZohoBigin.bulk.READ and ZohoBigin.modules.{module_name}.ALL
  • ZohoBigin.bulk.READ and ZohoBigin.modules.{module_name}.READ

In the above scope, replace {module_name} with the necessary module. The possible modules include deals, contacts, accounts (companies in Bigin), products, calls, events, and tasks.

Request parameters

The available request parameters are given below:

Path parameters

job_id stringRequired

The unique identification of bulk read job, which is obtained from the response of the Create Bulk Read Job API.

Sample request

Copiedcurl "https://www.zohoapis.com/bigin/bulk/v2/read/3652397000000646004" \
-X GET \
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample response: For Job Added

Copied{
    "data": [
        {
            "id": "3652397000000646004",
            "operation": "read",
            "state": "ADDED",
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Account_Name.Account_Name",
                    "Account_Name.Phone",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Boyle"
                        },
                        {
                            "api_name": "Account_Name.Phone",
                            "comparator": "contains",
                            "value": "5"
                        }
                    ],
                    "group_operator": "or"
                },
                "page": 1
            },
            "created_by": {
                "id": "3652397000000186017",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-04-01T14:20:04+05:30"
        }
    ]
}

Sample response: For Job In Progress

Copied{
    "data": [
        {
            "id": "3652397000000646004",
            "operation": "read",
            "state": "IN PROGRESS",
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Account_Name.Account_Name",
                    "Account_Name.Phone",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Boyle"
                        },
                        {
                            "api_name": "Account_Name.Phone",
                            "comparator": "contains",
                            "value": "5"
                        }
                    ],
                    "group_operator": "or"
                },
                "page": 1
            },
            "created_by": {
                "id": "3652397000000186017",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-04-01T14:22:04+05:30"
        }
    ]
}

Sample response: For Job Completed

Copied{
    "data": [
        {
            "id": "3652397000000646004",
            "operation": "read",
            "state": "COMPLETED",
            "result": {
                "page": 1,
                "count": 20,
                "download_url": "/bigin/bulk/v2/read/3652397000000646004/result",
                "per_page": 200000,
                "more_records": false
            },
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Account_Name.Account_Name",
                    "Account_Name.Phone",
                    "Lead_Source",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Lead_Source",
                            "comparator": "equal",
                            "value": "Advertisement"
                        },
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Boyle"
                        },
                        {
                            "api_name": "Account_Name.Phone",
                            "comparator": "contains",
                            "value": "5"
                        }
                    ],
                    "group_operator": "or"
                },
                "page": 1
            },
            "created_by": {
                "id": "3652397000000186017",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-04-01T14:24:04+05:30"
        }
    ]
}

Response object

The response object contains the following details:

operation string

Specifies the type of action the API completed. Sample - "operation" : "read”.

created_by jsonobject

Specifies the ID and Name of the user who initiated the bulk read job. Sample - "created_by": { "id": "1000000031045", "name": "Patricia Boyle" }

created_time datetime in ISO8601

Specifies the time period of when the bulk read job was initialized.

state string

Specifies the current status of the bulk read job. Example: "state": "ADDED" or "IN PROGRESS" or "COMPLETED".

query jsonobject

Specifies the "query" provided by the user when creating the bulk read job. The attributes are the same as in the Request JSON, with "modules", "cvid", fields", "criteria" and "page".

id string

Specifies the unique identifier of the bulk read job. Sample - "id": "1000010760002".

result jsonobject

It is available only after the completion of the job. Please refer to the below section for information on the "result" JSON object.

page integer

Describes the range of the number of records exported. If the "page" is one, then the number of records would be between 1 - 200,000. If it's "two", then the records from 200,001 - 400,000 will be taken for export.

count integer

Specifies the actual number of records exported. Sample - "count": 14567

download_url string

Specifies the url which contains the CSV file. User can send a GET request with your api domain attached to the download URL to download the file. Sample - "/bigin/bulk/v1/read/2883756000001275012/result".

more_records boolean

The "more_records" key in the response can be used to detect if there are any further records. You can change the value of "page" key for additional export jobs.

Note

To know about the Bulk Read API limits, go here.

Sample request: For the job with cvid and Criteria

Copiedcurl "https://www.zohoapis.com/bigin/bulk/v2/read/554023000000568002" \
-X GET \
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Sample response: For Job Completed

Copied{
    "data": [
        {
            "id": "554023000000568002",
            "operation": "read",
            "state": "COMPLETED",
            "result": {
                "page": 1,
                "count": 3,
                "download_url": "/bigin/bulk/v2/read/554023000000568002/result",
                "per_page": 200000,
                "more_records": false
            },
            "query": {
                "fields": [
                    "Last_Name",
                    "Owner",
                    "Owner.last_name",
                    "Email",
                    "Mobile",
                    "Created_Time"
                ],
                "module": "Contacts",
                "criteria": {
                    "group": [
                        {
                            "api_name": "Email",
                            "comparator": "contains",
                            "value": "boyle"
                        },
                        {
                            "api_name": "Owner.last_name",
                            "comparator": "equal",
                            "value": "Patricia Boyle"
                        }
                    ],
                    "group_operator": "and"
                },
                "page": 1,
                "cvid": "554023000000093005"
            },
            "created_by": {
                "id": "554023000000235011",
                "name": "Patricia Boyle"
            },
            "created_time": "2019-05-09T14:01:24+05:30"
        }
    ]
}