API Dashboard
Escrow API
Escrow Pay
CryptoExchange API :: Receiving items in a transaction
Receiving items in a transaction
Once you have received the goods, you mark the applicable items as received. This will start the inspection period. If you do not accept or reject the items before the end of the inspection period, Cryptoexchange.com will automatically assume that you accept them.
Marking all items as received
Marking all of the items in a transaction as received is as simple as making a patch request to https://cryptoexchange.com/api/v1/escrow/partner/transaction/id and setting the action field to product_received.
If the API call is successful, it will return the updated transaction object.
curl "https://cryptoexchange.com/api/v1/escrow/partner/transactions/22d68b6a-10c8-41af-a4a7-38709be5da86" \
-X PATCH \
-H "Authorization:Bearer your-api-key" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '
{
"action": "product_received"
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://cryptoexchange.com/api/v1/escrow/partner/transactions/22d68b6a-10c8-41af-a4a7-38709be5da86',
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json'
),
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => json_encode(
array(
'action' => 'product_received',
)
)
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);