Test Locations

A Test Locations is used when making an appointment. They are our national network of phlebotomy locations you can book a patient into.

Test Location model

The Test Location model contains all the information about the Order.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the Test Location.

  • Name
    name
    Type
    string
    Description

    Test Location Business Name.

  • Name
    full_address
    Type
    string
    Description

    Address of Test Location

  • Name
    city
    Type
    string
    Description

    City

  • Name
    postal_code
    Type
    string
    Description

    Postcode of Test Location

  • Name
    latitude
    Type
    float
    Description

    Latitude of Test Location.

  • Name
    longitude
    Type
    float
    Description

    Longitude of Test Location.

  • Name
    distance
    Type
    int
    Description

    Distance from search location in meters when using a nearest search.


GET/api/test_location/

Get all Test Locations

This endpoint allows you to get a list of all Test Locations. This is useful to store in a local database

Attributes

    Returns

    Returns a paginated list of Test Locations.

    Request

    GET
    /api/test_location/
    curl --location 'https://api.londonmedicallaboratory.com/api/test_location/' \
    --header 'Content-Type: text/plain' \
    --header 'Authorization: Bearer {token}'
    

    Response

    {
        "nr_of_results": 174,
        "current_page": 1,
        "nr_of_pages": 2,
        "results_per_page": 100,
        "next_page": 2,
        "items": [
            {
                "id": "fbd9c622-6d77-4b84-a2cd-bae0c0b76153",
                "full_address": "62 Walsh Bridge, Reynoldstown, CV34 4DF",
                "city": "Reynoldstown",
                "postal_code": "CV34 4DF",
                "name": "Adams Ltd - 36",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.521799,
                "longitude": -0.078065
            },
            {
                "id": "8174a6c1-ed20-494e-9d99-c9b63da07747",
                "full_address": "53 Lauren Springs, Lake Kimberlyville, L9 9BL",
                "city": "Lake Kimberlyville",
                "postal_code": "L9 9BL",
                "name": "Adams Ltd - 41",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.52103,
                "longitude": -0.201161
            },
            {
                "id": "69529955-a26e-4572-90c8-3e2838da5fdb",
                "full_address": "Studio 43\nWard Junction, North Pete, HU7 4FE",
                "city": "North Pete",
                "postal_code": "HU7 4FE",
                "name": "Adams Ltd - 91",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 57.801963,
                "longitude": 0.79932
            },
            {
                "id": "bb7c0537-60b1-4cb8-8518-60ddfbb092b3",
                "full_address": "Flat 57v\nArchie Extension, South Eileenmouth, ME15 0JU",
                "city": "South Eileenmouth",
                "postal_code": "ME15 0JU",
                "name": "Allen Ltd - 125",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 57.785714,
                "longitude": -4.350656
            },
            {
                "id": "fe0391fc-f1dc-4757-86ff-078b84fd758a",
                "full_address": "7 Linda Points, Huntmouth, L40 4LA",
                "city": "Huntmouth",
                "postal_code": "L40 4LA",
                "name": "Anderson Ltd - 19",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.530808,
                "longitude": -0.134384
            },
            {
                "id": "3add9dbd-dfd5-4370-8dec-b42edc4d5556",
                "full_address": "3 Warple Way, London, W3 0RX",
                "city": "London",
                "postal_code": "W3 0RX",
                "name": "Avalon- Spitting Image",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.5047923,
                "longitude": -0.25581
            },
            {
                "id": "d1ee756c-9550-4091-9d26-9357d7b9382c",
                "full_address": "Studio 01\nKhan Fall, Port Chelseahaven, RG19 8JZ",
                "city": "Port Chelseahaven",
                "postal_code": "RG19 8JZ",
                "name": "Baker Ltd - 138",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.505112,
                "longitude": -0.225226
            },
            {
                "id": "30c74fed-d8dc-4573-8d2a-aa37dc3c7124",
                "full_address": "Flat 71e\nCarole Forge, Zoeshire, GU1 2PB",
                "city": "Zoeshire",
                "postal_code": "GU1 2PB",
                "name": "Baker Ltd - 16",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.471529,
                "longitude": -0.166224
            },
            {
                "id": "320d47e2-804f-4d9d-9fad-fcddf41392b2",
                "full_address": "307 Tracy Plains, North Lily, WN2 3RS",
                "city": "North Lily",
                "postal_code": "WN2 3RS",
                "name": "Bell Ltd - 95",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.502176,
                "longitude": -0.242371
            }
        ]
    }
    

    GET/api/test_location/nearest/{latitude}/{longitude}

    Get Nearest Test Locations

    This endpoint allows you to get a list of nearest Test Locations to a passed latitude/longitude.

    Attributes

    • Name
      latitude
      Type
      float
      Required
      REQUIRED
      Description

      Latitude to search near

    • Name
      longitude
      Type
      float
      Required
      REQUIRED
      Description

      Longitude to search near

    Returns

    Returns a paginated list of locations with additional distance field to show how many meters from lat/lng it is.

    Request

    GET
    /api/test_location/nearest/51.45577/-0.16535
    curl --location 'https://api.londonmedicallaboratory.com/api/test_location/nearest/51.45577/-0.16535' \
    --header 'Content-Type: text/plain' \
    --header 'Authorization: Bearer {token}'
    

    Response

    {
        "nr_of_results": 20,
        "items": [
            {
                "id": "d11508e7-1188-4960-bedd-6c8aa0c72c6c",
                "full_address": "130 Northcote Rd, London, SW11 6QZ",
                "city": "London",
                "postal_code": "SW11 6QZ",
                "name": "Pearl Chemist - Northcote",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.4557006,
                "longitude": -0.16553,
                "distance": 14
            },
            {
                "id": "987226ba-c033-43d6-adf2-6826cb2bf8f7",
                "full_address": "629 Donna Spring, Jamestown, S66 8JW",
                "city": "Jamestown",
                "postal_code": "S66 8JW",
                "name": "Saunders Ltd - 81",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.471146,
                "longitude": -0.16621,
                "distance": 1710
            },
            {
                "id": "8bb8561d-2a3d-4f72-b486-3072f4f50915",
                "full_address": "85 Adele Avenue, Port Charlesborough, BT51 3NQ",
                "city": "Port Charlesborough",
                "postal_code": "BT51 3NQ",
                "name": "White Ltd - 101",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.472363,
                "longitude": -0.16234,
                "distance": 1856
            },
            {
                "id": "15bc3fbb-8c93-4366-8ab9-19555b2e2469",
                "full_address": "5 Wilson Pine, West Isabelle, W1D 4PR",
                "city": "West Isabelle",
                "postal_code": "W1D 4PR",
                "name": "Davis Ltd - 28",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.472007,
                "longitude": -0.155587,
                "distance": 1927
            },
            {
                "id": "7b910a7d-6171-45fb-b56c-6626eab442c1",
                "full_address": "4 Evans Throughway, Rosieberg, DE65 5JX",
                "city": "Rosieberg",
                "postal_code": "DE65 5JX",
                "name": "Powell Ltd - 10",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.475364,
                "longitude": -0.186171,
                "distance": 2612
            },
            {
                "id": "1a1294be-1ce1-415d-8462-06e481790dd7",
                "full_address": "3 Hunter Circles, Morrisborough, ST3 5SH",
                "city": "Morrisborough",
                "postal_code": "ST3 5SH",
                "name": "Richards Ltd - 41",
                "nearest_bus_station": null,
                "nearest_train_station": null,
                "latitude": 51.483355,
                "longitude": -0.164896,
                "distance": 3067
            }
        ]
    }
    

    GET/api/test_location/slots/{year}/{month}/{day}/?test_location_id={Test_location_id}

    Get Available Test Location Time Slots

    This endpoint allows you to get a list of bookable times for a passed Test Location

    Attributes

    • Name
      test_location_id
      Type
      string
      Required
      REQUIRED
      Description

      ID of Location to book into

    • Name
      year
      Type
      string
      Required
      REQUIRED
      Description

      Year of requested date in YYYY format, i.e. 2024

    • Name
      month
      Type
      string
      Required
      REQUIRED
      Description

      Month of requested date in XX format, i.e. 01

    • Name
      dau
      Type
      string
      Required
      REQUIRED
      Description

      Day of requested date in XX format, i.e. 23

    Returns

    Returns a paginated list of Time Slots.

    Request

    POST
    /api/test_location/
    curl --location 'https://api.londonmedicallaboratory.com/test_location/slots/2024/03/11/?test_location_id=b33e52ff-bf41-4295-acc6-e1c0913e4d3f' \
    --header 'Content-Type: text/plain' \
    --header 'Authorization: Bearer {token}'
    

    Response

    [
        {
        "id": "62255e6a-2b6f-41c3-97d1-675390a9a282",
        "preview": "09:00",
        "available": true,
        "time": "2024-03-11 09:00",
        "is_past": false
    },
    {
        "id": "b89d5ed5-d138-4bff-aa4e-fec4c1ecf280",
        "preview": "09:05",
        "available": true,
        "time": "2024-03-11 09:05",
        "is_past": false
    },
    {
        "id": "71102b4e-a725-424e-8468-e51b9808ac1e",
        "preview": "09:10",
        "available": true,
        "time": "2024-03-11 09:10",
        "is_past": false
    },
    {
        "id": "36319071-85a4-4d0a-94f8-64044cb9dfcf",
        "preview": "09:15",
        "available": true,
        "time": "2024-03-11 09:15",
        "is_past": false
    }
    ]