ChakraHQ APIs
HomeSign In
HomeSign In
  1. Process
  • API Keys
  • Response Format
  • Whatsapp
    • Inbound Events Webhook
    • Pass Through APIs
      • Create WhatsApp Message Template (pass-through)
      • List WhatsApp Message Templates (pass-through)
      • Update WhatsApp Message Template (pass-through)
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Upload Public Media
      POST
    • Whatsapp Messages API (pass-through)
      POST
  • Platform
    • Process
      • Fetch Process By Id
        GET
      • List Processes
        POST
      • Create Process
        POST
      • Update Process
        PUT
      • Update Process By Primary Key
        PUT
      • Delete Process
        DELETE
      • Delete Process By Primary Key Value
        DELETE
      • Bulk Create Process API
        POST
      • Bulk Update Process API
        PATCH
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
      • Fetch Background Job Entries API
    • Fetch Config
      GET
  1. Process

Bulk Update Process API

PATCH
https://api.chakrahq.com/v1/ext/procedure/{procedureShortId}/process
The following API allows you to update multiple processes in a single API call. This API is asynchronous - meaning the request is accepted and an acknowledgment is returned while the updates are carried out in the background. Use this api when you have to update 1000s of processes in one go.

Request Body#

In the request body you need to pass a list of processes which are to be updated. Each update item will need the following parts

Process Identifier#

A way to identify the process which needs to be updated. The identifier can be the process id or the process primary key
Eg:
"id": "LEAD-001"
"phone_number": "9901258433"
Where phone_number is the primary key for the corresponding procedure

update#

The actual update to be made. The update inputs need to be encapuslated and sent against the key "update". Supported parameters that can be updated are
data - a json object composed of attribute shortIds and the values that are to be updated
Eg:
{
  "data": {
		"score": 42,
    "city": "Bangalore",
    "name": "Shane Warne"
	}
}
state - the process state
Eg:
{
  "state": "IN_PROGRESS"
}
status - the process status
Eg:
{
	"status": "CANCELLED"
}
status can be one of OPEN, COMPLETED, CANCELLED
assignedTo - who the process is assignedTo
Eg:
{
  assignedTo: "shane.warne"
}
nextActionAt - the nextActionAt timestamp in epoch milliseconds
Eg:
{
  "nextActionAt": 1616253910842
}
isDeleted - set isDeleted to true to delete a process
Eg:
{
  "isDeleted": true
}
Following are valid examples of the request body
{
  "processes": [
    {
      "id": "46ce67e5-684e-4cfc-b47e-345a485d1cdd",
      "state": "IN_PROGRESS",
      "status": "OPEN",
      "assignedTo": "shane.warne",
      "nextActionAt": "1616253910842",
      "data": {
        "first_name": "shane",
        "last_name": "warne"
      }
    }
  ]
}
{
  "processes": [
    {
      "lead_id": "LEAD-910",
      "data": {
        "country": "Japan",
        "city": "Tokyo"
      }
    }
  ]
}
{
  "processes": [
    {
      "status": "COMPLETED"
    }
  ]
}

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
procedureShortId
string 
required
The short id of the procedure whose processes you want to update
Example:
lead

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.chakrahq.com/v1/ext/procedure/lead/process'

Responses

🟢200Success
application/json
Body
processes
array [object {3}] 
required
lead_id
string 
optional
update
object 
required
id
string 
optional
Example
{
	"processes": [
		{
			"lead_id": "EXT-TEST-143",
			"update": {
				"data": {
					"score": "105"
				}
			}
		},
		{
			"id": "1e50dd73-9ce6-405b-932a-9c4c5e7b5599",
			"update": {
				"data": {
					"city": "Goa"
				},
				"state": "IN_PROGRESS"
			}
		}
	]
}
Previous
Bulk Create Process API
Next
Create Task API
Built with