WEB API formats

Hi,

Hope everyone is well. I have come across some webapi requirements where my client wants to 

To use to upload/crate a batch, invoice, and retrieve error message or document number. This process should preferably be possible to automate and preferably a 1:1 batch to invoice relation is used. The error message is in this case business logic errors such as closed period, and the response document/voucher number should be the unique identifier for the invoice once posted. The process is meant to be for APinvoices

The process could for example be:

  1. Create batch
  2. Add invoice to batch
  3. Process batch
  4. Retrieve response from batch processing
    1. Error message
    2. Document number

Another part if the invoice format and the schema for the invoices mostly struggling with the TAX details as there are no examples for the same. Also the current customer we have is not setup for the web screen does API necessary means that the web screen should be working first ?

Is there a try out environment where it can be setup, can anyone please provide instructions for this.

Regards,

Amit K

  • 0

    HI Amit,

    To answer your questions in reverse as that make more sense.

    The Web API requires web screen functionality to be installed.

    The Web API does not require users make use of Web screens, they can use the Desktop screens.

    The Tax details will depend on the configuration of the tax setup. The best way to see their tax setup is to look at existing AP Invoice batches. In the Swagger interface you can GET existing information and have it return details based on existing transactions.

    The process you describe is completed as a single call.

    Your API will need to request a new batch, provide details of Invoice headers including an Invoice Number (I have found you also need to provide a DueDate, which the user interface does not normally require.) and invoice details for all invoices in the Invoice batch.

    The Web API will respond with confirmation or errors.

    With web API 2020 and older you cannot edit the contents of a batch using the API. Version 2021 and newer, implement PATCH, which allows you to edit details with the API.

    The Invoice Number is to be provided by the vendor (via your API) and must be unique to the Vendor. The API will return the Batch Number and Entry number, which is A unique reference to the document, Your API will be able to GET the invoice details in Sage using the Batch/Entry number, but otherwise this reference is internal to Sage.

    This sounds like you need a business process to sort this Invoice number detail.