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.BasicAuth = YES;
http.Login = @"{{secretId}}";
http.Password = @"{{secretPassword}}";
CkoHttpResponse *resp = [http QuickRequest: @"DELETE" url: @"https://domain.com/api/transactions/: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
-u '{{secretId}}:{{secretPassword}}'
https://domain.com/api/transactions/:id/
Postman Collection Item JSON
{
"name": "Destroy",
"request": {
"method": "DELETE",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/transactions/:id/",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"transactions",
":id",
""
],
"variable": [
{
"key": "id",
"value": "consequa",
"description": "(Required) The `transaction.id` that you want to delete."
}
]
},
"description": "Delete a specific transaction from your Belvo account."
},
"response": [
{
"name": "No content",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
}
],
"url": {
"raw": "{{baseUrl}}/api/transactions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"transactions",
":id"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "No Content",
"code": 204,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Unauthorized",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
}
],
"url": {
"raw": "{{baseUrl}}/api/transactions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"transactions",
":id"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "[\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t},\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t}\n]"
},
{
"name": "Too Many Sessions",
"originalRequest": {
"method": "DELETE",
"header": [
{
"description": "Added as a part of security scheme: basic",
"key": "Authorization",
"value": "Basic <credentials>"
}
],
"url": {
"raw": "{{baseUrl}}/api/transactions/:id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"transactions",
":id"
],
"variable": [
{
"key": "id"
}
]
}
},
"status": "Not Found",
"code": 404,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "[\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t},\n\t{\n\t\t\"code\": \"<string>\",\n\t\t\"message\": \"<string>\",\n\t\t\"request_id\": \"<string>\"\n\t}\n]"
}
]
}