Assets
Upload and retrieve assets (images, documents).
Base URL: /api/v1/partner/asset
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload/private | Upload Private Document |
| POST | /upload/public | Upload 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.
| Field | Type | Description |
|---|---|---|
name | string | name |
file | final | file |
Response
Returns a CompanyAsset object.
- Fields
- JSON
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique identifier |
companyId | string | No | Company identifier |
created | long | No | Created timestamp (epoch ms) |
modified | long | No | Last modified timestamp (epoch ms) |
deleted | boolean | No | Whether the record is deleted |
updated | boolean | No | Whether the record has been updated |
name | string | No | Name |
key | string | No | Key |
type | assettype | No | Type |
publicURL | string | No | Public U R L |
active | boolean | No | Whether active |
priority | integer | No | Priority |
secured | boolean | No | Secured (default: true) |
thumbURL | string | No | Thumb U R L |
mediumURL | string | No | Medium U R L |
largeURL | string | No | Large U R L |
largeX2URL | string | No | Large X2 U R L |
origURL | string | No | Orig U R L |
platformFileUrl | string | No | Platform File Url |
{
"id": "abc123",
"companyId": "abc123",
"created": 1704067200000,
"modified": 1704067200000,
"deleted": false,
"updated": false,
"name": "string",
"key": "string",
"type": {},
"publicURL": "string",
"active": false,
"priority": 0,
"secured": true,
"thumbURL": "string",
"mediumURL": "string",
"largeURL": "string",
"largeX2URL": "string",
"origURL": "string",
"platformFileUrl": "string"
}
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.
| Field | Type | Description |
|---|---|---|
name | string | name |
file | final | file |
Response
Returns a CompanyAsset object.
- Fields
- JSON
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique identifier |
companyId | string | No | Company identifier |
created | long | No | Created timestamp (epoch ms) |
modified | long | No | Last modified timestamp (epoch ms) |
deleted | boolean | No | Whether the record is deleted |
updated | boolean | No | Whether the record has been updated |
name | string | No | Name |
key | string | No | Key |
type | assettype | No | Type |
publicURL | string | No | Public U R L |
active | boolean | No | Whether active |
priority | integer | No | Priority |
secured | boolean | No | Secured (default: true) |
thumbURL | string | No | Thumb U R L |
mediumURL | string | No | Medium U R L |
largeURL | string | No | Large U R L |
largeX2URL | string | No | Large X2 U R L |
origURL | string | No | Orig U R L |
platformFileUrl | string | No | Platform File Url |
{
"id": "abc123",
"companyId": "abc123",
"created": 1704067200000,
"modified": 1704067200000,
"deleted": false,
"updated": false,
"name": "string",
"key": "string",
"type": {},
"publicURL": "string",
"active": false,
"priority": 0,
"secured": true,
"thumbURL": "string",
"mediumURL": "string",
"largeURL": "string",
"largeX2URL": "string",
"origURL": "string",
"platformFileUrl": "string"
}
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
| Parameter | Type | Description |
|---|---|---|
assetKey | string | The asset key |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
handleError | boolean | No | handle error |