Back to Collection Items
#import <CkoHttp.h>
#import <CkoJsonObject.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;
CkoJsonObject *queryParams = [[CkoJsonObject alloc] init];
[queryParams UpdateString: @"current_approval_group[name]" value: @"Tes Approver UserGroup Name"];
[queryParams UpdateString: @"filter" value: @"default_invoices_filter"];
// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = @"<access_token>";
CkoHttpResponse *resp = [http QuickRequestParams: @"GET" url: @"https://domain.com/invoices" json: queryParams];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
NSLog(@"%d",[resp.StatusCode intValue]);
NSLog(@"%@",resp.BodyStr);
Curl Command
curl -G -d "current_approval_group[name]=Tes%20Approver%20UserGroup%20Name"
-d "filter=default_invoices_filter"
-H "Authorization: Bearer <access_token>"
https://domain.com/invoices
Postman Collection Item JSON
{
"name": "Retrieve all invoices - Current Approver is UserGroup",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{URL}}/invoices?current_approval_group[name]=Tes Approver UserGroup Name&filter=default_invoices_filter",
"host": [
"{{URL}}"
],
"path": [
"invoices"
],
"query": [
{
"key": "current_approval_group[name]",
"value": "Tes Approver UserGroup Name"
},
{
"key": "filter",
"value": "default_invoices_filter"
}
]
}
},
"response": [
]
}