Let the platform do the work

//:lhs_sync_key_field_value/link_by_sync_keys/:link_name/:rhs_sync_key_field_value DELETE

Overview

Removes a relationship based on sync_key. If both the LHS and RHS records can be found with the respective fields, and those records are related, then remove the relationship of the RHS record to the LHS record.

Request Arguments

Name Type Description Required
module String The module the record belongs to True
lhs_sync_key_field_value String A unique ID for the LHS record identifying it in an external system True
link_name String A name for the link True
rhs_sync_key_field_value String A unique ID for the RHS record identifying it in an external system True

Request

  /<module>/:lhs_sync_key_field_value/link_by_sync_keys/:link_name/:rhs_sync_key_field_value

Response Arguments

Name Type Description
record String The ID of the record.
related_record String The ID of the related record.

Response

Status 200

  {
    "record": "a0328573-a252-a27c-3530-4e4297d4c9e1",
    "related_record": "a0328573-bc54-a554-3530-4e4297d4c9e1"
}

Status 422

  {
    "error": "invalid_parameter",
    "error_message": "Could not find record with :xhs_sync_key_field_value in module: <module>"
}

Change Log

Version Change
v11_10 Added /<module>/:lhs_sync_key_field_value/link_by_sync_keys/:link_name/:rhs_sync_key_field_value DELETE endpoint.