e-invoicing

Configure storage sections

Storage sections represent invoicing parties in TrustWeaver and control which storage operations are available for each party.

The admin service provides operations to register, enable, lock, and close storage sections. Each operation transitions the section through a defined lifecycle that determines which storage operations are available.

Operations for section management

Operation Action Resulting section state
RegisterSection Creates or updates a section and its associated invoicing party information. Registered
EnableSection Enables a registered section for storage and creates an initial super administrator. Enabled
LockSection Prevents new invoices from being stored or updated in the section. Locking a section is an offboarding prerequisite. Locked
CloseSection Permanently closes the section. Only the Corroborate operation remains available. Closing the section means that Sovos is now able to delete all invoices in it. Closed
RegisterBranch, ListBranches, GetBranchInfo Create, list, and retrieve branches within a section. Branches represent individual tax entities and are required for clearance operations and individual signing key selection. See About branches and Manage branches. No state change
StoreCryptoKey, RemoveCryptoKey, ReplaceCryptoKey, ListCryptoKeys, GetCryptoKeyInfo Store, replace, remove, list, and retrieve cryptographic keys in a section. Required when corroboration operations use individual party signing keys. See About stored cryptographic keys and Manage cryptographic keys. No state change

Check the current state of a section

To retrieve the current state of a section, including its SectionState, friendly name, and country of establishment, you must use the GetSectionInfo operation. To list all sections in the storage area, use ListSections. See Query storage sections for more details.

Available operations by section state

Operation Registered Enabled Locked Closed
Store No Yes No No
Update No Yes No No
Get No Yes Yes No
Search No Yes Yes No
Corroborate No Yes Yes Yes
CAUTION: State transitions are not reversible. A locked section can't be unlocked, and a closed section can't be reopened.

Register and enable a section

Before registering or enabling a section:

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

  • The country of establishment specified for the section must be enabled for storage. Contact Sovos to confirm which countries are supported in your configuration.

  • You must have a unique section name for the invoicing party. Section names must be unique within the storage area and follow character restriction up to 80 characters.

Important:

After a storage section is enabled with a country of establishment, the country can't be changed. If no country of establishment is set during registration, you can add it later but only if storage has not yet been enabled, or if the section was enabled without a country set.

If the invoicing party is an Italian or Hungarian legal entity, set CountryOfEstablishment to IT or HU, respectively, and store all e-invoices for that entity in this section. TrustWeaver runs the preservation process automatically for invoices stored under these country codes, and the process requires all invoices for the entity to be in the same section.

Registering a section creates a record for an invoicing party and associates metadata such as a friendly name and country of establishment. This step alone does not enable storage; you must also call EnableSection. You can still use a registered but not enabled section as a counterparty reference in searches.

  1. Send a RegisterSection request to the admin service with the following elements:
    Element Cardinality Type Description
    Name 1 xs:string The section name. Must be unique within the storage area. Allowed characters: Unicode letters, numbers, marks, punctuation, symbols, and single spaces. Double quotes, angle brackets, and control characters are excluded. Leading and trailing spaces are not allowed. Length: 1-80 characters.
    Note: If the name contains characters outside the basic alphanumeric set (A-Z, a-z, 0-9, hyphen, underscore, and dot), the section path in the Archive GUI URL is percent-encoded.
    StorageSectionInfo 1 taa:StorageSectionInfo Contains FriendlyName (optional, up to 100 characters) and CountryOfEstablishment (optional, ISO 3166 alpha-2 code). The friendly name can be used in invoice searches even for non-storing counterparties.
    RegistrationMode 1 taa:RegistrationMode Specifies the behavior if the section is already registered. Use OverwriteInfo to update section information, or OverwriteAndClearInfo to clear and overwrite.

    Example request:

    CODE
    <RegisterSection xmlns="http://www.trustweaver.com/trustarchive/admin/v1"
      xmlns:tac="http://www.trustweaver.com/trustarchive/common/v1">
      <Request>
        <tac:TransactionId>3580f...</tac:TransactionId>
        <Name>customer1</Name>
        <StorageSectionInfo>
          <FriendlyName>Customer 1</FriendlyName>
          <CountryOfEstablishment>SE</CountryOfEstablishment>
        </StorageSectionInfo>
        <RegistrationMode>OverwriteInfo</RegistrationMode>
      </Request>
    </RegisterSection>
  2. Confirm the registration was successful.

    A successful RegisterSection response contains no result sub-elements:

    CODE
    <RegisterSectionResponse
      xmlns="http://www.trustweaver.com/trustarchive/admin/v1" />
  3. Send an EnableSection request to the Admin Service to enable the section for storage.

    The request requires only the section name:

    CODE
    <EnableSection xmlns="http://www.trustweaver.com/trustarchive/admin/v1"
      xmlns:tac="http://www.trustweaver.com/trustarchive/common/v1">
      <Request>
        <tac:TransactionId>3580f...</tac:TransactionId>
        <Name>customer1</Name>
      </Request>
    </EnableSection>
  4. Save the credentials and section path from the EnableSection response.

    The response includes the following elements:

    Element Type Cardinality Description
    SuperAdminUsername xs:string 1 The username for the super administrator created for this section.
    SuperAdminPwd xs:string 1 The initial password for the super administrator. Change this after your first log in.
    SectionPath xs:string 1 An identifier for the section that you can append to the Archive GUI base URL for direct access. Sovosprovides the base URL is provided out of band.

    Example response:

    CODE
    <EnableSectionResponse xmlns="http://www.trustweaver.com/trustarchive/admin/v1">
      <Result>
        <SuperAdminUsername>SuperAdmin</SuperAdminUsername>
        <SuperAdminPwd>abcd1234</SuperAdminPwd>
        <SectionPath>/archive/area1/customer1</SectionPath>
      </Result>
    </EnableSectionResponse>

The storage section is now enabled. Invoices can be stored and retrieved on behalf of this invoicing party, and the Archive GUI is accessible using the section path.

Error codes:

Value Description
SectionAlreadyRegistered A section with the given name is already registered and the RegistrationMode parameter element has the value CreateNew.
CountryOfEstablishmentAlreadySet An attempt is made to change or clear an existing country of establishment of a storage section enabled for storage.
SectionClosed The storage section is closed for storage.
CountryNotEnabled An attempt is made to update the vacant country of establishment belonging to a storage section enabled for storage, but the country is not enabled for storage.
IdentityProviderNotFound The IdentityProviderName doesn't refer to an existing identity provider.

After enabling a section, you can begin storing invoices using the StoreInvoice operation. If you need to prevent new invoices from being stored later, see Lock and close a section.

Reset a section password

Before resetting a section password:

  • Your application must be authenticated with a valid X.509v3 client certificate.
  • The storage section must be registered and enabled. You can't reset the password for a section that hasn't been enabled or that is closed.

The ResetSectionPwd operation generates a new super administrator password for a named storage section.

  1. Send a ResetSectionPwd request to the admin service with the section name.
    ResetSectionPwd request elements:
    Element Type Cardinality Description
    Name xs:string 1 The name of the storage section whose password you want to reset. Allowed characters: Unicode letters, numbers, marks, punctuation, symbols, and single spaces. Excluded characters: Double quotes, angle brackets, and control characters. Leading and trailing spaces are not allowed. Length: 1-80 characters.

    Example request:

    CODE
    <ResetSectionPwd
      xmlns="http://www.trustweaver.com/trustarchive/admin/v1"
      xmlns:tac="http://www.trustweaver.com/trustarchive/common/v1">
      <Request>
        <tac:TransactionId>3580f...</tac:TransactionId>
        <Name>customer1</Name>
      </Request>
    </ResetSectionPwd>
  2. Retrieve and store the new password from the response.
    ResetSectionPwd response elements:
    Element Type Cardinality Description
    SuperAdminPwd xs:string 1 The newly generated super administrator password for the section.

    Example response:

    CODE
    <ResetSectionPwdResponse
      xmlns="http://www.trustweaver.com/trustarchive/admin/v1">
      <Result>
        <SuperAdminPwd><generated-password></SuperAdminPwd>
      </Result>
    </ResetSectionPwdResponse>
    CAUTION: The returned password is shown only once and you can't retrieved it again. Store it securely immediately after receiving the response.

Lock and close a section

Before locking or closing a section:

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

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

CAUTION:

These operations affect the availability of storage operations for the invoicing party. After you close a section, you can't reopen it. Plan your section lifecycle carefully before proceeding.

When you lock a section you can no longer store or update new invoices, but you can still retrieve, search, or use the corroborate operation. Closing a section further restricts access because only the corroborate operation remains available. These operations are typically used during offboarding or when an invoicing party is no longer active.

  1. To lock the section, send a LockSection request to the admin service.

    The request requires only the section name:

    CODE
    <LockSection xmlns="http://www.trustweaver.com/trustarchive/admin/v1"
      xmlns:tac="http://www.trustweaver.com/trustarchive/common/v1">
      <Request>
        <tac:TransactionId>5580f...</tac:TransactionId>
        <Name>customer1</Name>
      </Request>
    </LockSection>

    The following error codes are returned if locking fails:

    Error code Description
    SectionNotRegistered No section with the given name is registered
    SectionNotEnabled The section is not enabled for storage
    SectionLocked The section is already locked
    SectionClosed The section is already closed
  2. Confirm the lock operation was successful.

    A successful LockSection response contains no result sub-elements:

    CODE
    <LockSectionResponse
      xmlns="http://www.trustweaver.com/trustarchive/admin/v1" />
  3. Optional: To close the section, send a CloseSection request to the Admin Service.

    The request requires only the section name:

    CODE
    <CloseSection xmlns="http://www.trustweaver.com/trustarchive/admin/v1"
      xmlns:tac="http://www.trustweaver.com/trustarchive/common/v1">
      <Request>
        <tac:TransactionId>d0110f...</tac:TransactionId>
        <Name>customer1</Name>
      </Request>
    </CloseSection>

    The following error codes are returned if closing fails:

    Error code Description
    SectionNotRegistered No section with the given name has been registered
    SectionNotEnabled The section is not enabled for storage
    SectionClosed The section is already closed
    CAUTION: Closing a section is permanent and can't be undone. If you are offboarding a section, retrieve all invoices before closing it. After closing, the get and search operations are no longer available.
  4. Confirm the close operation was successful.

    A successful CloseSection response contains no result sub-elements:

    CODE
    <CloseSectionResponse
      xmlns="http://www.trustweaver.com/trustarchive/admin/v1" />

The section is now locked or closed. Storage and update operations are no longer possible for the invoicing party associated with this section.

Query storage sections

The admin service provides two read-only query operations for storage sections. Neither operation changes section state. Use GetSectionInfo to confirm a section's state before performing state-dependent operations such as offboarding. See Offboard archived documents.

ListSections operation

Returns the names of all storage sections in the storage area. Supports pagination using MaxHits and Offset.

Note: The order of sections in the result is not guaranteed. Adding a new section may change the position of existing sections in responses.
Request elements

Request type taa:ListSectionsRequest extends tac:TrustArchiveRequest.

Element Type Cardinality Description
MaxHits xs:int 1 The maximum number of section names to return. If your value exceeds the server limit, the server limit applies. To retrieve all sections, set a high value and check MaxHitsExceeded in the response: If true, repeat the call with an incremented Offset. Must be non-negative.
Offset xs:int 0..1 The number of results to skip from the start of the result set. Use with MaxHits to paginate. Must be non-negative if specified.
Request example
CODE
<ListSections xmlns="http://www.trustweaver.com/trustarchive/admin/v1">
  <Request xmlns:tac="http://www.trustweaver.com/trustarchive/common/v1">
    <tac:TransactionId>93ff...</tac:TransactionId>
    <MaxHits>1000</MaxHits>
  </Request>
</ListSections>
Response elements

Result type: taa: ListSectionsResult

Element Type Cardinality Description
SectionNames taa:SectionNames 1 A collection of SectionName string values, one per registered section. Empty when no sections exist.
MaxHitsExceeded xs:boolean 1 true when more sections exist beyond the returned page. Use Offset to retrieve the next page.
CODE
<ListSectionsResponse xmlns="http://www.trustweaver.com/trustarchive/admin/v1">
  <ListSectionsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <SectionNames>
      <SectionName>section1</SectionName>
      <SectionName>section2</SectionName>
    </SectionNames>
    <MaxHitsExceeded>false</MaxHitsExceeded>
  </ListSectionsResult>
</ListSectionsResponse>
Error codes

No operation-specific error codes. Common Admin Service error codes apply.

GetSectionInfo

Retrieves the current state and configuration of a named storage section, including the section state, archive GUI path, friendly name, and country of establishment.

Request elements

Request type taa:GetSectionInfoRequest extends: tac:TrustArchiveRequest

Element Type Cardinality Description
Name xs:string 1 The section name. Maximum 80 characters.
Request example
CODE
<GetSectionInfo xmlns="http://www.trustweaver.com/trustarchive/admin/v1">
  <Request xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <TransactionId
      xmlns="http://www.trustweaver.com/trustarchive/common/v1"
      >56c6...</TransactionId>
    <Name>section1</Name>
  </Request>
</GetSectionInfo>
Response elements

Result type: tas:GetSectionInfoResult

Element Cardinality Description
SectionPath 1 A path identifier for the section. Append this value to the archive GUI base URL provided during onboarding to access the section directly in the archive GUI.
StorageSectionInfo 1 Configuration details for the section. See the StorageSectionInfo elements entry.
SectionState 1 The current state of the section: Registered, Enabled, Locked, or Closed.
StorageSectionInfo elements
Element Cardinality Description
FriendlyName 0..1 A human-readable name for the section, used in invoice searches. Maximum 100 characters.
CountryOfEstablishment 0..1 ISO 3166 alpha-2 country code for the invoicing party's country of establishment. Used to determine the storage period for invoices.
AgreementId 0..1 The agreement identifier for transactions involving this section, as agreed with Sovos. Leave empty if no such agreement exists. Maximum 50 characters.
IdentityProviderName 0..1 The identity provider used for SSO access to this section in the Archive GUI.
CODE
<GetSectionInfoResponse xmlns="http://www.trustweaver.com/trustarchive/admin/v1">
  <Result xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <SectionPath>/archive/area1/section1</SectionPath>
    <StorageSectionInfo>
      <FriendlyName>Storage Section 1</FriendlyName>
      <CountryOfEstablishment>DE</CountryOfEstablishment>
    </StorageSectionInfo>
    <SectionState>Enabled</SectionState>
  </Result>
</GetSectionInfoResponse>
Error codes
For error codes returned by this operation, see Admin service error codes.