SweetConnect LogoSweetConnect
ApiDocuments

Delete a document by file ID

Deletes a document by file ID. Should check if the file is referenced before deletion.

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
  • producer-admin
  • producer-user
DELETE
/v1/documents/{fileId}
AuthorizationBearer <token>

In: header

Path Parameters

fileId*string

The ID of the file to delete.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://test.sweetconnect.io/api/storage/v1/documents/string"
Empty
{
  "errors": [
    {
      "errorCode": "Conflict",
      "message": "A conflict occurred due to duplicate data or resource state issues.",
      "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": "InternalServerError",
      "message": "An unexpected internal server error occurred.",
      "extension": {}
    }
  ]
}