# Clinics

The Clinics API allows authenticated users to manage clinic records. Users can list, create, retrieve, update, and delete clinic entries. Each clinic entry is uniquely identified by a unique_id and contains detailed information, including contact details, address, location, and clinic type.

# Get Clinic List

Retrieve a list of all clinics.

  • URL: resources/clinics/
  • Method: GET
  • Response Example:
    [
      {
        "unique_id": "12345",
        "clinic_name": "Care Clinic",
        "clinic_description": "Primary care clinic serving the local community.",
        "clinic_practice_number": "CC123456",
        "clinic_org_code": "ORG7890",
        "clinic_type": "Public",
        "clinic_physical_address": "123 Wellness Blvd, Health Town",
        "clinic_postal_address": "P.O. Box 4567",
        "clinic_town": "Health Town",
        "clinic_region": "East",
        "clinic_province": "Province C",
        "clinic_country": "Country Z",
        "clinic_postal_code": "3003",
        "clinic_phone_number": "321-987-6543",
        "clinic_phone_number_alt": "321-987-6544",
        "clinic_emergency_number": "321-987-6545",
        "clinic_fax_number": "321-987-6546",
        "clinic_email_address": "contact@careclinic.org",
        "clinic_website_url": "https://www.careclinic.org",
        "clinic_image_url": "https://images.com/clinic123",
        "clinic_latitude": "-27.12345",
        "clinic_longitude": "29.12345",
        "date_created": "2023-02-01T12:00:00Z",
        "last_updated": "2023-02-05T08:30:00Z"
      },
      ...
    ]
    

# Create a Clinic

Create a new clinic entry.

  • URL: resources/clinics/

  • Method: POST

  • Request Example:

    {
      "clinic_name": "Care Clinic",
      "clinic_description": "Primary care clinic serving the local community.",
      "clinic_practice_number": "CC123456",
      "clinic_org_code": "ORG7890",
      "clinic_type": "Public",
      "clinic_physical_address": "123 Wellness Blvd, Health Town",
      "clinic_postal_address": "P.O. Box 4567",
      "clinic_town": "Health Town",
      "clinic_region": "East",
      "clinic_province": "Province C",
      "clinic_country": "Country Z",
      "clinic_postal_code": "3003",
      "clinic_phone_number": "321-987-6543",
      "clinic_phone_number_alt": "321-987-6544",
      "clinic_emergency_number": "321-987-6545",
      "clinic_fax_number": "321-987-6546",
      "clinic_email_address": "contact@careclinic.org",
      "clinic_website_url": "https://www.careclinic.org",
      "clinic_image_url": "https://images.com/clinic123",
      "clinic_latitude": "-27.12345",
      "clinic_longitude": "29.12345"
    }
    
  • Response Example:

    {
      "unique_id": "12345",
      "clinic_name": "Care Clinic",
      "clinic_description": "Primary care clinic serving the local community.",
      "clinic_practice_number": "CC123456",
      "clinic_org_code": "ORG7890",
      "clinic_type": "Public",
      "clinic_physical_address": "123 Wellness Blvd, Health Town",
      "clinic_postal_address": "P.O. Box 4567",
      "clinic_town": "Health Town",
      "clinic_region": "East",
      "clinic_province": "Province C",
      "clinic_country": "Country Z",
      "clinic_postal_code": "3003",
      "clinic_phone_number": "321-987-6543",
      "clinic_phone_number_alt": "321-987-6544",
      "clinic_emergency_number": "321-987-6545",
      "clinic_fax_number": "321-987-6546",
      "clinic_email_address": "contact@careclinic.org",
      "clinic_website_url": "https://www.careclinic.org",
      "clinic_image_url": "https://images.com/clinic123",
      "clinic_latitude": "-27.12345",
      "clinic_longitude": "29.12345",
      "date_created": "2023-02-01T12:00:00Z",
      "last_updated": "2023-02-05T08:30:00Z"
    }
    

# Get a Clinic

Retrieve details of a specific clinic by unique ID.

  • URL: resources/clinics/<str:unique_id>/
  • Method: GET
  • Response Example:
    {
      "unique_id": "12345",
      "clinic_name": "Care Clinic",
      "clinic_description": "Primary care clinic serving the local community.",
      "clinic_practice_number": "CC123456",
      "clinic_org_code": "ORG7890",
      "clinic_type": "Public",
      "clinic_physical_address": "123 Wellness Blvd, Health Town",
      "clinic_postal_address": "P.O. Box 4567",
      "clinic_town": "Health Town",
      "clinic_region": "East",
      "clinic_province": "Province C",
      "clinic_country": "Country Z",
      "clinic_postal_code": "3003",
      "clinic_phone_number": "321-987-6543",
      "clinic_phone_number_alt": "321-987-6544",
      "clinic_emergency_number": "321-987-6545",
      "clinic_fax_number": "321-987-6546",
      "clinic_email_address": "contact@careclinic.org",
      "clinic_website_url": "https://www.careclinic.org",
      "clinic_image_url": "https://images.com/clinic123",
      "clinic_latitude": "-27.12345",
      "clinic_longitude": "29.12345",
      "date_created": "2023-02-01T12:00:00Z",
      "last_updated": "2023-02-05T08:30:00Z"
    }
    

# Update a Clinic

Update an existing clinic by unique ID.

  • URL: resources/clinics/<str:unique_id>/
  • Method: PUT
  • Request Example:
    {
      "clinic_name": "Updated Care Clinic",
      "clinic_description": "Updated description for the clinic."
    }
    
  • Response Example:
    {
      "unique_id": "12345",
      "clinic_name": "Updated Care Clinic",
      "clinic_description": "Updated description for the clinic.",
      "clinic_practice_number": "CC123456",
      "clinic_org_code": "ORG7890",
      "clinic_type": "Public",
      "clinic_physical_address": "123 Wellness Blvd, Health Town",
      "clinic_postal_address": "P.O. Box 4567",
      "clinic_town": "Health Town",
      "clinic_region": "East",
      "clinic_province": "Province C",
      "clinic_country": "Country Z",
      "clinic_postal_code": "3003",
      "clinic_phone_number": "321-987-6543",
      "clinic_phone_number_alt": "321-987-6544",
      "clinic_emergency_number": "321-987-6545",
      "clinic_fax_number": "321-987-6546",
      "clinic_email_address": "contact@careclinic.org",
      "clinic_website_url": "https://www.careclinic.org",
      "clinic_image_url": "https://images.com/clinic123",
      "clinic_latitude": "-27.12345",
      "clinic_longitude": "29.12345",
      "date_created": "2023-02-01T12:00:00Z",
      "last_updated": "2023-02-06T08:30:00Z"
    }
    

# Delete a Clinic

Delete a clinic by unique ID.

  • URL: resources/clinics/<str:unique_id>/
  • Method: DELETE
  • Response: 204 No Content