Introduction
This RESTful JSON API uses HTTP GET, POST, PUT, DELETE Requests to communicate with the System.
HTTP/1.1 Status Codes:
- 200 OK
- 201 Created
- 202 Accepted
- 204 No Content
- 301 Moved Permanently
- 302 Found
- 303 See Other
- 304 Not Modified
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 408 Request Time-out
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 414 Request-URI Too Large
- 415 Unsupported Media Type
- 416 Requested range not satisfiable
- 500 Internal Server Error
- 501 Not Implemented
- 502 Bad Gateway
- 505 HTTP Version not supported
JSON Errors (HTTP/1.1 STATUS CODES 4xx & 5xx)
{ "success": false, "error": { "message": "The email field is required.", "code": 400 } }
Single Response (HTTP/1.1 STATUS CODES 2xx)
{ "success": true, "data": { "id": 1, } }
Collection Response (HTTP/1.1 STATUS CODES 2xx)
{ "success": true, "items" : { "per_page" : 15, "from" : 1, "data" : [ { "id" : 1, } ], "total" : 1, "current_page" : 1, "last_page" : 1, "to" : 1 } }
Area
GET
index
- api/v1/areas?api_token={api_token}
Display a listing of the company's areas.
GET
show
- api/v1/areas/{area_id}?api_token={api_token}
Display the specified area.
AttendanceRecord
POST
store
- api/v1/attendance_record?api_token={api_token}
AttendanceRequest
GET
index
- api/v1/attendance_requests?api_token={api_token}
Displays a listing of the all attendance requests on the last month by default.
GET
show
- api/v1/attendance_requests/{attendance_request_id}?api_token={api_token}
Display the specified attendance request.
CostCenter
GET
index
- api/v1/cost_centers?api_token={api_token}
Display a listing of the const centers.
GET
show
- api/v1/cost_centers/{cost_center_id}?api_token={api_token}
Display the specified cost center.
CustomizedField
GET
index
- api/v1/customized_fields?api_token={api_token}
Display a listing of the resource.
GET
show
- api/v1/customized_fields/{customized_field_id}?api_token={api_token}
Display the specified resource.
Employee
GET
index
- api/v1/employees?api_token={api_token}
Display a listing of the employees.
fields: It can contain the next fields separated by comma.
Example: https://api.people-cloud.com/api/v1/employees?fields=full_name,dob,boss_id,position_id
fields: It can contain the next fields separated by comma.
- academic_degree: The academic degree
- address_external_number: The address external number
- address_internal_number: The address internal number
- address_street: The address street
- address_suburb: The address suburb
- allergies
- approbation_date: The approbation date of the employee incorporation formatted as YYYY-MM-DD.
- area_id: The ID of the working area
- area_name: The name of the working area
- bank: The bank CLABE of the employee
- base_seniority_date: The base seniority date of the employee
- blood_type: The blood type
- boss_id: The employee ID of the direct superior
- boss_name: The full name of the direct superior
- complexion: The phisical complexion
- contact_email: A contact e-mail
- cost_center_id: The ID of the cost center
- cost_center_name: The name of the cost center
- current_country: The name of the country of residence
- current_municipality: The name of the town, city or municipallity of residence
- current_state: The name of the state or province of residence
- dob: The date of birth formatted as YYYY-MM-DD
- effective_date: The effective date of the employee available in YYYY-MM-DD format (Field available to know when the integrated daily salary is taken).
- emergency_contact: A record of an emergency contact
- end_date: The working termination date of the employee formatted as YYYY-MM-DD (Field available for terminated employees).
- eyes_color: The eyes color
- first_name: The first name
- full_address: The full address
- full_name: The full name
- gender: The sex gender
- has_union: The employee is unionized.
- hair_color: The hair color
- height
- home_phone: The home phone
- integrated_salary: The integrated salary
- last_name: The last name
- locality_id: The ID of the work locality
- locality_name: The name of the work locality
- marital_status: The marital status
- mobile_phone: The mobile phone number
- national_identification_number: CURP
- national_identity_card: IFE
- origin_country: The name of the birth country
- origin_municipality: The name of the town, city or municipality country
- origin_state: The name of the state or province country
- payment_type:Payment type of the employee.
- personal_email: A personal e-mail
- person_details: The phisical person details
- phone: The work phone number
- phone_ext: The work phone extention number
- position_id: The ID of the job position
- position_name: The name of the job position
- professional_licensure: Número de cédula profesional
- salary: Salario mensual/Montlhy salary
- second_last_name: The second last name
- social_security_number: Número de seguridad social NSS
- start_date: The start working date formatted as YYYY-MM-DD
- style
- tax_id: RFC
- termination_id: The ID of the termination cuase (Field available for terminated employees).
- He never was an employee / Nunca fue empleado.
- Finalized contract / Término de contrato.
- Desertion / Abandono de empleo.
- Death / Defunción.
- Other reason / Otra razón.
- Retirement / Jubilación.
- Better economic offer or development / Mejor oferta económica o de desarrollo.
- Work environment / Ambiente de trabajo.
- Relation with his superior / Relación con jefe.
- Residence changing / Cambio de residencia.
- work_permit: FM3
- worker_type: indicates the type of worker
- permanent: Permanent / Permanente
- eventual: Eventual
- eventual_construction: Eventual construction / Eventual de la construcción
- zip_code: The ZIP code
Example: https://api.people-cloud.com/api/v1/employees?fields=full_name,dob,boss_id,position_id
GET
create
- api/v1/employees/create?api_token={api_token}
Create Employee.
Requirements for employee creation:
For the creation an object with the following parameters is needed:
GET
show
- api/v1/employees/{employee_id}?api_token={api_token}
Display the specified employee.
There can query information like:
- academic_degree: The academic degree
- address_external_number: The address external number
- address_internal_number: The address internal number
- address_street: The address street
- address_suburb: The address suburb
- allergies
- approbation_date: The approbation date of the employee incorporation formatted as YYYY-MM-DD.
- area_id: The ID of the working area
- area_name: The name of the working area
- bank: The bank CLABE of the employee
- base_seniority_date: The base seniority date of the employee
- blood_type: The blood type
- boss_id: The employee ID of the direct superior
- boss_name: The full name of the direct superior
- complexion: The phisical complexion
- contact_email: A contact e-mail
- cost_center_id: The ID of the cost center
- cost_center_name: The name of the cost center
- current_country: The name of the country of residence
- current_municipality: The name of the town, city or municipallity of residence
- current_state: The name of the state or province of residence
- dob: The date of birth formatted as YYYY-MM-DD
- effective_date: The effective date of the employee available in YYYY-MM-DD format (Field available to know when the integrated daily salary is taken).
- emergency_contact: A record of an emergency contact
- end_date: The working termination date of the employee formatted as YYYY-MM-DD (Field available for terminated employees).
- eyes_color: The eyes color
- first_name: The first name
- full_address: The full address
- full_name: The full name
- gender: The sex gender
- has_union: The employee is unionized.
- hair_color: The hair color
- height
- home_phone: The home phone
- integrated_salary: The integrated salary
- last_name: The last name
- locality_id: The ID of the work locality
- locality_name: The name of the work locality
- marital_status: The marital status
- mobile_phone: The mobile phone number
- national_identification_number: CURP
- national_identity_card: IFE
- origin_country: The name of the birth country
- origin_municipality: The name of the town, city or municipality country
- origin_state: The name of the state or province country
- payment_type:Payment type of the employee.
- personal_email: A personal e-mail
- person_details: The phisical person details
- phone: The work phone number
- phone_ext: The work phone extention number
- position_id: The ID of the job position
- position_name: The name of the job position
- professional_licensure: Número de céula profesional
- salary: Salario mensual/Montlhy salary
- second_last_name: The second last name
- social_security_number: Número de seguridad social NSS
- start_date: The start working date formatted as YYYY-MM-DD
- style
- tax_id: RFC
- termination_id: The ID of the termination cuase (Field available for terminated employees).
- He never was an employee / Nunca fue empleado.
- Finalized contract / Término de contrato.
- Desertion / Abandono de empleo.
- Death / Defunción.
- Other reason / Otra razón.
- Retirement / Jubilación.
- Better economic offer or development / Mejor oferta económica o de desarrollo.
- Work environment / Ambiente de trabajo.
- Relation with his superior / Relación con jefe.
- Residence changing / Cambio de residencia.
- work_permit: FM3
- worker_type: indicates the type of worker
- permanent: Permanent / Permanente
- eventual: Eventual
- eventual_construction: Eventual construction / Eventual de la construcción
- zip_code: The ZIP code
To retrieve some specific fields add them separated by comma to the GET variable named 'fields'.
Example: https://api.people-cloud.com/api/v1/employees/{employee_id}?fields=full_name,dob,boss_id,position_id
PUT
update
- api/v1/employees/{employee_id}?api_token={api_token}
update Num employee.
Requirements to update num employees:
DELETE
destroy
- api/v1/employees/{employee_id}?api_token={api_token}
Delete Employee.
Requirements to remove employees:
FieldAnswer
GET
index
- api/v1/employees/{employee_id}/field_answers?api_token={api_token}
Display a listing of the resource.
POST
store
- api/v1/employees/{employee_id}/field_answers?api_token={api_token}
Store the specified resource.
GET
show
- api/v1/employees/{employee_id}/field_answers/{customized_field_id}?api_token={api_token}
Display the specified resource.
GET
file
- api/v1/employees/{employee_id}/field_answers/{customized_field_id}/file?api_token={api_token}
Display the specified file of the resource.
Hiring
GET
index
- api/v1/employees/{employee_id}/hiring_information?api_token={api_token}
Display the hiring information of an employee.
Relative
GET
index
- api/v1/employees/{employee_id}/relatives?api_token={api_token}
Display a listing of the relatives of an employee.
There can query information like:
Example: https://api.people-cloud.com/api/v1/employees/{employee_id}/relatives?fields=full_name,dob,country
There can query information like:
- dob: The date of birth formatted as YYYY-MM-DD
- home_phone: The home phone
- job
- street: The street address
- suburb: The suburb address
- zip_code: The ZIP code
- country: The country name
- state: The state or province name
- municipality: The town, city or municipallity name
- full_name: The full name
- first_name: The first name
- last_name: The last name
- second_last_name: The second last name
- is_beneficiary: Is the employee's beneficiary
- relation :This field indicates the type of relationship with the user.
- mother / madre.
- father / padre.
- son / hijo.
- spouse / esposo(a).
- brother / hermano.
- grandparent / abuelo.
- uncle / tio.
- cousin / primo.
- other / otro.
Example: https://api.people-cloud.com/api/v1/employees/{employee_id}/relatives?fields=full_name,dob,country
GET
create
- api/v1/employees/{employee_id}/relatives/create?api_token={api_token}
Add employee relative.
Requirements for add employee relative:
For the creation an object with the following parameters is needed:
GET
show
- api/v1/employees/{employee_id}/relatives/{relative_id}?api_token={api_token}
Display the specified relative of an employee.
There can query information like:
Example: https://api.people-cloud.com/api/v1/employees/{employee_id}/relatives/{relative_id}?fields=full_name,dob,country
There can query information like:
- dob: The date of birth
- home_phone: The home phone
- job
- street: The street address
- suburb: The suburb address
- zip_code: The ZIP code
- country: The country name
- state: The state or province name
- municipality: The town, city or municipallity name
- full_name: The full name
- first_name: The first name
- last_name: The last name
- second_last_name: The second last name
- is_beneficiary: Is the employee's beneficiary
- relation :This field indicates the type of relationship with the user.
- mother / madre.
- father / padre.
- son / hijo.
- spouse / esposo(a).
- brother / hermano.
- grandparent / abuelo.
- uncle / tio.
- cousin / primo.
- other / otro.
Example: https://api.people-cloud.com/api/v1/employees/{employee_id}/relatives/{relative_id}?fields=full_name,dob,country
Locality
GET
index
- api/v1/localities?api_token={api_token}
Display a listing of the localities.
GET
show
- api/v1/localities/{locality_id}?api_token={api_token}
Display the specified locality.
Movement
GET
index
- api/v1/movements?api_token={api_token}
Display a listing of the all staff movements on the last month by default.
- status: The status of the staff movement.
- "pending" - Pendiente
- "authorized" - Autorizado
- "rejected" - Rechazado
- "recruitment" - Reclutamiento
- "applied" - Aplicado
- "canceled" - Cancelado
- type: The type of the staff movement.
- Employee enrollment/Alta de empleado.
- Employee termination/Baja de empleado
- Salary updating/Cambio de sueldo.
- Promotion/Promoción.
- Enrollment of a new job position/Alta nueva plaza.
- Job position termination/Baja de puesto.
- Transference/Transferencia.
- Enrollment of a request recruitment/Alta de solicitud de reclutamiento.
- Organizational structure movement/Movimiento de estructura organizacional.
GET
show
- api/v1/movements/{movement_id}?api_token={api_token}
Display the specified staff movement.
OrganizationalLevel
GET
index
- api/v1/organizational_levels?api_token={api_token}
Display a listing of the organizational levels.
GET
show
- api/v1/organizational_levels/{organizational_level_id}?api_token={api_token}
Display the specified organizational level.
Position
GET
index
- api/v1/positions?api_token={api_token}
Display a listing of the job positions.
GET
show
- api/v1/positions/{position_id}?api_token={api_token}
Display the specified job position.
Requisition
GET
index
- api/v1/requisitions?api_token={api_token}
Display a listing of the requisition.
GET
show
- api/v1/requisitions/{requisition_id}?api_token={api_token}
Display a listing of the requisition.
PublishNetworks
GET
index
- api/v1/requisitions/{requisition_id}/publish_networks?api_token={api_token}
Display a listing of the requisition.
RequisitionCandidates
GET
index
- api/v1/requisition_candidates?api_token={api_token}
Display a listing of the Cadidates of an publication.
There can query information like:
There can query information like:
- full_name: The full name of the candidate
- id_publication: The id of the publication where He belong
- id: The candiate id
- email: The email of the candidate
GET
create
- api/v1/requisition_candidates/create?api_token={api_token}
Add a new cadidate to an publication/requisition .
Requirements for add Candidate
For the creation an object with the following parameters is needed:
GET
show
- api/v1/requisition_candidates/{id_publication}?api_token={api_token}
Display the specified candidate of an requisition.
There can query information like:
There can query information like:
- full_name: The full name of the candidate
- id_publication: The id of the publication where He belong
- id: The candiate id
- email: The email of the candidate
Trajectory
GET
index
- api/v1/employees/{employee_id}/trajectory?api_token={api_token}
fields: It can contain the next fields separated by comma.
> Example: https://api.people-cloud.com/api/v1/employees/{employee_id}/?fields=end_date,salary,position_id
- internal_employee_id: The internal_employee_id is equal to the id shown in the data.
- end_date: The working termination date of the employee formatted as YYYY-MM-DD (Field available for terminated employees).
- position_id: The id of the job position
- salary: Salario mensual/Montlhy salary
- start_date: The start working date formatted as YYYY-MM-DD
- movement_type: Movement type
- Employee registration / Alta de empleado
- Salary increase / Incremento de sueldo
- Promotion / Promoción
- Exchange / Intercambio
- Transfer / Transferencia
- Increase report / Reporte de incremento
- Salary modification / Modificación de salario
> Example: https://api.people-cloud.com/api/v1/employees/{employee_id}/?fields=end_date,salary,position_id