Retrieve departments endpoint: response type changed

Hi Deel team!

We noticed that today the endpoint responses to retrieve the list of departments are returning an array instead of { data: [...] }.

API documentation v2.1.79:

Here is recent response that we received and broke our integration:

[
  {
    "id": "3940...203f",
    "name": "Department",
    "isMultiselect": true,
    "isMandatory": false,
    "type": "DEPARTMENT",
    "externalId": null,
    "teamsCount": 0,
    "teams": [
      
    ],
    "enableRoles": true,
    "roles": [
      {
        "id": "501c...d134",
        "name": "Head of Department"
      }
    ],
    "createdAt": "2024-03-05T19:44:09.361Z"
  }
]

Is it possible to revert this breaking change?

Thank you!

@davidaraujo Apologies for the inconvenience
We have reverted this change. Please verify.
Thank you

1 Like