ㅤReading time – 8 minutes
ㅤFinmap
ㅤ
Adding payments via API ➕
ㅤ
You can add the following payments via the API:
- Еxpenses
- Іncomes
- Тransfers
ㅤ
ㅤ
To add a payment via the API, you need to:
ㅤ
1. Go to the API documentation https://api.finmap.online/
2. Log in using the API key
3. Select the type of payment you want to add, these types include:
- operations/income
- operations/expense
- operations/transfer
ㅤ
4. Click on the option POST
5. Provide the necessary data for payment
6. Click on execute request
ㅤ
ㅤ✅ As a result, a new payment will be added to the Finmap service
ㅤ
Parameters that can be contained in a transaction:
ㅤ
- “date” – Date of payment
- “amount” – Payment amount
- “comment” – Comment
- “amountInCompanyCurrency” – Amount in the company’s currency (this option is useful if you are making a transaction to an account whose currency is different from the company’s currency)
- “exchangeRate” – Foreign exchange rate
- “transactionSum – Amount of payment
- “transactionCurrency” – Payment currency
- “transactionCurrencyRate” – Foreign exchange rate
- “dateOfPayment” – Date of payment accrual
- “startDate” – Start of the payment accrual period
- “endDate” – End of the payment accrual period
- “accountToId” – account ID
- “categoryId” – сategory ID
- “counterpartyId” – counterparty ID
- “projectId”– рroject ID
- “tagIds” – tag ID (you can add multiple tag IDs at once)
- “externalId”: – transaction ID (you specify the id yourself, so that you can edit or delete the payment using this id)
ㅤㅤ
ㅤ
ㅤ❗ You do not need to use all the options to add a payment.
ㅤ❗❗ Important: Our service operates in the UTC 0 time zone, if you need to specify a different time zone, then the offset parameter will help.
Please note that the date parameter must be specified in UNIX (milliseconds) format.
Example: “date”: 1717158515050
ㅤ
ㅤ
ㅤ
Editing payments via API ⚙️
ㅤ
You can edit subsequent payments via the API:
- Еxpenses
- Іncomes
- Тransfers
ㅤ
To add a payment via the API, you need to:
ㅤㅤ
1. Go to the API documentation https://api.finmap.online/
2. Log in using the API key
3. Select the type of payment you want to add, these types include:
- operations/income
- operations/expense
- operations/transfer
ㅤ
4. Click on the option PATCH
5. Select which type of payment you will edit by operationID or externalID
ㅤ
6. Specify the required ID
7. Specify the changes you want to make
8. Click on execute request
ㅤ
✅ As a result, the data in the transaction will be changed. You can change not all parameters, but only those you need, for example, you can change only the date (most often, changing the date is used when you need to confirm a future payment)
ㅤ
ㅤ
Deleting payments via API 🗑️
ㅤ
To delete a payment via the API, you need to:
ㅤ
1. Go to the API documentation https://api.finmap.online/
2. Log in using the API key
3. Select the type of payment you want to add, these types include:
- operations/income
- operations/expense
- operations/transfer
ㅤ
4. Click on the option DELETE
5. Select which type of payment you will edit by operationID or externalID
ㅤ
6. Specify the necessary ID
7. Click on execute request
ㅤ
ㅤㅤ
How to get the operation id 👀
ㅤ
You can find the operation ID in the following way:
ㅤ
1. Using a Webhook
ㅤ
2. Using developer tools
ㅤ2.1 To do this, you need to open the developer tools in the browser
ㅤ2.2 Go to the Network tab
ㅤ
ㅤ
ㅤ2.3 Select log (this option contains data on all payments that you have on the Finmap page)
ㅤ2.4 Click on the Preview tab
ㅤ
ㅤ
ㅤ2.5 Open all payments in this tab
ㅤ
ㅤ
ㅤ2.6 Choose the right payment
ㅤ2.7 And find its id (usually located at the very end of the payment information)
ㅤ