# Agency Sync API URI ```bash https://api.versal.one/ ``` Method ``` POST /agency/sync ``` #### **Description** This API synchronizes agency data using a unique identifier (`uuid`). The client must provide an authorization token to access this endpoint. The API responds with success, error, or status messages based on the input and server-side processes. --- #### **Request Headers**
HeaderTypeDescriptionConstraints
`Authorization`StringBearer token for authentication and authorization.Required. Must be in the format `Bearer [token]`.
--- #### **Query Parameters**
ParameterTypeDescriptionConstraints
`uuid`StringUnique identifier for the agency.Required. Must be a valid UUID format.
--- #### **Response Codes**
Status CodeDescription
`200`Sync completed successfully. Returns a success message.
`400`Bad request. The `uuid` parameter is missing or invalid.
`403`Access forbidden. Invalid HMAC signature.
`404`No agency found with the provided `uuid`.
`500`Internal server error. Something went wrong on the backend.
--- #### **Example Requests** **Request (Sync Agency):** ```bash POST /53d1bcd3-aaf0-45e1-9298-5395b6a27b61/agency/sync Authorization: Bearer 5395b6a27b61 ``` **Response (Sync Complete - 200):** ```json { "status": true, "message": "Sync Complete" } ``` **Response (Missing UUID - 400):** ```json { "success": false, "message": "Bad Request: Missing uuid parameter" } ``` **Response (Invalid HMAC - 403):** ```json { "success": false, "message": "Forbidden: Invalid HMAC signature" } ``` **Response (Not Found - 404):** ```json { "success": false, "message": "No company found with the provided uuid" } ``` **Response (Server Error - 500):** ```json { "status": false, "message": "Something went wrong on the backend" } ``` --- #### **Notes** - **Authentication**: The authorization token must be valid. If it is missing or invalid, the request will fail. - **Field Validation**: Ensure the `uuid` parameter is correctly formatted as a valid UUID. - **Error Handling**: For 500 errors, consult server logs for debugging.