This article describes general delete-operation rules, including deleting nested objects and removing specific values.

How to delete data

Deleting data from RecMan is done through the POST method.

The operation must be set to: delete

All delete operations across the different scopes will work the same, but for the simplicity of explaining how the delete operation works, we are using the scope, for instance: candidate

Remove fields

If you want to remove values of fields like, for instance, email or fields connected to nested objects, you will have to use the update operation.

The only exception is when you want to delete a value within an object, for instance removing a specific department within the departmentIds field on a candidate.

Delete candidate example

To delete a candidate and all of its data, you only need to provide a candidateId

Deleting candidates is done with a JSON object. Below is a small example of how the JSON object is structured.

JSON

{
    "key": "YOUR_KEY",
    "scope": "candidate",
    "operation": "delete",
    "data": {
        "candidateId": 1209594
    }}

Delete nested objects

To delete segments like an education, experience or a skill, you must provide both the ID of the candidate with the nested object and the ID of the nested object you want to remove.

Below is an example of how to delete a single education record for a specific candidate.

JSON

{
    "key": "YOUR_KEY",
    "scope": "candidate",
    "operation": "delete",
    "data": {
        "candidateId": 1209594,
        "education": {
            "id": 18491823
        }
    }}

Delete a specific value within an object field

If you need to remove a given value within an object field, for instance, removing a connected department on a candidate, you will need to provide the ID of the target and the field with the value you want to remove. This is similar to the update/insert statement, except it uses the delete operation.

Below you will see two examples. First, an example of how to delete two connected departments on a specific candidate. The second shows how to remove a driver's license type from a candidate.

JSON

{
    "key": "YOUR_KEY",
    "scope": "candidate",
    "operation": "delete",
    "data": {
        "candidateId": 1209594,
        "departmentIds": [231, 231]
    }}

JSON

{
    "key": "YOUR_KEY",
    "scope": "candidate",
    "operation": "delete",
    "data": {
        "candidateId": 144467,
        "driversLicense": ['TRUCK']
    }}
Was this article helpful?
0 out of 0 found this helpful