curl --request POST \
--url https://api.splose.com/v1/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "Harry",
"lastname": "Potter",
"middleName": "James",
"preferredName": "Harry",
"title": "Mr.",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"pronouns": "They/them",
"alert": "He knows magic",
"invoiceRecipientId": 1,
"birthdate": "1996-07-30T00:00:00.000Z",
"timezone": "Australia/Adelaide",
"extraInfo": "Some extra info",
"extraBillingInfo": "Some extra billing info",
"addressL1": "123 King William Street",
"addressL2": "",
"addressL3": "",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"ndisInfo": {
"diagnosis": "Foot Injury",
"nomineeEmail": "nominee@email.com",
"fundManagement": "Plan-managed",
"nomineeLastName": "Clark",
"nomineeFirstName": "Chris",
"nomineeMobileCode": "+61",
"nomineeMobileNumber": "433555111",
"startDate": "2024-02-09T00:00:00.000Z",
"endDate": "2024-02-18T00:00:00.000Z"
},
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"communicationPreference": "SMS",
"archived": false,
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
'import requests
url = "https://api.splose.com/v1/patients"
payload = {
"firstname": "Harry",
"lastname": "Potter",
"middleName": "James",
"preferredName": "Harry",
"title": "Mr.",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"pronouns": "They/them",
"alert": "He knows magic",
"invoiceRecipientId": 1,
"birthdate": "1996-07-30T00:00:00.000Z",
"timezone": "Australia/Adelaide",
"extraInfo": "Some extra info",
"extraBillingInfo": "Some extra billing info",
"addressL1": "123 King William Street",
"addressL2": "",
"addressL3": "",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"ndisInfo": {
"diagnosis": "Foot Injury",
"nomineeEmail": "nominee@email.com",
"fundManagement": "Plan-managed",
"nomineeLastName": "Clark",
"nomineeFirstName": "Chris",
"nomineeMobileCode": "+61",
"nomineeMobileNumber": "433555111",
"startDate": "2024-02-09T00:00:00.000Z",
"endDate": "2024-02-18T00:00:00.000Z"
},
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"communicationPreference": "SMS",
"archived": False,
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: 'Harry',
lastname: 'Potter',
middleName: 'James',
preferredName: 'Harry',
title: 'Mr.',
email: 'harry@hogwarts.edu',
sex: 'Male',
genderIdentity: 'Man',
pronouns: 'They/them',
alert: 'He knows magic',
invoiceRecipientId: 1,
birthdate: '1996-07-30T00:00:00.000Z',
timezone: 'Australia/Adelaide',
extraInfo: 'Some extra info',
extraBillingInfo: 'Some extra billing info',
addressL1: '123 King William Street',
addressL2: '',
addressL3: '',
city: 'Adelaide',
state: 'SA',
postalCode: '5000',
country: 'Australia',
phoneNumbers: [{phoneNumber: '401234567', type: 'Mobile', code: '+61'}],
privacyPolicy: 'Accepted',
ndisNumber: '430123456',
ndisInfo: {
diagnosis: 'Foot Injury',
nomineeEmail: 'nominee@email.com',
fundManagement: 'Plan-managed',
nomineeLastName: 'Clark',
nomineeFirstName: 'Chris',
nomineeMobileCode: '+61',
nomineeMobileNumber: '433555111',
startDate: '2024-02-09T00:00:00.000Z',
endDate: '2024-02-18T00:00:00.000Z'
},
medicareNum: '4444444444',
irn: '1',
veteransFileNumber: '',
emergencyContactNumber: '0412345678',
emergencyContactName: 'Quentin Neely',
emergencyContactRelationship: 'Brother',
communicationPreference: 'SMS',
archived: false,
createdAt: '2023-07-30T09:00:00.000Z',
updatedAt: '2023-07-30T09:00:00.000Z'
})
};
fetch('https://api.splose.com/v1/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.splose.com/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstname' => 'Harry',
'lastname' => 'Potter',
'middleName' => 'James',
'preferredName' => 'Harry',
'title' => 'Mr.',
'email' => 'harry@hogwarts.edu',
'sex' => 'Male',
'genderIdentity' => 'Man',
'pronouns' => 'They/them',
'alert' => 'He knows magic',
'invoiceRecipientId' => 1,
'birthdate' => '1996-07-30T00:00:00.000Z',
'timezone' => 'Australia/Adelaide',
'extraInfo' => 'Some extra info',
'extraBillingInfo' => 'Some extra billing info',
'addressL1' => '123 King William Street',
'addressL2' => '',
'addressL3' => '',
'city' => 'Adelaide',
'state' => 'SA',
'postalCode' => '5000',
'country' => 'Australia',
'phoneNumbers' => [
[
'phoneNumber' => '401234567',
'type' => 'Mobile',
'code' => '+61'
]
],
'privacyPolicy' => 'Accepted',
'ndisNumber' => '430123456',
'ndisInfo' => [
'diagnosis' => 'Foot Injury',
'nomineeEmail' => 'nominee@email.com',
'fundManagement' => 'Plan-managed',
'nomineeLastName' => 'Clark',
'nomineeFirstName' => 'Chris',
'nomineeMobileCode' => '+61',
'nomineeMobileNumber' => '433555111',
'startDate' => '2024-02-09T00:00:00.000Z',
'endDate' => '2024-02-18T00:00:00.000Z'
],
'medicareNum' => '4444444444',
'irn' => '1',
'veteransFileNumber' => '',
'emergencyContactNumber' => '0412345678',
'emergencyContactName' => 'Quentin Neely',
'emergencyContactRelationship' => 'Brother',
'communicationPreference' => 'SMS',
'archived' => false,
'createdAt' => '2023-07-30T09:00:00.000Z',
'updatedAt' => '2023-07-30T09:00:00.000Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.splose.com/v1/patients"
payload := strings.NewReader("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"middleName\": \"James\",\n \"preferredName\": \"Harry\",\n \"title\": \"Mr.\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"pronouns\": \"They/them\",\n \"alert\": \"He knows magic\",\n \"invoiceRecipientId\": 1,\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\n \"timezone\": \"Australia/Adelaide\",\n \"extraInfo\": \"Some extra info\",\n \"extraBillingInfo\": \"Some extra billing info\",\n \"addressL1\": \"123 King William Street\",\n \"addressL2\": \"\",\n \"addressL3\": \"\",\n \"city\": \"Adelaide\",\n \"state\": \"SA\",\n \"postalCode\": \"5000\",\n \"country\": \"Australia\",\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"401234567\",\n \"type\": \"Mobile\",\n \"code\": \"+61\"\n }\n ],\n \"privacyPolicy\": \"Accepted\",\n \"ndisNumber\": \"430123456\",\n \"ndisInfo\": {\n \"diagnosis\": \"Foot Injury\",\n \"nomineeEmail\": \"nominee@email.com\",\n \"fundManagement\": \"Plan-managed\",\n \"nomineeLastName\": \"Clark\",\n \"nomineeFirstName\": \"Chris\",\n \"nomineeMobileCode\": \"+61\",\n \"nomineeMobileNumber\": \"433555111\",\n \"startDate\": \"2024-02-09T00:00:00.000Z\",\n \"endDate\": \"2024-02-18T00:00:00.000Z\"\n },\n \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"communicationPreference\": \"SMS\",\n \"archived\": false,\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.splose.com/v1/patients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"middleName\": \"James\",\n \"preferredName\": \"Harry\",\n \"title\": \"Mr.\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"pronouns\": \"They/them\",\n \"alert\": \"He knows magic\",\n \"invoiceRecipientId\": 1,\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\n \"timezone\": \"Australia/Adelaide\",\n \"extraInfo\": \"Some extra info\",\n \"extraBillingInfo\": \"Some extra billing info\",\n \"addressL1\": \"123 King William Street\",\n \"addressL2\": \"\",\n \"addressL3\": \"\",\n \"city\": \"Adelaide\",\n \"state\": \"SA\",\n \"postalCode\": \"5000\",\n \"country\": \"Australia\",\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"401234567\",\n \"type\": \"Mobile\",\n \"code\": \"+61\"\n }\n ],\n \"privacyPolicy\": \"Accepted\",\n \"ndisNumber\": \"430123456\",\n \"ndisInfo\": {\n \"diagnosis\": \"Foot Injury\",\n \"nomineeEmail\": \"nominee@email.com\",\n \"fundManagement\": \"Plan-managed\",\n \"nomineeLastName\": \"Clark\",\n \"nomineeFirstName\": \"Chris\",\n \"nomineeMobileCode\": \"+61\",\n \"nomineeMobileNumber\": \"433555111\",\n \"startDate\": \"2024-02-09T00:00:00.000Z\",\n \"endDate\": \"2024-02-18T00:00:00.000Z\"\n },\n \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"communicationPreference\": \"SMS\",\n \"archived\": false,\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.splose.com/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"middleName\": \"James\",\n \"preferredName\": \"Harry\",\n \"title\": \"Mr.\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"pronouns\": \"They/them\",\n \"alert\": \"He knows magic\",\n \"invoiceRecipientId\": 1,\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\n \"timezone\": \"Australia/Adelaide\",\n \"extraInfo\": \"Some extra info\",\n \"extraBillingInfo\": \"Some extra billing info\",\n \"addressL1\": \"123 King William Street\",\n \"addressL2\": \"\",\n \"addressL3\": \"\",\n \"city\": \"Adelaide\",\n \"state\": \"SA\",\n \"postalCode\": \"5000\",\n \"country\": \"Australia\",\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"401234567\",\n \"type\": \"Mobile\",\n \"code\": \"+61\"\n }\n ],\n \"privacyPolicy\": \"Accepted\",\n \"ndisNumber\": \"430123456\",\n \"ndisInfo\": {\n \"diagnosis\": \"Foot Injury\",\n \"nomineeEmail\": \"nominee@email.com\",\n \"fundManagement\": \"Plan-managed\",\n \"nomineeLastName\": \"Clark\",\n \"nomineeFirstName\": \"Chris\",\n \"nomineeMobileCode\": \"+61\",\n \"nomineeMobileNumber\": \"433555111\",\n \"startDate\": \"2024-02-09T00:00:00.000Z\",\n \"endDate\": \"2024-02-18T00:00:00.000Z\"\n },\n \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"communicationPreference\": \"SMS\",\n \"archived\": false,\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body{
"firstname": "Harry",
"lastname": "Potter",
"id": 1,
"deletedAt": "2023-07-30T09:00:00.000Z",
"middleName": "James",
"preferredName": "Harry",
"title": "Mr.",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"pronouns": "They/them",
"alert": "He knows magic",
"invoiceRecipientId": 1,
"birthdate": "1996-07-30T00:00:00.000Z",
"timezone": "Australia/Adelaide",
"extraInfo": "Some extra info",
"extraBillingInfo": "Some extra billing info",
"addressL1": "123 King William Street",
"addressL2": "",
"addressL3": "",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"ndisInfo": {
"diagnosis": "Foot Injury",
"nomineeEmail": "nominee@email.com",
"fundManagement": "Plan-managed",
"nomineeLastName": "Clark",
"nomineeFirstName": "Chris",
"nomineeMobileCode": "+61",
"nomineeMobileNumber": "433555111",
"startDate": "2024-02-09T00:00:00.000Z",
"endDate": "2024-02-18T00:00:00.000Z"
},
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"communicationPreference": "SMS",
"archived": false,
"patientTags": [
"Self-managed"
],
"customFields": [
{
"name": "<string>",
"value": "<string>"
}
],
"healthFund": {
"name": "AHM",
"membershipNumber": "12345678",
"patientNumber": "1",
"cardIssueNumber": "01"
},
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}Create a single patient
Create a single patient
curl --request POST \
--url https://api.splose.com/v1/patients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "Harry",
"lastname": "Potter",
"middleName": "James",
"preferredName": "Harry",
"title": "Mr.",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"pronouns": "They/them",
"alert": "He knows magic",
"invoiceRecipientId": 1,
"birthdate": "1996-07-30T00:00:00.000Z",
"timezone": "Australia/Adelaide",
"extraInfo": "Some extra info",
"extraBillingInfo": "Some extra billing info",
"addressL1": "123 King William Street",
"addressL2": "",
"addressL3": "",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"ndisInfo": {
"diagnosis": "Foot Injury",
"nomineeEmail": "nominee@email.com",
"fundManagement": "Plan-managed",
"nomineeLastName": "Clark",
"nomineeFirstName": "Chris",
"nomineeMobileCode": "+61",
"nomineeMobileNumber": "433555111",
"startDate": "2024-02-09T00:00:00.000Z",
"endDate": "2024-02-18T00:00:00.000Z"
},
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"communicationPreference": "SMS",
"archived": false,
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
'import requests
url = "https://api.splose.com/v1/patients"
payload = {
"firstname": "Harry",
"lastname": "Potter",
"middleName": "James",
"preferredName": "Harry",
"title": "Mr.",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"pronouns": "They/them",
"alert": "He knows magic",
"invoiceRecipientId": 1,
"birthdate": "1996-07-30T00:00:00.000Z",
"timezone": "Australia/Adelaide",
"extraInfo": "Some extra info",
"extraBillingInfo": "Some extra billing info",
"addressL1": "123 King William Street",
"addressL2": "",
"addressL3": "",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"ndisInfo": {
"diagnosis": "Foot Injury",
"nomineeEmail": "nominee@email.com",
"fundManagement": "Plan-managed",
"nomineeLastName": "Clark",
"nomineeFirstName": "Chris",
"nomineeMobileCode": "+61",
"nomineeMobileNumber": "433555111",
"startDate": "2024-02-09T00:00:00.000Z",
"endDate": "2024-02-18T00:00:00.000Z"
},
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"communicationPreference": "SMS",
"archived": False,
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: 'Harry',
lastname: 'Potter',
middleName: 'James',
preferredName: 'Harry',
title: 'Mr.',
email: 'harry@hogwarts.edu',
sex: 'Male',
genderIdentity: 'Man',
pronouns: 'They/them',
alert: 'He knows magic',
invoiceRecipientId: 1,
birthdate: '1996-07-30T00:00:00.000Z',
timezone: 'Australia/Adelaide',
extraInfo: 'Some extra info',
extraBillingInfo: 'Some extra billing info',
addressL1: '123 King William Street',
addressL2: '',
addressL3: '',
city: 'Adelaide',
state: 'SA',
postalCode: '5000',
country: 'Australia',
phoneNumbers: [{phoneNumber: '401234567', type: 'Mobile', code: '+61'}],
privacyPolicy: 'Accepted',
ndisNumber: '430123456',
ndisInfo: {
diagnosis: 'Foot Injury',
nomineeEmail: 'nominee@email.com',
fundManagement: 'Plan-managed',
nomineeLastName: 'Clark',
nomineeFirstName: 'Chris',
nomineeMobileCode: '+61',
nomineeMobileNumber: '433555111',
startDate: '2024-02-09T00:00:00.000Z',
endDate: '2024-02-18T00:00:00.000Z'
},
medicareNum: '4444444444',
irn: '1',
veteransFileNumber: '',
emergencyContactNumber: '0412345678',
emergencyContactName: 'Quentin Neely',
emergencyContactRelationship: 'Brother',
communicationPreference: 'SMS',
archived: false,
createdAt: '2023-07-30T09:00:00.000Z',
updatedAt: '2023-07-30T09:00:00.000Z'
})
};
fetch('https://api.splose.com/v1/patients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.splose.com/v1/patients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstname' => 'Harry',
'lastname' => 'Potter',
'middleName' => 'James',
'preferredName' => 'Harry',
'title' => 'Mr.',
'email' => 'harry@hogwarts.edu',
'sex' => 'Male',
'genderIdentity' => 'Man',
'pronouns' => 'They/them',
'alert' => 'He knows magic',
'invoiceRecipientId' => 1,
'birthdate' => '1996-07-30T00:00:00.000Z',
'timezone' => 'Australia/Adelaide',
'extraInfo' => 'Some extra info',
'extraBillingInfo' => 'Some extra billing info',
'addressL1' => '123 King William Street',
'addressL2' => '',
'addressL3' => '',
'city' => 'Adelaide',
'state' => 'SA',
'postalCode' => '5000',
'country' => 'Australia',
'phoneNumbers' => [
[
'phoneNumber' => '401234567',
'type' => 'Mobile',
'code' => '+61'
]
],
'privacyPolicy' => 'Accepted',
'ndisNumber' => '430123456',
'ndisInfo' => [
'diagnosis' => 'Foot Injury',
'nomineeEmail' => 'nominee@email.com',
'fundManagement' => 'Plan-managed',
'nomineeLastName' => 'Clark',
'nomineeFirstName' => 'Chris',
'nomineeMobileCode' => '+61',
'nomineeMobileNumber' => '433555111',
'startDate' => '2024-02-09T00:00:00.000Z',
'endDate' => '2024-02-18T00:00:00.000Z'
],
'medicareNum' => '4444444444',
'irn' => '1',
'veteransFileNumber' => '',
'emergencyContactNumber' => '0412345678',
'emergencyContactName' => 'Quentin Neely',
'emergencyContactRelationship' => 'Brother',
'communicationPreference' => 'SMS',
'archived' => false,
'createdAt' => '2023-07-30T09:00:00.000Z',
'updatedAt' => '2023-07-30T09:00:00.000Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.splose.com/v1/patients"
payload := strings.NewReader("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"middleName\": \"James\",\n \"preferredName\": \"Harry\",\n \"title\": \"Mr.\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"pronouns\": \"They/them\",\n \"alert\": \"He knows magic\",\n \"invoiceRecipientId\": 1,\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\n \"timezone\": \"Australia/Adelaide\",\n \"extraInfo\": \"Some extra info\",\n \"extraBillingInfo\": \"Some extra billing info\",\n \"addressL1\": \"123 King William Street\",\n \"addressL2\": \"\",\n \"addressL3\": \"\",\n \"city\": \"Adelaide\",\n \"state\": \"SA\",\n \"postalCode\": \"5000\",\n \"country\": \"Australia\",\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"401234567\",\n \"type\": \"Mobile\",\n \"code\": \"+61\"\n }\n ],\n \"privacyPolicy\": \"Accepted\",\n \"ndisNumber\": \"430123456\",\n \"ndisInfo\": {\n \"diagnosis\": \"Foot Injury\",\n \"nomineeEmail\": \"nominee@email.com\",\n \"fundManagement\": \"Plan-managed\",\n \"nomineeLastName\": \"Clark\",\n \"nomineeFirstName\": \"Chris\",\n \"nomineeMobileCode\": \"+61\",\n \"nomineeMobileNumber\": \"433555111\",\n \"startDate\": \"2024-02-09T00:00:00.000Z\",\n \"endDate\": \"2024-02-18T00:00:00.000Z\"\n },\n \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"communicationPreference\": \"SMS\",\n \"archived\": false,\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.splose.com/v1/patients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"middleName\": \"James\",\n \"preferredName\": \"Harry\",\n \"title\": \"Mr.\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"pronouns\": \"They/them\",\n \"alert\": \"He knows magic\",\n \"invoiceRecipientId\": 1,\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\n \"timezone\": \"Australia/Adelaide\",\n \"extraInfo\": \"Some extra info\",\n \"extraBillingInfo\": \"Some extra billing info\",\n \"addressL1\": \"123 King William Street\",\n \"addressL2\": \"\",\n \"addressL3\": \"\",\n \"city\": \"Adelaide\",\n \"state\": \"SA\",\n \"postalCode\": \"5000\",\n \"country\": \"Australia\",\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"401234567\",\n \"type\": \"Mobile\",\n \"code\": \"+61\"\n }\n ],\n \"privacyPolicy\": \"Accepted\",\n \"ndisNumber\": \"430123456\",\n \"ndisInfo\": {\n \"diagnosis\": \"Foot Injury\",\n \"nomineeEmail\": \"nominee@email.com\",\n \"fundManagement\": \"Plan-managed\",\n \"nomineeLastName\": \"Clark\",\n \"nomineeFirstName\": \"Chris\",\n \"nomineeMobileCode\": \"+61\",\n \"nomineeMobileNumber\": \"433555111\",\n \"startDate\": \"2024-02-09T00:00:00.000Z\",\n \"endDate\": \"2024-02-18T00:00:00.000Z\"\n },\n \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"communicationPreference\": \"SMS\",\n \"archived\": false,\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.splose.com/v1/patients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"middleName\": \"James\",\n \"preferredName\": \"Harry\",\n \"title\": \"Mr.\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"pronouns\": \"They/them\",\n \"alert\": \"He knows magic\",\n \"invoiceRecipientId\": 1,\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\n \"timezone\": \"Australia/Adelaide\",\n \"extraInfo\": \"Some extra info\",\n \"extraBillingInfo\": \"Some extra billing info\",\n \"addressL1\": \"123 King William Street\",\n \"addressL2\": \"\",\n \"addressL3\": \"\",\n \"city\": \"Adelaide\",\n \"state\": \"SA\",\n \"postalCode\": \"5000\",\n \"country\": \"Australia\",\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"401234567\",\n \"type\": \"Mobile\",\n \"code\": \"+61\"\n }\n ],\n \"privacyPolicy\": \"Accepted\",\n \"ndisNumber\": \"430123456\",\n \"ndisInfo\": {\n \"diagnosis\": \"Foot Injury\",\n \"nomineeEmail\": \"nominee@email.com\",\n \"fundManagement\": \"Plan-managed\",\n \"nomineeLastName\": \"Clark\",\n \"nomineeFirstName\": \"Chris\",\n \"nomineeMobileCode\": \"+61\",\n \"nomineeMobileNumber\": \"433555111\",\n \"startDate\": \"2024-02-09T00:00:00.000Z\",\n \"endDate\": \"2024-02-18T00:00:00.000Z\"\n },\n \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"communicationPreference\": \"SMS\",\n \"archived\": false,\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body{
"firstname": "Harry",
"lastname": "Potter",
"id": 1,
"deletedAt": "2023-07-30T09:00:00.000Z",
"middleName": "James",
"preferredName": "Harry",
"title": "Mr.",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"pronouns": "They/them",
"alert": "He knows magic",
"invoiceRecipientId": 1,
"birthdate": "1996-07-30T00:00:00.000Z",
"timezone": "Australia/Adelaide",
"extraInfo": "Some extra info",
"extraBillingInfo": "Some extra billing info",
"addressL1": "123 King William Street",
"addressL2": "",
"addressL3": "",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"ndisInfo": {
"diagnosis": "Foot Injury",
"nomineeEmail": "nominee@email.com",
"fundManagement": "Plan-managed",
"nomineeLastName": "Clark",
"nomineeFirstName": "Chris",
"nomineeMobileCode": "+61",
"nomineeMobileNumber": "433555111",
"startDate": "2024-02-09T00:00:00.000Z",
"endDate": "2024-02-18T00:00:00.000Z"
},
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"communicationPreference": "SMS",
"archived": false,
"patientTags": [
"Self-managed"
],
"customFields": [
{
"name": "<string>",
"value": "<string>"
}
],
"healthFund": {
"name": "AHM",
"membershipNumber": "12345678",
"patientNumber": "1",
"cardIssueNumber": "01"
},
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Patient first name
"Harry"
Patient last name
"Potter"
Patient middle name
"James"
Patient preferred name
"Harry"
Patient title
"Mr."
Patient email
"harry@hogwarts.edu"
Patient sex
"Male"
Patient gender identity
"Man"
Patient pronouns
"They/them"
Patient alert messages
"He knows magic"
The invoice receipient (contact) id of this patient
x > 01
Patient birthdate in YYYY-MM-DD format
"1996-07-30T00:00:00.000Z"
Patient timezone
"Australia/Adelaide"
Patient extra info
"Some extra info"
Patient extra billing info
"Some extra billing info"
Patient address line 1
"123 King William Street"
Patient address line 2
""
Patient address line 3
""
Patient city
"Adelaide"
Patient state
"SA"
Patient post code
"5000"
Patient country
"Australia"
Show child attributes
Show child attributes
Patient privacy policy status
No response, Accepted, Rejected, "Accepted"
Patient NDIS number
"430123456"
Show child attributes
Show child attributes
Patient Medicare number
"4444444444"
Patient Medicare reference number
"1"
Patient veterans information
""
Patient emergency contact number
"0412345678"
Patient emergency contact name
"Quentin Neely"
Patient emergency contact relationship
"Brother"
Patient communication preference (defaults to organisation's communication preference if not set)
NONE, SMS, SMS_EMAIL, EMAIL "SMS"
Whether the patient has been archived
Object creation date time
"2023-07-30T09:00:00.000Z"
Object update date time
"2023-07-30T09:00:00.000Z"
Response
Successfully created patient
Patient first name
"Harry"
Patient last name
"Potter"
Patient Id
x > 01
Object archived date time
"2023-07-30T09:00:00.000Z"
Patient middle name
"James"
Patient preferred name
"Harry"
Patient title
"Mr."
Patient email
"harry@hogwarts.edu"
Patient sex
"Male"
Patient gender identity
"Man"
Patient pronouns
"They/them"
Patient alert messages
"He knows magic"
The invoice receipient (contact) id of this patient
x > 01
Patient birthdate in YYYY-MM-DD format
"1996-07-30T00:00:00.000Z"
Patient timezone
"Australia/Adelaide"
Patient extra info
"Some extra info"
Patient extra billing info
"Some extra billing info"
Patient address line 1
"123 King William Street"
Patient address line 2
""
Patient address line 3
""
Patient city
"Adelaide"
Patient state
"SA"
Patient post code
"5000"
Patient country
"Australia"
Show child attributes
Show child attributes
Patient privacy policy status
No response, Accepted, Rejected, "Accepted"
Patient NDIS number
"430123456"
Show child attributes
Show child attributes
Patient Medicare number
"4444444444"
Patient Medicare reference number
"1"
Patient veterans information
""
Patient emergency contact number
"0412345678"
Patient emergency contact name
"Quentin Neely"
Patient emergency contact relationship
"Brother"
Patient communication preference (defaults to organisation's communication preference if not set)
NONE, SMS, SMS_EMAIL, EMAIL "SMS"
Whether the patient has been archived
Patient tags
["Self-managed"]
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Object creation date time
"2023-07-30T09:00:00.000Z"
Object update date time
"2023-07-30T09:00:00.000Z"