# Site - Update

| **API URL**     | {{url}}/admin-service/site/update |
| --------------- | --------------------------------- |
| **Method**      | PUT                               |
| **Description** | Update site details               |

#### **Input** <a href="#site-update-input" id="site-update-input"></a>

| **Field Name**        | **Type** | **Mandatory** | **Example**                                  |
| --------------------- | -------- | ------------- | -------------------------------------------- |
| id                    | Number   | Yes           | 246                                          |
| name                  | String   | Yes           | Githongo Sub-county Hospital                 |
| email                 | String   | No            | <henrywixxxams@spice.mdt>                    |
| addressType           | String   | Yes           | Physical                                     |
| addressUse            | String   | Yes           | Home                                         |
| address1              | String   | Yes           | 1st Avenue                                   |
| address2              | String   | No            |                                              |
| latitude              | Number   | Yes           | 1                                            |
| longitude             | Number   | Yes           | 1                                            |
| city                  | String   | Yes           | New Zealand, Christchurch City, Christchurch |
| phoneNumber           | String   | Yes           | 987XXX2784                                   |
| postalCode            | Number   | Yes           | 9493248324                                   |
| siteLevel             | String   | Yes           | Level 3                                      |
| siteType              | String   | Yes           | Clinic                                       |
| id(Country id)        | Number   | Yes           | 4                                            |
| id(County id)         | Number   | Yes           | 7                                            |
| id(Sub county id)     | Number   | Yes           | 10                                           |
| id(Operating unit id) | Number   | Yes           | 12                                           |

#### **Sample Input:** <a href="#site-update-sampleinput" id="site-update-sampleinput"></a>

{\
"id": 246,\
"name": "Githongo Sub-county Hospital",\
"email": "<sam.waxxxa1@gmail.com>",\
"addressType": "Physical",\
"addressUse": "Work",\
"address1": "Githongo Market town",\
"address2": "5. west road/colony 6-25",\
"latitude": "1",\
"longitude": "1",\
"city": "Kenya, Meru",\
"phoneNumber": "717XXX294",\
"postalCode": 1204133333,\
"siteLevel": "Level 4",\
"siteType": "Pharmacy",\
"country": {\
"id": 4\
},\
"county": {\
"id": 4,\
"name": "Meru"\
},\
"subCounty": {\
"id": 105,\
"name": "Central Imenti"\
},\
"operatingUnit": {\
"id": 57\
},\
"culture": 1,\
"tenantId": 338,\
"countyId": 4,\
"subCountyId": 105,\
"accountId": 30,\
"countryId": "4"\
}

#### **Sample Output:** <a href="#site-update-sampleoutput" id="site-update-sampleoutput"></a>

```
{
    "message": "Site updated successfully.",
    "entity": {
        "id": 246,
        "createdBy": 6486,
        "updatedBy": 6486,
        "createdAt": "2022-11-14T15:10:32+05:30",
        "updatedAt": "2023-03-02T09:48:42+05:30",
        "tenantId": 338,
        "name": "Githongo Sub-county Hospital",
        "email": "sam.waguxxx@gmail.com",
        "addressType": "Physical",
        "addressUse": "Work",
        "address1": "Githongo Market town",
        "address2": null,
        "latitude": "1",
        "longitude": "1",
        "city": "Kenya, Meru",
        "phoneNumber": "717XXX294",
        "workingHours": null,
        "postalCode": 1204133333,
        "siteLevel": "Level 4",
        "siteType": "Pharmacy",
        "countryId": 4,
        "countyId": 4,
        "subCountyId": 105,
        "accountId": 30,
        "operatingUnit": {
            "id": 57,
            "createdBy": 6486,
            "updatedBy": 6486,
            "createdAt": null,
            "updatedAt": null,
            "name": "Meruu",
            "account": null,
            "countryId": null,
            "tenantId": 337,
            "active": true,
            "deleted": false
        },
        "culture": {
            "id": 1,
            "createdBy": 6486,
            "updatedBy": 6486,
            "createdAt": null,
            "updatedAt": null,
            "name": null,
            "code": null,
            "active": true,
            "deleted": false
        },
        "refId": "63720d10979f45001fac65d9",
        "active": true,
        "deleted": false
    },
    "status": true,
    "entityList": null,
    "responseCode": 200,
    "totalCount": null
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://spice.docs.medtroniclabs.org/versions/spice-1.0/engineering/api-documentation/admin-services/site/site-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
