phpExt / APPIA API / APPROVE ESCROW
Back to Collection Items
<?php
include("chilkat.php");
// Use "chilkat_9_5_0.php" for versions of Chilkat < 10.0.0
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$http = new CkHttp();
// Use this online tool to generate code from sample JSON: Generate Code to Create JSON
// The following JSON is sent in the request body.
// {}
$json = new CkJsonObject();
// Adds the "Authorization: Bearer <access_token>" header.
$http->put_AuthToken('<access_token>');
$sbRequestBody = new CkStringBuilder();
$json->EmitSb($sbRequestBody);
// resp is a CkHttpResponse
$resp = $http->PTextSb('GET','https://domain.com/escrow/approve/kFYHM0Qi',$sbRequestBody,'utf-8','application/json',false,false);
if ($http->get_LastMethodSuccess() == false) {
print $http->lastErrorText() . "\n";
exit;
}
print $resp->get_StatusCode() . "\n";
print $resp->bodyStr() . "\n";
?>
Curl Command
curl -X GET
-H "Authorization: Bearer <access_token>"
-d '{
}'
https://domain.com/escrow/approve/kFYHM0Qi
Postman Collection Item JSON
{
"name": "APPROVE ESCROW",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{auth}}",
"type": "string"
}
]
},
"method": "GET",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{url}}/escrow/approve/kFYHM0Qi",
"host": [
"{{url}}"
],
"path": [
"escrow",
"approve",
"kFYHM0Qi"
]
},
"description": "Only a Sender can approve escrow transaction."
},
"response": [
]
}