API Reference
GuidesAPI ReferenceSign In
  • Introduction
  • Authentication
  • Scopes
  • Errors
  • Endpoints
    • Accounts & Transactions
    • Customers & Suppliers
    • Expenses
    • Income
    • Payments
    • Products & Services
    • Projects
    • Tags
    • Taxes
  • Common Models
    • Countries
    • Currencies
Powered by GitBook
On this page
  1. Endpoints

Payments

All API Operations related with payments of income and expenses

PreviousIncomeNextProducts & Services

Last updated 9 months ago

WRITE Scope

  • WRITE Scope
  • POSTRecord a new payment
  • POSTMatch payment with an existing Transaction

Record a new payment

post

Adds a new payment into for an income or expense. This endpoint also creates a new transaction in the provided account automatically. It works only for manually tracked accounts. If you would like to match an existing transaction with and income or expense please use 'Match Payment' endpoint.

Authorizations
Body
all ofOptional
Responses
200
OK
application/json
post
POST /v1/add-payment HTTP/1.1
Host: api.nuvio.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 236

{
  "invoiceId": "123e4567-e89b-12d3-a456-426614174000",
  "expenseId": "123e4567-e89b-12d3-a456-426614174000",
  "accountId": "123e4567-e89b-12d3-a456-426614174000",
  "description": "text",
  "transactionTimestamp": 1,
  "transactionDate": "text",
  "amount": 1
}
200

OK

{
  "success": true,
  "errors": [
    "text"
  ],
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "accountId": "123e4567-e89b-12d3-a456-426614174000",
    "accountName": "text",
    "description": "text",
    "transactionTimestamp": 1,
    "transactionDate": "text",
    "amount": 1,
    "currency": "text",
    "transactionType": "text",
    "matchedEntity": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "code": "text"
    },
    "matchedIncomes": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "invoiceId": "123e4567-e89b-12d3-a456-426614174000",
        "matchedAmount": 1
      }
    ],
    "matchedExpenses": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "expenseId": "123e4567-e89b-12d3-a456-426614174000",
        "matchedAmount": 1
      }
    ]
  }
}

Match payment with an existing Transaction

post

Matches an existing transaction as the payment for an income or expense.

Authorizations
Path parameters
transactionIdstring ยท uuidRequired
Body
all ofOptional
Responses
200
OK
application/json
post
POST /v1/match-payment/{transactionId} HTTP/1.1
Host: api.nuvio.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "incomeId": "123e4567-e89b-12d3-a456-426614174000",
  "expenseId": "123e4567-e89b-12d3-a456-426614174000",
  "amount": 1
}
200

OK

{
  "success": true,
  "errors": [
    "text"
  ],
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "accountId": "123e4567-e89b-12d3-a456-426614174000",
    "accountName": "text",
    "description": "text",
    "transactionTimestamp": 1,
    "transactionDate": "text",
    "amount": 1,
    "currency": "text",
    "transactionType": "text",
    "matchedEntity": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "code": "text"
    },
    "matchedIncomes": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "invoiceId": "123e4567-e89b-12d3-a456-426614174000",
        "matchedAmount": 1
      }
    ],
    "matchedExpenses": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "expenseId": "123e4567-e89b-12d3-a456-426614174000",
        "matchedAmount": 1
      }
    ]
  }
}