Create a branch
const url = 'https://api2.recruso.co.uk/v1/branches';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"branchLocation":"Manchester Central","address1":"Unit 7, Ashton House","address2":"14 Deansgate","town":"Manchester","county":"Greater Manchester","postcode":"M3 2BW","country":"United Kingdom","telephone1":"0161 496 0114","telephone2":"0161 496 0115","mobile":"07700 900432","fax":"0161 496 0116","email":"manchester@example-recruitment.co.uk","website":"https://www.example-recruitment.co.uk","sageDepartmentId":21,"clientName":"example","agencyNameForEmail":"Example Recruitment (Manchester)","displayInSelfRegistration":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api2.recruso.co.uk/v1/branches \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "branchLocation": "Manchester Central", "address1": "Unit 7, Ashton House", "address2": "14 Deansgate", "town": "Manchester", "county": "Greater Manchester", "postcode": "M3 2BW", "country": "United Kingdom", "telephone1": "0161 496 0114", "telephone2": "0161 496 0115", "mobile": "07700 900432", "fax": "0161 496 0116", "email": "manchester@example-recruitment.co.uk", "website": "https://www.example-recruitment.co.uk", "sageDepartmentId": 21, "clientName": "example", "agencyNameForEmail": "Example Recruitment (Manchester)", "displayInSelfRegistration": true }'Creates a branch under your own agency. Only branchLocation is required; every other field is optional and may be filled in later with UpdateBranch.
branchLocation must be unique across the agency’s branches — a name that is already in use returns 400. A name belonging to a deleted branch is also rejected, because branches are only ever soft-deleted and a deleted branch keeps its name.
The agency is taken from your credentials, so there is no owner field on the request. The new branch is added to the accessible branches of the user behind your API app, so you can read it back straight away.
On success the response carries the new branchId and a Location header pointing at GetBranchById.
Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A new branch. Only branchLocation is required; everything else may be filled in later with UpdateBranch. The owning agency comes from your credentials, so there is no owner field.
object
The branch name. Required, up to 50 characters, and unique across the agency’s branches — a name already in use returns 400. Leading and trailing whitespace is trimmed.
Example
Manchester CentralFirst line of the branch address. Up to 50 characters.
Example
Unit 7, Ashton HouseSecond line of the branch address. Up to 50 characters.
Example
14 DeansgateTown or city of the branch address. Up to 255 characters.
Example
ManchesterCounty of the branch address. Up to 255 characters.
Example
Greater ManchesterPostcode of the branch address. Up to 10 characters.
Example
M3 2BWCountry of the branch address. Up to 255 characters.
Example
United KingdomPrimary contact telephone number. Up to 50 characters; the format is not validated.
Example
0161 496 0114Secondary contact telephone number. Up to 50 characters.
Example
0161 496 0115Mobile contact number. Up to 50 characters.
Example
07700 900432Fax number. Up to 50 characters.
Example
0161 496 0116Contact email address for the branch. Up to 100 characters; stored as given and not validated as an email address.
Example
manchester@example-recruitment.co.ukWebsite address for the branch. Up to 255 characters.
Example
https://www.example-recruitment.co.ukThe branch’s Sage department. Not verified against Sage by this endpoint — an unknown department is accepted here and fails later at posting time.
Example
21Up to 70 characters.
The agency name used as the sender identity on emails sent from this branch. Up to 100 characters.
Example
Example Recruitment (Manchester)Whether the branch is offered as a choice when a worker self-registers. Omitted means null, not false.
Example
trueResponses
Section titled “Responses”Created
The newly created branch. ModifiedBy and ModifiedOn are absent because the branch has not been changed yet — read them back from GetBranchById after the first update.
object
The identifier allocated to the new branch. Use this on the cost-centre endpoints as branchId. It is also the id in the Location header.
The branch name, trimmed. Unique across the agency’s branches.
First line of the branch address.
Second line of the branch address.
Town or city of the branch address.
County of the branch address.
Postcode of the branch address.
Country of the branch address.
Primary contact telephone number for the branch.
Secondary contact telephone number for the branch.
Mobile contact number for the branch.
Fax number for the branch.
Contact email address for the branch.
Website address for the branch.
The branch’s Sage department. Cost centres carry a sageDepartmentId of their own; which one a posting uses is decided by the Sage integration, not by this endpoint.
The agency name used as the sender identity on emails sent from this branch.
Whether the branch is offered as a choice when a worker self-registers.
Example
{ "branchId": 4, "branchLocation": "Manchester Central", "address1": "Unit 7, Ashton House", "address2": "14 Deansgate", "town": "Manchester", "county": "Greater Manchester", "postcode": "M3 2BW", "country": "United Kingdom", "telephone1": "0161 496 0114", "telephone2": "0161 496 0115", "mobile": "07700 900432", "fax": "0161 496 0116", "email": "manchester@example-recruitment.co.uk", "website": "https://www.example-recruitment.co.uk", "sageDepartmentId": 21, "agencyNameForEmail": "Example Recruitment (Manchester)", "displayInSelfRegistration": true}Bad Request
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
