e-invoicing

Offboard archived documents

Permanently remove all archived documents from a storage section by locking the section, downloading its contents, closing it, and authorizing deletion.

Before offboarding a section:

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

  • The section must be in the Enabled state. You can't lock or close a section that hasn't been enabled.

Offboarding is the process of permanently removing all documents from a storage section, after first downloading them if needed. The process must be completed in order. To check a section's current state before starting, call GetSectionInfo. See Query storage sections.

Important:

An offboarding agreement must be signed before the offboarding process begins. You must explicitly confirm in writing that you are responsible for archiving your own original e-invoices. Contact Sovos Support to request the offboarding agreement template.

  1. Lock the section to stop storage operations.

    Call LockSection to put the section in the LockedForArchiving state. A locked section doesn't accept store or update operations, but still allows document retrieval and search.

    Locking the section before listing its documents prevents race conditions that could cause the listing to miss recently stored documents.

    For the full request and response reference, see Lock and close a section. If you need to revert a section from LockedForArchiving back to Enabled, your service owner must contact Sovos Support with the request.

  2. Confirm the section is in the LockedForArchiving state.

    Call GetSectionInfo and verify that SectionState returns LockedForArchiving. See Query storage sections.

  3. Optional: Download all documents in the section.

    Retrieve all documents and attachments using one of the two available operations:

    Automatic download
    Use the OffloadSection.ashx endpoint to retrieve all documents in a single streaming response.
    Self-service download
    Use ListInvoiceReferences and GetInvoice to retrieve documents in paginated batches.

    For full instructions on both operations, see Download all section documents. To reconcile the downloaded set, use the API endpoints that list and retrieve documents to compare downloaded references against the stored set.

  4. Migrate the downloaded documents to your new archive.

    Once you have downloaded all documents and attachments, you can migrate them to the replacement archive. This step is outside the scope of Sovos's responsibilities.

  5. Call CloseSection to put the section in the ClosedForArchiving state.

    Closing the section hides all documents, starting a grace period before permanent deletion. During this grace period, you can test your business processes to confirm that documents in storage are no longer needed.

    In the ClosedForArchiving state, only the Corroborate operation and branch key operations remain available. The store, update, get, and search operations are no longer available.

    For the full request and response reference, see Lock and close a section.

    CAUTION:

    Closing a section is permanent. A closed section can't be reopened. Retrieve all documents before closing.

  6. Authorize Sovos to permanently delete all documents from the section.

    This step is performed out of band. Your service owner must contact Sovos Support with a formal request to delete all documents for the offboarded section. Sovos Support confirms when deletion is complete.

    CAUTION:

    This step is irreversible. After deletion is authorized, you can't recover your documents.

After Sovos Support confirms that the documents have been deleted, the offboarding process is complete and the section is permanently removed from the service.

For guidance on error handling during the offboarding API calls, see Error handling and status codes.