Upload HTML-based document as ZIP
Uploads a ZIP file that contains a structured HTML-based document (e.g., offline manuals). The file is associated with the given asset and metadata provided in the request body.
Access restricted to roles:
- admin
- manufacturer-admin
- manufacturer-user
- producer-admin
- producer-user
Authorization
bearer In: header
Path Parameters
The ID of the asset the document is associated with
Request Body
multipart/form-data
Request payload for creating a document.
Human-readable name of the file/document
UUID of the organization where the document will be stored
Category identifier for the file
List of language codes associated with the document
Whether this is a supplier document. When true, supplierName is required.
Name of the supplier. Required when supplierDocument is true.
The file to be uploaded
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://test.sweetconnect.io/api/storage/v1/documents/assets/zip/asset-1234" \ -F displayname="Manual 2025" \ -F organizationId="d1f2g3h4-i5j6-k7l8-m9n0" \ -F categoryId="AA" \ -F file="string"{
"data": {
"warningCode": "DuplicateDocument",
"message": "Document \"Manual 2025\" (filename: document.pdf, id: a3f2b65e-4f22-4f45-80c4-9e547a8f5e6a) already exists and was not uploaded again, linked to asset(s) 54dd7365-6fd1-4fc4-81a5-1f9ca2156920,3f63fa1e-2f00-43a4-a5e1-ed478640ea53.",
"extension": {
"document": {
"id": "a3f2b65e-4f22-4f45-80c4-9e547a8f5e6a",
"filename": "document.pdf",
"displayname": "Manual 2025",
"ownerId": "d1f2g3h4-i5j6-k7l8-m9n0",
"organizationId": "d1f2g3h4-i5j6-k7l8-m9n0",
"manufacturerId": "d1f2g3h4-i5j6-k7l8-m9n0",
"mimetype": "application/pdf",
"category": {
"id": "AA",
"languageCode": "en",
"name": "Electronics"
},
"languages": [
"de",
"fr"
],
"updatedAt": "2025-02-27T12:00:00.000Z",
"updatedBy": "user-1234abcd",
"createdBy": "user-5678efgh",
"createdAt": "2025-01-15T09:30:00.000Z",
"supplierDocument": false,
"supplierName": "Amcor",
"aiInjected": "uninjected",
"aiInjectedUpdatedAt": "2025-02-27T14:30:00.000Z"
},
"assetIds": [
"e49a408c-eba7-436f-bcf5-fd8469f74b03"
],
"maintenanceIds": [
"b4d1f36b-253a-4b7f-8ef4-33ee478835a7"
]
}
}
}{
"data": {
"id": "a3f2b65e-4f22-4f45-80c4-9e547a8f5e6a",
"filename": "document.pdf",
"displayname": "Manual 2025",
"ownerId": "d1f2g3h4-i5j6-k7l8-m9n0",
"organizationId": "d1f2g3h4-i5j6-k7l8-m9n0",
"manufacturerId": "d1f2g3h4-i5j6-k7l8-m9n0",
"mimetype": "application/pdf",
"category": {
"id": "AA",
"languageCode": "en",
"name": "Electronics"
},
"languages": [
"de",
"fr"
],
"updatedAt": "2025-02-27T12:00:00.000Z",
"updatedBy": "user-1234abcd",
"createdBy": "user-5678efgh",
"createdAt": "2025-01-15T09:30:00.000Z",
"supplierDocument": false,
"supplierName": "Amcor",
"aiInjected": "uninjected",
"aiInjectedUpdatedAt": "2025-02-27T14:30:00.000Z"
}
}{
"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": {}
}
]
}