Get Bulk Write Job Details

Retrieve the details of a bulk write job performed earlier using Create Bulk Write Job API.

Request URL

{api-domain}/bigin/bulk/v2/write/{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.CREATE
  • ZohoBigin.bulk.ALL

Request parameters

The available request parameters are given below:

Path parameters

job_id stringRequired

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

Sample request

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

Response object

The response object contains the following details:

status string

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

character_encoding string

Specifies the character encoding for the bulk write job. The system detects the character encoding automatically. However, if you specify, it will take precedence.

id string

Specifies the unique identifier of the bulk write job.

result jsonobject

download_url: Represents the download URL from which you can download the result (CSV file) of the bulk write job after its successful completion.

created_by jsonobject

Specifies the ID and Name of the user who initiated the bulk read job.

operation string

Specifies the type of bulk write operation performed. Sample: "operation": "insert".

created_time datetime in ISO8601

Specifies the type of bulk write operation performed. Sample: "operation": "insert".

resource jsonobject

Contains the details about the module selected, the field mappings, and the ID of the file used for this job.

status string

The status of the bulk write job for that module. Example: "status": "ADDED", "IN PROGRESS", "COMPLETED", "SKIPPED", or "FAILED".

type string

The type of module that you have imported. The value is data.

module string

The API name of the module that you have imported the records from.

field_mappings jsonobject

Contains the following keys:

api_name string

The API name of the field present in the Zoho module object that you want to import into.

find_by string

The API name of the unique field or primary field(record ID) in the module. The system uses this API name to find the existing records in Bigin.

index integer

The column index of the field you want to map to the Bigin field.

default_value jsonobject

The default value with which the system replaces any partial or empty file column in the CSV file.

file jsonobject

Contains the following details about the import:

status string

The status of the bulk write job for that module. Example: "status": "ADDED", "IN PROGRESS", "COMPLETED", "SKIPPED", or "FAILED".

name string

The name of the CSV file which will get downloaded.

module string

The API name of the module that you have imported the records from.

added_count integer

The number of records added or imported.

skipped_count integer

The number of records skipped due to some issues. The Error column in the CSV file will have details about why the record was skipped during import.

updated_count integer

The number of records updated during bulk update.

total_count integer

The total number of records inserted, updated, or skipped during bulk import.

Note

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

Possible error codes

The response of this resource includes HTTP status and error codes.

The most common HTTP error codes that occur when you request access to this endpoint are given in the following:

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to request URL section above.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have ZohoBigin.bulk.CREATE. Create a new client with valid scope. Refer to scope section above.

  • NO_PERMISSIONHTTP 403

    Permission denied to read
    Resolution: The user does not have permission to get the details of a bulk write job. Contact your system administrator.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in Server. Contact support team.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to endpoints section above.

  • AUTHORIZATION_FAILEDHTTP 400

    User does not have sufficient privilege to read.
    Resolution: The user does not have the permission to get the details of a bulk write job. Contact your system administrator.

  • RESOURCE_NOT_FOUNDHTTP 404

    The requested resource doesn't exist.
    Resolution: The job ID specified is invalid. Specify a valid job ID.

Sample response for job "Added"

Copied{
  "status": "ADDED",
  "resource": [
    {
      "status": "INPROGRESS",
      "type": "data",
      "module": "Deals",
      "field_mappings": [
        {
          "api_name": "Deal_Name",
          "index": 1,
          "format": null,
          "find_by": null,
          "default_value": null
        },
        {
          "api_name": "Stage",
          "index": 132,
          "format": null,
          "find_by": null,
          "default_value": null
        }
      ],
      "file": {
        "status": "INPROGRESS"
      }
    }
  ],
  "id": "111111000002308098",
  "created_by": {
    "id": "111111000000035795",
    "name": "Patricia Boyle"
  },
  "operation": "insert",
  "created_time": "2019-01-30T02:21:32-12:00"
}

Sample response for job "In Progress"

Copied{
  "status": "INPROGRESS",
  "character_encoding": "UTF-8",
  "resource": [
    {
      "status": "INPROGRESS",
      "type": "data",
      "module": "Deals",
      "field_mappings": [
        {
          "api_name": "Deal_Name",
          "index": 1,
          "format": null,
          "find_by": null,
          "default_value": null
        },
        {
          "api_name": "Stage",
          "index": 2,
          "format": null,
          "find_by": null,
          "default_value": null
        }
      ],
      "file": {
        "status": "INPROGRESS",
        "name": "Accounts.csv",
        "added_count": 0,
        "skipped_count": 100,
        "updated_count": 0,
        "total_count": 100
      }
    }
  ],
  "id": "111111000002308051",
  "created_by": {
    "id": "111111000000035795",
    "name": "Patricia Boyle"
  },
  "operation": "insert",
  "created_time": "2019-01-30T02:18:15-12:00"
}

Sample response for job "Completed"

Copied{
  "status": "COMPLETED",
  "character_encoding": "UTF-8",
  "resource": [
    {
      "status": "COMPLETED",
      "type": "data",
      "module": "Deals",
      "field_mappings": [
        {
          "api_name": "Deal_Name",
          "index": 1,
          "format": null,
          "find_by": null,
          "default_value": null
        },
        {
          "api_name": "Stage",
          "index": 2,
          "format": null,
          "find_by": null,
          "default_value": null
        }
      ],
      "file": {
        "status": "COMPLETED",
        "name": "Accounts.csv",
        "added_count": 0,
        "skipped_count": 100,
        "updated_count": 0,
        "total_count": 100
      }
    }
  ],
  "id": "111111000002308051",
  "result": {
    "download_url": "/v2/bigin/org6196138/bulk-write/111111000002308051/111111000002308051.zip"
  },
  "created_by": {
    "id": "111111000000035795",
    "name": "Patricia Boyle"
  },
  "operation": "insert",
  "created_time": "2019-01-30T02:18:15-12:00"
}