Creating Users via API for PHA

Modified on Tue, 23 Dec, 2025 at 8:36 AM

This article shows the simplest path for creating a user in PHA using the public API, then submitting their User Profile assessment to populate key demographic fields.


Before you start


You’ll need API credentials (to generate a Bearer token) and the correct environment (Demo vs Live).


The API documentation portal is PIN-protected, so if you can’t access it, request the PIN or an account from Ignis Support.


All API calls use HTTPS and authenticated access (Bearer token).


Step 1: Create the user login entity (Users)

This creates the login/auth record and returns a user_id (integer). You’ll use that ID for anything you attach to the user (assessments, records, etc.).

Docs (PIN required):

https://api.ignistechnologies.co.uk/#/GEN%20-%20users/post_v2_admin_users

Endpoint:

POST /api/v2/admin_users

Output you need to keep:

  • user_id (the new user’s unique integer ID)


Step 2: Populate demographics via “User Profile” (User Assessment)

Once the user exists, you can submit a User Profile assessment to populate things like:

  • DOB

  • Sex

  • Rank / Reference

  • Name / Surname

This works in two parts:


2A: GET the User Profile form (to discover IDs)

You do this first to retrieve the block_id, form_id, and the attribute IDs you need to answer.

Endpoint:

GET /api/v2/user_profile

Example (truncated) response:

{ "status": "OK", "data": { "nextStep": { "block_id": 188, "code": "user_block", "block": { "form_attributes": [ { "id": 311, "label": "Date of birth", "code": "user_dob" } ] } } } }

In this example:

  • block_id = 188

  • DOB attribute id = 311

  • DOB attribute code = user_dob

Best practice: always do the GET first, because IDs can vary between environments and can change if the form definition is updated.


2B: POST the completed User Profile form

You now submit answers using the IDs retrieved in 2A.

Endpoint:

POST /api/v2/user_profile

Example POST body (expand answers as needed):

{ "user_id": {{user_id}}, "assessment_date": "2024-04-12", "current_step_code": "user_block", "draft": false, "form_id": {{form_id}}, "answers": [ { "block_id": 188, "attribute_id": 311, "attribute_code": "user_dob", "answer": "1990-01-31" } ] }

Field notes

  • assessment_date should be ISO format: YYYY-MM-DD

  • draft: false submits the record (rather than saving a draft)

  • current_step_code must match the step/code returned in the GET (user_block in the example)

  • Add more objects to answers[] for Sex / Rank / Name / etc., using the IDs returned from the GET response


Common pitfalls

  • Forgetting to GET first → you won’t have the correct block_id / attribute_id / form_id.

  • Wrong date format → use YYYY-MM-DD.

  • Posting to the wrong environment (Demo vs Live) → IDs and data won’t match what you expect.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article