Objective-C / easybill REST API / Delete SEPA payment
Back to Collection Items
#import <CkoHttp.h>
#import <CkoHttpResponse.h>
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
CkoHttp *http = [[CkoHttp alloc] init];
BOOL success;
[http SetRequestHeader: @"Authorization" value: @"{{apiKey}}"];
CkoHttpResponse *resp = [http QuickRequest: @"DELETE" url: @"https://api.easybill.de/rest/v1/sepa-payments/:id"];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
int respStatusCode = [resp.StatusCode intValue];
NSLog(@"%@%d",@"Response Status Code = ",respStatusCode);
if (respStatusCode != 204) {
NSLog(@"%@",@"Response Header:");
NSLog(@"%@",resp.Header);
NSLog(@"%@",@"Response Body:");
NSLog(@"%@",resp.BodyStr);
NSLog(@"%@",@"Failed.");
return;
}
NSLog(@"%@",@"Success.");
Curl Command
curl -X DELETE
-H "Authorization: {{apiKey}}"
https://api.easybill.de/rest/v1/sepa-payments/:id
Postman Collection Item JSON
{
"name": "Delete SEPA payment",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/sepa-payments/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"sepa-payments",
":id"
],
"variable": [
{
"key": "id",
"value": "<long>",
"description": "(Required) ID of SPEA payment"
}
]
}
},
"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}}/sepa-payments/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"sepa-payments",
":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}}/sepa-payments/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"sepa-payments",
":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}}/sepa-payments/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"sepa-payments",
":id"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Too Many Requests",
"code": 429,
"_postman_previewlanguage": "text",
"header": [
],
"cookie": [
],
"body": ""
}
]
}