Invoices Management
General summary
The Invoice Relay Service allows ERP to manage invoices for purchases originated inside or outside BEES platform. The zone can create and delete an invoice by sending requests to invoices relay service. These requests are asynchronous, they will be placed upon a queue for a post processing consumption.
An invoice POST request can contain one or more invoices and each of them must have at least the required fields shown in the API documentation. Note that although the orderId field is not mandatory, it is important to send it correctly since it will be used to establish a link with the erpOrderNumber field of an order. Besides that, the invoice account Id must be valid to the system, so this invoice will be available for the customer in the app.
Requirements
To place an invoice the ERP should send a request containing one or more invoices to the service. Besides respect the contracts and required fields it's important to highlight the follow information.
The orderId field is not mandatory, but it is important to send it correctly since it will be used to establish a link with the erpOrderNumber field of an order.
The invoice accountId must be valid to the system, so this invoice will be available for the customer in the app.
To be able to create an invoice first we need to guarantee that the follow steps are completed:
The Order is not checked as mandatory because the service can handle Invoices of Orders created from other sources. In this case, the services won't have the related Order of it. The account is mandatory to create a relationship between these two entities.