e-invoicing

Submit an invoice

Authenticate and submit a Norway e-invoice to Compliance Network for routing through the PEPPOL network.

You can also manually upload invoices and submit them through the Compliance NetworkGUI.
  1. Authenticate to obtain an access token.

    Send a POST request to the token endpoint using Basic authentication with your base64-encoded API key and secret key.

    JSON
    POST /oauth/token
    Authorization: Basic {base64(apiKey:secretKey)}
    Content-Type: application/x-www-form-urlencoded
    
    grant_type=client_credentials

    The response contains your access token. Include it in all subsequent API calls. Tokens expire after 3600 seconds.

  2. Prepare the document.

    Wrap your UBL 2.1 invoice or credit note in a Standard Business Document (SBD) as described in Create a document. The invoice must be Base64-encoded inside <svs:SovosLegalDocument>.

    Make sure to include:
    • BusinessProcess = Default

    • Mapping.InputSchema = <Plugin name>
      CODE
      <sbd:Type>BusinessProcess</sbd:Type>
      	<sbd:InstanceIdentifier/>
      		<sbd:BusinessService>
          			<sbd:BusinessServiceName>Default</sbd:BusinessServiceName>
      		</sbd:BusinessService>
      		</sbd:Scope>
      <sbd:Scope>
      <!-- Mandatory to identify the format -->
      <sbd:Type>Mapping.InputSchema</sbd:Type>
      	<sbd:InstanceIdentifier/>
      <sbd:Identifier>ALL-PEPPOLBISUBL-3.0-INVOICE-1.0</sbd:Identifier>
  3. Submit to the Indirect Tax API endpoint.

    Send a POST request with the SBD body.

    Environment Submission URL
    UAT https://api-test.sovos.com/v1/documents
    Production https://api.sovos.com/v1/documents
    JSON
    POST /documents/
    Authorization: Bearer {access_token}
    Content-Type: application/xml
    x-correlationId: {your_unique_correlation_id}
    
    {Standard Business Document — SBD XML}

    Include x-correlationId with a unique value you generate. Sovos returns this value in error responses and notifications, enabling you to correlate submission events in your logs.

  4. Save the data ID from the response.

    A successful submission returns HTTP 202 Accepted with a response body containing the data ID for tracking.

    JSON
    {
       "status": 202,
        "message": "Accepted",
        "success": true,
        "timestamp": 1790582264530,
        "data": {
            "documentId": "ABC123",
            "transactionId": "abcd1234..."
        }
    }
    Important: HTTP 202 means Sovos accepted the document for processin but it doesn't confirm delivery to the buyer. Save the data.id value. You need it to monitor transmission status and retrieve notifications.
    Code Meaning Action
    202 Accepted, Sovos received the document Save the data ID and monitor for delivery status
    400 Validation error,document failed Sovos pre-check Review the error detail in the response body, fix the document, and resubmit
    401 Authentication failure Check your access token; re-authenticate if expired
    403 Authorization failure Verify your API key has access to the Norway product
    500 Server error Retry with exponential backoff