openapi: 3.0.4
info:
title: Bench AccountActivities Persons API
description: "
Versioning
\n\n The API is currently at version 1.0. All API endpoints (other than\n authentication) require you to specify the API version as part of the path.\n
\n\nURL Paths
\n\n Authentication requests should be made to /auth/signin,\n as documented below. All other API requests should be made to\n sub-paths of /rp/api/1.0/....\n
\n\nAuthentication
\n\n API requests are authenticated using an OAuth Bearer token.\n You can get a token by authenticating your user by sending a\n POST request to /auth/signin, with \"username and \"password\"\n parameters form-encoded in the body of the request.\n\n POST /auth/signin HTTP/1.1\n Content-Type: application/x-www-form-urlencoded\n\n username=user@example.com&password=some-secret-password\n
\n\n The response will be a JSON object including both\n \"access_token\" and \"refresh_token\" property.\n All other requests against the Bench API should include an\n authorization header: Authorization: Bearer xxxYYYzzz,\n where xxxYYYzzz is the value of \"access_token\" in the response.\n
\n For example:\n\n $ curl https://bench.gobridgit.com/auth/signin -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'username=someone@example.com' --data-urlencode 'password=[...snip...]'\n {\n \"access_token\": \"...snip...\",\n \"token_type\": \"Bearer\",\n \"refresh_token\": \"...snip...\"\n \"expiry\": \"2020-01-01T00:00:00.413440849Z\"\n }\n\n
\n\n\n The refresh token can be used to generate new session by request with /auth/token endpoint:\n\n POST /auth/token HTTP/1.1\n Content-Type: application/x-www-form-urlencoded\n\n grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA\n
\n\n Note that once the refresh token is used, the previous access and refresh token is no longer valid.\n
\n For example:\n\n $ curl https://bench.gobridgit.com/auth/token -H 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'grant_type=refresh_token' --data-urlencode 'refresh_token=[...snip...]'\n {\n \"access_token\": \"...snip...\",\n \"token_type\": \"Bearer\",\n \"refresh_token\": \"...snip...\"\n \"expiry\": \"2020-01-01T00:00:00.413440849Z\"\n }\n
\n\nPagination
\n\n Several of the API endpoints are paginated. These are denoted by\n including the offset (zero-based offset) and limit query\n parameters. For example, to request the 10 items,\n set the offset=0 to limit=10.\n
\n NOTE: the result set contains items with index of 0-9\n
\n To request the next 10 items (starting at index 10),\n set the offset=10 to limit=10\n
\n\n Responses to paginated API endpoints return a JSON array of objects.\n If there are results beyond the page you have requested, the server\n will set a query-has-more: true header in the response.\n
\n\nRequest Encoding
\n\n GET and DELETE requests should have parameters encoded as URL query\n parameters. Boolean values should be encoded as true and\n false, not as 1 and 0.\n
\n\nErrors
\n\n Errors are returned for some response codes such as 400 Bad Request in the\n following format:\n\n {\n \"errors\": [\n {\n \"errorType\": \"ValidationError\",\n \"description\": \"The value of Name must be a string with a minimum length of 1 and a maximum length of 8 and not whitespace.\",\n \"field\": \"Name\",\n \"values\": [\n null\n ]\n }\n ],\n \"title\": \"One or more validation errors occurred.\",\n \"status\": 400,\n \"instance\": \"api/v1/accounts/0/persons\",\n \"requestUid\": \"123e4567-e89b-12d3-a456-426614174000\"\n }\n
\n"
version: '1.0'
servers:
- url: https://bench.gobridgit.com
description: Bridgit Bench production
security:
- {}
tags:
- name: Persons
paths:
/rp/api/v1/accounts/{accountId}/Persons:
get:
tags:
- Persons
summary: Gets all people in the given account.
description: 'NOTE: If there are more persons in the account than were returned, there will be a "query-has-more" header that will be set to true.
Permissions
HourlyProfile: Read
Person: Read
Finance: Read'
operationId: Persons_Query
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: offset
in: query
description: Offset for pagination
schema:
maximum: 2147483647
minimum: 0
type: integer
format: int32
default: 0
- name: limit
in: query
description: Maximum number of results in this page
schema:
maximum: 2147483647
minimum: 1
type: integer
format: int32
default: 1000
- name: email
in: query
description: Filter user with email
schema:
type: string
- name: state
in: query
description: 'If specified and not ''Unknown'', only include people matching the given state. The available values are defined as follows:
- Unknown: By default, includes only Active people.
- Active: include only Active people
- Deactivated: include only Deactivated people
- All: include all people, regardless of state'
schema:
enum:
- Active
- Deactivated
- All
type: string
default: Active
- name: ids
in: query
description: Optional paramater of comma delimited ids for filtering results based on the person IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: uniqueId
in: query
description: Optional paramater of unique identifier for filtering results based on the person unique identifier provided
schema:
type: string
responses:
'200':
description: 'Success: List of persons in the account'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
post:
tags:
- Persons
summary: Add a person to the given account
description: '
Permissions
HourlyProfile: Write
Person: Write
Private: Read
Finance: Read'
operationId: Persons_Post
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
requestBody:
description: 'Details for the person object and any associated custom field values. Note: the title must be one of the titles already defined on the account.'
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/NewPersonRequest'
example:
email: jayne@example.com
uniqueId: jayne@example.com
name: Jayne Peters
type: Salaried
title: Project Engineer
photoUrl: https://www.example.com/jayne.png
employmentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
workDays:
- 1
- 2
- 3
- 4
- 5
fields:
- fieldId: 1394
values:
- '5195555555'
groupings: null
industryStartDate: null
application/json:
schema:
$ref: '#/components/schemas/NewPersonRequest'
example:
email: jayne@example.com
uniqueId: jayne@example.com
name: Jayne Peters
type: Salaried
title: Project Engineer
photoUrl: https://www.example.com/jayne.png
employmentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
workDays:
- 1
- 2
- 3
- 4
- 5
fields:
- fieldId: 1394
values:
- '5195555555'
groupings: null
industryStartDate: null
text/json:
schema:
$ref: '#/components/schemas/NewPersonRequest'
example:
email: jayne@example.com
uniqueId: jayne@example.com
name: Jayne Peters
type: Salaried
title: Project Engineer
photoUrl: https://www.example.com/jayne.png
employmentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
workDays:
- 1
- 2
- 3
- 4
- 5
fields:
- fieldId: 1394
values:
- '5195555555'
groupings: null
industryStartDate: null
application/*+json:
schema:
$ref: '#/components/schemas/NewPersonRequest'
example:
email: jayne@example.com
uniqueId: jayne@example.com
name: Jayne Peters
type: Salaried
title: Project Engineer
photoUrl: https://www.example.com/jayne.png
employmentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
workDays:
- 1
- 2
- 3
- 4
- 5
fields:
- fieldId: 1394
values:
- '5195555555'
groupings: null
industryStartDate: null
required: true
responses:
'200':
description: 'Success: Person model of the newly added person'
content:
text/plain:
schema:
$ref: '#/components/schemas/PersonResponse'
application/json:
schema:
$ref: '#/components/schemas/PersonResponse'
text/json:
schema:
$ref: '#/components/schemas/PersonResponse'
'400':
description: Bad Request - Request has missing or invalid values
'401':
description: Unauthorized
'403':
description: Forbidden - User doesn't have permissions on this resource, or the account couldn't be found
'409':
description: Conflict - A person with the provided email already exists on the account
'422':
description: Unprocessable Entity - Validation failure
/rp/api/v1/accounts/{accountId}/Persons/availabilities:
get:
tags:
- Persons
summary: Gets the number of days until each person in this account is available and their availability ranges for the duration
description: '
Permissions
HourlyProfile: Read
Person: Read'
operationId: Persons_QueryNextAvailables
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: start
in: query
description: Start date to filter availabilities from (default today UTC)
schema:
type: string
format: date-time
- name: end
in: query
description: End date to filter availabilities to (default 10 years from today UTC)
schema:
type: string
format: date-time
- name: boundRange
in: query
description: Setting this value to true will truncate the dates returned to the specified start and end date paramters
schema:
type: boolean
default: true
- name: ids
in: query
description: Optional paramater of comma delimited ids for filtering results based on the person IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: includeUnavailable
in: query
description: 'If this is set to true it will return the availabilities and next available dates even if a person doesn''t have a next availability.
If the person does not have a "nextAvailableDate", then the "availableInDays" property will be -1'
schema:
type: boolean
default: false
responses:
'200':
description: 'Success: List of next availabilities'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonNextAvailable'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonNextAvailable'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonNextAvailable'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/{id}/externalId:
put:
tags:
- Persons
summary: Updates a person to set and externalId that can be referenced by external systems.
operationId: Persons_SetExternalId
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The person ID
required: true
schema:
type: integer
format: int64
requestBody:
description: Details for the person object
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/ExternalIdRequest'
application/json:
schema:
$ref: '#/components/schemas/ExternalIdRequest'
text/json:
schema:
$ref: '#/components/schemas/ExternalIdRequest'
application/*+json:
schema:
$ref: '#/components/schemas/ExternalIdRequest'
required: true
responses:
'204':
description: No Content
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/_filter:
post:
tags:
- Persons
summary: Gets all people in the given account filter by person ids.
description: 'NOTE: If there are more persons in the account than were returned, there will be a "query-has-more" header that will be set to true.
Permissions
HourlyProfile: Read
Person: Read
Finance: Read'
operationId: Persons_QueryFilter
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
requestBody:
description: Filter object including personIds, state, email, uniqueId, relativeDate, offset and limit
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/PersonFilterPredicatesFilter'
application/json:
schema:
$ref: '#/components/schemas/PersonFilterPredicatesFilter'
text/json:
schema:
$ref: '#/components/schemas/PersonFilterPredicatesFilter'
application/*+json:
schema:
$ref: '#/components/schemas/PersonFilterPredicatesFilter'
required: true
responses:
'200':
description: 'Success: List of persons in the account'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/{id}:
patch:
tags:
- Persons
summary: Update a person in the given account. Each of the fields in the request body is optional - only fields that are present in the request will be updated.
description: '
Permissions
Person: Write
HourlyProfile: Write
Finance: Read'
operationId: Persons_Update
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person ID
required: true
schema:
type: integer
format: int64
requestBody:
description: 'Details for the person object. Note: the title must be one of the titles already defined on the account.'
content:
application/json-patch+json:
schema:
type: object
additionalProperties: {}
example:
Email: jayne@example.com
UniqueId: This is a unique String Id
Name: Jayne Peters
Title: Project Engineer
EmploymentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
WorkDays:
- 1
- 2
- 3
- 4
- 5
application/json:
schema:
type: object
additionalProperties: {}
example:
Email: jayne@example.com
UniqueId: This is a unique String Id
Name: Jayne Peters
Title: Project Engineer
EmploymentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
WorkDays:
- 1
- 2
- 3
- 4
- 5
text/json:
schema:
type: object
additionalProperties: {}
example:
Email: jayne@example.com
UniqueId: This is a unique String Id
Name: Jayne Peters
Title: Project Engineer
EmploymentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
WorkDays:
- 1
- 2
- 3
- 4
- 5
application/*+json:
schema:
type: object
additionalProperties: {}
example:
Email: jayne@example.com
UniqueId: This is a unique String Id
Name: Jayne Peters
Title: Project Engineer
EmploymentDates:
StartDate: '2020-01-01T00:00:00'
EndDate: '2020-12-31T00:00:00'
WorkDays:
- 1
- 2
- 3
- 4
- 5
required: true
responses:
'200':
description: 'Success: Person model of the updated person'
content:
text/plain:
schema:
$ref: '#/components/schemas/PersonResponse'
application/json:
schema:
$ref: '#/components/schemas/PersonResponse'
text/json:
schema:
$ref: '#/components/schemas/PersonResponse'
'400':
description: Bad Request - Request has missing or invalid values
'401':
description: Unauthorized
'403':
description: Forbidden - User doesn't have permissions on this resource, or the person or account couldn't be found
'409':
description: Conflict - A person with the provided email already exists on the account
'422':
description: Unprocessable Entity - Validation failure
get:
tags:
- Persons
summary: Gets details for the given person
description: '
Permissions
Finance: Read
Person: Read
HourlyProfile: Read'
operationId: Persons_Get
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person ID
required: true
schema:
type: integer
format: int64
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
responses:
'200':
description: 'Success: Person Model for the requested person'
content:
text/plain:
schema:
$ref: '#/components/schemas/PersonResponse'
application/json:
schema:
$ref: '#/components/schemas/PersonResponse'
text/json:
schema:
$ref: '#/components/schemas/PersonResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
delete:
tags:
- Persons
summary: Deactivate a person
description: '
Permissions
Person: Write
HourlyProfile: Write'
operationId: Persons_Delete
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person ID
required: true
schema:
type: integer
format: int64
responses:
'204':
description: No Content (success)
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden - User doesn't have permissions on this resource, or the account couldn't be found
/rp/api/v1/accounts/{accountId}/Persons/{id}/deactivate:
post:
tags:
- Persons
summary: Deactivate a person with optional deactivation details (reason, notes, would rehire).
description: '
Permissions
Person: Write
HourlyProfile: Write'
operationId: Persons_Deactivate
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person ID
required: true
schema:
type: integer
format: int64
requestBody:
description: Optional deactivation details
content:
application/json-patch+json:
schema:
$ref: '#/components/schemas/PersonDeactivateRequest'
application/json:
schema:
$ref: '#/components/schemas/PersonDeactivateRequest'
text/json:
schema:
$ref: '#/components/schemas/PersonDeactivateRequest'
application/*+json:
schema:
$ref: '#/components/schemas/PersonDeactivateRequest'
responses:
'204':
description: No Content (success)
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden - User doesn't have permissions on this resource, or the account couldn't be found
/rp/api/v1/accounts/{accountId}/Persons/{id}/allocations:
get:
tags:
- Persons
summary: Get all allocations for the given person within the selected date range.
description: '
Permissions
Role: Read
HourlyRole: Read
Allocation: Read
HourlyAllocation: Read
Person: Read
HourlyProfile: Read'
operationId: Persons_GetAllocations
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person's ID
required: true
schema:
type: integer
format: int64
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: start
in: query
description: Start date to filter allocations from
schema:
type: string
format: date-time
- name: end
in: query
description: End date to filter allocations to
schema:
type: string
format: date-time
- name: roleId
in: query
description: Optional parameter to get allocations for a specific role
schema:
type: integer
format: int32
- name: projectState
in: query
description: Optional parameter for filtering results by project state.
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
- name: type
in: query
description: Optional parameter Salaried role type to filter results by (Default to Operations)
schema:
enum:
- Operations
- Preconstruction
- All
type: string
default: Operations
responses:
'200':
description: 'Success: List of allocations'
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonAllocationResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonAllocationResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonAllocationResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/{id}/projects:
get:
tags:
- Persons
summary: Get all projects that this person is allocated to, including past, present, and future allocations.
description: '
Permissions
Person: Read
HourlyProfile: Read
Allocation: Read
HourlyAllocation: Read'
operationId: Persons_GetProjects
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person ID
required: true
schema:
type: integer
format: int64
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: projectState
in: query
description: Optional parameter for filtering results by project state.
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
responses:
'200':
description: Success
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectResponse'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectResponse'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectResponse'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/current-projects:
get:
tags:
- Persons
summary: Get all projects that any person in the given account has an active allocation for. That is, each allocation's start date is ≦ now and the end date is ≧ now.
description: '
Permissions
Person: Read
Allocation: Read'
operationId: Persons_GetCurrentProjects
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: personIds
in: query
description: Optional paramater of comma delimited ids for filtering results based on the person IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: projectState
in: query
description: Optional parameter for filtering results by project state.
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
- name: type
in: query
description: (Optional)Salaried role type to filter results by (Defaults to All)
schema:
enum:
- Operations
- Preconstruction
- All
type: string
default: All
responses:
'200':
description: Success
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectList'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectList'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectList'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/current-projects-hourly:
get:
tags:
- Persons
summary: Get all projects that any person in the given account has an active allocation for. That is, each allocation's start date is ≦ now and the end date is ≧ now.
description: '
Permissions
HourlyProfile: Read
HourlyAllocation: Read'
operationId: Persons_GetCurrentProjectsHourly
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: relativeDate
in: query
description: Optional paramater used to calculate date based properties. If not provided, it is set to today's date in UTC.
schema:
type: string
format: date-time
example: '2021-01-01'
example: '2021-01-01'
- name: personIds
in: query
description: Optional paramater of comma delimited ids for filtering results based on the person IDs provided
schema:
type: array
items:
type: integer
format: int64
- name: projectState
in: query
description: Optional parameter for filtering results by project state.
schema:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
- All
type: string
default: All
responses:
'200':
description: Success
content:
text/plain:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectList'
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectList'
text/json:
schema:
type: array
items:
$ref: '#/components/schemas/PersonProjectList'
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden
/rp/api/v1/accounts/{accountId}/Persons/{id}/restore:
post:
tags:
- Persons
summary: Reactivate a person
description: '
Permissions
Person: Write
HourlyProfile: Write
Finance: Read'
operationId: Persons_Restore
parameters:
- name: accountId
in: path
description: The Account ID
required: true
schema:
type: integer
format: int32
- name: id
in: path
description: The Person ID
required: true
schema:
type: integer
format: int64
responses:
'204':
description: No Content (success)
'400':
description: Bad Request
'401':
description: Unauthorized
'403':
description: Forbidden - User doesn't have permissions on this resource, or the account couldn't be found
'422':
description: Validation failure - The person is already active in the account
components:
schemas:
FieldValuesPair:
type: object
properties:
fieldId:
type: integer
format: int64
example: 1394
values:
type: array
items:
type: string
nullable: true
example:
- '5195555555'
additionalProperties: false
PersonNextAvailable:
type: object
properties:
personId:
type: integer
format: int64
example: 8673
nextAvailableDate:
type: string
format: date-time
nullable: true
example: '2019-01-01'
availableInDays:
type: integer
format: int32
example: 82
availabilities:
type: array
items:
$ref: '#/components/schemas/Availability'
nullable: true
additionalProperties: false
NewPersonRequest:
type: object
properties:
email:
type: string
format: email
nullable: true
example: jayne@example.com
uniqueId:
type: string
nullable: true
example: This is a unique string that is less than 255 characters
name:
maxLength: 250
minLength: 1
type: string
nullable: true
example: Jayne Peters
type:
enum:
- Salaried
- Hourly
type: string
example: Salaried
title:
maxLength: 250
minLength: 1
type: string
nullable: true
example: Project Engineer
photoUrl:
type: string
format: uri
nullable: true
example: https://www.example.com/jayne.png
employmentDates:
type: object
additionalProperties:
type: string
format: date-time
nullable: true
description: Request object for representing employment dates on a person.
nullable: true
workDays:
minItems: 1
type: array
items:
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
type: integer
format: int32
default:
- 1
- 2
- 3
- 4
- 5
nullable: true
example:
- 1
- 2
- 3
- 4
- 5
fields:
type: array
items:
$ref: '#/components/schemas/FieldValuesPair'
nullable: true
groupings:
minItems: 1
type: array
items:
type: integer
format: int64
nullable: true
industryStartDate:
type: string
format: date-time
nullable: true
example: '2020-01-01T00:00:00Z'
additionalProperties: false
PersonDeactivateRequest:
type: object
properties:
deactivationReason:
maxLength: 100
minLength: 0
type: string
nullable: true
deactivationNotes:
maxLength: 240
minLength: 0
type: string
nullable: true
wouldRehire:
type: boolean
nullable: true
employmentEndDate:
type: string
format: date-time
nullable: true
additionalProperties: false
PersonFilterPredicatesFilter:
type: object
properties:
offset:
type: integer
format: int32
limit:
type: integer
format: int32
predicates:
$ref: '#/components/schemas/PersonFilterPredicates'
additionalProperties: false
PersonProjectResponse:
type: object
properties:
id:
type: integer
format: int64
example: 8673
name:
type: string
nullable: true
example: Ahrens Lofts
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
projectType:
enum:
- Awarded
- Opportunity
type: string
projectStatus:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
type: string
additionalProperties: false
PersonResponse:
type: object
properties:
id:
type: integer
format: int64
email:
type: string
nullable: true
externalId:
type: string
nullable: true
uniqueId:
type: string
nullable: true
name:
type: string
nullable: true
type:
enum:
- Salaried
- Hourly
type: string
title:
type: string
nullable: true
photoUrl:
type: string
nullable: true
state:
enum:
- Active
- Deactivated
- All
type: string
hasConflict:
type: boolean
readOnly: true
nextConflict:
type: string
format: date-time
nullable: true
lastModifiedOn:
type: string
format: date-time
hourlyCostRate:
type: number
format: double
nullable: true
employmentDates:
$ref: '#/components/schemas/EmploymentDatesResponse'
workDays:
type: array
items:
enum:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
type: integer
format: int32
nullable: true
groupings:
type: array
items:
type: integer
format: int64
nullable: true
industryStartDate:
type: string
format: date-time
nullable: true
deactivationReason:
type: string
nullable: true
deactivationNotes:
type: string
nullable: true
wouldRehire:
type: boolean
nullable: true
additionalProperties: false
ExternalIdRequest:
type: object
properties:
externalId:
type: string
nullable: true
additionalProperties: false
Project:
type: object
properties:
id:
type: integer
format: int64
example: 9381
name:
type: string
nullable: true
example: Ahrens Lofts
colour:
type: string
nullable: true
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
projectType:
enum:
- Awarded
- Opportunity
type: string
state:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
type: string
readOnly: true
additionalProperties: false
EmploymentDatesResponse:
type: object
properties:
startDate:
type: string
format: date-time
nullable: true
endDate:
type: string
format: date-time
nullable: true
additionalProperties: false
PersonFilterPredicates:
type: object
properties:
personIds:
type: array
items:
type: integer
format: int64
nullable: true
state:
enum:
- Active
- Deactivated
- All
type: string
email:
type: string
nullable: true
uniqueId:
type: string
nullable: true
relativeDate:
type: string
format: date-time
additionalProperties: false
PersonAllocationResponse:
type: object
properties:
projectId:
type: integer
format: int64
projectName:
type: string
nullable: true
projectColour:
type: string
nullable: true
projectType:
enum:
- Awarded
- Opportunity
type: string
projectStatus:
enum:
- Canceled
- Upcoming
- Active
- Complete
- Pursuit
- Lost
type: string
nullable: true
taskId:
type: string
format: uuid
nullable: true
roleId:
type: integer
format: int64
roleName:
type: string
nullable: true
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
allocatedPercent:
type: integer
format: int32
additionalProperties: false
Availability:
type: object
properties:
startDate:
type: string
format: date-time
example: '2021-01-01'
endDate:
type: string
format: date-time
example: '2021-12-31'
availablePercent:
type: integer
format: int32
nullable: true
example: 100
reason:
enum:
- Available
- Allocated
- PreEmployment
- PostEmployment
- Unavailability
type: string
nullable: true
additionalProperties: false
PersonProjectList:
type: object
properties:
personId:
type: integer
format: int64
example: 8673
projects:
type: array
items:
$ref: '#/components/schemas/Project'
nullable: true
additionalProperties: false
securitySchemes:
Bearer:
type: http
description: Standard Authorization header using the Bearer scheme
scheme: bearer
bearerFormat: JWT