These APIs enable you to programmatically implement Syncplicity for Salesforce integration for folder creation. They can be invoked from an external script with a valid access token. These APIs can update and retrieve Salesforce records to Syncplicity folder mapping.
createObjectFolderForRecordId
| Parameters | Type | Description |
|---|---|---|
| recordId | String | Salesforce record id |
Returns
| Syncplicity Folder Id (String) | If folder already exists, record folder Id is returned. Or if created successfully in Syncplicity, the newly created folder Id is returned. |
| Error (String) | In case of exceptions. |
Sample curl request
curl --request POST \
--url https://instance_name.salesforce.com/services/apexrest/Syncplicity/syncp/createObjectFolderForRecordId \
--header 'authorization: Bearer ${token}' \
--header 'content-type: application/json' \
--data '{
"RecordId":${recordId}
}'
Success Response
{
"folderId": ${folderId},
"status": "ok"
}
Error Response
{
'status':${Error code}
'error-message': ${Error Message}
}
getFolderIdbyRecordID
| Path component | Type | Description |
|---|---|---|
| recordId | String | Salesforce record id |
Returns
| Syncplicity Folder Id (String) | If folder exists, record folder Id is returned. |
| error-message: SyncTable record for record id | ${recordId} not found if folder is not found. |
Sample curl request
curl --request GET \
--url https://instance_name.salesforce.com /services/apexrest/Syncplicity/syncp/getFolderIdByRecordId/${recordId} \
--header 'authorization: Bearer ${token}'
Response
{
"folderId": ${folderId},
"status": "ok"
}
Error Response
{
'status':${Error code}
'error-message': ${Error Message}
}