Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
loHttp.SetRequestHeader("Authorization","{{apiKey}}")
loResp = loHttp.QuickRequest("DELETE","https://api.easybill.de/rest/v1/customers/:customerId/contacts/:id")
if (loHttp.LastMethodSuccess = .F.) then
? loHttp.LastErrorText
release loHttp
return
endif
lnRespStatusCode = loResp.StatusCode
? "Response Status Code = " + str(lnRespStatusCode)
if (lnRespStatusCode <> 204) then
? "Response Header:"
? loResp.Header
? "Response Body:"
? loResp.BodyStr
? "Failed."
release loResp
release loHttp
return
endif
release loResp
? "Success."
release loHttp
Curl Command
curl -X DELETE
-H "Authorization: {{apiKey}}"
https://api.easybill.de/rest/v1/customers/:customerId/contacts/:id
Postman Collection Item JSON
{
"name": "Delete contact",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/customers/:customerId/contacts/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"customers",
":customerId",
"contacts",
":id"
],
"variable": [
{
"key": "customerId",
"value": "<long>",
"description": "(Required) ID of customer"
},
{
"key": "id",
"value": "<long>",
"description": "(Required) ID of contact"
}
]
}
},
"response": [
{
"name": "Successful operation",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/customers/:customerId/contacts/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"customers",
":customerId",
"contacts",
":id"
],
"variable": [
{
"key": "customerId"
},
{
"key": "id"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Not found",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/customers/:customerId/contacts/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"customers",
":customerId",
"contacts",
":id"
],
"variable": [
{
"key": "customerId"
},
{
"key": "id"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
},
{
"name": "Too Many Requests",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: apikey",
"key": "Authorization",
"value": "<API Key>"
}
],
"url": {
"raw": "{{baseUrl}}/customers/:customerId/contacts/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"customers",
":customerId",
"contacts",
":id"
],
"variable": [
{
"key": "customerId"
},
{
"key": "id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}