Orders (Direct Purchases)
Get a single order
Retrieves an order's information under the current practitioner.
GET /orders/:orderNumber
URL Parameters
| Parameter | Description |
|---|---|
orderNumber | The order number |
curl "https://partner-staging.i-screen.com.au/v1/orders/ORD067908" \
-H "Authorization: Bearer f3ee05b1e3d140a3b17456fb69d28cd9-5f6a46513aa48d0bf80a04c7d52c9805633070a7803d3bd4"
Response
{
"orderNumber": "ORD067908",
"createdAt": "2024-04-24T10:32:28.119Z",
"patientId": "655c1ecff75d6500129ea04b",
"amount": "31.25",
"tests": [
{
"_id": "6628dfbca7c1ceeb96d9aa67",
"status": "pending",
"product": "Vitamin D Check",
"testNumber": "00105582",
"createdAt": "2024-04-24T10:32:28.148Z",
"updatedAt": "2024-04-24T10:32:28.148Z",
"requestForm": "https://iscreen-dev.s3.eu-west-1.amazonaws.com/staging/requestForms/655c1ecff75d6500129ea04b/3e772fd0621ea83a89f23f6ab7acc55dd88e31bed6c01fd9.pdf?ts=1713954782",
"patientId": "655c1ecff75d6500129ea04b"
}
]
}
Get multiple orders
Retrieves multiple orders under the current practitioner.
GET /orders
This endpoint only returns successful orders. Failed purchases are not retrievable via API.
Query Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
skip | No | 0 | Number of records to skip |
limit | No | 10 | Max records to retrieve (max: 100) |
patientId | No | - | Filter by patient ID |
curl "https://partner-staging.i-screen.com.au/v1/orders?patientId=655c1ecff75d6500129ea04b" \
-H "Authorization: Bearer f3ee05b1e3d140a3b17456fb69d28cd9-5f6a46513aa48d0bf80a04c7d52c9805633070a7803d3bd4"
Response
{
"total": 3,
"limit": 10,
"skip": 0,
"data": [
{
"orderNumber": "ORD067922",
"createdAt": "2024-04-29T11:19:00.646Z",
"patientId": "655c1ecff75d6500129ea04b",
"amount": "31.35"
}
]
}
Create a new order
Creates a direct purchase of the selected tests for the selected patient using the previously saved payment method.
POST /orders
On the staging environment, purchases over $2,000 in value are automatically rejected. There is no such limitation in the production environment.
Payload
| Parameter | Required | Description |
|---|---|---|
patientId string | Yes | The patient's record ID |
productIds array | Yes | The product ID(s) to order |
curl -X POST https://partner-staging.i-screen.com.au/v1/orders \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer f3ee05b1e3d140a3b17456fb69d28cd9-5f6a46513aa48d0bf80a04c7d52c9805633070a7803d3bd4"
Payload
{
"patientId": "655c1ecff75d6500129ea04b",
"productIds": ["59770901cca022000fd1c4fa", "59770901cca022000fd1c4f1"]
}
Response (success)
{
"amount": "50.11",
"orderNumber": "ORD067930",
"patientId": "604705f9d1705600187a36d7",
"createdAt": "2024-05-03T01:37:52.406Z"
}
Response (no payment method)
{
"name": "GeneralError",
"message": "No associated payment method.",
"code": 500,
"className": "general-error",
"data": {},
"errors": {}
}
Since this order is already paid, the patient's only i-screen-side email here is the request-form/instructions notification, gated by the patient's allowIscreenPathologyFormNotification setting. Set it to false and the patient receives nothing from i-screen for this order. Compare with Create a new invoice, which has its own separate flag since that email carries the payment link the patient needs.