Skip to main content

Assets

Upload and retrieve assets (images, documents).

Base URL: /api/v1/partner/asset

Endpoints Overview

MethodEndpointDescription
POST/upload/privateUpload Private Document
POST/upload/publicUpload Public Document
GET/{assetKey}Get Asset

Upload Private Document

POST /api/v1/partner/asset/upload/private

Upload a private asset (image or document) that is stored with restricted access. Send the file as multipart/form-data with a name and assetType. Returns the created asset metadata.

Request

This endpoint accepts multipart/form-data.

FieldTypeDescription
namestringname
filefinalfile

Response

Returns a CompanyAsset object.

FieldTypeRequiredDescription
idstringNoUnique identifier
companyIdstringNoCompany identifier
createdlongNoCreated timestamp (epoch ms)
modifiedlongNoLast modified timestamp (epoch ms)
deletedbooleanNoWhether the record is deleted
updatedbooleanNoWhether the record has been updated
namestringNoName
keystringNoKey
typeassettypeNoType
publicURLstringNoPublic U R L
activebooleanNoWhether active
priorityintegerNoPriority
securedbooleanNoSecured (default: true)
thumbURLstringNoThumb U R L
mediumURLstringNoMedium U R L
largeURLstringNoLarge U R L
largeX2URLstringNoLarge X2 U R L
origURLstringNoOrig U R L
platformFileUrlstringNoPlatform File Url

Upload Public Document

POST /api/v1/partner/asset/upload/public

Upload a public asset (image or document) that is stored with public access. Send the file as multipart/form-data with a name and assetType. Returns the created asset metadata.

Request

This endpoint accepts multipart/form-data.

FieldTypeDescription
namestringname
filefinalfile

Response

Returns a CompanyAsset object.

FieldTypeRequiredDescription
idstringNoUnique identifier
companyIdstringNoCompany identifier
createdlongNoCreated timestamp (epoch ms)
modifiedlongNoLast modified timestamp (epoch ms)
deletedbooleanNoWhether the record is deleted
updatedbooleanNoWhether the record has been updated
namestringNoName
keystringNoKey
typeassettypeNoType
publicURLstringNoPublic U R L
activebooleanNoWhether active
priorityintegerNoPriority
securedbooleanNoSecured (default: true)
thumbURLstringNoThumb U R L
mediumURLstringNoMedium U R L
largeURLstringNoLarge U R L
largeX2URLstringNoLarge X2 U R L
origURLstringNoOrig U R L
platformFileUrlstringNoPlatform File Url

Get Asset

GET /api/v1/partner/asset/{assetKey}

Retrieve an asset (image or document) by its key. Returns the binary file stream directly (not JSON) with the appropriate content type. The response is cacheable for 30 days. Set handleError to true for graceful error handling.

Path Parameters

ParameterTypeDescription
assetKeystringThe asset key

Query Parameters

ParameterTypeRequiredDescription
handleErrorbooleanNohandle error