Returns a paginated list of customer deposits sorted by id in descending order.
List All Deposits
Header
|
Authorization String |
Set value to Bearer SECRET_KEY |
|
customer_id integer |
Specify an ID for the customer whose sales you want to retrieve |
|
start_date datetime |
A timestamp from which to start listing sales. see date & time formats section |
|
end_date datetime |
A timestamp from which to stop listing sales. see date & time formats section |
|
limit integer |
Specify how many records you want to retrieve per page. If not specified we use a default value of 50. |
curl -L 'https://api.vendloop.com/deposits/' \ -H 'Authorization: Bearer SECRET_KEY'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.vendloop.com/deposits',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer SECRET_KEY");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.vendloop.com/deposits", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.vendloop.com/deposits")
.addHeader("Authorization", "Bearer SECRET_KEY")
.build()
val response = client.newCall(request).execute()Sample Response
{
"status":true,
"message":"Customer deposits found",
"data":[
{
"id":"4",
"date":"2021-08-25 12:54:00",
"amount":"100.0000",
"paid_by":"cash",
"note":"",
"created_by":"2",
"updated_at":null,
"updated_by":null
}
],
"metadata":{
"limit":50,
"start":1,
"total":1
}
}{
"status": false,
"message": "Customer deposits not found"
}Fetch a Single Deposit
Returns details of a customer deposit with the given ID.
Header
|
Authorization String |
Set value to Bearer SECRET_KEY |
|
id required integer |
Auto-generated unique ID |
|
customer_id integer |
Specify an ID for the customer whose sales you want to retrieve |
|
start_date datetime |
A timestamp from which to start listing sales. see date & time formats section |
|
end_date datetime |
A timestamp from which to stop listing sales. see date & time formats section |
|
limit integer |
Specify how many records you want to retrieve per page. If not specified we use a default value of 50. |
curl -L 'https://api.vendloop.com/deposits/{id}' \
-H 'Authorization: Bearer SECRET_KEY'<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.vendloop.com/deposits/{id}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer SECRET_KEY");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.vendloop.com/deposits/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.vendloop.com/deposits/{id}")
.addHeader("Authorization", "Bearer SECRET_KEY")
.build()
val response = client.newCall(request).execute()Sample Response
{
"status":true,
"message":"Customer deposit found",
"data":{
"id":"4",
"date":"2021-08-25 12:54:00",
"amount":"100.0000",
"paid_by":"cash",
"note":"",
"created_by":"2",
"updated_at":null,
"updated_by":null
}
}{
"status": false,
"message": "Customer deposit not found"
}Delete a Single Deposit
Delete deposit with the given ID.
Header
|
Authorization String |
Set value to Bearer SECRET_KEY |
|
id required integer |
The ID of the deposit to be deleted. |
curl -L 'http://api.vendloop.com/deposits/delete' \
-H 'Authorization: Bearer SECRET_KEY' \
-F 'id="{id}"'<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.vendloop.com/deposits/delete',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('id' => '{id}'),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer SECRET_KEY");
var formdata = new FormData();
formdata.append("id", "{id}");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://api.vendloop.com/deposits/delete", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));val client = OkHttpClient()
val mediaType = "text/plain".toMediaType()
val body = MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("id","{id}")
.build()
val request = Request.Builder()
.url("https://api.vendloop.com/deposits/delete")
.post(body)
.addHeader("Authorization", "Bearer SECRET_KEY")
.build()
val response = client.newCall(request).execute()Sample Response
{
"status": true,
"message": "Customer deposit deleted"
}{
"status": false,
"message": "Customer deposit not found"
}