Service user contacts

A key contact for a service user.

The service user contact object

Attributes

  • _id
    string

    A unique Id for the service user contact.

  • account_code
    string

    The service user contact's account code, used when exporting invoices to an accounts package.

  • billing_comms_preference
    list of strings

    The billing party's preference for receiving billing related commsemail, post.

  • billing_enabled
    boolean

    A flag indiciating if billing is enabled for the service user contact.

  • care_enquiry
    string

    The care enquiry the service user contact relates to.

  • created
    string

    The date/time the service user contact was created.

  • email
    string

    The service user contact's email address.

  • email_invoices_to
    list of strings

    A list of email addresses to send invoices (and related documents) to.

  • emergency_contact
    boolean

    Flag indicating if the service user contact should be contacted in an emergency for the service user.

  • first_name
    string

    The service user contact's first name.

  • future_billing_disabled
    boolean

    A flag indicating that while billing is enabled for the service user contact they cannot appear as an option for new contracts or invoices.

  • has_direct_debit_mandate
    boolean

    A flag indicating if the service user contact has an direct debit mandate in place (in any state, pending, active or pending cancellation).

  • invoices_service_user_id_fields
    list of strings

    A list of fields to identify a service user with when generating a line item for the service user in an invoice for the service user contactaccount_code, full_name, initials, nhs_number, patient_id, ref.

  • large_print_requested_for_billing
    boolean

    A flag indicating that the billing party wants to receive billing comms (invoices, statements, etc.) in larger print.

  • last_name
    string

    The service user contact's last name.

  • location
    string

    The location the service user contact relates to.

  • mobile
    string

    The service user contact's mobile number.

  • modified
    string

    The date/time the service user contact was created.

  • next_of_kin
    boolean

    Flag indicating that the service user contact is the next of kin for the service user.

  • notes
    string

    Additional notes for the service user contact.

  • payment_method
    string

    The method the billing party is expected to use for making paymentscard, cash, cheque, standing_order, direct_debit, bac.

  • phone
    string

    The service user contact's phone number.

  • poa_types
    list of strings

    A list of power or attorney types the service user contact is assigned for the service user (if any); epa, lpa_property_affairs, lpa_health_welfare.

  • postal_address
    hash

    The service user contact's postal address.

    • postal_address.address_1
      string

      Address line 1 (e.g. house name/number).

    • postal_address.address_2
      string

      Address line 2 (e.g. street).

    • postal_address.town
      string

      Town, city or village.

    • postal_address.county
      string

      County.

    • postal_address.postcode
      string

      Postal code.

    • postal_address.country
      string

      Country.

  • relationship
    string

    The service user contact's relationship to the service user.

  • service_user
    string

    The service user the service user contact relates to.

  • title
    string

    The service user contact's title.

  • work_phone
    string

    The service user contact's work phone number.

The service user contact object
{
    "_id": "6724fbcb4f73a2cebf638768",
    "account_code": "AW0474",
    "billing_comms_preference": null,
    "billing_enabled": null,
    "care_enquiry": null,
    "created": "2024-11-01 16:03:23",
    "email": "abbey.wall@gmx.co.uk",
    "email_invoices_to": null,
    "emergency_contact": true,
    "first_name": "Abbey",
    "future_billing_disabled": null,
    "has_direct_debit_mandate": null,
    "invoices_service_user_id_fields": null,
    "large_print_requested_for_billing": null,
    "last_name": "Wall",
    "location": "6724fbc74f73a2cebf6377fa",
    "mobile": "07284280384",
    "modified": "2024-11-01 16:03:23",
    "next_of_kin": true,
    "notes": "",
    "payment_method": "",
    "phone": "01842625621",
    "poa_types": [
        "lpa_property_affairs",
        "lpa_health_welfare"
    ],
    "postal_address": {
        "address_1": "The Old Rectory",
        "address_2": "Rectory Rd",
        "country": "",
        "county": "Oxfordshire",
        "postcode": "OX44 7JG",
        "town": "Great Haseley"
    },
    "relationship": "Daughter",
    "service_user": "6724fbca4f73a2cebf63868a",
    "title": "Mrs",
    "work_phone": ""
}

List all service user contacts

Return a list of service user contacts.

Parameters

  • attributes
    optional
    default ['_id']

    A list of attributes to include for fetched objects.

  • filters-care_enquiry
    optional

    A filter that accepts a list of care enquiry Ids and filters service user contacts by the enquiry the contacts relate to.

  • filters-ids
    optional

    A filter that accepts a list of Ids and filters the items returned to those with an Id in the list.

  • filters-location
    optional

    A filter that accepts a list of location Ids and filters service user contacts by the location their service user is a client of.

  • filters-modified_after
    optional

    A filter that accepts a date/time and filters the items returned to those modified after the date/time.

  • filters-modified_before
    optional

    A filter that accepts a date/time and filters the items returned to those modified before the date/time.

  • filters-q
    optional

    A case insensitive keyword filter applied to the following fields; account_code, full_name.

  • filters-service_user
    optional

    A filter that accepts a list of service user Ids and filters service user contacts by the service user the contacts relate to.

  • page
    optional
    default 1

    The page number to fetch.

  • per_page
    optional
    default 10

    The number of items to return per page.

  • sort_by
    optional
    default _id

    A list of fields the returned items can be sorted by. Fields prefixed with minus (-) sign are sorted in descending order.

    • _id
    • created
    • modified
    • full_name

Response

Returns a page of service user contacts.

GET
/v1/service-user-contacts
var serviceUserContacts = apiClient.Request(
    HttpMethod.Get,
    "service-user-contacts",
    new MultiValueDict()
        .Add("attributes", "email", "first_name", "last_name")
        .Add("filters-location", locationId)
);
<?php

$service_user_contacts = $api_client->request(
    'GET',
    'service-user-contacts',
    [
        'attributes'=>['email', 'first_name', 'last_name'],
        'filters-location'=>[location_id]
    ]
);
service_user_contacts = api_client(
    'GET',
    'service-user-contacts',
    params={
        'attributes': ['email', 'first_name', 'last_name'],
        'filters-location': [location_id]
    }
)
service_user_contacts = api_client.request(
    'GET',
    'service-user-contacts',
    params: {
        'attributes' => ['email', 'first_name', 'last_name'],
        'filters-location' => [location_id]
    }
)
Response
{
    "item_count": 115,
    "items": [
        {
            "_id": "6724fbc94f73a2cebf638142",
            "email": "abigail.mills@hotmail.com",
            "first_name": "Abigail",
            "last_name": "Mills"
        },
        {
            "_id": "6724fbc94f73a2cebf638146",
            "email": "",
            "first_name": "Brett",
            "last_name": "Wilson"
        },
        {
            "_id": "6724fbc94f73a2cebf63814a",
            "email": "carly.davies@yahoo.co.uk",
            "first_name": "Carly",
            "last_name": "Davies"
        },
        {
            "_id": "6724fbc94f73a2cebf63814c",
            "email": "",
            "first_name": "Danielle",
            "last_name": "Lee"
        },
        {
            "_id": "6724fbc94f73a2cebf638150",
            "email": "",
            "first_name": "David",
            "last_name": "Watson"
        },
        {
            "_id": "6724fbc94f73a2cebf638152",
            "email": "dawn.smith@yahoo.com",
            "first_name": "Dawn",
            "last_name": "Smith"
        },
        {
            "_id": "6724fbc94f73a2cebf638154",
            "email": "derek.robinson@hotmail.co.uk",
            "first_name": "Derek",
            "last_name": "Robinson"
        },
        {
            "_id": "6724fbc94f73a2cebf638158",
            "email": "eleanor.cooper@gmail.com",
            "first_name": "Eleanor",
            "last_name": "Cooper"
        },
        {
            "_id": "6724fbc94f73a2cebf63815e",
            "email": "gareth.kerr@gmail.com",
            "first_name": "Gareth",
            "last_name": "Kerr"
        },
        {
            "_id": "6724fbc94f73a2cebf638160",
            "email": "",
            "first_name": "Garry",
            "last_name": "Moore"
        }
    ],
    "page": 1,
    "page_count": 12,
    "per_page": 10
}

Retrieve a service user contact

Retreive a service user contact object.

Response

Returns a service user contact object.

GET
/v1/service-user-contacts/<service_user_contact_id>
serviceUserContact = apiClient.Request(
    HttpMethod.Get,
    $"service-user-contacts/{serviceUserContactId}"
);
<?php

$service_user_contact = $api_client->request(
    'GET',
    'service-user-contacts/' . $service_user_contact_id
);
service_user_contact = api_client(
    'GET',
    f'service-user-contacts/{service_user_contact_id}'
)
service_user_contact = api_client.request(
    'GET',
    "service-user-contacts/#{service_user_contact_id}"
)
Response
{
    "_id": "6724fbcb4f73a2cebf638768",
    "account_code": "AW0474",
    "billing_comms_preference": null,
    "billing_enabled": null,
    "care_enquiry": null,
    "created": "2024-11-01 16:03:23",
    "email": "abbey.wall@gmx.co.uk",
    "email_invoices_to": null,
    "emergency_contact": true,
    "first_name": "Abbey",
    "future_billing_disabled": null,
    "has_direct_debit_mandate": null,
    "invoices_service_user_id_fields": null,
    "large_print_requested_for_billing": null,
    "last_name": "Wall",
    "location": "6724fbc74f73a2cebf6377fa",
    "mobile": "07284280384",
    "modified": "2024-11-01 16:03:23",
    "next_of_kin": true,
    "notes": "",
    "payment_method": "",
    "phone": "01842625621",
    "poa_types": [
        "lpa_property_affairs",
        "lpa_health_welfare"
    ],
    "postal_address": {
        "address_1": "The Old Rectory",
        "address_2": "Rectory Rd",
        "country": "",
        "county": "Oxfordshire",
        "postcode": "OX44 7JG",
        "town": "Great Haseley"
    },
    "relationship": "Daughter",
    "service_user": "6724fbca4f73a2cebf63868a",
    "title": "Mrs",
    "work_phone": ""
}