orders

GET many orders with filters.

get/v3/orders

Request

  • Base URL
    https://api.us.junction.com
  • URL
    https://api.us.junction.com/v3/orders
  • Auth
    API key in header x-vital-api-key

Query parameters

search_inputstring nullable

Search by order id, user id, patient name, shipping dob, or shipping recipient name.

start_datestring date-time nullable

Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00

end_datestring date-time nullable

Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59

updated_start_datestring date-time nullable

Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00

updated_end_datestring date-time nullable

Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00

statusOrderLowLevelStatus[] nullable

Filter by low level status.

order_key'created_at' | 'patient_name' | 'last_status' nullable

Order key to sort by.

order_direction'asc' | 'desc' nullable

Order direction to sort by.

order_typeLabTestCollectionMethod[] nullable

Filter by method used to perform the lab test.

is_criticalboolean nullable

Filter by critical order status.

interpretation'normal' | 'abnormal' | 'critical' | 'unknown'

ℹ️ This enum is non-exhaustive.

Filter by result interpretation of the lab test.

order_activation_typesOrderActivationType[] nullable

Filter by activation type.

user_idstring uuid nullable

Filter by user ID.

patient_namestring nullable

Filter by patient name.

shipping_recipient_namestring nullable

Filter by shipping recipient name.

order_idsstring[] nullable

Filter by order ids.

lab_idsinteger[] nullable

Filter by lab partner IDs.

lab_test_idsstring[] nullable

Filter by lab test IDs.

order_transaction_idstring uuid nullable

Filter by order transaction ID

pageinteger
sizeinteger

Response

Successful Response

totalinteger nullable
pageinteger nullable
sizeinteger nullable

Example response

{
  "orders": [
    {
      "activate_by": "2020-01-01",
      "created_at": "2020-01-01T00:00:00Z",
      "details": {
        "data": {
          "created_at": "2020-01-01T00:00:00Z",
          "id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
          "shipment": {
            "created_at": "2020-01-01T00:00:00.000Z",
            "id": "d55210cc-3d9f-4115-8262-5013f700c7be",
            "inbound_courier": "usps",
            "inbound_tracking_number": "<inbound_tracking_number>",
            "inbound_tracking_url": "<inbound_tracking_url>",
            "notes": "<notes>",
            "outbound_courier": "usps",
            "outbound_tracking_number": "<outbound_tracking_number>",
            "outbound_tracking_url": "<outbound_tracking_url>",
            "updated_at": "2020-01-01T00:00:00.000Z"
          },
          "updated_at": "2020-01-01T00:00:00Z"
        },
        "type": "testkit"
      },
      "events": [
        {
          "created_at": "2022-01-01T00:00:00Z",
          "id": 1,
          "status": "received.testkit.ordered"
        },
        {
          "created_at": "2022-01-02T00:00:00Z",
          "id": 2,
          "status": "received.testkit.requisition_created"
        },
        {
          "created_at": "2022-01-03T00:00:00Z",
          "id": 3,
          "status": "collecting_sample.testkit.transit_customer"
        }
      ],
      "has_abn": false,
      "health_insurace_id": "dcf589c2-b4c7-4733-9308-f22d2c076fca",
      "id": "613342c2-ada0-44ca-ba24-90d7643d80ee",
      "lab_test": {
        "description": "Cholesterol test",
        "method": "testkit",
        "name": "Lipids Panel",
        "updated_at": "2020-01-01T00:00:00Z"
      },
      "last_event": {
        "created_at": "2022-01-03T00:00:00Z",
        "id": 3,
        "status": "collecting_sample.testkit.transit_customer"
      },
      "notes": "This is a note",
      "order_transaction": {
        "id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
        "orders": [
          {
            "created_at": "2020-01-01T00:00:00Z",
            "id": "d55210cc-3d9f-4115-8262-5013f700c7be",
            "low_level_status": "transit_customer",
            "low_level_status_created_at": "2020-01-05T00:00:00Z",
            "origin": "initial",
            "updated_at": "2020-01-05T00:00:00Z"
          },
          {
            "created_at": "2020-01-05T01:00:00Z",
            "id": "e66321dd-4e0g-5226-9373-6124g811d8cf",
            "low_level_status": "requisition_created",
            "low_level_status_created_at": "2020-01-05T01:00:00Z",
            "origin": "redraw",
            "updated_at": "2020-01-05T01:00:00Z"
          }
        ],
        "status": "active"
      },
      "origin": "initial",
      "patient_address": {
        "city": "San Francisco",
        "country": "United States",
        "first_line": "123 Main St.",
        "phone_number": "+11234567890",
        "receiver_name": "John Doe",
        "second_line": "Apt. 208",
        "state": "CA",
        "zip": "91189"
      },
      "patient_details": {
        "dob": "2020-01-01",
        "gender": "male"
      },
      "requisition_form_url": "https://www.example.com",
      "sample_id": "123456789",
      "status": "collecting_sample",
      "team_id": "d2d6d231-f767-470a-bac3-9acba41c38d0",
      "updated_at": "2020-01-01T00:00:00Z",
      "user_id": "30e37a5c-34a8-4bc4-b840-ecf4821f4c32"
    }
  ]
}

Changes

    • info

      response property orders/items/lab_test/markers/anyOf[subschema #1]/items/price deprecated

    • info

      response property orders/items/lab_test/price deprecated

    • info

      added the new optional query request parameter lab_ids

    • info

      added the new optional query request parameter lab_test_ids