Use Cases > Submission API

Submission API allows us to submit invoices in UBF or ESF format. The API has the following services:

  • Submit invoice

  • Update invoice status to ready (received state)

  • Associate attachments to invoice

Submit invoice

Invoices are submitted via this API, there are multiple types of UBF and ESF formats which can be submitted via this API

Any of the above invoice can be submitted to the API via HTTP request which would contain the xml content of the invoice.

Upon submission the invoice will be validated against invoice schema and check if it is in the right format. Any validation errors found will be returned in the response with a failure message.

Once an invoice is submitted successfully to the API, the response provides us with a generated Submission id and Invoice ID. This submission id can further be used to associate uploaded attachments.

Attachment scenario:

For any invoice, the xml body content has an attribute ‘has_attachments’ for ESF and ‘attachments’ attribute for UBF which determines if the invoice being submitted will have an attachment associated for it after submission. The attribute is set as below in the invoice.

ESF

UBF

In case the attribute is set to false, the invoice will be submitted in received state in EBH and will be sent forward for processing.

In case the attribute is set to true, the invoice will be submitted in new state and will wait for an attachment to be associated. Once the attachment is associated, we will have to use the Submission API service again to update the state to received (Further explained in point III).

Associate attachments to invoice

This service is used to associate a successfully uploaded attachment (uploaded via attachment API) to a submitted invoice. Once we have Uploaded an attachment via attachment API, the response provides us with an Attachment id.

We pick the invoice submission id and the attachment id and use this service to associate the invoice and the attachment.

Green: Submission id

Yellow: Invoice id

 Body of the request will have the attachment id:

This way the attachment will be associated with the highlighted invoice id.

Once this is done successfully, we would then proceed to point III to update the invoice to ready state.

Update invoice status to ready

This service is used in a scenario when an invoice has been submitted with attachment attribute as true and all required attachments has been associated to the invoice. We then use this API service to move the invoice state to ready so that it can be sent for further processing.

The id highlighted in green is the submission id we received after submitting the invoice, and the id highlighted in yellow is the invoice id received after submission.

The response we receive is a 200-ok message.

Note: This step is not required for invoices which were submitted with attachments as false as they directly go into EBH system with ready state.

Also, an invoice cannot be moved to ready state without any attachment associated if it was submitted with attachment attribute as true initially.