PUT api/site/{id}
Update all details of the specified site
Error Messages
- 404/NotFound: Company with id = Specified ID is not assigned to a company
- 401/Unauthorized: CompanySitePermission - user does not have the correct permissions to update this site and/or company)
- 403/Forbidden: Only a CP user can update the AccountRef - User is not a CP users
- 403/Forbidden: Only a CP user can update the AccountRef - User is not a CP user
- 403/Forbidden: Only a CP user can update the BillRunID - User is not a CP user
- 403/Forbidden: Non-customers can not have a bill run set - Customers are companies that have iscustomer set to true
- 403/Forbidden: Invalid bill run id X - Specified Bill Run ID is not assigned to a Bill Run
- 403/Forbidden: Bill run ID X has been disabled
- 403/Forbidden: Bill run ID X is agent only - The specified ID is assigned to agent only Bill Run
- 403/Forbidden: BillingInformation not found for site ID X - No Billing information found on this site
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | The unique identifer for the Site. | integer |
Required |
Body Parameters
SiteModify| Name | Description | Type | Additional information |
|---|---|---|---|
| BillRunID | Site Bill Run ID | integer |
None. |
| SiteName | Name | string |
Required String length: inclusive between 0 and 255 |
| ShortName | Short Name | string |
Required String length: inclusive between 0 and 255 |
| Address | Street Address | string |
String length: inclusive between 0 and 255 |
| Town | town | string |
String length: inclusive between 0 and 50 |
| County | County | string |
String length: inclusive between 0 and 50 |
| PostCode | Post Code | string |
String length: inclusive between 0 and 20 |
| Fax | Fax Number | string |
String length: inclusive between 0 and 30 |
| Telephone | Telephone Number | string |
String length: inclusive between 0 and 30 |
| MainSite | Marks this site as the main site for the Company. | boolean |
None. |
| AccountRef | Customer Account Reference | string |
String length: inclusive between 0 and 30 |
Request Formats
application/json, text/json
Sample:
{
"BillRunID": 1,
"DateClosed": "2025-11-01T09:22:14.293",
"SiteName": "sample string 1",
"ShortName": "sample string 2",
"Address": "sample string 3",
"Town": "sample string 4",
"County": "sample string 5",
"PostCode": "sample string 6",
"Fax": "sample string 7",
"Telephone": "sample string 8",
"MainSite": true,
"AccountRef": "sample string 9"
}
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
None.