Skip to main content

Patient Data

Access patient-specific data such as intent status and custom properties. These endpoints use the shop customer ID and shop identifier to identify patients.

Check Patient Intent

Query whether a patient has completed a specific intent (e.g., a questionnaire submission).
GET /api/v0/patient/intent
shop_customer_id
string
required
The customer ID from your shop system
shop_identifier
string
required
Your shop identifier (e.g., my-store.myshopify.com)
intent
string
required
The intent identifier to check

Example Request

curl -X GET "https://api.rxscale.com/api/v0/patient/intent?shop_customer_id=CUST123&shop_identifier=my-store.myshopify.com&intent=weight-loss-questionnaire" \
  -H "X-API-Key: your-api-key-here"

Response

{
  "return_code": "signed_within_12_months"
}
The return_code indicates when the patient last completed a signed submission for the given intent.
This endpoint returns 404 if the patient is not known to RxScale. If the patient was just created (e.g., during a Shopify checkout), their profile may not be available immediately. Wait 1–2 seconds and retry before treating a 404 as a definitive “patient not found”.

Get Patient Property

Retrieve a specific property value for a patient.
GET /api/v0/patient/properties
shop_customer_id
string
required
The customer ID from your shop system
shop_identifier
string
required
Your shop identifier
field
string
required
The property field name to retrieve. You can find the field key in the admin tool under Settings > Profile Fields — use the key value shown for each field.

Example Request

curl -X GET "https://api.rxscale.com/api/v0/patient/properties?shop_customer_id=CUST123&shop_identifier=my-store.myshopify.com&field=allergies" \
  -H "X-API-Key: your-api-key-here"

Set Patient Property

Set or update a property value for a patient.
POST /api/v0/patient/properties
shop_customer_id
string
required
The customer ID from your shop system
shop_identifier
string
required
Your shop identifier

Request Body (form-data)

FieldTypeRequiredDescription
fieldstringYesThe property field name
valuestringYesThe value to set

Example Request

curl -X POST "https://api.rxscale.com/api/v0/patient/properties?shop_customer_id=CUST123&shop_identifier=my-store.myshopify.com" \
  -H "X-API-Key: your-api-key-here" \
  -F "field=allergies" \
  -F "value=penicillin"
Patient properties are custom fields defined per organisation. You can configure available property fields in the Settings > Profile Fields section of the admin tool.