Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loResp
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loHttp = CreateObject('Chilkat.Http')
* Adds the "Authorization: Bearer <access_token>" header.
loHttp.AuthToken = "<access_token>"
loHttp.SetRequestHeader("Content-Type","application/json")
loResp = CreateObject('Chilkat.HttpResponse')
lnSuccess = loHttp.HttpNoBody("DELETE","https://domain.com/services/data/v{{version}}/sobjects/:SOBJECT_API_NAME/:RECORD_ID",loResp)
IF (lnSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loResp
CANCEL
ENDIF
? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loHttp
RELEASE loResp
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
-H "Content-Type: application/json"
https://domain.com/services/data/v{{version}}/sobjects/:SOBJECT_API_NAME/:RECORD_ID
Postman Collection Item JSON
{
"name": "SObject Rows Delete",
"request": {
"method": "DELETE",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"url": {
"raw": "{{_endpoint}}/services/data/v{{version}}/sobjects/:SOBJECT_API_NAME/:RECORD_ID",
"host": [
"{{_endpoint}}"
],
"path": [
"services",
"data",
"v{{version}}",
"sobjects",
":SOBJECT_API_NAME",
":RECORD_ID"
],
"variable": [
{
"key": "SOBJECT_API_NAME",
"value": ""
},
{
"key": "RECORD_ID",
"value": ""
}
]
},
"description": "Accesses records based on the specified object ID. Retrieves, updates, or deletes records. This resource can also be used to retrieve field values. Use the GET method to retrieve records or fields, the DELETE method to delete records, and the PATCH method to update records."
},
"response": [
]
}