Documentation of ECAT "Nexus" API
General info
Dev url: https://api.nexus.padillainc.com
Each request must conatin headers Application-Key. This key can be provided by Administrators of the system.
Each request except /auth/login must also conatin header Authorization with value in format Bearer {token}.
This token can be obtained by using endpoint /auth/login.
All the params in POST request must be transferred as form-data.
Endpoints
GET /version- provides information about current user and authorization.- Request: (no params)
- Response:
"20230713-1754"
GET /auth/me- provides information about current user and authorization.- Request: (no params)
- Response:
{ "email": "client-octa@padillainc.com", "roles": [ { "slug": "agency-admin", "title": "Agency Admin", "clientSlug": "octa", "clientTitle": "OCTA" } ], "auth": { "expired": "2023-07-22 09:07:53", "token": "ioF_Q-KHExXQ0Yh39YIhpu7hVvfJeS-LMLRu2eXL6zseswq_xNIZn-LoyuAr2GwP" } }
POST /auth/request-password-reset- sends email with temporaty link to "Password Reset" page- Request:
- (required, string)
email
- (required, string)
- Response: - response will be empty if mail is sent successfully
null
- Request:
POST /auth/reset-password- resets password usng temporary token- Request:
- (required, string)
password - (required, string)
confirmation - (required, string)
email - (required, string)
token
- (required, string)
- Response: - response will be empty if password was changed successfully
null
- Request:
POST /auth/change-password- chnage password of the current user- Request:
- (required, string)
password, - (required, string)
confirmation
- (required, string)
- Response: - response will be empty if password was changed successfully
null
- Request:
POST /auth/login- allows to log in the system.- Request:
- (required, string)
email - (required, string)
password
- (required, string)
- Response:
{ "email": "client-octa@padillainc.com", "roles": [ { "slug": "agency-admin", "title": "Agency Admin", "clientSlug": "octa", "clientTitle": "OCTA" } ], "auth": { "expired": "2023-07-22 09:07:53", "token": "ioF_Q-KHExXQ0Yh39YIhpu7hVvfJeS-LMLRu2eXL6zseswq_xNIZn-LoyuAr2GwP" } }
- Request:
POST /user/add- adds user to the system- Restrictions: allowed only for admins
- Request:
- (required, string)
firstName - (required, string)
lastName - (required, string)
email - (optional, string)
phone - (optional, string)
phoneExt
- (required, string)
- Response: - response will be empty if user was created successfully
null
POST /user/edit- edits user in the system- Restrictions: allowed only for admins
- Request:
- (required, string)
userEmail - (optional, string)
firstName - (optional, string)
lastName - (optional, string)
email - (optional, string)
phone - (optional, string)
phoneExt
- (required, string)
- Response: - response will be empty if user was changed successfully
null
POST /user/search- searches the users- Restrictions: allowed only for admins
- Request:
- (optional, bool)
withMeta- if set '1', the object with fields 'data' and 'meta' will be returned. 'data' will contain the actulal search results and 'meta' will contain meta information about a search (totalEntries, totalPages, perPage, currentPage) - (optional, array)
filtersfilters[typed]- any text. The search will be preformed by folumsnemail,forstName,lastNamefilters[role]- user role (available values:admin,client-admin,client-staff,contractor,dot,eeo,subcontractor,subreciptient,super-admin)
- (optional, string)
sort. Column for sorting. Available values:email,active,lastName. Each value can be prefixed with-sign for descendeing order - (optional, int)
perPage - (optional, int)
page
- (optional, bool)
- Response:
{ "data": [ { "email": "admin@padillainc.com", "created": "2023-07-26 14:22:02", "active": "2023-07-26 14:22:02", "firstName": "Admin", "lastName": "Padilla" }, { "email": "akutsel@padillainc.com", "created": "2023-07-13 13:20:17", "active": "2023-07-26 14:22:02", "firstName": "Anton", "lastName": "Kutsel" } ], "meta": { "totalEntries": 5, "totalPages": 3, "perPage": 2, "currentPage": 1 } }
POST /user/update-contacts-and-positions- assign user to specified positions (including project contacts) and update user contacts along the way.- Restrictions: allowed only for admins
- Request:
- (required, string)
oldEmail - (required, array)
positions- list of positions user is going to be assigned. Must be an array, each element of which represents particular position- (required, string)
positions[i].roleSlug - (required if mainEntity is 'client', e.g. for roles 'client-admin', 'client-staff', 'dot', 'subrecipient', string)
positions[i].clientSlug - (required if mainEntity is 'contractor', e.g. for role 'contractor')
positions[i].contractorSlug - (required if mainEntity is 'subcontractor', e.g. for role 'subcontractor')
positions[i].subcontractorSlug - (required if mainEntity is 'eeo, e.g. for role 'eeo')
positions[i].eeoSlug
- (required, string)
- (optional, array)
userData- list of fields to be updated in all contacts with this email address- (optional, string)
userData.firstName - (optional, string)
userData.lastName - (optional, string)
userData.email - (optional, string)
userData.phone - (optional, string)
userData.phoneExt
- (optional, string)
- (required, string)
- Response: - response will be empty if positions was set successfully
null
POST /client/search- searches the clients- Request:
- (optional, bool)
withMeta- if set '1', the object with fields 'data' and 'meta' will be returned. 'data' will contain the actulal search results and 'meta' will contain meta information about a search (such as perPage, total, etc) - Response:
[ { "slug": "nerv", "title": "Nerv", "created": "2023-01-01 00:00:00", "assignedUsers": [ { "id": 7, "assigned": "2023-10-10 15:06:22", "user_email": "bini@gmail.com", "client_slug": "gluon" } ] }, { "slug": "padilla", "title": "Padilla", "created": "2023-01-01 00:00:00", "assignedUsers": [ { "id": 7, "assigned": "2023-10-10 15:06:22", "user_email": "bini@gmail.com", "client_slug": "gluon" } ] } ]
- (optional, bool)
- Request:
POST /client/add- Add Client- Request:
- (required, string)
slugvalid input should consist of latin symbols, numbers, and spaces are allowed. - (required, string)
titlevalid input should consist of latin symbols, numbers, and spaces are allowed. - (required, string)
namevalid input should consist of latin symbols, numbers, and spaces are allowed. - (required, string)
addressvalid input should consist of latin symbols, numbers, hyphens, dots, commas, apostrophes, and spaces. - (required, string)
cityvalid input should consist of latin symbols, numbers, and hyphens. - (required, string)
state - (required, string)
zip - (required, string)
masterContactId - (required, string)
adminContactId - (required, bool)
doesTrainingVideoExist - (required, int)
assignedStaffContactId - (optional, int)
dbeloContactId
- (required, string)
- Response:
{ "slug": "Slug", "title": "Title Here", "name": "Client Name", "address": "Address Here", "city": "City", "state": "State", "zip": "Zipcode", "masterContactId": "1", "dbeloContactId": "4", "adminContactId": "1", "doesTrainingVideoExist": "1", "assignedStaffContactId": "1" }
- Request:
POST /client/edit/{slug}- Edit Client- Request:
slugmust be passed as url. And must exist for the client otherwise it will return null- (optional, string)
titlevalid input should consist of latin symbols, numbers, and spaces are allowed. - (optional, string)
namevalid input should consist of latin symbols, numbers, and spaces are allowed. - (optional, string)
addressvalid input should consist of latin symbols, numbers, hyphens, dots, commas, apostrophes, and spaces. - (optional, string)
cityvalid input should consist of latin symbols, numbers, and hyphens. - (optional, string)
state - (optional, string)
zip - (optional, string)
masterContactId - (optional, string)
adminContactId - (optional, bool)
doesTrainingVideoExist - (optional, int)
assignedStaffContactId - (optional, int)
dbeloContactId
- Response:
{ "slug": "Slug", "title": "Title Here", "name": "Client Name", "address": "Address Here", "city": "City", "state": "State", "zip": "Zipcode", "masterContactId": "1", "dbeloContactId": "4", "adminContactId": "1", "doesTrainingVideoExist": "1", "assignedStaffContactId": "1" }
- Request:
POST /client/assign-users- assign users to client- Restrictions: allowed only for admin-users
- Request:
- (required, string)
clientSlug - (required, array)
userEmails- list of email is going to be assigned. Must be an array- (required, string)
userEmails[i].email
- (required, string)
- (required, string)
- Response: - response will be empty if assigned users was set successfully
null
GET /tmpstorage/view/{key}- get user temporary storage data- Request:
- (no params)
keymust be passed as url. The key must exist for the user otherwise it will return null
- Response:
{ "id": 6, "created": "2023-09-14 16:58:56", "key": "Item", "value": "some data", "user_email": "bkassahun@padillainc.com" }
- Request:
POST /tmpstorage/add- add new user temporary storage data- Request:
- (required, string)
keymust be unique by user. support up to 128 characters - (required, string)
valuesupport up to 2048 characters
- (required, string)
- Response:
{ "key": "Item1", "value": "some data", "id": 8, "user_email": "bkassahun@padillainc.com" }
- Request:
DELETE /tmpstorage/delete/{key}- delete user`s temporary storage data by key.- Request:
- (no params)
keymust be passed as url. return a status of 1 when the provided key is present in the storage. Otherwise it will return a status of 0
- Response:
{ "status": 1 }
- Request:
POST /contact/add- add contact- Request:
- (optional, string)
namevalid input should consist of Latin letters, numeric digits, apostrophes, and spaces exclusively. - (optional, string)
titlevalid input should consist of Latin letters, numeric digits, apostrophes, and spaces exclusively. - (optional, phone)
phoneonly numeric digits, spaces, braces, dashes, and dots are permitted in the input. - (required, email)
email
- (optional, string)
- Response:
{ "name": "Name Here", "title": "Title", "email": "email@gmail.com", "phone": "+112323232323", "id": 5 }
- Request:
POST /contact/edit/{id}- edit contact- Request:
idvalid id must be provided as a url. otherwise it will return contact not found exception.- (optional, string)
namevalid input should consist of Latin letters, numeric digits, apostrophes, and spaces exclusively. - (optional, string)
titlevalid input should consist of Latin letters, numeric digits, apostrophes, and spaces exclusively. - (optional, phone)
phoneOnly numeric digits, spaces, braces, dashes, and dots are permitted in the input. - (optional, email)
emailvalid email must be provided
- Response:
{ "name": "Name Here", "title": "Title", "email": "email@gmail.com", "phone": "+112323232323", "id": 5 }
- Request:
POST /contractor/search- searches the contractors- Request:
- (optional, bool)
withMeta- if set '1', the object with fields 'data' and 'meta' will be returned. 'data' will contain the actulal search results and 'meta' will contain meta information about a search (such as perPage, total, etc)
- (optional, bool)
- Response:
[ { "slug": "another", "name": "Another", "created": "2023-09-20 13:52:19" }, { "slug": "test-contractor", "name": "Test Contractor", "created": "2023-09-19 15:32:42" } ]
- Request:
POST /subcontractor/search- searches the subcontractors- Request:
- (optional, bool)
withMeta- if set '1', the object with fields 'data' and 'meta' will be returned. 'data' will contain the actulal search results and 'meta' will contain meta information about a search (such as perPage, total, etc)
- (optional, bool)
- Response:
[ { "slug": "first-subcontractor", "name": "First Subcontractor", "created": "2023-09-20 13:53:02" }, { "slug": "third-subcontractor", "name": "Third Subcontractor", "created": "2023-09-20 13:53:02" } ]
- Request:
POST /eeo/search- searches the EEO- Request:
- (optional, bool)
withMeta- if set '1', the object with fields 'data' and 'meta' will be returned. 'data' will contain the actulal search results and 'meta' will contain meta information about a search (such as perPage, total, etc)
- (optional, bool)
- Response:
[ { "slug": "test-eeo", "name": "Test EEO", "created": "2023-09-20 13:52:36" } ]
- Request:
POST contract-modification/add- adds contract modification- Restrictions: allowed only for admins
- Request:
- (required, int)
contractId - (required, string)
requestType(available values: increase, reduction) - (required, text, 2-256, only latin symbols, numbers, hyphens, dots, commas, apostrophes, and spaces are allowed)
amendmentNumber - (required, string)
changedformat: Y-m-d H:i:s - (file encoded multipart/form-data)
ammendmentFile - (required, text, 2-64, only numbers, dots, commas allowed)
newAmount - (string)
reasonmax-length - 256
- (required, int)
- Response: - response will be empty if positions was set successfully
null
POST contract-modification/approve- adds contract modification- Restrictions: allowed only for admins
- Request:
- (required, int)
contractModificationId
- (required, int)
- Response: - response will be empty if positions was set successfully
null