API Basics#

Target audience#

Our API is targeted towards developers, software engineers, and businesses seeking to automate their invoicing processes.

Key features and functionality#

Our API includes:

  • Invoice sending: send invoice (legal format and PDF).

  • Invoice lifecycle management: track invoice lifecycle status.

  • Customers/receivers management: know who are the costumers/receivers available, and/or, who are their networks that interoperate with Saphety Invoice Network.

  • Compliance and standards: Ensure adherence to regulatory standards.

Advantages and benefits#

By using our API, developers can:

  • Reduce manual errors by automating the invoice generation and sending process.

  • Expedite payment cycles by sending invoices promptly and tracking invoice lifecycle status.

  • Improve customer experience by offering electronic invoicing options tailored to their needs.

  • Ensure compliance with regulatory requirements and standardized invoicing practices.

Supported platforms and integration#

The API supports integration across various platforms and programming languages.

Developers can seamlessly integrate our API by making HTTP requests to our RESTful endpoints, allowing for easy integration into web applications, accounting software, and enterprise systems.

What is a REST API?#

In today’s interconnected digital landscape, web services play a pivotal role in enabling communication between different applications. REST, which stands for Representational State Transfer, is an architectural style that provides standards and guidelines for creating web services. A RESTful API (Application Programming Interface) adheres to these principles, allowing applications to communicate over the internet by using standard HTTP methods.

Key principles of REST#

Statelessness
One of the fundamental principles of REST is statelessness. Each request from a client to a server must contain all the information necessary to understand and fulfill the request. The server doesn’t store any client state between requests, enhancing scalability and reliability.

Resource-based architecture
REST revolves around resources, which are entities that can be accessed and manipulated. These resources are identified by unique URIs (Uniform Resource Identifiers), and the interactions with these resources are performed using standard HTTP methods like GET, POST, PUT, DELETE, and others.

Uniform interface
A uniform interface simplifies the architecture and decouples the client and server components. It includes four constraints: identification of resources, manipulation of resources through representations, self-descriptive messages, and hypermedia as the engine of application state (HATEOAS), which allows the server to guide clients through available actions.

Advantages of REST APIs#

Scalability
The stateless nature of REST APIs allows them to be highly scalable. Servers can handle a large number of client requests as they do not need to maintain session information between requests.

Flexibility and simplicity
REST APIs use standard HTTP methods, making them easy to understand and use. They also support various data formats, such as JSON (JavaScript Object Notation) and XML (Extensible Markup Language), providing flexibility in data representation.

Platform independence and compatibility
As long as the client and server understand the HTTP protocol, REST APIs can be implemented in any programming language and can run on any platform. This interoperability promotes compatibility and ease of integration.

Common use cases#

REST APIs are widely used in various industries and applications:

  • Web applications: Many modern web applications use REST APIs to communicate with servers for data exchange.

  • Mobile applications: Mobile apps often rely on RESTful services to retrieve data from servers.IoT (Internet of Things): RESTful APIs facilitate communication between IoT devices and servers, enabling seamless data transfer.

  • Integration between systems: REST APIs are crucial for integrating different systems and services, allowing them to work together efficiently.