List Revenue Heads
//A code snippet of how to consume the API
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2RlbW8ubW9uaWNyZWRpdC5jb20vYXBpL3YxL2NvcmUvYXV0aC9sb2dpbiIsImlhdCI6MTY2ODk2NzQ0MywiZXhwIjoxNjY4OTcxMDQzLCJuYmYiOjE2Njg5Njc0NDMsImp0aSI6ImF0UE9GVHE4cU4yN2lBWlciLCJzdWIiOiJVU0FETUlOIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.shrbQUV29vXRF30qMeBN3zxlc5JXd03QyMeD6ekzudU");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"revname": "test",
"rev_status": "REVHEAD",
"revenue_code": "required",
"settlement_bank_id": "SB626be58724dcb",
"display": "yes"
});
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://demo.backend.monicredit.com/api/v1/payment/revenue_head", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
//A code snippet of how to consume the API
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://demo.backend.monicredit.com/api/v1/payment/revenue_head',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"revname" : "test",
"rev_status" : "REVHEAD",
"revenue_code" : "required",
"settlement_bank_id" : "SB626be58724dcb",
"display" : "yes"
}
',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2RlbW8ubW9uaWNyZWRpdC5jb20vYXBpL3YxL2NvcmUvYXV0aC9sb2dpbiIsImlhdCI6MTY2ODk2NzQ0MywiZXhwIjoxNjY4OTcxMDQzLCJuYmYiOjE2Njg5Njc0NDMsImp0aSI6ImF0UE9GVHE4cU4yN2lBWlciLCJzdWIiOiJVU0FETUlOIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.shrbQUV29vXRF30qMeBN3zxlc5JXd03QyMeD6ekzudU',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
GET
{{BaseURL}}/payment/revenue_head
Headers
{
"status": true,
"message": "revenue_head.all_revenue_heads",
"data": {
"current_page": 1,
"data": [
{
"id": "REV626be7d362525",
"name": "Nicolas-Treutel REV",
"type": "MAINACC",
"revenue_code": null,
"settlement_bank_id": "SB626be7d35d8ce",
"display": "yes",
"created_at": "2022-04-29T13:27:47.000000Z",
"updated_at": "2022-04-29T13:27:47.000000Z"
}
],
"first_page_url": "https://demo.monicredit2.test/api/v1/payment/revenue_head?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://demo.monicredit2.test/api/v1/payment/revenue_head?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://demo.monicredit2.test/api/v1/payment/revenue_head?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https://demo.monicredit2.test/api/v1/payment/revenue_head",
"per_page": 50,
"prev_page_url": null,
"to": 11,
"total": 11
}
}
Last updated