/integrate//:sync_key_field_name/:sync_key_field_value PATCH
Overview
Upserts based on sync_key_field_name. If a record can be found with sync_key_field_name, then update. If the record does not exist, then create it.
Note: This endpoint cannot be used to set the sync_key_field_name for an existing Sugar record. To do so, it is recommended to use the set sync key endpoint to update the matching Sugar record ID. Once the sync_key is set for the record, then it is possible to leverage this endpoint.
Important: This endpoint is restricted to Admin users only. Non-admin users will receive an authorization error.
Request Arguments
Name | Type | Description | Required |
---|---|---|---|
module | String | The module the record belongs to | True |
sync_key_field_name | String | The name of the field that contains sync_key_field_value (the default field is named sync_key but can be renamed via code customization) |
True |
sync_key_field_value | String | A unique ID for the record identifying it in an external system | True |
Request
/integrate/<module>/:sync_key_field_name/:sync_key_field_value
Response Arguments
Name | Type | Description |
---|---|---|
record | String | The ID of the record that was upserted. |
Response
- Status 201: For a created record
- Status 200: For an updated record
{
record: "a0328573-a252-a27c-3530-4e4297d4c9e1"
}
Change Log
Version | Change |
---|---|
v11_10 | Added /integrate/<module>/:sync_key_field_name/:sync_key_field_value PATCH endpoint. |