Back to Collection Items
func chilkatTest() {
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = CkoHttp()!
var success: Bool
let queryParams = CkoJsonObject()!
queryParams.update("fields", value: "[\"id\",\"code\",\"description\",\"active\"]")
// Adds the "Authorization: Bearer <access_token>" header.
http.authToken = "<access_token>"
var resp: CkoHttpResponse? = http.quickRequestParams("GET", url: "https://domain.com/payment_terms/:id", json: queryParams)
if http.lastMethodSuccess == false {
print("\(http.lastErrorText!)")
return
}
print("\(resp!.statusCode.intValue)")
print("\(resp!.bodyStr!)")
resp = nil
}
Curl Command
curl -G -d "fields=%5B%22id%22,%22code%22,%22description%22,%22active%22%5D"
-H "Authorization: Bearer <access_token>"
https://domain.com/payment_terms/:id
Postman Collection Item JSON
{
"name": "Get Payment Terms by ID",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{URL}}/payment_terms/:id?fields=[\"id\",\"code\",\"description\",\"active\"]",
"host": [
"{{URL}}"
],
"path": [
"payment_terms",
":id"
],
"query": [
{
"key": "fields",
"value": "[\"id\",\"code\",\"description\",\"active\"]"
}
],
"variable": [
{
"key": "id",
"value": "1"
}
]
}
},
"response": [
]
}