Introduction
Views Partner API provides access to managing user inventory, collections, requests, and other resources.
API examples are given in cURL, feel free to get in touch for examples in other languages.
By using this API, you agree to our API Terms of Use.
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
-H "Authorization: Bearer T"
Make sure to replace
Twith your API key.
Views uses AWS Cognito for authentication.
In practice Views requires requests to the server to include Bearer token in a header that looks like the following:
Authorization: Bearer T
Inventory
Inventory consists of artworks owned by the user. User's inventory is private and is not accessible to other users unless artworks are shared to their Organisation.
Get All Artworks
curl --location --request GET 'https://server.viewsart.com/inventory?updated_after=2010-01-12T11:45:26.371Z' \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
[
{
"id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215",
"artist": "Damien Hirst",
"title": "Colours",
"year": "1999",
"medium": "Oil in Canvas",
"dim_width": "100",
"dim_height": "200",
"dim_depth": "3",
"dims_other": "circular 30cm diameter",
"owner": "Augustinas Malinauskas",
"cost_price": "1000000",
"retail_price": "200000",
"description": "Framed with signature",
"ownership_distance": "direct",
"lastUpdated": "2021-10-22T18:01:34Z",
"createdAt": "2021-10-12T11:27:26Z",
"itemDeleted": false,
"image_names": ["1.png"],
"provenance": "provenance here",
"exhibition_history": "exhibition",
"literature": "literature here",
"stock_code": "PICA-123",
"insurance_price": "500000",
"insurance_price_currency": "GBP",
"confidential_note": "Buyer is very motivated",
"location": "Paris, France",
"work_type": "painting",
"cost_price_currency": "USD",
"retail_price_currency": "EUR",
"owner_details": {
"cognito_uuid": "5a0d6574-3b0c-4643-ba17-4b2a27d96b52",
"given_name": "User 1",
"family_name": "Family 1"
},
"images": [
{
"thumbnail": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Acd95dae9-8e72-4ee8-a850-f6d25a890637%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215%2Fthumbnail_1.png",
"detail": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Acd95dae9-8e72-4ee8-a850-f6d25a890637%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215%2Fdetail_1.png",
"fullscreen": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Acd95dae9-8e72-4ee8-a850-f6d25a890637%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215%2Ffullscreen_1.png"
}
],
"availability": "0x36cedf",
"origin": "upload",
"permissions": [
"canEdit",
"canEditImages",
"canShare",
"canDelete",
"canAddToOrg",
"canDeleteFromOrg"
],
"custom_hash": "0x123a",
"market": "primary",
"holds": [
{
"name": "Marc Andreessen",
"note": "Great collector",
"created_at": "2020-10-10T12:37:54Z"
},
{
"name": "Ben Horowitz",
"note": "Fantastic collector",
"created_at": "2022-10-10T12:37:54Z"
}
],
"location_history": [
{
"name": "London",
"details": "Mayfair",
"date": "2020-05-17T14:39:58+01:00",
"notes": "This artwork is held in Queens storage."
}
],
"location": "Don't drop it"
}
]
This endpoint retrieves all artworks.
HTTP Request
GET https://server.viewsart.com/inventory
Query Parameters
| Parameter | Default | Description |
|---|---|---|
updated_after required |
1970-01-01T11:45:26.371Z | Returns artworks updated after this date. Omitting returns all artworks in inventory. Date must follow ISO 8601 standards. |
Get Artwork by ID
curl --location --request GET 'https://server.viewsart.com/inventoryb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215' \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
{
"id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215",
"artist": "Damien Hirst",
"title": "Colours",
"year": "1999",
"medium": "Oil in Canvas",
"dim_width": "100",
"dim_height": "200",
"dim_depth": "3",
"dims_other": "circular 30cm diameter",
"owner": "Augustinas Malinauskas",
"cost_price": "1000000",
"retail_price": "200000",
"description": "Framed with signature",
"ownership_distance": "direct",
"lastUpdated": "2021-10-22T18:01:34Z",
"createdAt": "2021-10-12T11:27:26Z",
"itemDeleted": false,
"image_names": ["1.png"],
"provenance": "provenance here",
"exhibition_history": "exhibition",
"literature": "literature here",
"stock_code": "PICA-123",
"insurance_price": "500000",
"insurance_price_currency": "GBP",
"confidential_note": "Buyer is very motivated",
"location": "Paris, France",
"work_type": "painting",
"cost_price_currency": "USD",
"retail_price_currency": "EUR",
"owner_details": {
"cognito_uuid": "5a0d6574-3b0c-4643-ba17-4b2a27d96b52",
"given_name": "User 1",
"family_name": "Family 1"
},
"images": [
{
"thumbnail": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Acd95dae9-8e72-4ee8-a850-f6d25a890637%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215%2Fthumbnail_1.png",
"detail": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Acd95dae9-8e72-4ee8-a850-f6d25a890637%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215%2Fdetail_1.png",
"fullscreen": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Acd95dae9-8e72-4ee8-a850-f6d25a890637%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215%2Ffullscreen_1.png"
}
],
"availability": "0x36cedf",
"origin": "upload",
"permissions": [
"canEdit",
"canEditImages",
"canShare",
"canDelete",
"canAddToOrg",
"canDeleteFromOrg"
],
"custom_hash": "0x123a",
"market": "primary",
"holds": [
{
"name": "Marc Andreessen",
"note": "Great collector",
"created_at": "2020-10-10T12:37:54Z"
},
{
"name": "Ben Horowitz",
"note": "Fantastic collector",
"created_at": "2022-10-10T12:37:54Z"
}
],
"location_history": [
{
"name": "London",
"details": "Mayfair",
"date": "2020-05-17T14:39:58+01:00",
"notes": "This artwork is held in Queens storage."
}
]
}
This endpoint retrieves a specific artwork.
HTTP Request
GET https://server.viewsart.com/inventory/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the artwork to retrieve |
Create an artwork
curl --location --request POST 'https://server.viewsart.com/inventory/push' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '[{
"client_id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215",
"artist": "Damien Hirst",
"title": "Colours",
"year": "1999",
"medium": "Canvas",
"dim_width": "100",
"dim_height": "200",
"dim_depth": "3",
"dims_other": "comes with 30cm diameter plate",
"cost_price": "1000000",
"retail_price": "200000",
"owner": "Augustinas Malinauskas",
"description": "Framed with signature",
"ownership": "direct",
"is_deleted": false,
"image_names": ["https://upload.wikimedia.org/wikipedia/commons/b/bf/Bucephala-albeola-010.jpg"],
"provenance": "provenance here",
"exhibition_history": "exhibition",
"literature": "literature here",
"stock_code": "PICA-123",
"insurance_price": "500000",
"insurance_price_currency": "GBP",
"confidential_note": "Buyer is very motivated",
"location": "Paris, France",
"work_type": "painting",
"cost_price_currency": "USD",
"retail_price_currency": "EUR",
"series": "Nature",
"edition": "Edition 5/6",
"availability": "0x36cef2",
"org_uids": ["0x1403"],
"ref_ids": ["12345", "0xabc"],
"custom_hash": "0x123a",
"market": "primary",
"holds": [
{
"name": "Marc Andreessen",
"note": "Great collector",
"created_at": "2020-10-10T12:37:54Z"
},
{
"name": "Ben Horowitz",
"note": "Fantastic collector",
"created_at": "2022-10-10T12:37:54Z"
}
],
"location_history": [
{
"name": "London",
"details": "Queens, Mayfair",
"date": "2020-05-17T14:39:58+01:00",
"notes": "This artwork is held in Queens storage and is already in crate."
}
]
}]'
Above request request will respond with status code
200.
This is upsert endpoint. This endpoint creates a new artwork or updates artwork with specified identifier client_id.
When artwork with specified client_id does not exist in the database, it will be created.
When artwork with specified client_id exists in the database, its attributes will be updated as specified. Omitting artwork attributes will set them to an empty string.
This endpoint accepts array of artworks for bulk creating / updating.
HTTP Request
POST https://server.viewsart.com/inventory/push
JSON request parameters
| Parameter | Description |
|---|---|
client_id required |
Globally unique identifier with which item should be created. Recommended UUID standard. |
artist required |
Name of the artist. |
title optional |
Title of the artwork. |
medium optional |
Medium of the artwork. |
dim_width optional |
Width of the artwork in cm. |
dim_height optional |
Height of the artwork in cm. |
dim_depth optional |
Depth of the artwork in cm. |
dims_other optional |
Additional notes for dimensions. |
cost_price optional |
Cost price. |
retail_price optional |
Retail price. |
insurance_price optional |
Insurance price. |
cost_price_currency optional |
Cost price currency. Available values are GBP, USD, EUR. 1 |
retail_price_currency optional |
Retail price. Available values are GBP, USD, EUR. |
insurance_price_currency optional |
Insurance price. Available values are GBP, USD, EUR. |
owner optional |
Source of the artwork. |
description optional |
Additional notes. |
ownership optional |
User's relationship to the artwork. Available values are own, direct, one, two, twoplus, unknown. |
is_deleted optional |
Is artwork scheduled for deletion. Setting this property to true will hide the artwork for the user and schedules it for permanent deletion. |
image_names optional |
Ordered list of image names for the artwork relative to cloudfront_cdn/user_id/client_id. image_names list is used to generate full image paths. Using empty array will create artwork without images. Alternatively, you can provide ordered list of full image URLs and Views will process the images. |
provenance optional |
Provenance of the artwork. |
exhibition_history optional |
Exhibition history of the artwork. |
literature optional |
Literature of the artwork. |
stock_code optional |
Stock code for the artwork. |
location optional |
Location of the artwork. |
work_type optional |
Artwork type. |
series optional |
Artwork series. |
edition optional |
Artwork edition. |
availability optional |
Artwork availability ID. (More details here.) |
org_uids optional |
List of organisation IDs artwork should be shared to. |
ref_ids optional |
List of reference IDs to be assigned the item. More details Item reference IDs. |
custom_hash optional |
Custom hash. |
market optional |
Allowed values are primary and secondary. |
holds optional |
Metadata about artwork holds. Each hold entity can contain name, note and created_at timestamp in RFC 3339 format. |
Update an artwork
curl --location --request POST 'https://server.viewsart.com/inventory/push' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '[{
"client_id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215",
"artist": "Damien Hirst",
"title": "Colours",
"year": "1999",
"medium": "Canvas",
"dim_width": "100",
"dim_height": "200",
"dim_depth": "3",
"dims_other": "comes with 30cm diameter plate",
"cost_price": "1000000",
"retail_price": "200000",
"owner": "Augustinas Malinauskas",
"description": "Framed with signature",
"ownership": "direct",
"is_deleted": false,
"image_names": ["1.png"],
"provenance": "provenance here",
"exhibition_history": "exhibition",
"literature": "literature here",
"stock_code": "PICA-123",
"insurance_price": "500000",
"insurance_price_currency": "GBP",
"confidential_note": "Buyer is very motivated",
"location": "Paris, France",
"work_type": "painting",
"cost_price_currency": "USD",
"retail_price_currency": "EUR",
"series": "Nature",
"edition": "Edition 5/6",
"availability": "0x36cef2",
"org_uids": ["0x1403"],
"ref_ids": ["12345", "0xabc"],
"custom_hash": "0x123a",
"market": "primary",
"holds": [
{
"name": "Marc Andreessen",
"note": "Great collector",
"created_at": "2020-10-10T12:37:54Z"
},
{
"name": "Ben Horowitz",
"note": "Fantastic collector",
"created_at": "2022-10-10T12:37:54Z"
}
],
"location_history": [
{
"name": "London",
"details": "Queens, Mayfair",
"date": "2020-05-17T14:39:58+01:00",
"notes": "This artwork is held in Queens storage and is already in crate."
}
]
}]'
Above request request will respond with status code
200.
curl --location --request POST 'https://server.viewsart.com/inventory/push' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '[{
"client_id": "3085A28F-4BBF-4D75-A99E-6621CD28EDA1",
"insurance_price": "50000"
}]'
Above request request will respond with status code
200.
curl --location --request POST 'https://server.viewsart.com/inventory/push' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '[{
"client_id": "3085A28F-4BBF-4D75-A99E-6621CD28EDA1",
"availability": "0x36ce9d"
}]'
Above request request will respond with status code
200.
Creating and updating an artwork uses the same upsert endpoint. Read Create an artwork
When artwork with specified client_id exists in the database, its attributes will be updated as specified. You can perform updates on all attributes of the artwork or just a few.
This endpoint accepts an array of artworks for bulk updating.
HTTP Request
POST https://server.viewsart.com/inventory/push
Delete an artwork
curl --location --request DELETE 'https://server.viewsart.com/inventory/b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215' \
--header 'Authorization: Bearer T'
Above request should respond with status code
200.
This endpoint deletes a specific artwork.
HTTP Request
DELETE https://server.viewsart.com/inventory/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the artwork to delete |
Get availabilities list
curl --location --request GET 'https://server.viewsart.com/workflows/schema' \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
{
"statuses": [
{
"id": "0x36ceab",
"name": "Stock",
"availabilities": [
{
"id": "0x36cef2",
"name": "Available",
"icon": {
"symbol": "dotFilledGreen"
},
"actions": [
{
"name": "Available",
"icon": {
"symbol": "greenDot"
},
"changeSet": {
"status": "0x36ceab",
"availability": "0x36cef2"
}
},
{
"name": "Reserved",
"icon": {
"symbol": "yellowDot"
},
"changeSet": {
"status": "0x36ceab",
"availability": "0x36cef3"
}
},
{
"name": "Sold",
"icon": {
"symbol": "redDot"
},
"changeSet": {
"status": "0x36ce93",
"availability": "0x36ce88"
}
},
{
"name": "Other (Unavailable)",
"icon": {
"symbol": "grayDot"
},
"changeSet": {
"status": "0x36ceab",
"availability": "0x36ceac"
}
}
]
},
...
]
GET https://server.viewsart.com/workflows/schema
This endpoint returns list a allowed availabilities for the artwork together and additional data. Availability ID can be used to change artworks availability by providing it to Create an artwork endpoint.
For production environment default list of availabilities is collected in the table below.
| Availability | ID |
|---|---|
| Stock - Available | 0x36cef2 |
| Stock - Consigned out | 0x36ceea |
| Stock - On loan | 0x36cefa |
| Stock - On loan (NFS) | 0x36ce97 |
| Stock - Gift/Donated | 0x36cebf |
| Stock - Not for sale | 0x36ce9d |
| Stock - Reserved | 0x36cef3 |
| Stock - Damaged | 0x36ce87 |
| Stock - Returned | 0x36ceb3 |
| Stock - On approval | 0x36cee6 |
| Stock - Under offer (exclusive) | 0x36ceb0 |
| Stock - Other | 0x36ceac |
| Stock - Not yet made | 0x36cefe |
| On consignment - Available | 0x36cedf |
| On consignment - Consigned out | 0x36ce92 |
| On consignment - On loan | 0x36ce9e |
| On consignment - On loan (NFS) | 0x36ce8c |
| On consignment - Gift/Donated | 0x36cec7 |
| On consignment - Not for sale | 0x36ceca |
| On consignment - Reserved | 0x36ced0 |
| On consignment - Damaged | 0x36cecb |
| On consignment - Returned | 0x36cea4 |
| On consignment - On approval | 0x36ce84 |
| On consignment - Under offer (exclusive) | 0x36ceed |
| On consignment - Other | 0x36cef6 |
| On consignment - Not yet made | 0x36ce9f |
| Ex-inventory - Sold | 0x36ce88 |
| Ex-inventory - Returned | 0x36cecc |
| Ex-inventory - Destroyed | 0x36cf01 |
| Ex-inventory - Damaged | 0x36cf02 |
| Ex-inventory - Gift/Donated | 0x36ce98 |
| Ex-inventory - Not for sale | 0x36cea0 |
| Ex-inventory - Other | 0x36cee3 |
| 3rd party - Available | 0x36ceb5 |
| 3rd party - Potentially available | 0x36cea7 |
| 3rd party - Known about / future potential | 0x36cec3 |
| 3rd party - Not yet made | 0x36ce85 |
| 3rd party - Not for sale | 0x36cefc |
| 3rd party - Sold | 0x36cec0 |
| 3rd party - Other | 0x36ce99 |
Get item reference IDs
curl --location --request GET 'https://server.viewsart.com/api/refs' \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
{
"items": [
{
"id": "0f523fe1-79e4-11ec-b054-0a58a9feac01",
"ref_ids": ["12345"]
},
{
"id": "0f523fe1-79e4-11ec-b054-0a58a9feac02",
"ref_ids": ["0x000000a", "0x000000b"]
}
]
}
GET https://server.viewsart.com/api/refs
If you are integrating Views with other systems you may need to associate reference IDs to each inventory item in Views to be able to identify item in other systems. This endpoint returns reference IDS for all inventory items sorted ascending by reference ID. Reference IDs can be set using Create an artwork or Update an artwork endpoints. This endpoint returns IDs for both private inventory items as well as organisation items you have access to.
JSON response
| Parameter | Description |
|---|---|
id |
Unique item ID in Views. |
ref_ids |
Array of reference IDs you have associated with the item. |
Organisations
Organisation consists of a group of users. Organisations allow a user to share a subset of their inventory with other members of the organisation. User might be in more than one organisation; however in practice it is usually one. Each organisation can have its own branding which is reflected in Views UI and in PDFs generated by Views.
Get User Organisations
curl --location --request GET 'https://server.viewsart.com/organisation' \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
[
{
"uid": "0x138f8",
"name": "Manchester United",
"logo_url": "https://d1zr3jiovrff0o.cloudfront.net/private/eu-west-183a-1289ab-319pc-139/logo.png",
"pdf_cover_url": "https://d1zr3jiovrff0o.cloudfront.net/private/eu-west-183a-1289ab-319pc-139/cover-template.pdf",
"pdf_tmpl_details_url": "https://d1zr3jiovrff0o.cloudfront.net/private/eu-west-183a-1289ab-319pc-139/details-template.pdf",
"members": [
{
"cognito_uuid": "ca212d43-04e0-422f-8f30-fe59f8cf8668",
"given_name": "David",
"family_name": "Beckham"
},
{
"cognito_uuid": "71d0a57c-0168-4fd4-a8a1-4cab46f32cdc",
"given_name": " Roger",
"family_name": "Byrne"
},
{
"cognito_uuid": "5a0d6574-3b0c-4643-ba17-4b2a27d96b52",
"given_name": "Mark",
"family_name": "Jones"
}
]
}
]
This endpoint retrieves all organisations a user is a member of and metadata (such as members list) associated with each organisation.
HTTP Request
GET https://server.viewsart.com/organisation
| Parameter | Description |
|---|---|
uid |
Unique organisation id. |
name |
Organisation name. |
logo_url |
Organisation logo. |
pdf_cover_url |
URL of the PDF template that can be used as a cover page when generating PDFs inside an app. |
pdf_tmpl_details_url |
URL of the PDF template that can be used to brand pages when generating PDFs inside an app. |
members |
Metadata about all members of the organisation. |
Get Organisations inventory
curl --location --request GET 'https://server.viewsart.com/organisation/inventory' \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
[
{
"id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e22111axx11111",
"org_uids": ["0x138f8"],
"artist": "Damien Hirst",
"title": "Colours",
"year": "1999",
"medium": "Canvas",
"dim_width": "100",
"dim_height": "200",
"dim_depth": "3",
"dims_other": "",
"owner": "AM",
"cost_price": "1000000",
"retail_price": "200000",
"description": "good stuff",
"ownership_distance": "direct",
"lastUpdated": "2021-10-12T11:27:41Z",
"createdAt": "2021-10-12T11:27:38Z",
"itemDeleted": false,
"image_names": ["1.png"],
"provenance": "",
"exhibition_history": "",
"literature": "",
"stock_code": "testc0d3",
"insurance_price": "500000",
"insurance_price_currency": "GBP",
"confidential_note": "Notes so Confidential",
"location": "Paris, France",
"work_type": "painting",
"cost_price_currency": "USD",
"retail_price_currency": "EUR",
"owner_details": {
"cognito_uuid": "ca212d43-04e0-422f-8f30-fe59f8cf8668",
"given_name": "Margot",
"family_name": "Stern"
},
"images": [
{
"thumbnail": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Abbd4d0cf-5ab6-4387-a2f3-76eeb190189c%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e22111axx11111%2Fthumbnail_1.png",
"detail": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Abbd4d0cf-5ab6-4387-a2f3-76eeb190189c%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e22111axx11111%2Fdetail_1.png",
"fullscreen": "https://d1zr3jiovrff0o.cloudfront.net/protected/eu-west-1%3Abbd4d0cf-5ab6-4387-a2f3-76eeb190189c%2Fb83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e22111axx11111%2Ffullscreen_1.png"
}
],
"permissions": [
"canEdit",
"canEditImages",
"canShare",
"canDelete",
"canAddToOrg",
"canDeleteFromOrg"
]
}
]
This endpoint retrieves all items in user's organisations.
Response data is identical to that of Get all Artworks.
Response property org_uids lists ids of all organisations that this artwork belongs to. Every member of these organisations has access to the artwork.
HTTP Request
GET https://server.viewsart.com/organisation/inventory
Share artwork
curl --location --request PUT 'https://server.viewsart.com/organisation/share' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"item_client_id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e22111",
"orgs": ["0x138f8", "0x134a0"]
}
]'
Above request should respond with status code
200.
This endpoint shares a private artworks owned by the user to one ore more organisations. User must be a member of an organisation in order to share an artwork.
HTTP Request
PUT https://server.viewsart.com/organisation/share
Unshare artwork
curl --location --request PUT 'https://server.viewsart.com/organisation/share' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"item_client_id": "b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e22111",
"orgs": []
}
]'
Above request should respond with status code
200.
This unshares shares a private artworks owned by the user to one ore more organisations. User must be a member of an organisation in order to share an artwork.
HTTP Request
PUT https://server.viewsart.com/organisation/share
Requests
Requests (Wishlist) allow users to keep track of what artworks their clients are looking for. Requests have additional information such as budget, notes, source and degree of separation. Based on Request details user will see artworks matching the request. Request can be shared to user's organisation.
Get All Requests
curl --location --request GET 'https://server.viewsart.com/requests \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
[
{
"id": "0x1390f",
"artists": ["Damien Hirst", "Richard Prince"],
"dos": "direct",
"min_price": "100000",
"max_price": "200000",
"currency": "USD",
"source": "Margot Robbie",
"notes": "buyer is very motivated",
"confidential_notes": "confident",
"type_of_work": "painting",
"created_at": "2021-10-12T11:27:45.9983969Z",
"updated_at": "2021-10-12T11:27:46.4296119Z",
"owner": {
"id": "0x13883",
"family_name": "Jamie",
"given_name": "Gourlay"
},
"organisations": [],
"shared_to_you": false
}
]
This endpoint retrieves all requests created by the user and requests accessible to user via their organisation.
HTTP Request
GET https://server.viewsart.com/requests
Create Request
curl --location --request POST 'https://server.viewsart.com/requests' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"artists": ["Damien Hirst", "Richard Prince"],
"dos": "direct",
"source": "Margot Robbie",
"min_price": "100000",
"max_price": "200000",
"currency": "USD",
"notes": "buyer is very motivated",
"type_of_work": "painting",
"confidential_notes": "confident"
"org_ids": ["0x3fa1b"]
}'
The above command returns JSON structured like this:
{
"id": "0x15f9e"
}
This endpoint creates a Request.
HTTP Request
POST https://server.viewsart.com/requests
JSON request parameters
| Parameter | Description |
|---|---|
artists optional |
List of artists for the request. |
dos required |
User's relationship to the client for this Request. Available values are own, direct, one, two, unknown. |
source optional |
Name of the client for this Request. 1 |
min_price optional |
Minimum budget. |
max_price optional |
Maximum budget. |
currency optional |
Currency for above prices. Available values are GBP, USD, EUR. |
notes optional |
Notes for this request. |
type_of_work optional |
Type of work for this request. |
confidential_notes optional |
Confidential notes for the request. 2 |
insurance_price optional |
Insurance price. |
org_ids optional |
List of Organisation ids this Request should be shared to. |
JSON response parameters
| Parameter | Description |
|---|---|
id |
ID of created request. |
Update Request
curl --location --request PUT 'https://server.viewsart.com/requests/0x15f9e' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"artists": ["Damien Hirst", "Richard Prince"],
"dos": "direct",
"source": "Margot Robbie",
"min_price": "100000",
"max_price": "200000",
"currency": "USD",
"notes": "buyer is very motivated",
"type_of_work": "painting",
"confidential_notes": "confident",
"org_ids": ["0x3fa1b"]
}'
Above request request should respond with status code
204.
This endpoint edits a Request.
HTTP Request
PUT https://server.viewsart.com/requests/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the request to update |
Delete Request
curl --location --request DELETE 'https://server.viewsart.com/requests/0x15f9e' \
--header 'Authorization: Bearer T'
Above request request should respond with status code
204.
This endpoint deletes a Request with specified id.
HTTP Request
DELETE https://server.viewsart.com/requests/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the request to delete |
Share Request
To share Request to one or more Organisation include org_ids list when Creating or Updating a Request.
curl --location --request PUT 'https://server.viewsart.com/requests/0x15f9e' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"artists": ["Damien Hirst", "Richard Prince"],
"dos": "direct",
"source": "Margot Robbie",
"min_price": "100000",
"max_price": "200000",
"currency": "USD",
"notes": "buyer is very motivated",
"type_of_work": "painting",
"confidential_notes": "confident",
"org_ids": ["0x3fa1b"]
}'
Above request request should respond with status code
204.
If Request is shared to Organisation other users will not see the original source but will see creator of the Request instead for confidentiality.
If request is shared to organisation other users will not see confidential_notes.
Unshare Request
To unshare Reques from all (or some) Organisation set org_ids list appropriately when Updating a Request.
Setting org_ids to empty array will remove Request from all Organisations.
curl --location --request PUT 'https://server.viewsart.com/requests/0x15f9e' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"artists": ["Damien Hirst", "Richard Prince"],
"dos": "direct",
"source": "Margot Robbie",
"min_price": "100000",
"max_price": "200000",
"currency": "USD",
"notes": "buyer is very motivated",
"type_of_work": "painting",
"confidential_notes": "confident",
"org_ids": []
}'
Above request request should respond with status code
204.
Collections
Collection is a set of artworks that is nicely displayed in the UI and contains metadata such as name and cover_image. Collections are often used to currate artworks in for Exhibitions or Fairs and serves a way to group artworks in Views for easy access. Collections can be shared to user's organisation for collaboration.
Get All Collections
curl --location --request GET 'https://server.viewsart.com/collections \
--header 'Authorization: Bearer T'
The above command returns JSON structured like this:
[
{
"id": "0x1390f",
"artists": ["Damien Hirst", "Richard Prince"],
"dos": "direct",
"min_price": "100000",
"max_price": "200000",
"currency": "USD",
"source": "Margot Robbie",
"notes": "buyer is very motivated",
"confidential_notes": "confident",
"type_of_work": "painting",
"created_at": "2021-10-12T11:27:45.9983969Z",
"updated_at": "2021-10-12T11:27:46.4296119Z",
"owner": {
"id": "0x13883",
"family_name": "Jamie",
"given_name": "Gourlay"
},
"organisations": [],
"shared_to_you": false
}
]
This endpoint retrieves all collections created by the user and collections accessible to user via their organisation.
HTTP Request
GET https://server.viewsart.com/collections
Create Collection
curl --location --request POST 'https://server.viewsart.com/collections' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Test collection",
"cover_image_url": "https://webapp.dev1.dev.viewsart.com/graphics/logo.png"
"organisations": ["0x2711"]}
}'
The above command returns JSON structured like this:
{
"id": "0x186a2"
}
This endpoint creates a Collection.
HTTP Request
POST https://server.viewsart.com/collections
JSON request parameters
| Parameter | Description |
|---|---|
name required |
Name of the collection. |
cover_image_url optional |
Cover image URL for the collection. |
organisations optional |
Organisations to share this collection to. 1 |
1 If collection is shared to the organisation, then all organisation members will be able to see shared collection. Organisation members will only be able to see specific artwork inside the collection if the artwork is also shared to the organisation shared before.
JSON response parameters
| Parameter | Description |
|---|---|
id |
ID of created collection. |
1 If collection is shared to the organisation, then all organisation members will be able to see shared collection. Organisation members will only be able to see specific artwork inside the collection if the artwork is also shared to the organisation shared before.
Update Collection
curl --location --request PUT 'https://server.viewsart.com/collections/0x186a2' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Test collection 2",
"cover_image_url": "https://webapp.dev1.dev.viewsart.com/graphics/logo.png"
"organisations": ["0x2711"]}
}'
Above request request should respond with status code
204.
This endpoint updates a Collection with specified id.
HTTP Request
PUT https://server.viewsart.com/collections/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the collection to update |
JSON request parameters
| Parameter | Description |
|---|---|
name required |
Name of the collection. |
cover_image_url optional |
Cover image URL for the collection. |
organisations optional |
Organisations to share this collection to. 1 |
Delete Collection
curl --location --request DELETE 'https://server.viewsart.com/collections/0x15f9e' \
--header 'Authorization: Bearer T'
Above request request should respond with status code
204.
This endpoint deletes a Collection with specified id.
HTTP Request
DELETE https://server.viewsart.com/collections/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the collection to delete |
Share Collection
To share Collection to one or more Organisation include organisations property when Creating or Updating a Collection.
curl --location --request PUT 'https://server.viewsart.com/collections/0x15f9e' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Test collection 2",
"cover_image_url": "https://webapp.dev1.dev.viewsart.com/graphics/logo.png",
"organisations": ["0x12345"]
}'
Above request request should respond with status code
204.
Unshare Collection
To unshare Collection from all (or some) Organisation set organisations property appropriately when Updating a Collection.
Setting organisations to empty array will remove Request from all Organisations.
curl --location --request PUT 'https://server.viewsart.com/collections/0x15f9e' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Test collection 2",
"cover_image_url": "https://webapp.dev1.dev.viewsart.com/graphics/logo.png",
"organisations": []
}'
Above request request should respond with status code
204.
Manage Collection
# Add items to collection
curl --location --request PUT 'https://server.viewsart.com/collections/0x27f3/items' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"items_to_add": [
"b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215",
"de68217f-34cc-11ec-82c7-0242ac120006"
]
}'
Above request request should respond with status code
204.
# Delete item from collection
curl --location --request PUT 'https://server.viewsart.com/collections/0x27f3/items' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"items_to_delete": ["b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215"]
}'
Above request request should respond with status code
204.
# Set items for collection
curl --location --request PUT 'https://server.viewsart.com/collections/0x27f3/items' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"items_to_set": ["b83b779f5f48b4da6971c0118cb978b42e4bbe217ab00921a5982656e55a2e2215"]
}'
Above request request should respond with status code
204.
# Delete items for collection
curl --location --request PUT 'https://server.viewsart.com/collections/0x27f3/items' \
--header 'Authorization: Bearer T' \
--header 'Content-Type: application/json' \
--data-raw '{
"items_to_set": []
}'
Above request request should respond with status code
204.
This endpoint allows to manage items inside collection. There are 3 methods of managing collection
- add items
- remove items
- set items (discard all existing items and add add new items)
HTTP Request
PUT https://server.viewsart.com/collections/<ID>/items
URL Parameters
| Parameter | Description |
|---|---|
| ID | ID of the collection to manage |
JSON request parameters
| Parameter | Description |
|---|---|
items_to_add optional |
Item IDs to add to collection. |
items_to_delete optional |
Item IDs to delete from collection |
items_to_set optional |
Item IDs to set for collection. |