Pay Bill from Bank Withdrawal
GET
https://us-central1-appgregator.cloudfunctions.net/jurnalID/bank_withdrawals/
Query Parameters
Name
Type
Description
name*
String
ft-4
connection_name*
String
intrapreneur-jurnalid-1
Headers
Name
Type
Description
x-api-key*
String
U2Fsd...
{
"bank_withdrawal": {
"id": 532713139,
"transaction_no": "10010",
"token": "AkSwR5ND2lE5VT2X0LQhgg",
"memo": "reimburse",
"custom_id": null,
"source": "appstore_codebayu22@gmail.com",
"tax_amount": "0.0",
"remaining": "200000.0",
"witholding_type": null,
"created_at": "2022-08-10T18:08:14.490Z",
"updated_at": "2022-08-10T18:08:14.490Z",
"deleted_at": null,
"remaining_currency_format": "Rp. 200.000,00",
"deletable": true,
"editable": true,
"audited_by": null,
"transaction_date": "08/08/2022",
"transaction_status": {
"id": 2,
"name": "Closed",
"name_bahasa": "Selesai"
},
"person": {
"id": 47164113,
"name": "BUDI",
"is_customer": false,
"is_vendor": true
},
"refund_from": {
"id": 61810308,
"name": "Cash",
"number": "1-10001",
"category": {
"id": 3,
"name": "Cash & Bank"
}
},
"original_amount": 200000,
"original_amount_currency_format": "Rp. 200.000,00",
"transaction_account_lines": [
{
"id": 525221366,
"description": "ini bayar dari bank",
"debit": 200000,
"credit": 0,
"credit_currency_format": "Rp. 0,00",
"debit_currency_format": "Rp. 200.000,00",
"line_tax": {
"id": null,
"name": null,
"rate": null,
"children": []
},
"account": {
"id": 61810365,
"name": "Trade Payable",
"number": "2-20100",
"category": {
"id": 8,
"name": "Accounts Payable (A/P)"
}
},
"expense": {
"id": 532713009,
"transaction_no": "INV017",
"original_amount": 200000,
"remaining": 0,
"original_amount_currency_format": "Rp.200.000,00",
"remaining_currency_format": "Rp.0,00"
}
}
],
"attachments": [],
"tax_details": [],
"use_tax_inclusive": false,
"tags": null,
"tags_string": "",
"locked": false,
"is_reconciled": false,
"subtotal": 200000,
"subtotal_currency_format": "Rp. 200.000,00",
"witholding_value": 0,
"witholding_amount": 0,
"witholding_amount_currency_format": "Rp. 0,00",
"witholding_account": {
"id": null,
"name": null,
"number": null,
"category": {
"id": null,
"name": null
}
},
"currency_code": "IDR"
}
}
Body JSON
{
"bank_withdrawal": {
"refund_from_name": "Cash",
"person_name": "BUDI",
"transaction_date": "08/08/2022",
"memo": "reimburse",
"pay_bill": true,
"transaction_account_lines_attributes": [
{
"expense_no": "INV017",
"description": "ini bayar dari bank",
"debit": 200000
}
]
}
}
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/bank_withdrawals?name=ft-4&connection_name=intrapreneur-jurnalid-1' \
--header 'x-api-key: U2Fsd...' \
--header 'Content-Type: application/json' \
--data-raw '{
"bank_withdrawal": {
"refund_from_name": "Cash",
"person_name": "BUDI",
"transaction_date": "08/08/2022",
"memo": "reimburse",
"pay_bill": true,
"transaction_account_lines_attributes": [
{
"expense_no": "INV017",
"description": "ini bayar dari bank",
"debit": 200000
}
]
}
}'
var axios = require('axios');
var data = JSON.stringify({
"bank_withdrawal": {
"refund_from_name": "Cash",
"person_name": "BUDI",
"transaction_date": "08/08/2022",
"memo": "reimburse",
"pay_bill": true,
"transaction_account_lines_attributes": [
{
"expense_no": "INV017",
"description": "ini bayar dari bank",
"debit": 200000
}
]
}
});
var config = {
method: 'post',
url: 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/bank_withdrawals?name=ft-4&connection_name=intrapreneur-jurnalid-1',
headers: {
'x-api-key': 'U2Fsd...',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/bank_withdrawals?name=ft-4&connection_name=intrapreneur-jurnalid-1',
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_POSTFIELDS =>'{
"bank_withdrawal": {
"refund_from_name": "Cash",
"person_name": "BUDI",
"transaction_date": "08/08/2022",
"memo": "reimburse",
"pay_bill": true,
"transaction_account_lines_attributes": [
{
"expense_no": "INV017",
"description": "ini bayar dari bank",
"debit": 200000
}
]
}
}',
CURLOPT_HTTPHEADER => array(
'x-api-key: U2Fsd...',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Last updated