Add an org chart

After getting a resource ID from Productiv, the org chart can be sent by issuing multiple PUT requests to this endpoint. Multiple PUT requests to the same resource ID are required if more than 1000 users need to be added to the org chart. Different resource ids correspond to different org chart snapshots and are used independently. If you defined custom fields when creating the org chart, you can use them here to assign custom field values to users.

Prerequisites

  • In order to query this API, you would also need to send an access_token as part of the Authorization header. Visit the Authorization section to see the steps for generating an access token.

  • A resource ID must have been generated to be used with this endpoint (see request a resource ID).

Endpoint

PUT https://public-api.productiv.com/services/push/v1/customer/org-chart/{id}
Required Scope https://api.productiv.com/connector.write

Request headers

Parameter Value
content-type application/json
Authorization Bearer access_token

Path params

Parameter Description
id The resource ID for which you are sending the org chart data.

Request body

Property Datatype Description Optional
hasMore boolean Set to true if followup requests will be issued to add more users to the org chart (multiple requests may be needed if the total number of users exceeds 1000) No
users array List of User objects to be added to the org chart (see definition below) No

Example request body

{
  "hasMore": true,
  "users": [
    {
      "email": "testEmail@example.com",
      "firstName": "testFirst",
      "lastName": "testLast",
      "team": "Engineering",
      "location": "San Francisco",
      "title": "testTitle",
      "managerEmail": "testManagerEmail@example.com",
      "additionalEmails": "",
      "costCenter": "1004 - San Francisco"
    }
  ]
}

Response

If the request is successful, a JSON response will be returned. This JSON object will contain the following parameters:

Parameter Description
success Will be set to true in case of a successful response.

Example response

{
  "success": true
}

API limitations

  • A maximum of 1000 provisioned users are accepted in a single PUT request.

Objects

User

Property Datatype Description Optional
email String Primary Email address of an employee. Also acts as primary key. No
firstName String First Name of employee. No
lastName String Last Name of employee. No
team String Team/department of employee. No
location String Location of employee. Yes
title String Job Title of employee. Yes
managerEmail String Employee’s manager’s email. Yes
additionalEmails String Comma separated list of additional email addresses of the employee. Yes
costCenter String Cost center of employee. Yes