[Bug]: Avalara connector uses an unsupported Accept media type for document downloads

Abierto Apto para principiantes
#14,336 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
65/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Área
backend

Línea de trabajo

Empieza con src/Apps/W1/EDocumentConnectors/Avalara/App/src/Connection/Requests.Codeunit.al, en codeunit 6376 Requests y el procedimiento CreateDownloadRequest. Comprueba cómo se selecciona el encabezado Accept de UBL y si el tipo de medio propuesto se aplica a todos los mandatos y entornos de Avalara compatibles. Se considera terminado cuando el documento afectado se descarga correctamente con el tipo de medio compatible y el procesamiento XML existente sigue siendo compatible.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Team: Integrations
Describe the issue

The Avalara E-Document connector hardcodes the following HTTP header
in codeunit 6376 Requests, procedure CreateDownloadRequest(Id: Text):

line 195: Accept: application/vnd.oasis.ubl+xml

This media type is no longer accepted for the documents tested in our
Avalara environment, preventing downloads using this request.

When testing the same request in Postman, the following Accept values
are accepted:
**- application/vnd.oasis.ubl.flow2+xml

  • application/vnd.oasis.sbdh.flow2+xml**

The XML structure seems to appear unchange for the UBL representation with application/vnd.oasis.ubl.flow2+xml;
the issue appears to concern the accepted media type rather than
a change to the document structure.

We have observed this behavior since approximately July 2026.

Actual response with application/vnd.oasis.ubl+xml:
{
"error": 404,
"message": "The requested media type has not been generated yet or is unavailable."
}
While with application/vnd.oasis.ubl.flow2+xml we obtain a code 200 with the UBL.

Expected behavior

The connector should use an Accept media type supported by Avalara
so that documents can be downloaded successfully.

For the affected scenario, updating the UBL Accept header to
application/vnd.oasis.ubl.flow2+xml appears sufficient, without
changing the existing XML processing.

Steps to reproduce
  1. Identify a document available for download in the affected
    Avalara environment.

  2. Send the following request in Postman with valid authentication:

    GET {baseUrl}/einvoicing/documents/{documentId}/$download
    avalara-version: 1.6
    Accept: application/vnd.oasis.ubl+xml

  3. Observe that the request fails:
    {
    "error": 404,
    "message": "The requested media type has not been generated yet or is unavailable."
    }

  4. Repeat the same request for the same document, changing only
    the Accept header to:

    application/vnd.oasis.ubl.flow2+xml

  5. Observe that the document is successfully downloaded.

Additional context

Environment:

  • Business Central version/build: FR Business Central 29.0 (Platform 29.0.57751.0 + Application 29.0.54011.57536)
  • E-Document Connector - Avalara app version: 29.0.54011.55407
  • Avalara environment: sandbox
  • Tested on the latest bcinsider build: not tested

Relevant source:
https://github.com/microsoft/BCApps/blob/040b335389729ace7ce8dc0fd81d88ee007ed479/src/Apps/W1/EDocumentConnectors/Avalara/App/src/Connection/Requests.Codeunit.al

Proposed fix:
Update the hardcoded UBL Accept media type to application/vnd.oasis.ubl.flow2+xml for the affected scenario, subject to confirmation of its applicability across supported Avalara mandates and environments.

I am willing to contribute a fix once the proposed approach has been reviewed and approved.

I will provide a fix for a bug
  • I will provide a fix for a bug
Lenguaje dominante
AL
Estrellas
730
Forks
514
Merge medio
2 d 23 h
PR fusionados (30 d)
601

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/BCApps

Todos los issues de microsoft/BCApps

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.