---
title: Core Bulk
slug: core-bulk
docTags: 
createdAt: 2022-12-29T03:01:45.000Z
---

The Bulk API is expected to be used with a large number of Rows. The bulk process runs asynchronously and calls an Automation Endpoint on completion. Its best to use this when you are expecting a process to run over for more than a minute.

There are three parts to this API

1. Input - is expected to be a large list of JSON Objects.
2. Functions - a list of any of the Core Functions in the function JSON representation format defined [here](https://autodocs.pathfix.com/core-api-functions)
3. Output - An output definition for each of the items in the Input list

:::hint{type="info"}
There is a minor difference in the way the functions list is created. Follow the example in the API for clarity. This will be aligned in future releases of the bulk API.
:::

### &#x20;Webhooks in this API

| Name       | Description                                                                                                                                                                                                                                              |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| completion | Required - The API will be rejected without a valid Automation url. This is where the output along with the "process\_name" will be sent as a POST resquest                                                                                              |
| progress   | Optional - Use this to track the progress of API. This works in conjunction with progress\_rows and sends a progress notification for every n rows (100 in this example)                                                                                 |
| error      | Optional - Useful to track any failure. The error notification works on every item of the list that is being processed. Any error will not stop processing but will send a notification to he url specified and continue to process the remaining items. |



API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/bulk",
  "name": "Multi functions API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "28UsDqyeH3QRdmtVamSQT",
        "code": "{\n    \"output\": \"Processing Asynchronously\"\n}",
        "language": "200"
      },
      {
        "id": "yIX64DyIuDPJgBRFSfAWb",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "28UsDqyeH3QRdmtVamSQT"
  },
  "examples": {
    "languages": [
      {
        "id": "ENcJz9TStG38F0X-taA4x",
        "code": "{\r\n    \"input\": [\r\n        {\r\n            \"user_id\": \"ron4@pathfix.com\",\r\n            \"source\": \"facebook\",\r\n            \"country\": \"India\"\r\n        },\r\n        {\r\n            \"user_id\": \"janet@pathfix.com\",\r\n            \"source\": \"LinkedIn\",\r\n            \"country\": \"India\"\r\n        }\r\n    ],\r\n    \"functions\": {\r\n        \"switch_source\": {\r\n            \"type\": \"text\",\r\n            \"function\": \"multiswitch\",\r\n            \"params\": {\r\n                \"switches\": {\r\n                    \"source\": {\r\n                        \"input\": \"{{function_input.source}}\",\r\n                        \"switch\": {\r\n                            \"facebook\": \"Facebook\",\r\n                            \"Facebook-\": \"Facebook\",\r\n                            \"LinkedIn\": \"LinkedIn\"\r\n                        }\r\n                    },\r\n                    \"countryCode\": {\r\n                        \"input\": \"{{function_input.country}}\",\r\n                        \"switch\": {\r\n                            \"India\": \"IN\"\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        },\r\n        \"to_base64\": {\r\n            \"type\": \"text\",\r\n            \"function\": \"tobase64\",\r\n            \"params\": {\r\n                \"input\": \"{{function_input.user_id}} {{function_switch_source.output.source}}\"\r\n            }\r\n        }\r\n    },\r\n    \"output\": {\r\n        \"email\": \"{{user_id}}\",\r\n        \"source\": \"{{function_switch_source.output.source}}\",\r\n        \"address\": {\r\n            \"country_cde\": \"{{function_switch_source.output.countryCode}}\"\r\n        },\r\n        \"base64\": \"{{function_to_base64.output}}\"\r\n    },\r\n    \"webhooks\": {\r\n        \"completion\": \"https://run.pathfix.com/flow/5594F54E-F3ED-49C8-89EC-F87AE102719A\",\r\n        \"progress\": \"https://run.pathfix.com/flow/5594F54E-F3ED-49C8-89EC-F87AE102719A\",\r\n        \"error\": \"https://run.pathfix.com/flow/5594F54E-F3ED-49C8-89EC-F87AE102719A\",\r\n        \"progress_rows\":100\r\n    },\r\n    \"process_name\":\"Async Conversion\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ENcJz9TStG38F0X-taA4x"
  },
  "description": "\nCall the following API:",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




