NAV
Developer Documentation
Output

Introduction

The BetterWorks API is a REST API. All API responses return JSON, including errors.

To allow for testing, you can make API keys in the BetterWorks Preview Environment. The Preview Environment is refreshed at the end of every month, so a new key will need to be generated each month. Production keys are live until deactivated via the BetterWorks admin portal.

This documentation refers to BetterWorks work units as “goals” and “milestones.” These units are interchangeable with “Objectives” and “Key Results” respectively, so if your organization uses OKRs, remember that every “goal” is an “Objective” and every “milestone” is a “Key Result.”

Authentication

# With shell, you can just pass the correct header with each request
curl --header "Authorization: APIToken 33ee80167fad49739a71ccf8a0e5679e"
https://app.betterworks.com/api/v1/users/:identifier/`

Each call to the API is authenticated by including your secret API token in the request. API tokens are managed through the BetterWorks Admin portal. Please contact your BetterWorks Admin to obtain a token. Each token carries the permissions of the user assigned to the token.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

URI Structure and Versioning

All BetterWorks APIs require specifying an API version in the request URL.

Ex. GET https://app.betterworks.com/api/<Version>/user/ or GET https://preview.betterworks.com/api/<Version>/user/ if developing against the preview environment.

Newer versions of the API will include new features and improvements and you should consider upgrading to the latest version whenever possible.

The most current API version is V1 (GET https://app.betterworks.com/api/v1/user/). New versions of the API will be communicated to your BetterWorks admin and via our Support page.

Permissions

Permissions for API keys will always match the permissions allowed to the user in which the API key is assigned. For example, if a user owns a private goal, that goal will be visible to requests made using any key attached to the user (and will not be visible for API keys attached to users that do not have permission to view).

In addition, some APIs require additional administrative privileges in order to function.

Pagination

The API response will be of the form:

{
  "nextUrl": "<nextpageurl>",
  "results": [

  ],
  "more" : "true"
}

All BetterWorks APIs support pagination. Supplying page will select which page of content you get, and size will dictate the number of entities returned per page.

If more is true, you can get the next page of results by querying the nextURL

Goals

Goals and Milestones

In the BetterWorks system, Goals may have any number of milestones (also called Key Results) or other goals as children which will contribute to their parent’s progress. Goals and Milestones are serialized nearly identically, with Milestones being identifiable by the is_key_result: true attribute.

Throughout the API both Goals and Milestones can be referenced interchangablely by goals/:goal_id in the URL, though the specific endpoints may handle them differently.

Get a Specific Goal

Example Response:

{
  "categories": [
    {
      "id": 1,
      "name": "Marketing"
    }
  ],
  "children": [
    {
      "id": 116,
      "name": "<Goal Name>"
    }
  ],
  "created": 1453420800.0,
  "created_by": {
    "id": 25,
    "name": "<First Name> <Last Name>"
  },
  "description": "",
  "end": "2016-02-21",
  "id": 115,
  "integration": null,
  "is_key_result": false,
  "last_checkedin": null,
  "measurement": {
    "condition": "green",
    "current": null,
    "done": false,
    "expected": 0.0,
    "initial": null,
    "is_binary": true,
    "is_numeric": false,
    "lower_limit": null,
    "lower_mid": null,
    "progress": 0.0,
    "target": null,
    "type": "avgofprogress",
    "unit": "",
    "updated": 1453420800.0,
    "updated_by": {
      "id": 25,
      "name": "<First Name> <Last Name>"
    },
    "upper_limit": null,
    "upper_mid": null
  },
  "name": "<Goal Name>",
  "owner": {
    "group": null,
    "team": null,
    "user": {
      "id": 25,
      "name": "<First Name> <Last Name>"
    }
  },
  "parent": null,
  "start": "2016-01-21",
  "stats": {
    "cheers": 0,
    "comments": 0,
    "last_assessed": null,
    "nudges": 0,
    "views": 0
  },
  "updated": 1453420800.0,
  "updated_by": {
    "id": 25,
    "name": "<First Name> <Last Name>"
  },
  "visibility": "public"
}

This endpoint will retrieve the full details about a specific goal within your organization.

HTTP Request

GET /api/v1/goals/:id/

URL Parameters

Parameter Required Description
id Required The ID of the goal to retrieve

Returns

Returns the goal object or a 404 Error if the goal is not found.

Filter

Returns all goals and milestones matching the filter criteria

HTTP Request

GET /api/v1/goals/filter/

Query Parameters

Parameter Type Description Modifiers
owner Integer Filter goals owned by the specified user id. Direct, negate
aligned_to_goal Integer Filter for goals aligned to the specified goal id. Direct, negate
aligned_to_owner Integer Filter all goals aligned to the person you choose Direct, negate
team_only Boolean Filter goals to only those owned by users on your team. yes or no (no will filter out any goals owned by your team) None
group Integer Filters goals in the specified group (department) by id. Empty (filter for “no group” goals only
reports_to Integer Filters goals owned by users who report to the specified manager Direct, negate
visibility Boolean Filter goals by visibility. Accepts public or private None
permission Enum Filters goals that the current user can_edit or can_only_view None
following Boolean Filters goals that the current user is following. yes or no (no will filter out any followed goals) None
category Integer Filter goals by the specified category id Empty (uncategoriezed goals), Intersect
assessment Boolean Filter goals that have been assessed. Accepts yes or no None
risk String Filter by risk status. Must be ontrack needsattention or atrisk None
integration Enum Filters for goals using specific integrations. Currently accepts salesforce, jira, or tableau Empty (no integrations)
unit String Filters for goals with units in their milestones Empty (no units)
top_company_goal Boolean Filters for top company goals. yes or no (no will filter out any top company goals) None
goal_name Goal Filter by goal entities by matching names (I’m not exactly clear how you specify a goal entity for this one) None
date_range Date_range Filter for goals that are active during the specified date range. Negate
updated_since Date_range Filter for key results that have been updated since the date Negate
viewed_by_owner_date Date_range Filter goals owned by the current user that they viewed within the specified date range. None

Returns

Returns a results list of up to size goals that matched the given filter criteria and the boolean flag more if these results are not the end of the list.

Example Request:

GET /api/v1/goals/search/?q=needle&size=2

Example Response:

{
  "more": true,
  "nextUrl": "/api/v1/goals/search/?q=needle&page=2&size=2",
  "results": [
    {
      "categories": [],
      "children": [
        {
          "id": 154,
          "name": "needle 0"
        }
      ],
      "created": 1453420800.0,
      "created_by": {
        "id": 21,
        "name": "<First Name> <Last Name>"
      },
      "description": "",
      "end": "2016-02-21",
      "id": 153,
      "integration": null,
      "is_key_result": false,
      "last_checkedin": null,
      "measurement": {
        "condition": "green",
        "current": null,
        "done": false,
        "expected": 0.0,
        "initial": null,
        "is_binary": true,
        "is_numeric": false,
        "lower_limit": null,
        "lower_mid": null,
        "progress": 0.0,
        "target": null,
        "type": "avgofprogress",
        "unit": "",
        "updated": 1453420800.0,
        "updated_by": {
          "id": 21,
          "name": "<First Name> <Last Name>"
        },
        "upper_limit": null,
        "upper_mid": null
      },
      "name": "needle 0",
      "owner": {
        "group": null,
        "team": null,
        "user": {
          "id": 21,
          "name": "<First Name> <Last Name>"
        }
      },
      "parent": null,
      "start": "2016-01-21",
      "stats": {
        "cheers": 0,
        "comments": 0,
        "last_assessed": null,
        "nudges": 0,
        "views": 0
      },
      "updated": 1453420800.0,
      "updated_by": {
        "id": 21,
        "name": "<First Name> <Last Name>"
      },
      "visibility": "public"
    },
    {
      "categories": [],
      "children": [
        {
          "id": 156,
          "name": "needle 1"
        }
      ],
      "created": 1453420800.0,
      "created_by": {
        "id": 21,
        "name": "<First Name> <Last Name>"
      },
      "description": "",
      "end": "2016-02-21",
      "id": 155,
      "integration": null,
      "is_key_result": false,
      "last_checkedin": null,
      "measurement": {
        "condition": "green",
        "current": null,
        "done": false,
        "expected": 0.0,
        "initial": null,
        "is_binary": true,
        "is_numeric": false,
        "lower_limit": null,
        "lower_mid": null,
        "progress": 0.0,
        "target": null,
        "type": "avgofprogress",
        "unit": "",
        "updated": 1453420800.0,
        "updated_by": {
          "id": 21,
          "name": "<First Name> <Last Name>"
        },
        "upper_limit": null,
        "upper_mid": null
      },
      "name": "needle 1",
      "owner": {
        "group": null,
        "team": null,
        "user": {
          "id": 21,
          "name": "<First Name> <Last Name>"
        }
      },
      "parent": null,
      "start": "2016-01-21",
      "stats": {
        "cheers": 0,
        "comments": 0,
        "last_assessed": null,
        "nudges": 0,
        "views": 0
      },
      "updated": 1453420800.0,
      "updated_by": {
        "id": 21,
        "name": "<First Name> <Last Name>"
      },
      "visibility": "public"
    }
  ]
}

Returns all goal matching the search criteria. Matches on goal name.

HTTP Request

GET /api/v1/goals/search/

Query Parameters

Parameter Required Type Description
q required String Text string to be compared against goal name.
visibility Optional Enum Search for public or private goals.
goal_type Optional Enum Search for goals whose type is avgofprogress, sumofcurrent or sumofrange
not_due Optional Flag Search for goals that have not yet ended
current Optional Flag Search for goals that are currently active
current_stale Optional Flag Search for goals that are current or expired within 7 days.
future Optional Flag Search for goals that have yet to start

Returns

Returns a goal dictionary that contains an empty objects list if no users were found, or an objects list of up to size users and the boolean flag more if these results are not the end of the list.

Comments

Example Response:

{
  "more": false,
  "results": [
    {
      "author": {
        "id": 18,
        "name": "<First Name> <Last Name>"
      },
      "created": 1453420800.0,
      "edited": null,
      "goal": {
        "id": 131,
        "name": "<Goal Name>"
      },
      "goal_owner": {
        "group": null,
        "team": null,
        "user": {
          "id": 18,
          "name": "<First Name> <Last Name>"
        }
      },
      "id": 3,
      "is_key_result": false,
      "text": "Qux"
    },
    {
      "author": {
        "id": 18,
        "name": "<First Name> <Last Name>"
      },
      "created": 1453420800.0,
      "edited": null,
      "goal": {
        "id": 131,
        "name": "<Goal Name>"
      },
      "goal_owner": {
        "group": null,
        "team": null,
        "user": {
          "id": 18,
          "name": "<First Name> <Last Name>"
        }
      },
      "id": 2,
      "is_key_result": false,
      "text": "Bar"
    },
    {
      "author": {
        "id": 19,
        "name": "<First Name> <Last Name>"
      },
      "created": 1453420800.0,
      "edited": null,
      "goal": {
        "id": 131,
        "name": "<Goal Name>"
      },
      "goal_owner": {
        "group": null,
        "team": null,
        "user": {
          "id": 18,
          "name": "<First Name> <Last Name>"
        }
      },
      "id": 1,
      "is_key_result": false,
      "text": "Foo"
    }
  ]
}

Returns all comments associated with a specific goal

HTTP Request

GET /api/v1/goals/:id/comments

URL Parameters

Parameter Description
id Required The ID of the goal for which to retrieve comments

Query Parameters

Parameter Type Description
type Optional Enum Selecting private will limit query to only private comments. starred will return only starred comments
latest_time Optional Timestamp Limits comments to only those that occurred before the given time.
size Optional Integer Maximum number of results to return. (maximum and default value is 10)

Returns

Returns the list of comments for the specified goal, or a blank list if none are found. Returns a 404 Error if the goal is not found.

Assessments

Example Response:

[
  {
    "comment": "",
    "created": 1453420800.0,
    "created_by": {
      "id": 17,
      "name": "<First Name> <Last Name>"
    },
    "edited": null,
    "goal_id": 123,
    "id": 2,
    "score": 0.8
  },
  {
    "comment": "test",
    "created": 1453420800.0,
    "created_by": {
      "id": 17,
      "name": "<First Name> <Last Name>"
    },
    "edited": null,
    "goal_id": 123,
    "id": 1,
    "score": 0.5
  }
]

Returns all assessments and score associated with a specific goal or milestone id

HTTP Request

GET /api/v1/goals/:id/assessments/

URL Parameters

Parameter Required Description
id Required The ID of the goal for which to retrieve assessments

Returns

Returns the list of assessments for the specified goal, or a blank list if none are found. Returns a 404 Error if the goal is not found.

Check In

Example cURL:

curl -X POST --header "Authorization: APIToken 6aff4053185a4092998215aa8054f38e" -H
"Content-Type: application/json" --data '{"value":18.6, "target":30}'
https://app.betterworks.com/api/v1/goals/12834/checkin/

Example Response:

{
  "categories": [],
  "children": [],
  "created": 1453420800.0,
  "created_by": {
    "id": 3,
    "name": "<First Name> <Last Name>"
  },
  "description": "",
  "end": "2016-02-21",
  "id": 29,
  "integration": null,
  "is_key_result": true,
  "last_checkedin": 1453507200.0,
  "last_checkedin_by": {
    "id": 3,
    "name": "<First Name> <Last Name>"
  },
  "measurement": {
    "condition": "green",
    "current": 4.0,
    "done": false,
    "expected": 0.03,
    "initial": 0.0,
    "is_binary": false,
    "is_numeric": true,
    "lower_limit": null,
    "lower_mid": null,
    "progress": 0.4,
    "target": 10.0,
    "type": "numeric",
    "unit": "u",
    "updated": 1453507200.0,
    "updated_by": {
      "id": 3,
      "name": "<First Name> <Last Name>"
    },
    "upper_limit": null,
    "upper_mid": null
  },
  "name": "<Goal Name>",
  "owner": {
    "group": null,
    "team": null,
    "user": {
      "id": 3,
      "name": "<First Name> <Last Name>"
    }
  },
  "parent": {
    "id": 28,
    "name": "<Goal Name>"
  },
  "start": "2016-01-21",
  "stats": {
    "cheers": 0,
    "comments": 0,
    "last_assessed": null,
    "nudges": 0,
    "views": 0
  },
  "updated": 1453507200.0,
  "updated_by": {
    "id": 3,
    "name": "<First Name> <Last Name>"
  },
  "visibility": "public"
}

Conduct a Check In on a goal. Update the current or the target value of a milestone.

HTTP Request

POST /api/v1/goals/:id/checkin/

URL Parameters

Parameter Required Description
id Required The ID of the goal or milestone to update

POST Parameters

Parameter Required Type Description
done Required Boolean New completion state for the binary milestone
or
value Required Float New current progress on the metric milestone
target Optional Float New target value for the milestone (metric milestone only)

Returns

Returns the parent goal updated with the new information. Returns a 400 Error if no value or done is provided, or if any parameter is not the proper type with an error message describing the issue.

Users

Get User

Example Response:

{
  "about": "",
  "attributes": {},
  "department": {
    "id": 5,
    "name": "group2"
  },
  "email": "testuser_2@betterworks.com",
  "employee_id": "",
  "first_name": "<First Name>",
  "id": 6,
  "is_active": true,
  "is_admin": false,
  "is_goalmaster": false,
  "is_group_admin": false,
  "is_super_admin": false,
  "last_name": "<Last Name>",
  "manager": null,
  "name": "<First Name> <Last Name>",
  "phone": "",
  "preferred_name": "<First Name>",
  "title": ""
}

Returns details for a specific user using email, or user id

HTTP Request

GET /api/v1/users/:identifier/

URL Parameters

Parameter Required Type Description
identifier Required Integer or String ID or email address of the user to be fetched.

Returns

The retrieved user object or a 404 if the no user was found.

Example Response:

{
  "more": false,
  "nextUrl": null,
  "results": [
    {
      "about": "",
      "attributes": {},
      "department": null,
      "email": "testuser_1@betterworks.com",
      "employee_id": "",
      "first_name": "needle",
      "id": 24,
      "is_active": true,
      "is_admin": false,
      "is_goalmaster": false,
      "is_group_admin": false,
      "is_super_admin": false,
      "last_name": "user",
      "manager": null,
      "name": "needle user",
      "phone": "",
      "preferred_name": "needle",
      "title": ""
    }
  ]
}

Returns all users matching the search criteria. Matches on full name and username.

HTTP Request

GET /api/v1/users/search/

Query Parameters

Parameter Required Type Description
q Required String Text string to be compared against user’s First, Last, and Email name.
manager_id Optional Integer Only search for users who report to this manager (includes him or herself)
can_view_goal_id Optional Integer Append ‘can_view’ to each user in the response if that user has permission to view the specified goal.
deactivated Optional Boolean Only search for deactivated users.

Returns

Returns a users dictionary that contains an empty objects list if no users were found, or an objects list of up to size users and the boolean flag more if these results are not the end of the list.

Update Users

Example Request:

{
  "dry_run": true,
  "users": [
    {
      "email": "user1@betterworks.com",
      "first_name": "User",
      "last_name": "One",
      "employee_id": "u1_1234",
      "department_name": "Engineering",
      "title": "Software Engineer",
      "manager_id": "u0_0987",
      "location": "San Francisco",
      "preferred_name": "Bob",
      "matrix_manager": "user2@betterworks.com",
      "phone": "1234567890",
      "custom_01": "extra data"
    }
  ]
}

Example Response:

{
  "deactivated_count": 0,
  "reactivated_count": 0,
  "updated_count": 0,
  "dry_run": true,
  "errors": [
    {
      "error_details": [
        {"description": "betterworks.com is an invalid domain"}
      ],
      "index": 0,
      "processed": false
    }
  ]
}

Update and create multiple users.

HTTP Request

POST /api/v1/users/bulk/

Payload Parameters

Parameter Required Type Description
users Required List of User Users to be updated.
dry_run Optional Boolean Whether to perform a dry run. If dry run is true, no changes are made.

User

Parameter Required Type Description
email Required String Email - Domains are pre-approved by BetterWorks. Contact support@betterworks.com to add more domains.
first_name Required String First Name
last_name Required String Last Name
employee_id Optional String Employee ID - Strongly recommended. This field supports re-use of email address and prevents re-activation of old accounts.
department_name Optional String Department name
title Optional String User’s job title
manager_id Optional String Employee ID of user’s manager - Must match an existing employee_id.
manager_email Optional String Email of user’s manager - Strongly recommended. Must match an existing email.
is_active Optional Boolean Activated/deactivated status of user
phone Optional String Phone number
location Optional String Location
preferred_name Optional String Nickname
on_leave Optional Boolean Is user out of office - will only appear in admin panel for reporting purposes.
matrix_manager Optional String Email of a manager that may not be their direct report in BetterWorks - will only appear in admin panel for reporting purposes.
custom_01 Optional String
custom_02 Optional String
custom_03 Optional String
custom_04 Optional String
custom_05 Optional String

Returns

A count of user changes, list of errors.

Assign Roles

Example Request:

{
  "roles": [
    {
      "role": "admin",
      "user_id": 9
    },
    {
      "employee_id": "e1234",
      "role": "superadmin"
    },
    {
      "email": "testuser_4@betterworks.com",
      "role": "none"
    },
    {
      "role": "superadmin",
      "user_id": 12
    },
    {
      "departments": [
        5,
        6
      ],
      "role": "groupadmin",
      "user_id": 13
    }
  ]
}

Example Response:

{
  "results": [
    {
      "admin_since": null,
      "id": 5,
      "managed_departments": [],
      "name": "<First Name> <Last Name>",
      "role": "superadmin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 10,
      "managed_departments": [],
      "name": "<First Name> <Last Name>",
      "role": "superadmin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 12,
      "managed_departments": [],
      "name": "<First Name> <Last Name>",
      "role": "superadmin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 9,
      "managed_departments": [],
      "name": "<First Name> <Last Name>",
      "role": "admin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 13,
      "managed_departments": [
        {
          "id": 5,
          "name": "A"
        },
        {
          "id": 6,
          "name": "B"
        }
      ],
      "name": "<First Name> <Last Name>",
      "role": "groupadmin"
    }
  ]
}

Update roles. For details regarding how these roles function within BetterWorks, please read this article.

HTTP Request

PUT /api/v1/users/roles/

Payload Parameters

Parameter Required Type Description
roles Required List of RoleAssignment Roles to be assigned.

RoleAssignment

Parameter Required Type Description
[identifier] Required Unique identifier associated with the user (see below)
role Required String Role to assign to user.
departments Optional List of department ids This field is required when assigning groupadmin. List of departments over which an HR Admin has scope over. Note: When including a department, all children (and grand children, and on) of that department are implicitly included in the HR Admin’s scope.

Identifier

Each RoleAssignment must have one (and only) one identifier:

Parameter Type Description
user_id Integer BetterWorks user id
email String BetterWorks user email
employee_id String User’s employee ID

Role

Each RoleAssignment must specify a role:

Role Description
none This role has no special privileges.
groupadmin This role gives HR Admin access over a given set of department. Note: RoleAssignment must include departments.
admin This role grants Admin access to the organization.
superadmin This role grants Super Admin access to the organization.

Returns

The list of updated users and their new assignments.

List Users With Admin Roles

Example Response:

{
  "results": [
    {
      "admin_since": 1453420800.0,
      "id": 6,
      "managed_departments": [],
      "name": "A B",
      "role": "admin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 5,
      "managed_departments": [],
      "name": "B A",
      "role": "superadmin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 7,
      "managed_departments": [],
      "name": "B A",
      "role": "admin"
    },
    {
      "admin_since": 1453420800.0,
      "id": 8,
      "managed_departments": [
        {
          "id": 4,
          "name": "Test Group"
        }
      ],
      "name": "C D",
      "role": "groupadmin"
    }
  ]
}

Returns list of all users with Admin, Super Admin, or HR Admin privileges.

HTTP Request

GET /api/v1/users/roles/

Returns

The list of all users with Admin, Super Admin, or HR Admin privileges.

Departments

List Departments

Example Response:

{
  "more": true,
  "nextUrl": "/api/v1/departments/?page=2&size=2",
  "num_pages": 2,
  "page": 1,
  "results": [
    {
      "id": 42,
      "is_active": true,
      "name": "Department 1",
      "parent": null
    },
    {
      "id": 43,
      "is_active": true,
      "name": "Department 2",
      "parent": {
        "id": 42,
        "name": "Department 1"
      }
    }
  ]
}

Get paginated lists of departments

HTTP Request

GET /api/v1/departments/

URL Parameters

Parameter Required Type Description
page Optional Integer Page number of departments to return
size Optional Integer Number of departments per page, default 20, max 100
include_deactivated Optional Boolean Whether to include deactivated departments, default false

Returns

List of departments and pagination details

Create Department

Example Request:

{
  "name": "New Department",
  "parent_id": 27
}

Example Response:

{
  "id": 29,
  "is_active": true,
  "name": "New Department",
  "parent": {
    "id": 27,
    "name": "Parent Department"
  }
}

HTTP Request

POST /api/v1/departments/

Payload Parameters

Parameter Required Type Description
name Required String Name of department to create.
parent_id Optional Integer ID of parent department

Returns

The created department object

Update Department

Example Request:

{
  "name": "A Department",
  "parent_id": 1
}

Example Response:

{
  "id": 3,
  "is_active": true,
  "name": "A Department",
  "parent": {
    "id": 1,
    "name": "Parent Department"
  }
}

Updates the name and parent of a department

HTTP Request

PUT /api/v1/departments/:id/

Payload Parameters

Parameter Required Type Description
name Required String Name of department to update.
parent_id Optional Integer ID of parent department

Returns

The updated department object

Deactivate Department

Example Response:

{
  "id": 3,
  "is_active": false,
  "name": "Deactivated Department",
  "parent": null
}

Deactivates a department. Note departments must be empty to be deactivated.

HTTP Request

POST /api/v1/departments/:id/deactivate/

Returns

The deactivated department object

Reactivate Department

Example Response:

{
  "id": 3,
  "is_active": true,
  "name": "Reactivated Department",
  "parent": null
}

Reactivates a department.

HTTP Request

POST /api/v1/departments/:id/reactivate/

Returns

The reactivated department object

Update Departments

Example Request:

{
  "departments": [
    {
      "name": "Existing Department",
      "parent": "New Parent Department"
    },
    {
      "name": "New Department",
      "parent": "Existing Department"
    }
  ]
}

Example Response:

{
  "created": 1,
  "updated": 1
}

Create or update the parents of multiple departments.

HTTP Request

POST /api/v1/departments/bulk/

Payload Parameters

Parameter Required Type Description
departments Required List of Department Departments to be updated.

Department

Parameter Required Type Description
name Required String Name of department to create. Note: Case sensitive identifier used for lookup.
parent Optional String Name of parent department

Returns

A count of departments created and updated.