Bulk create
Needs: Clients, Read-write
Creates up to 50 clients like the Add client form, with the same checks, locations and custom attributes. Every row is checked first. A possible duplicate (same name, and date of birth when given) is refused unless you send allow_duplicates. Duplicates inside the same request are always refused.
Note:
business_idcan be left out when the organisation has one location.statusfor a new client can beActive,InactiveorHospital leave. Acontactsentry takesname,phone,relationshipandtype(Primary ContactorSecondary Contact), with optionaladdress. Ahealth_professionalsentry takesnameandphone, with optionaltype,department,specialty,address.
Tip: Run with
dry_runfirst. Rows that fail come back withok: falseand anerror, while the rest are still reported.
curl -X POST "https://app.imploy.com.au/api/integrations/v1/clients/bulk" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"dry_run": true,
"clients": [
{
"first_name": "Example",
"last_name": "Client",
"client_type": "NDIS",
"business_id": 1,
"date_of_birth": "1980-05-20",
"gender": "Female",
"address": "1 Example St, Perth WA 6000",
"contacts": [
{
"name": "Example Contact",
"phone": "0400 000 000",
"relationship": "Daughter",
"type": "Primary Contact"
}
]
}
]
}'
import requests
import json
url = "https://app.imploy.com.au/api/integrations/v1/clients/bulk"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"dry_run": true,
"clients": [
{
"first_name": "Example",
"last_name": "Client",
"client_type": "NDIS",
"business_id": 1,
"date_of_birth": "1980-05-20",
"gender": "Female",
"address": "1 Example St, Perth WA 6000",
"contacts": [
{
"name": "Example Contact",
"phone": "0400 000 000",
"relationship": "Daughter",
"type": "Primary Contact"
}
]
}
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app.imploy.com.au/api/integrations/v1/clients/bulk", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"dry_run": true,
"clients": [
{
"first_name": "Example",
"last_name": "Client",
"client_type": "NDIS",
"business_id": 1,
"date_of_birth": "1980-05-20",
"gender": "Female",
"address": "1 Example St, Perth WA 6000",
"contacts": [
{
"name": "Example Contact",
"phone": "0400 000 000",
"relationship": "Daughter",
"type": "Primary Contact"
}
]
}
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"dry_run": true,
"clients": [
{
"first_name": "Example",
"last_name": "Client",
"client_type": "NDIS",
"business_id": 1,
"date_of_birth": "1980-05-20",
"gender": "Female",
"address": "1 Example St, Perth WA 6000",
"contacts": [
{
"name": "Example Contact",
"phone": "0400 000 000",
"relationship": "Daughter",
"type": "Primary Contact"
}
]
}
]
}`)
req, err := http.NewRequest("POST", "https://app.imploy.com.au/api/integrations/v1/clients/bulk", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app.imploy.com.au/api/integrations/v1/clients/bulk')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"dry_run": true,
"clients": [
{
"first_name": "Example",
"last_name": "Client",
"client_type": "NDIS",
"business_id": 1,
"date_of_birth": "1980-05-20",
"gender": "Female",
"address": "1 Example St, Perth WA 6000",
"contacts": [
{
"name": "Example Contact",
"phone": "0400 000 000",
"relationship": "Daughter",
"type": "Primary Contact"
}
]
}
]
}'
response = http.request(request)
puts response.body
{
"dry_run": true,
"ready": 1,
"failed": 0,
"results": [
{
"index": 0,
"ok": true,
"name": "Example Client",
"status": "would_create"
}
]
}
{
"created": 1,
"failed": 0,
"results": [
{
"index": 0,
"ok": true,
"id": 13,
"name": "Example Client",
"status": "created"
}
]
}
{
"message": "Invalid or expired access token."
}
{
"message": "Access token does not permit this action."
}
{
"message": "Too many requests."
}
/clients/bulk
Target server for requests. Edit to use your own host.
An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
imp_at_. Send it as Authorization: Bearer imp_at_XXXX.The media type of the request body
1 to 50 client objects. Each takes first_name, last_name and client_type, plus optional business_id, date_of_birth, gender, address, status, contacts, health_professionals and custom_attributes.
Check every row without creating anything.
Create even when a client with the same name exists. Only use after confirming.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
Body
1 to 50 client objects. Each takes first_name, last_name and client_type, plus optional business_id, date_of_birth, gender, address, status, contacts, health_professionals and custom_attributes.
Check every row without creating anything.
Create even when a client with the same name exists. Only use after confirming.
Responses
Dry run