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

Expenses

All API Operations related with Expenses

PreviousCustomers & SuppliersNextIncome

Last updated 9 months ago

READ Scope

WRITE Scope

UPDATE Scope

  • READ Scope
  • POSTList all expenses
  • GETGet an Expense by ID
  • WRITE Scope
  • POSTCreate a new Expense
  • UPDATE Scope
  • PUTUpdate expense

Get an Expense by ID

get

Retrieves an expense by its unique UID

Authorizations
Path parameters
idstringRequired
Responses
200
OK
application/json
get
GET /v1/expense/{id} HTTP/1.1
Host: api.nuvio.io
Authorization: YOUR_API_KEY
Accept: */*
200

OK

{
  "success": true,
  "errors": [
    "text"
  ],
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "referenceNumber": "text",
    "paymentStatus": "text",
    "description": "text",
    "dueDate": "text",
    "expenseDate": "text",
    "currency": "text",
    "exchangeRate": 1,
    "project": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "projectCode": "text"
    },
    "supplier": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "entityCode": "text"
    },
    "tags": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      }
    ],
    "subTotal": 1,
    "totalTax": 1,
    "totalAmount": 1,
    "remainingAmount": 1,
    "items": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "itemDetail": "text",
        "productCode": "text",
        "productId": "123e4567-e89b-12d3-a456-426614174000",
        "productName": "text",
        "quantity": 1,
        "unitPrice": "text",
        "totalTaxes": 1,
        "totalAmount": 1,
        "itemTaxes": [
          {
            "taxId": "123e4567-e89b-12d3-a456-426614174000",
            "taxName": "text",
            "taxAmount": 1
          }
        ]
      }
    ],
    "matchedPayments": [
      {
        "bankAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "bankAccountName": "text",
        "transactionId": "123e4567-e89b-12d3-a456-426614174000",
        "amount": 1,
        "currency": "text",
        "description": "text",
        "transactionDate": "text"
      }
    ]
  }
}

List all expenses

post

Retrieves all the expenses that match with provided filters

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

{
  "startDate": "text",
  "endDate": "text",
  "supplierId": "123e4567-e89b-12d3-a456-426614174000",
  "supplierCode": "text",
  "tagName": "text",
  "projectName": "text",
  "projectCode": "text",
  "paymentStatus": "text"
}
200

OK

{
  "success": true,
  "errors": [
    "text"
  ],
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "referenceNumber": "text",
      "paymentStatus": "text",
      "description": "text",
      "dueDate": "text",
      "expenseDate": "text",
      "currency": "text",
      "exchangeRate": 1,
      "project": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "projectCode": "text"
      },
      "supplier": {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text",
        "entityCode": "text"
      },
      "tags": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "name": "text"
        }
      ],
      "subTotal": 1,
      "totalTax": 1,
      "totalAmount": 1,
      "remainingAmount": 1,
      "items": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "itemDetail": "text",
          "productCode": "text",
          "productId": "123e4567-e89b-12d3-a456-426614174000",
          "productName": "text",
          "quantity": 1,
          "unitPrice": "text",
          "totalTaxes": 1,
          "totalAmount": 1,
          "itemTaxes": [
            {
              "taxId": "123e4567-e89b-12d3-a456-426614174000",
              "taxName": "text",
              "taxAmount": 1
            }
          ]
        }
      ],
      "matchedPayments": [
        {
          "bankAccountId": "123e4567-e89b-12d3-a456-426614174000",
          "bankAccountName": "text",
          "transactionId": "123e4567-e89b-12d3-a456-426614174000",
          "amount": 1,
          "currency": "text",
          "description": "text",
          "transactionDate": "text"
        }
      ]
    }
  ]
}

Create a new Expense

post

Creates a new expense from scratch

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

{
  "referenceNumber": "text",
  "description": "text",
  "expenseDate": "text",
  "dueDate": "text",
  "currency": "text",
  "projectId": "123e4567-e89b-12d3-a456-426614174000",
  "projectCode": "text",
  "supplierId": "123e4567-e89b-12d3-a456-426614174000",
  "supplierCode": "text",
  "tags": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "items": [
    {
      "itemDetail": "text",
      "productId": "123e4567-e89b-12d3-a456-426614174000",
      "productCode": "text",
      "quantity": 1,
      "itemTaxes": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "unitPrice": 1
    }
  ],
  "exchangeRate": 1
}
200

OK

{
  "success": true,
  "errors": [
    "text"
  ],
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "referenceNumber": "text",
    "paymentStatus": "text",
    "description": "text",
    "dueDate": "text",
    "expenseDate": "text",
    "currency": "text",
    "exchangeRate": 1,
    "project": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "projectCode": "text"
    },
    "supplier": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "entityCode": "text"
    },
    "tags": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      }
    ],
    "subTotal": 1,
    "totalTax": 1,
    "totalAmount": 1,
    "remainingAmount": 1,
    "items": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "itemDetail": "text",
        "productCode": "text",
        "productId": "123e4567-e89b-12d3-a456-426614174000",
        "productName": "text",
        "quantity": 1,
        "unitPrice": 1,
        "totalTaxes": 1,
        "totalAmount": 1,
        "itemTaxes": [
          {
            "taxId": "123e4567-e89b-12d3-a456-426614174000",
            "taxName": "text",
            "taxAmount": 1
          }
        ]
      }
    ],
    "matchedPayments": [
      {
        "bankAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "bankAccountName": "text",
        "transactionId": "123e4567-e89b-12d3-a456-426614174000",
        "amount": 1,
        "currency": "text",
        "description": "text",
        "transactionDate": "text"
      }
    ]
  }
}

Update expense

put

Updates an existing expense

Authorizations
Path parameters
idstring ยท uuidRequired
Body
all ofOptional
Responses
200
OK
application/json
put
PUT /v1/expense/{id} HTTP/1.1
Host: api.nuvio.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 498

{
  "referenceNumber": "text",
  "description": "text",
  "expenseDate": "text",
  "dueDate": "text",
  "currency": "text",
  "projectId": "123e4567-e89b-12d3-a456-426614174000",
  "projectCode": "text",
  "supplierId": "123e4567-e89b-12d3-a456-426614174000",
  "supplierCode": "text",
  "tags": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "items": [
    {
      "itemDetail": "text",
      "productId": "123e4567-e89b-12d3-a456-426614174000",
      "productCode": "text",
      "quantity": 1,
      "itemTaxes": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "unitPrice": 1
    }
  ],
  "exchangeRate": 1
}
200

OK

{
  "success": true,
  "errors": [
    "text"
  ],
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "referenceNumber": "text",
    "paymentStatus": "text",
    "description": "text",
    "dueDate": "text",
    "expenseDate": "text",
    "currency": "text",
    "exchangeRate": 1,
    "project": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "projectCode": "text"
    },
    "supplier": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "entityCode": "text"
    },
    "tags": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "name": "text"
      }
    ],
    "subTotal": 1,
    "totalTax": 1,
    "totalAmount": 1,
    "remainingAmount": 1,
    "items": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "itemDetail": "text",
        "productCode": "text",
        "productId": "123e4567-e89b-12d3-a456-426614174000",
        "productName": "text",
        "quantity": 1,
        "unitPrice": 1,
        "totalTaxes": 1,
        "totalAmount": 1,
        "itemTaxes": [
          {
            "taxId": "123e4567-e89b-12d3-a456-426614174000",
            "taxName": "text",
            "taxAmount": 1
          }
        ]
      }
    ],
    "matchedPayments": [
      {
        "bankAccountId": "123e4567-e89b-12d3-a456-426614174000",
        "bankAccountName": "text",
        "transactionId": "123e4567-e89b-12d3-a456-426614174000",
        "amount": 1,
        "currency": "text",
        "description": "text",
        "transactionDate": "text"
      }
    ]
  }
}