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/positions/: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/positions/:id
Postman Collection Item JSON
{
"name": "Delete position",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/positions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"positions",
":id"
],
"variable": [
{
"key": "id",
"value": "<long>",
"description": "(Required) ID of position"
}
]
}
},
"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}}/positions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"positions",
":id"
],
"variable": [
{
"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}}/positions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"positions",
":id"
],
"variable": [
{
"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}}/positions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"positions",
":id"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}