References - xpand-io/api-docs GitHub Wiki

References

POST /api/v1/references

To create reference values

Sample requests

POST https://domain-staging.xpand.io/api/v1/references

Sample response

{
  "data": [
    {
      "name": "Marital Status",
      "reference_id_type": "marital_status",
      "options": [
        {
          "name": "Married",
          "value": "married",
          "valid_country": "IND",
          "deprecated": false
        },
        {
          "name": "Single",
          "value": "single",
          "valid_country": "",
          "deprecated": true
        }
      ]
    },
    {
      ...
    }
  ]
}

Sample cURL request

curl -v -X POST https://domain-staging.xpand.io/api/v1/list_of_values_map -H "Content-Type: application/json" -H 'Accept: application/json' -H "Authorization: Token YOUR_API_KEY" -d ' { "data": { "attributes": { "name": "marital_status", "options": [ { "name": "Married", "value": "married", "valid_country": "ind", "deprecated": false }, { "name": "Single", "value": "single", "valid_country": "", "deprecated": false } ] } }'

Office Location

GET /api/v1/office_locations

Get details of all the office locations

Sample requests

GET /api/v1/office_locations

Sample response

{
  "data": [
    {
      "id": "5ee1862b9211cd30",
      "type": "office_locations",
      "attributes": {
        "created_at": "2020-06-11T01:17:31Z",
        "updated_at": "2020-06-11T01:17:31Z",
        "active": true,
        "address1": "46th Street",
        "address2": null,
        "address3": null,
        "city": "New York",
        "state": "New York",
        "country": "United States",
        "external_ids": {
            "HRIS_ID": "NEWYORK"
        }
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/office_locations"

Job Profiles

GET /api/v1/users/job_profiles

Get details of all the Job Profiles

Sample requests

GET /api/v1/users/job_profiles

Sample response

{
  "data": [
    {
      "id": "5ee196359211cd2d735f28c9",
      "type": "job_profiles",
      "attributes": {
        "created_at": "2020-06-11T02:25:57Z",
	      "updated_at": "2020-06-11T02:25:57Z",
	      "name": "Profile 1",
	      "reference_id": "PF1",
	      "job_family_id": "Profile family",
	      "job_family_group_id": "134bed8c92aa01c018c09",
	      "career_track_level": "Level8"
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/users/job_profiles"

Employee Types

GET /api/v1/users/employee_types

Get details of all the Employee Types

Sample requests

GET /api/v1/users/employee_types

Sample response

{
  "data": [
    {
      "id": "5f7b89e824a5b",
      "type": "list_of_values_options",
      "attributes": {
        "name": "Employee",
        "value": "Employee"
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/users/employee_types"

Cost Centers

GET /api/v1/users/cost_centers

Get details of all the Cost Centers

Sample requests

GET /api/v1/users/cost_centers

Sample response

{
  "data": [
    {
      "id": "5f7b89de24a5b6310e50a7ce",
      "type": "list_of_values_options",
      "attributes": {
        "name": "Cost Center",
        "value": "CC"
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/users/cost_centers"

Legal Entities

GET /api/v1/users/legal_entities

Get details of all the Legal Entities

Sample requests

GET /api/v1/users/legal_entities

Sample response

{
  "data": [
    {
      "id": "5f7b89de24a5b6310e",
      "type": "list_of_values_options",
      "attributes": {
        "name": "Xpand Limited",
        "value": "XPL"
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/users/legal_entities"

Candidate Statuses

GET /api/v1/users/candidate_statuses

Get details of all the Candidate Statuses

Sample requests

GET /api/v1/users/candidate_statuses

Sample response

{
  "data": [
    {
      "id": "5f808783a51d9f63ca",
      "type": "list_of_values_options",
      "attributes": {
        "name": "Accepted",
        "value": "accepted"
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/users/candidate_statuses"

Job Levels

GET /api/v1/users/job_levels

Get details of all the Job Levels

Sample requests

GET /api/v1/users/job_levels

Sample response

{
  "data": [
    {
      "id": "5f7b89e824a5b",
      "type": "list_of_values_options",
      "attributes": {
        "name": "L1",
        "value": "L1"
      }
    }
  ]
}

Sample cURL request

curl -i -H "Authorization: Token YOUR_API_KEY" -H "Content-Type: application/json" -X GET "https://subdomain.xpand.io/api/v1/users/job_levels"