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: @"status" value: @"issued"];
[queryParams UpdateString: @"exported" value: @"false"];
[queryParams UpdateString: @"filter" value: @"default_purchase_orders_filter"];
// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = @"<access_token>";
CkoHttpResponse *resp = [http QuickRequestParams: @"GET" url: @"https://domain.com/purchase_orders" json: queryParams];
if (http.LastMethodSuccess == NO) {
NSLog(@"%@",http.LastErrorText);
return;
}
NSLog(@"%d",[resp.StatusCode intValue]);
NSLog(@"%@",resp.BodyStr);
Curl Command
curl -G -d "status=issued"
-d "exported=false"
-d "filter=default_purchase_orders_filter"
-H "Authorization: Bearer <access_token>"
https://domain.com/purchase_orders
Postman Collection Item JSON
{
"name": "Get Purchase orders - issued and not exported",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{URL}}/purchase_orders?status=issued&exported=false&filter=default_purchase_orders_filter",
"host": [
"{{URL}}"
],
"path": [
"purchase_orders"
],
"query": [
{
"key": "status",
"value": "issued"
},
{
"key": "exported",
"value": "false"
},
{
"key": "filter",
"value": "default_purchase_orders_filter"
}
]
}
},
"response": [
]
}