SweetConnect LogoSweetConnect
ApiMaintenance documents

Remove a file from a maintenance record

Removes the specified file link from the given maintenance record. If this was the only remaining file link, the maintenance record itself will be deleted automatically.

Access restricted to roles:

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

In: header

Path Parameters

maintenanceId*string

The ID of the maintenance record from which the file will be removed

fileId*string

The ID of the file to be removed from the maintenance record

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://test.sweetconnect.io/api/storage/v1/documents/maintenance/bde96ced-06e1-4ee2-a8c1-a77afa2332ea/a6e8725e-c920-4121-8535-b3969f7ed55d"
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": "InternalServerError",
      "message": "An unexpected internal server error occurred.",
      "extension": {}
    }
  ]
}