Collect attachment

Retrieve attachments in transactions

Get Attachment

POST https://api.btm-services.work/v2/transaction/get-attachment?transaction_id=TRANSACTION_ID

This endpoint allows you to get attachments from Transaction.

Query Parameters

Name
Type
Description

transaction_id

integer

ID of the transaction to get

{
	"success": true,
	"message": "Attachment collected",
	"attachment": [
		{
			"file_name": "file_name",
			"file_path": "file_path"
		},
		...
	]
}
<?php

$curl = curl_init();
$transaction_id = id;

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.btm-services.work/v2/transaction/get-attachment?transaction_id='.$transaction_id,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_HTTPHEADER => array(
    'private_key: YOUR_PRIVATE_KEY',
    'Token: YOUR_TOKEN',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Last updated