Document Sharing
Overview
Canopy OS can share documents for accounts. The documents can be added, viewed, and listed in both the Canopy OS front-end and API.
Programmatic usage
See the API reference for document upload
Example of an upload workflow with curl:
#MY_CANOPY_DOMAIN="my-api.us.canopyservicing.com"
#ACCOUNT_ID="can_10010"
#FILE="doc1.pdf"
#ACCESS_TOKEN="{API token}"
# Request to upload with a presigned URL
response=$(curl --request GET \
--url "https://${MY_CANOPY_DOMAIN}/accounts/${ACCOUNT_ID}/documents/upload_url?filename=${FILE}" \
--header 'accept: application/json' \
--header "Authorization: Bearer ${ACCESS_TOKEN}")
# Response body contains a presigned url
echo "${response}"
# {"upload_url": "https://s3-presigned-url", "method": "PUT"}
# Take the url from the response
url=$(echo "${response}" | jq -r '.upload_url')
# Upload using HTTPS PUT and the URL from above
curl -v --request PUT --upload-file "${FILE}" "${url}"
Supported file types
Our supported file extensions are: .pdf, .jpg, .jpeg, .png, .csv, .odf, .heic
Updated 4 months ago