CryptoExchange API :: Shipping a transaction
Shipping a transaction
Once a transaction has been funded, Cryptoexchange.com will instruct the seller to ship the goods. Shipment can be both physical delivery and non physical delivery.
Physical delivery refers to items that are shipped via courier and can be tracked via a tracking number. Non physical delivery is for electronic items such as domain names. While these don't require a tracking number, we do accept other ways of determining that the buyer has received the goods. For example, with domain names we track the changes to the WHOIS information.
Marking all items as shipped
Marking a transaction and all of its items as shipped is a simple patch request to the transaction endpoint with the action attribute set to ship. There is also an optional field tracking_information within the shipping_information field that allows you to enter free-form tracking information.
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_sent",
"carrier": "UPS",
"tracking_id": "1Z999AA10123456784"
}'
$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 => '
{
"action": "product_sent",
"carrier": "UPS",
"tracking_id": "1Z999AA10123456784"
}
'
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);
Marking domain name items as shipped
The ship endpoint is also used to mark a domain name as transferred.
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_sent"
}'
$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_USERPWD => 'email-address:your-password',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization:Bearer your-api-key',
'Content-Type: application/json
),
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_POSTFIELDS => '
{
"action": "product_sent"
}
'
));
$output = curl_exec($curl);
echo $output;
curl_close($curl);