curl --request PUT \
--url https://api.splose.com/v1/patients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "Harry",
"lastname": "Potter",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"alert": "He knows magic",
"birthdate": "1996-07-30T00:00:00.000Z",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"timezone": "Australia/Adelaide",
"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"
},
"patientTags": [
"Self-managed"
],
"communicationPreference": "SMS",
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
'import requests
url = "https://api.splose.com/v1/patients/{id}"
payload = {
"firstname": "Harry",
"lastname": "Potter",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"alert": "He knows magic",
"birthdate": "1996-07-30T00:00:00.000Z",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"timezone": "Australia/Adelaide",
"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"
},
"patientTags": ["Self-managed"],
"communicationPreference": "SMS",
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: 'Harry',
lastname: 'Potter',
email: 'harry@hogwarts.edu',
sex: 'Male',
genderIdentity: 'Man',
alert: 'He knows magic',
birthdate: '1996-07-30T00:00:00.000Z',
city: 'Adelaide',
state: 'SA',
postalCode: '5000',
country: 'Australia',
phoneNumbers: [{phoneNumber: '401234567', type: 'Mobile', code: '+61'}],
privacyPolicy: 'Accepted',
ndisNumber: '430123456',
medicareNum: '4444444444',
irn: '1',
veteransFileNumber: '',
emergencyContactNumber: '0412345678',
emergencyContactName: 'Quentin Neely',
emergencyContactRelationship: 'Brother',
timezone: 'Australia/Adelaide',
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'
},
patientTags: ['Self-managed'],
communicationPreference: 'SMS',
createdAt: '2023-07-30T09:00:00.000Z',
updatedAt: '2023-07-30T09:00:00.000Z'
})
};
fetch('https://api.splose.com/v1/patients/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstname' => 'Harry',
'lastname' => 'Potter',
'email' => 'harry@hogwarts.edu',
'sex' => 'Male',
'genderIdentity' => 'Man',
'alert' => 'He knows magic',
'birthdate' => '1996-07-30T00:00:00.000Z',
'city' => 'Adelaide',
'state' => 'SA',
'postalCode' => '5000',
'country' => 'Australia',
'phoneNumbers' => [
[
'phoneNumber' => '401234567',
'type' => 'Mobile',
'code' => '+61'
]
],
'privacyPolicy' => 'Accepted',
'ndisNumber' => '430123456',
'medicareNum' => '4444444444',
'irn' => '1',
'veteransFileNumber' => '',
'emergencyContactNumber' => '0412345678',
'emergencyContactName' => 'Quentin Neely',
'emergencyContactRelationship' => 'Brother',
'timezone' => 'Australia/Adelaide',
'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'
],
'patientTags' => [
'Self-managed'
],
'communicationPreference' => 'SMS',
'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/{id}"
payload := strings.NewReader("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"alert\": \"He knows magic\",\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\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 \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"timezone\": \"Australia/Adelaide\",\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 \"patientTags\": [\n \"Self-managed\"\n ],\n \"communicationPreference\": \"SMS\",\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.splose.com/v1/patients/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"alert\": \"He knows magic\",\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\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 \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"timezone\": \"Australia/Adelaide\",\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 \"patientTags\": [\n \"Self-managed\"\n ],\n \"communicationPreference\": \"SMS\",\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"alert\": \"He knows magic\",\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\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 \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"timezone\": \"Australia/Adelaide\",\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 \"patientTags\": [\n \"Self-managed\"\n ],\n \"communicationPreference\": \"SMS\",\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body1Update single patient
Update single patient
curl --request PUT \
--url https://api.splose.com/v1/patients/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstname": "Harry",
"lastname": "Potter",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"alert": "He knows magic",
"birthdate": "1996-07-30T00:00:00.000Z",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"timezone": "Australia/Adelaide",
"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"
},
"patientTags": [
"Self-managed"
],
"communicationPreference": "SMS",
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
'import requests
url = "https://api.splose.com/v1/patients/{id}"
payload = {
"firstname": "Harry",
"lastname": "Potter",
"email": "harry@hogwarts.edu",
"sex": "Male",
"genderIdentity": "Man",
"alert": "He knows magic",
"birthdate": "1996-07-30T00:00:00.000Z",
"city": "Adelaide",
"state": "SA",
"postalCode": "5000",
"country": "Australia",
"phoneNumbers": [
{
"phoneNumber": "401234567",
"type": "Mobile",
"code": "+61"
}
],
"privacyPolicy": "Accepted",
"ndisNumber": "430123456",
"medicareNum": "4444444444",
"irn": "1",
"veteransFileNumber": "",
"emergencyContactNumber": "0412345678",
"emergencyContactName": "Quentin Neely",
"emergencyContactRelationship": "Brother",
"timezone": "Australia/Adelaide",
"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"
},
"patientTags": ["Self-managed"],
"communicationPreference": "SMS",
"createdAt": "2023-07-30T09:00:00.000Z",
"updatedAt": "2023-07-30T09:00:00.000Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstname: 'Harry',
lastname: 'Potter',
email: 'harry@hogwarts.edu',
sex: 'Male',
genderIdentity: 'Man',
alert: 'He knows magic',
birthdate: '1996-07-30T00:00:00.000Z',
city: 'Adelaide',
state: 'SA',
postalCode: '5000',
country: 'Australia',
phoneNumbers: [{phoneNumber: '401234567', type: 'Mobile', code: '+61'}],
privacyPolicy: 'Accepted',
ndisNumber: '430123456',
medicareNum: '4444444444',
irn: '1',
veteransFileNumber: '',
emergencyContactNumber: '0412345678',
emergencyContactName: 'Quentin Neely',
emergencyContactRelationship: 'Brother',
timezone: 'Australia/Adelaide',
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'
},
patientTags: ['Self-managed'],
communicationPreference: 'SMS',
createdAt: '2023-07-30T09:00:00.000Z',
updatedAt: '2023-07-30T09:00:00.000Z'
})
};
fetch('https://api.splose.com/v1/patients/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'firstname' => 'Harry',
'lastname' => 'Potter',
'email' => 'harry@hogwarts.edu',
'sex' => 'Male',
'genderIdentity' => 'Man',
'alert' => 'He knows magic',
'birthdate' => '1996-07-30T00:00:00.000Z',
'city' => 'Adelaide',
'state' => 'SA',
'postalCode' => '5000',
'country' => 'Australia',
'phoneNumbers' => [
[
'phoneNumber' => '401234567',
'type' => 'Mobile',
'code' => '+61'
]
],
'privacyPolicy' => 'Accepted',
'ndisNumber' => '430123456',
'medicareNum' => '4444444444',
'irn' => '1',
'veteransFileNumber' => '',
'emergencyContactNumber' => '0412345678',
'emergencyContactName' => 'Quentin Neely',
'emergencyContactRelationship' => 'Brother',
'timezone' => 'Australia/Adelaide',
'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'
],
'patientTags' => [
'Self-managed'
],
'communicationPreference' => 'SMS',
'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/{id}"
payload := strings.NewReader("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"alert\": \"He knows magic\",\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\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 \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"timezone\": \"Australia/Adelaide\",\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 \"patientTags\": [\n \"Self-managed\"\n ],\n \"communicationPreference\": \"SMS\",\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.splose.com/v1/patients/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"alert\": \"He knows magic\",\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\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 \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"timezone\": \"Australia/Adelaide\",\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 \"patientTags\": [\n \"Self-managed\"\n ],\n \"communicationPreference\": \"SMS\",\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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstname\": \"Harry\",\n \"lastname\": \"Potter\",\n \"email\": \"harry@hogwarts.edu\",\n \"sex\": \"Male\",\n \"genderIdentity\": \"Man\",\n \"alert\": \"He knows magic\",\n \"birthdate\": \"1996-07-30T00:00:00.000Z\",\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 \"medicareNum\": \"4444444444\",\n \"irn\": \"1\",\n \"veteransFileNumber\": \"\",\n \"emergencyContactNumber\": \"0412345678\",\n \"emergencyContactName\": \"Quentin Neely\",\n \"emergencyContactRelationship\": \"Brother\",\n \"timezone\": \"Australia/Adelaide\",\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 \"patientTags\": [\n \"Self-managed\"\n ],\n \"communicationPreference\": \"SMS\",\n \"createdAt\": \"2023-07-30T09:00:00.000Z\",\n \"updatedAt\": \"2023-07-30T09:00:00.000Z\"\n}"
response = http.request(request)
puts response.read_body1Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
x > 01
Body
Patient first name
1"Harry"
Patient last name
1"Potter"
Patient email
"harry@hogwarts.edu"
Patient sex
"Male"
Patient gender identity
"Man"
Patient alert messages
"He knows magic"
Patient birthdate in YYYY-MM-DD format
"1996-07-30T00:00:00.000Z"
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"
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 timezone
"Australia/Adelaide"
Show child attributes
Show child attributes
Patient tags
["Self-managed"]
Patient communication preference
NONE, SMS, SMS_EMAIL, EMAIL "SMS"
Object creation date time
"2023-07-30T09:00:00.000Z"
Object update date time
"2023-07-30T09:00:00.000Z"
Response
Return 1 on success
The response is of type enum<number>.
1