e-invoicing

Track document status

TrustWeaver provides operations to check invoice status and manage the lifecycle of storage sections.

In TrustWeaver, a document status is determined by the state of the storage section that holds the document and by the metadata returned when you retrieve or search for it.

A storage section represents a single transacting party (invoicing party or user organization) within a storage area. The section lifecycle controls which storage operations are available.

Storage section states

A storage section can be in one of the following states:

Registered
The section exists but hasn't been enabled for storage. Invoices can't be stored on behalf of this party. GetInvoice and SearchInvoices are not available.
Enabled
The section is active. All operations are available: StoreInvoice, UpdateInvoice, GetInvoice, SearchInvoices, and Corroborate.
LockedForArchiving
The section is locked. StoreInvoice and UpdateInvoice are not available. GetInvoice, SearchInvoices, and Corroborate remain available. Use this state for bulk retrieval before offboarding.
ClosedForArchiving

The section is closed. StoreInvoice, UpdateInvoice, GetInvoice, and SearchInvoices are not available. Corroborate and branch key operations remain available. This state begins the grace period before permanent deletion.

Important: Section state transitions are not reversible. A closed section can't be reopened. Contact Sovos Support if you need guidance on section lifecycle planning.

Invoice metadata and status information

When you retrieve or search for an invoice, the response includes metadata you can use to determine its status. Key fields include:

Reference
A unique identifier for the stored invoice. Use this reference to retrieve the full invoice document with the GetInvoice operation.
InvoiceInfo
Invoice metadata such as invoice number, invoice date, and purchase order numbers.
StoragePeriodEndDate
The date when the stored invoice expires based on current configuration. This value might change over time due to configuration updates.
StoredTime
The date and time the document was stored, in UTC.
Note: The SearchInvoices operation returns metadata only. It doesn't include the actual document or attachment data. To retrieve the full invoice, pass the reference to GetInvoice.

Check invoice status through the API

Before checking invoice status:

  • Your application must be authenticated with a valid X.509v3 client certificate.

  • The storage section for the invoicing party must be enabled.

  • You must have the invoice reference or enough search criteria (invoice number, date, or party information) to locate the invoice.

Use SearchInvoices to locate invoices and retrieve their references and metadata. Then use GetInvoice to retrieve the full invoice document and all attached files.

  1. Send a SearchInvoices request to the storage service with your search criteria as explained in Search invoices through the API.

    The request must include a MaxHits value. All other criteria elements are optional.

    Note: If an invoice was stored on behalf of both the supplier and the buyer, it results in two stored invoices: one with the supplier as the principal party and one with the buyer. Each has a separate reference.
  2. Review the search response to get the invoice reference and metadata.

    The response contains a list of matching invoices. For each result, the following information is included:

    Reference
    The unique reference for the stored invoice.
    Document
    Document metadata (not the actual document data).
    InvoiceInfo
    Invoice metadata such as invoice number and date.
    SupplierInfo and BuyerInfo
    Party information. The StoreFor element is set to true for the party that owns the stored invoice (principal party).
    Attachments
    Metadata for all attached documents (not the actual attachment data).

    If the MaxHitsExceeded element is true, there are more results than those returned. Use the Offset parameter to paginate through the results.

  3. Optional: Send a GetInvoice request with the reference from the search result to retrieve the full invoice document and attachments as explained in Retrieve an invoice through the API.

    The response includes the full invoice document (including the electronic signature), invoice metadata, party information, all attached documents, and custom properties.

You have retrieved the invoice status and metadata. If the section is locked or closed, some operations might not be available. See Lock and close a section for details on how the section state affects the available operations.