POST/directory/positions/external-keys

Updates a list of position 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/positions/external-keys

Header Parameters

HeadertypeDescription
Authorization string 

Bearer {token}


required 
Content-Type string 

application/json


required
example : application/json 

Request Body

PropertyTypeDescription
positions array (DomainUniqueExternalKeyRequest) 

List of external keys


required
minItems : 1
maxItems : 50 

DomainUniqueExternalKeyRequest

PropertyTypeDescription
domainId integer 

Domain ID


required
format : int32 
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  "positions": [3    {4      "domainId": 10000001,5      "id": "position-bba1-4d6f-8397-511f673467ec",6      "externalKey": "POSITION_EXT_01"7    },8    {9      "domainId": 10000001,10      "id": "position-7027-4a02-b838-6f52b5e38db7",11      "externalKey": "POSITION_EXT_02"12    }13  ]14}

Response

HTTP 204

No Content

HTTP 400

Bad Request

HTTP 404

Not Found

HTTP 409

Conflict