SweetConnect LogoSweetConnect
ApiDocuments

Download a file

Streams the requested file as a download attachment.

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
  • producer-admin
  • producer-user
  • sales-agent
GET
/v1/documents/{fileId}/download
AuthorizationBearer <token>

In: header

Path Parameters

fileId*string

Unique identifier of the file to download

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/documents/12345abcde/download"
Empty
Empty
{
  "errors": [
    {
      "errorCode": "BadRequest",
      "message": "The request payload is invalid.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "Unauthorized",
      "message": "Authentication is required to access this resource.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "NoPermission",
      "message": "You do not have permission to access this resource.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "NotFound",
      "message": "The requested resource was not found.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "UnprocessableEntity",
      "message": "Operation not allowed for this entity type.",
      "extension": {
        "entityType": "Document"
      }
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "HttpError",
      "message": "An unexpected HTTP error occurred.",
      "extension": {}
    }
  ]
}
{
  "errors": [
    {
      "errorCode": "InternalServerError",
      "message": "An unexpected error occurred. See logs for further details or create a support ticket.",
      "extension": {}
    }
  ]
}