Skip to main content

Edit Site

Written by Support

PUT [ site/{siteId} ]

Production Endpoint:
Test Endpoint: https://test.complyflow.com.au/app/public/index.php/api/site/46

Overview

This endpoint updates an existing site in the ComplyFlow system. It supports partial updates (send only the fields you want to change) and is typically used to manage sites from external systems — including setting an end date to deactivate a site (e.g. for invoicing) and assigning a site contact.

Authentication instructions

Refer to the Authentication method for Authentication Methods (for Login and Logout).

Permissions Required

The user should possess the permissions below:

  • API User

  • User is Staff

  • Users have Access to View and Edit Site Permission

Please also refer to the Permissions Overview guide.

Body properties/Payload

All fields are optional — only the fields included in the request are updated (partial update). siteId, startDate and timezone cannot be changed.

FIELD

TYPE

DESCRIPTION

REQUIRED

siteName

string

Site name

No

code

string

Site code

No

address

string

Site address

No

state

string

Site state

No

postCode

string

Site post code

No

country

string

Site country

No

endDate

date

Site end date (YYYY-MM-DD). Cannot be in the past; setting it to today deactivates the site.

No

siteContactId

integer

Staff ID assigned as Site Contact. Must be a valid staff member in the same organisation.

No

Request Example

curl --location --request PUT 'https://test.complyflow.com.au/app/public/index.php/api/site/46' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{
"siteName": "ProjectD",
"code": "PD",
"address": "Jln D",
"state": "Pekan Baru",
"postCode": "50112",
"country": "argentina",
"endDate": "2035-09-01",
"siteContactId": "692"
}'

Response Example

A successful update returns:

{
"token": "",
"data": {
"success": true,
"message": "Site updated successfully",
"statusCode": 200
}
}

Per CFCON-16774 the success payload should also include "siteId" and "successCode": "SITE_UPDATED" inside data — confirm against the deployed endpoint and update if present.

Error Responses

Scenario

statusCode

message

Site not found

404

Site not found

Invalid site contact ID

400

Invalid site contact ID

End date in the past

400

End date cannot be in the past

Access denied

403

Access denied

Example error response:

{
"token": "",
"data": {
"success": false,
"message": "Site not found",
"statusCode": 404
}
}
Did this answer your question?