Documentation to support developers wanting to integrate with the VENTURE.co investment platform.
An Asset in VENTURE.co’s API is any arbitrary file that a user might upload to the system. This can be anything from an image such as a product logo to a PDF for an issuer’s prospective offering memorandum or an Excel spreadsheet detailing financials for the past several years. The Asset endpoint is designed to easily support uploading and managing these types of documents.
Creating or uploading a new asset is as simple as sending a POST request to the asset endpoint. For brevity we document this as a JSON object but if necessary you can send this document as multipart/form-data.
asset key.
POST /v2/core/assets
{
"file": "######",
"file_type": "some-document",
"name": "My business document",
"assetable_type": "Investment",
"assetable_id": 1234,
"meta": {
"arbitrary": "data"
}
}
If all is well you’ll receive a 201 Created response code and a JSON object
similar to that detailed below in ‘Getting Assets’. Otherwise check out more
details below on working with assets during the creation process.
Images are uploaded to the Cloudinary image hosting and transformation service.
It is possible to provide cropping attributes in the meta object. Please see
Cloudinary’s cropping documentation
for more details.
Sometimes it is a better UX to provide a thumbnail of a cover sheet to download
a document instead of simply putting a text link on the screen. If it is possible
for us to thumbnail a document’s cover sheet we will mark that file type as
thumbifiable. If we can make a thumbnail for a document we will return a thumbnail_id
attribute representing the thumbnail Asset.
The file_type attribute is extremely important; it helps us organize documents
and dictates what entity that document should be associated to. When creating an
Asset the file_type you specify MUST already exist on the API. Below is a
comprehensive list of every file_type for the entities that they can be associated
to.
| File Type | Assetable Type | Details | Document Type | Thumbifiable |
|---|---|---|---|---|
| additional_document | Investment | A blank slate for documents associated to an investment but does not fit into the other file types for Investment | file | No |
| avatar | User | The graphical representation of a user | image | No |
| bad_actor_certification | TBD | A document detailing that a team or team members are acting in good faith | file | No |
| business_plan | TBD | A document detailing a Product’s plan to conduct their business | file | Yes |
| charter_document | TBD | A legal filing with a US State that details the major components and objectives of a company | file | Yes |
| cover_image | Product | The large hero image at the top of an Investment’s landing page | image | No |
| drivers_license | Accreditation | An investor’s drivers license to prove their residency, required for certain investment types | image | No |
| executed_letter_of_accreditation | TBD | A letter executed by an attorney to verify an investor’s accreditation status | file | No |
| financial_document | Investment | A document detailing a company’s financials for a given year or set of years | file | Yes |
| intellectual_property | Investment | A document describing some IP under the company’s control, likely a patent document | file | Yes |
| investors_charter_document | IndicationOfInterest | A charter document that gives rights to an investor to act on a company’s behalf | file | No |
| investors_corporate_resolution | IndicationOfInterest | TBD | file | No |
| letter_of_accreditation | Accreditation | A letter that an investor provides verifying they are accredited to invest | file | No |
| logo | Product | A product’s logo | image | No |
| one_page_teaser | Product | A product’s primary marketing teaser intended to sell the product to investors in a 1 page format | file | Yes |
| preexisting_subscription_agreement | Investment | An issuer has provided an existing subscription agreement outside of VENTURE.co’s platform | file | No |
| pitch_deck | Product | A set of slides intended to expand on the one page teaser and provide a more comprehensive overview of the product | file | Yes |
| team_member_avatar | TeamMember | An avatar for team members who are not yet users on the VENTURE.co platform | image | No |
| utility_bill | Accreditation | A photo of an investor’s utility bill to ensure their residency | image | No |
Retrieving a single Asset is as simple as sending a GET request with the desired Assets id.
GET /v2/core/assets/9876
The response will look like:
{
"asset": {
"assetable": {
"type": "Investment",
"id": 1234
},
"file_type": "some-document",
"id": 9876,
"key": "########",
"meta": {
"arbitrary": "data"
},
"name": "My business document",
"private": false,
"thumbifiable": true,
"thumbnail_id": "########"
}
}
There is no corresponding GET /v2/core/assets endpoint to get a collection of
assets; this is because it would return every possible Asset you have permission
to access. Without the appropriate context this would be confusing to the user
and would cause a ton of superfluous data to constantly be sent from the API.
Instead each resource that has assets associated to it will either sideload their
assets or will include a URL to access in the links hash of the response body.
Please see the API overview for more information on sideloading and each individual resource documentation to learn how to access specific Asset collections.
Downloading an asset is as simple as retrieving a time-expiry URL from the VENTURE.co API and then using that to download or display the file represented by the Asset resource.
GET /v2/core/assets/:id/download_url
The response will look like:
{
"url": "https://download.example.com/some/file"
}
You’re able to use the value in the url key to perform the download.
It is possible to mark an Asset as private, change its name, or update meta data
after the file has been uploaded. You can do so by passing a simple PUT request
to the API.
PUT /v2/core/assets/:id
{
"asset": {
"private": true,
"name": "some new name",
"meta": {
"key": "value"
}
}
}
Sometimes you don’t want an Asset to stick around anymore. You can get rid of
it by sending a DELETE request.
DELETE /v2/core/assets/:id
If the Asset was deleted successfully you’ll receive a 204 No Content response.