POST/directory/employment-types/external-keys

Updates employment type external keys. > Caution > Support for this API operation is scheduled to end. Please use Update user type external keys.

Authorization

oauth2

OAuth 2.0 authentication.
For more information, see Authentication and Authorization.

Scope

directory

HTTP Request

POSThttps://www.worksapis.com/v1.0/directory/employment-types/external-keys

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
employmentTypes array (EmploymentTypeTenantUniqueExternalKeyRequest) 

List of external keys


required
minItems : 1
maxItems : 50 

EmploymentTypeTenantUniqueExternalKeyRequest

PropertyTypeDescription
id string 

ID.

It is the ID automatically assigned to a resource.
To add, update or delete external keys, the following types are available:

  • Resource ID
  • External key in "externalKey:{externalKey}" format

required 
externalKey string 

Customer's external key.

Updating external keys works as follows:

  • If no existing external key is found, a new one is added.
  • If an existing external key is found, a new one replaces it.
  • An external key whose value is NULL is deleted.
  • An external key can be up to 100 characters in length and cannot contain some special characters, %, #, /, and ?.

maxLength : 100 

Request Example

example

1{2  "employmentTypes": [3    {4      "id": "employ2c-f321-47a6-ac11-e81fcc23a8c3",5      "externalKey": "EMPLOYMENTTYPE_EXT_01"6    },7    {8      "id": "employ0f-997b-4f47-9267-463f15e908a3",9      "externalKey": "EMPLOYMENTTYPE_EXT_02"10    }11  ]12}

Response

HTTP 204

No Content

HTTP 400

Bad Request

HTTP 404

Not Found

HTTP 409

Conflict