SweetConnect LogoSweetConnect
ApiAsset documents

Create a link between a file and an asset

POST
/v1/documents/assets/{fileId}/{assetId}

Access restricted to roles:

  • admin
  • manufacturer-admin
  • manufacturer-user
  • producer-admin
  • producer-user
AuthorizationBearer <token>

In: header

Path Parameters

fileId*string

The unique identifier of the file

assetId*string

The unique identifier of the asset

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/documents/assets/string/string"
{  "data": {    "id": "a3f2b65e-4f22-4f45-80c4-9e547a8f5e6a",    "filename": "document.pdf",    "ownerId": "d1f2g3h4-i5j6-k7l8-m9n0",    "mimetype": "application/pdf",    "type": "AssetDocument",    "createdBy": "user-5678efgh",    "createdAt": "2025-01-15T09:30:00.000Z",    "updatedBy": "user-1234abcd",    "updatedAt": "2025-02-27T12:00:00.000Z",    "displayname": "Manual 2025",    "organizationId": "d1f2g3h4-i5j6-k7l8-m9n0",    "manufacturerId": "d1f2g3h4-i5j6-k7l8-m9n0",    "category": {      "id": "AA",      "languageCode": "en",      "name": "Electronics"    },    "languages": [      "de",      "fr"    ],    "supplierDocument": false,    "supplierName": "Amcor",    "aiEnabled": false,    "aiIngested": "uningested",    "aiIngestedUpdatedAt": "2025-02-27T14:30:00.000Z"  }}