mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
82 lines
6.4 KiB
YAML
82 lines
6.4 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: 'Invoice Ninja API Reference.'
|
|
description: |
|
|
---
|
|
![Invoice Ninja](https://invoicing.co/images/new_logo.png)
|
|
## Introduction
|
|
Welcome to the Invoice Ninja API documentation, your comprehensive guide to integrating Invoice Ninja's powerful features into your applications. Whether you're building a custom client, automating workflows, or integrating with other systems, our API provides the tools you need to streamline your invoicing and billing processes.
|
|
### What is Invoice Ninja?
|
|
Invoice Ninja is a robust source-available platform designed to simplify invoicing, billing, and payment management for freelancers, small businesses, and enterprises alike. With a user-friendly interface, customizable templates, and a suite of powerful features, Invoice Ninja empowers businesses to create professional invoices, track expenses, manage clients, and get paid faster.
|
|
### Why use the Invoice Ninja API?
|
|
The Invoice Ninja API allows developers to extend the functionality of Invoice Ninja by programmatically accessing and manipulating data within their Invoice Ninja accounts. With the API, you can automate repetitive tasks, integrate with third-party services, and build custom solutions tailored to your specific business needs.
|
|
### Getting Started
|
|
To get started with the Invoice Ninja API, you'll need an active Invoice Ninja account (or your own self hosted installation) and API credentials. If you haven't already done so, sign up for an account at Invoice Ninja and generate your API keys from the settings section.
|
|
|
|
Once you have your API credentials, you can start exploring the API endpoints, authentication methods, request and response formats, and more using the documentation provided here.
|
|
### Explore the Documentation
|
|
This documentation is organized into sections to help you navigate and understand the various aspects of the Invoice Ninja API:
|
|
|
|
- Authentication: Learn how to authenticate your requests to the API using API tokens.
|
|
- Endpoints: Explore the available API endpoints for managing invoices, clients, payments, expenses, and more.
|
|
- Request and Response Formats: Understand the structure of API requests and responses, including parameters, headers, and payloads.
|
|
- Error Handling: Learn about error codes, status messages, and best practices for handling errors gracefully.
|
|
- Code Examples: Find code examples and tutorials to help you get started with integrating the Invoice Ninja API into your applications.
|
|
### Need Help?
|
|
|
|
If you have any questions, encounter any issues, or need assistance with using the Invoice Ninja API, don't hesitate to reach out to our support team or join our community forums. We're here to help you succeed with Invoice Ninja and make the most of our API.
|
|
|
|
Let's start building together!
|
|
### Endpoints
|
|
|
|
<div style="background-color: #2D394E; color: #fff padding: 20px; border-radius: 5px; border: 4px solid #212A3B; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);">
|
|
<p style="padding:10px; color: #DBDBDB;"">Production: https://invoicing.co</p>
|
|
<p style="padding:10px; color: #DBDBDB;">Demo: https://demo.invoiceninja.com</p>
|
|
</div>
|
|
|
|
### Client Libraries
|
|
|
|
PHP SDK can be found [here](https://github.com/invoiceninja/sdk-php)
|
|
### Authentication:
|
|
|
|
Invoice Ninja uses API tokens to authenticate requests. You can view and manage your API keys in Settings > Account Management > Integrations > API tokens
|
|
|
|
API requests must be made over HTTPS. Calls made to HTTP will fail.
|
|
### Errors:
|
|
|
|
Invoice Ninja uses standard HTTP response codes to indicate the success or failure of a request. below is a table of standard status codes and responses
|
|
|
|
| Status Code | Explanation |
|
|
|-------------|-----------------------------------------------------------------------------|
|
|
| 200 | OK: The request has succeeded. The information returned with the response is dependent on the method used in the request. |
|
|
| 301 | Moved Permanently: This and all future requests should be directed to the given URI. |
|
|
| 303 | See Other: The response to the request can be found under another URI using the GET method. |
|
|
| 400 | Bad Request: The server cannot or will not process the request due to an apparent client error. |
|
|
| 401 | Unauthorized: Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. |
|
|
| 403 | Forbidden: The request was valid, but the server is refusing action. |
|
|
| 404 | Not Found: The requested resource could not be found but may be available in the future. |
|
|
| 405 | Method Not Allowed: A request method is not supported for the requested resource. |
|
|
| 409 | Conflict: Indicates that the request could not be processed because of conflict in the request. |
|
|
| 422 | Unprocessable Entity: The request was well-formed but was unable to be followed due to semantic errors. |
|
|
| 429 | Too Many Requests: The user has sent too many requests in a given amount of time ("rate limiting"). |
|
|
| 500 | Internal Server Error: A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. |
|
|
### Pagination
|
|
|
|
When using index routes to retrieve lists of data, by default we limit the number of records returned to 20. You can using standard pagination to paginate results, ie: ?per_page=50
|
|
termsOfService: 'https://invoiceninja.github.io/docs/legal/terms_of_service/#page-content'
|
|
contact:
|
|
email: contact@invoiceninja.com
|
|
name: Invoice Ninja Support
|
|
url: 'https://www.invoiceninja.com'
|
|
license:
|
|
name: 'Elastic License'
|
|
url: 'https://www.elastic.co/licensing/elastic-license'
|
|
version: 5.10.31
|
|
servers:
|
|
- url: 'https://demo.invoiceninja.com'
|
|
description: |
|
|
## Demo API endpoint
|
|
You can use the demo API key `TOKEN` to test the endpoints from within this API spec
|
|
- url: 'https://invoicing.co'
|
|
description: |
|
|
## Production API endpoint |