Add an Expense

POST https://us-central1-appgregator.cloudfunctions.net/jurnalID/expenses/

Query Parameters

Name
Type
Description

name*

String

ft-4

connection_name*

String

intrapreneur-jurnalid-1

Headers

Name
Type
Description

x-api-key*

String

U2Fsd...

{
    "expense": {
        "id": 532327614,
        "transaction_no": "INV016",
        "token": "Dyg4NQo0V1KvjfpI2ERyjw",
        "email": null,
        "source": "appstore_codebayu22@gmail.com",
        "address": null,
        "memo": "makan siang teko",
        "remaining": "200000.0",
        "original_amount": "200000.0",
        "created_at": "2022-08-10T06:07:49.080Z",
        "updated_at": "2022-08-10T06:07:49.080Z",
        "witholding_value": "0.0",
        "witholding_type": "percent",
        "custom_id": "INV016",
        "tax_amount": "0.0",
        "deleted_at": null,
        "deletable": true,
        "editable": true,
        "audited_by": null,
        "is_payable": true,
        "transaction_date": "08/08/2022",
        "due_date": "23/08/2022",
        "balance_due_currency_format": "Rp.  200.000,00",
        "witholding_amount_currency_format": "Rp.  0,00",
        "witholding_amount": 0,
        "remaining_currency_format": "Rp.  200.000,00",
        "subtotal": 200000,
        "subtotal_currency_format": "Rp.  200.000,00",
        "transaction_type": {
            "id": 4,
            "name": "Expense"
        },
        "amount_receive": "0.0",
        "amount_receive_currency_format": "Rp.  0,00",
        "has_payments": false,
        "payments": [],
        "transaction_status": {
            "id": 10,
            "name": "Draft",
            "name_bahasa": "Draf"
        },
        "payment_method": {
            "id": 2456765,
            "name": "Bank Transfer"
        },
        "term": {
            "id": 2246564,
            "name": "Net 15",
            "longetivity": 15
        },
        "transaction_account_lines_attributes": [
            {
                "id": 524957460,
                "description": "tes",
                "debit": "200000.0",
                "debit_currency_format": "Rp.  200.000,00",
                "account": {
                    "id": 61810380,
                    "name": "Salaries",
                    "number": "6-60101",
                    "category": {
                        "id": 16,
                        "name": "Expenses"
                    }
                },
                "line_tax": {
                    "id": null,
                    "name": null,
                    "rate": null,
                    "children": []
                }
            }
        ],
        "account_category": "Salaries",
        "person": {
            "id": 47164113,
            "display_name": "BUDI"
        },
        "witholding_account": {
            "id": null,
            "name": null,
            "number": null,
            "category": {
                "id": null,
                "name": null
            }
        },
        "pay_from": {
            "id": null,
            "name": null,
            "number": null,
            "category": {
                "id": null,
                "name": null
            },
            "bank_account": {
                "bank_id": null,
                "bank_holder": null,
                "bank_number": null
            }
        },
        "attachments": [],
        "tags": null,
        "tags_string": "",
        "comments_size": 0,
        "is_reconciled": false,
        "tax_details": [],
        "use_tax_inclusive": false,
        "currency_code": "IDR"
    }
}
Body JSON
{
  "expense": {
    "refund_from_name": "Cash",
    "person_name": "BUDI",
    "transaction_date": "08-08-2022",
    "payment_method_name": "Bank Transfer",
    "payment_method_id": 2456765,
    "transaction_no": "INV016",
    "memo": "makan siang teko",
    "custom_id": "INV016",
    "expense_payable": true,
    "term_name": "Net 15",
    "transaction_account_lines_attributes": [
      {
        "account_name": "Salaries",
        "description": "tes",
        "debit": 200000
      }
    ],
    "witholding_account_name": "Cash",
    "witholding_value": 0,
    "witholding_type": "percent"
  }
}
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/expenses?name=ft-4&connection_name=intrapreneur-jurnalid-1' \
--header 'x-api-key: U2Fsd...' \
--header 'Content-Type: application/json' \
--data-raw '{
  "expense": {
    "refund_from_name": "Cash",
    "person_name": "BUDI",
    "transaction_date": "08-08-2022",
    "payment_method_name": "Bank Transfer",
    "payment_method_id": 2456765,
    "transaction_no": "INV016",
    "memo": "makan siang teko",
    "custom_id": "INV016",
    "expense_payable": true,
    "term_name": "Net 15",
    "transaction_account_lines_attributes": [
      {
        "account_name": "Salaries",
        "description": "tes",
        "debit": 200000
      }
    ],
    "witholding_account_name": "Cash",
    "witholding_value": 0,
    "witholding_type": "percent"
  }
}'

Last updated