Skip to main content
All CollectionsSettingsIntegration
How to Use Gaviti's Public API
How to Use Gaviti's Public API

The Gaviti Public API provides developers with powerful tools to manage and interact with data programmatically.

Updated over a month ago

Getting Started

To start using the Gaviti API, you need to authorize your requests.
Authorization is essential to ensure secure communication and access to the API.

Here's how:

Request the required API details: Contact to the Gaviti support team to obtain your
a. The unique API key
b. Company ID
c. Proper public API url depend on your location:
- US: https://us.api.gaviti.com/v2/docs
- Europe: https://api.gaviti.com/v2/docs

API key is required to authenticate your requests.
Then go to public API url and click on "Authorize" button and fill the provided API key, then click Authorize.

Key Features

  1. Pagination
    The API supports pagination, allowing you to handle large datasets efficiently. Use query parameters like page and perPage to control the number of results returned and navigate through pages.

  2. Filtering
    The API provides various filters to help you retrieve the exact data you need. These filters allow you to narrow down the list of invoices based on specific criteria, such as status, or customer details.

  3. Invoice Management
    Fetch a comprehensive list of invoices or create custom workflows by integrating the API into your application.


Example Request

Here’s a basic example of how to fetch a filtered list of invoices:

{ 
"companyId": "[YOUR_GAVITI_COMPANY_ID]",
"page": 1,
"perPage": 25,
"search": {
"ids": [
"[YOUR_INVOICE_ID1]",
"[YOUR_INVOICE_ID2]"
],
}
}


Example Response

The response will include a paginated list of invoices matching your filters:

{
"success": true,
"errorMsg": null,
"data": [
{ ... },
{
"id": "YOUR_INVOICE_ID2",
"addedDate": 1734011127608,
"balance": 548683,
"closeDate": null,
"createdAt": 1734011127608,
"currency": "USD",
"customFields": {},
"customerId": "672756672",
"displayId": "672756672",
"dueDate": 1684331127608,
"fileAttached": false,
"localBalance": 548683,
"localTotalAmount": 548683,
"modifiedAt": 1734011127608,
"paymentStatus": "reconciled",
"populated": true,
"totalAmount": 548683,
"workflowEnabled": false,
"dueDateOriginal": 1678842963979,
"lastNote": {
"manual": {
"template": {
"body": "The workflow for this invoice is now ENABLED."
},
"invoiceId": "YOUR_INVOICE_ID2",
"customerId": "672756672",
"userId": "666afe52-4a2a-4839-8bd1-8ba3639647a2",
"timestamp": 1734490806306
}
},
"lastNoteDate": 1732071604945,
"daysDifference": -581,
"statusLabel": "overdueBucket91-null",
"paymentTerms": "other",
"customer": {
"id": "672756672",
"addedDate": 1734011127608,
"contactLevels": [],
"contactName": "",
"createdAt": 1734011127608,
"customFields": {},
"displayId": "672756672",
"displayName": "LSI",
"modifiedAt": 1734509777499,
"phone": "",
"populated": true,
"stats": {},
"userCustomerRelations": {},
"workflowEnabled": false,
"workflowId": "",
"lastNote": {
"manual": {
"template": {
"body": "The workflow for this invoice is now ENABLED."
},
"invoiceId": "672756672",
"customerId": "672756672",
"userId": "123afe52-4a2a-4839-8bd1-8ba3639647a2",
"timestamp": 1734490806306
}
},
"lastNoteDate": 1732071604945,
"risk": 4.735334594072978
},
"risk": 4
}
]
}


Tips for Success

  • Experiment Safely:
    Use the API test environment to try out features without impacting production data.

  • Read the Documentation:
    Visit Gaviti Online API documentation for detailed information on endpoints, parameters, and usage examples.

  • Contact Support:
    If you encounter any issues or need additional assistance, Gaviti's support team is ready to help.

By leveraging the Gaviti Public API, you can streamline invoice management and build custom solutions tailored to your needs!

Did this answer your question?