POST
/
v3
/
order
/
testkit
from vital import Client

client = Client(api_key, "sandbox")

data = client.LabTests.create_unregistered_testkit_order(
  user_id="63661a2b-2bb3-4125-bb1a-b590f64f057f",
  lab_test_id="5b41f610-ebc5-4803-8f0c-a61c3bdc7faf",
  shipping_details={
    "receiver_name": "john Doe",
    "street": "123 Main St.",
    "street_number": "Apt. 208",
    "city": "San Francisco",
    "state": "CA",
    "zip": "91189",
    "country": "US",
    "phone_number": "+11234567890"
  }
)

"order": {
    "id": "96edc6ef-3b2c-412b-b9e5-96f361f93aec",
    "team_id": "b080b20c-e162-4cf1-9c7d-8faee72ee08e",
    "user_id": "9f1e094e-1641-466b-b668-d4d3300e569f",
    "shipping_details": {
      "receiver_name": "John Doe",
      "first_line": "123 Main St.",
      "second_line": "Apt. 208",
      "city": "San Francisco",
      "state": "CA",
      "zip": "91189",
      "country": "United States",
      "phone_number": "+11234567890"
    },
    "details": {
      "type": "testkit",
      "data": {
        "id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
        "created_at": "2020-01-01T00:00:00Z",
        "updated_at": "2020-01-01T00:00:00Z"
      }
    },
    "lab_test": {
      "name": "Lipids Panel",
      "description": "Cholesterol test",
      "method": "testkit"
    },
    "sample_id": "123456789",
    "health_insurace_id": "7695cc28-f9e5-400d-95d2-ec7d9ec580df",
    "notes": "This is a note",
    "created_at": "2020-01-01T00:00:00Z",
    "updated_at": "2020-01-01T00:00:00Z",
    "status": "received",
    "events": [
      {
        "id": 1,
        "created_at": "2022-01-01T00:00:00Z",
        "status": "received.testkit.ordered"
      },
      {
        "id": 2,
        "created_at": "2022-01-02T00:00:00Z",
        "status": "received.testkit.awaiting_registration"
      },
    ]
  },
  "status": "string",
  "message": "string"
}
from vital import Client

client = Client(api_key, "sandbox")

data = client.LabTests.create_unregistered_testkit_order(
  user_id="63661a2b-2bb3-4125-bb1a-b590f64f057f",
  lab_test_id="5b41f610-ebc5-4803-8f0c-a61c3bdc7faf",
  shipping_details={
    "receiver_name": "john Doe",
    "street": "123 Main St.",
    "street_number": "Apt. 208",
    "city": "San Francisco",
    "state": "CA",
    "zip": "91189",
    "country": "US",
    "phone_number": "+11234567890"
  }
)

"order": {
    "id": "96edc6ef-3b2c-412b-b9e5-96f361f93aec",
    "team_id": "b080b20c-e162-4cf1-9c7d-8faee72ee08e",
    "user_id": "9f1e094e-1641-466b-b668-d4d3300e569f",
    "shipping_details": {
      "receiver_name": "John Doe",
      "first_line": "123 Main St.",
      "second_line": "Apt. 208",
      "city": "San Francisco",
      "state": "CA",
      "zip": "91189",
      "country": "United States",
      "phone_number": "+11234567890"
    },
    "details": {
      "type": "testkit",
      "data": {
        "id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
        "created_at": "2020-01-01T00:00:00Z",
        "updated_at": "2020-01-01T00:00:00Z"
      }
    },
    "lab_test": {
      "name": "Lipids Panel",
      "description": "Cholesterol test",
      "method": "testkit"
    },
    "sample_id": "123456789",
    "health_insurace_id": "7695cc28-f9e5-400d-95d2-ec7d9ec580df",
    "notes": "This is a note",
    "created_at": "2020-01-01T00:00:00Z",
    "updated_at": "2020-01-01T00:00:00Z",
    "status": "received",
    "events": [
      {
        "id": 1,
        "created_at": "2022-01-01T00:00:00Z",
        "status": "received.testkit.ordered"
      },
      {
        "id": 2,
        "created_at": "2022-01-02T00:00:00Z",
        "status": "received.testkit.awaiting_registration"
      },
    ]
  },
  "status": "string",
  "message": "string"
}

Authorizations

x-vital-api-key
string
header
required

Vital Team API Key

Body

application/json
user_id
string
required
lab_test_id
string
required
shipping_details
object
required
passthrough
string | null

Response

200
application/json
Successful Response
order
object
required
Example:
{
  "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"
    }
  ],
  "health_insurace_id": "9b83bea9-7c9c-4b40-99b9-da9f248fd99a",
  "id": "3f5c1016-952d-4033-8f27-8f644ad5c2d0",
  "lab_test": {
    "description": "Cholesterol test",
    "method": "testkit",
    "name": "Lipids Panel"
  },
  "notes": "This is a note",
  "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": "dc957cca-e5b2-46ec-b3d8-8e66ccd1d182",
  "updated_at": "2020-01-01T00:00:00Z",
  "user_id": "e1940a13-0ae7-42d2-bc53-8c00832c612d"
}
status
string
required
message
string
required