Get an upload URL for a field reference file
post
https://api.expiryedge.com/v1/getCollectionTemplateReferenceUploadUrleditor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/getCollectionTemplateReferenceUploadUrl' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_W9onboard",
"fieldId": "fld_insurance",
"filename": "sample-certificate.pdf",
"contentType": "application/pdf",
"sizeBytes": 120331
}'Antwort
{
"uploadUrl": "https://storage.googleapis.com/stylingsphere.appspot.com/organizations/org_northwind/collection-templates/tpl_W9onboard/fields/fld_insurance/reference-1b2c-sample-certificate.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Expires=900&X-Goog-Signature=...",
"storagePath": "organizations/org_northwind/collection-templates/tpl_W9onboard/fields/fld_insurance/reference-1b2c-sample-certificate.pdf",
"uploadHeaders": {
"Content-Type": "application/pdf"
}
}Returns a V4 signed PUT URL valid for 15 minutes, bound to contentType. Send every header in uploadHeaders with the PUT. Max 2MB. Then put {storagePath, originalFilename} in the field's reference_file when saving the template. The handler does not check the HTTP method.
templateIdstringerforderlichExisting template id, or the client id you will pass to createCollectionTemplate.pattern: ^[a-zA-Z0-9_-]+$fieldIdstringerforderlichpattern: ^[a-zA-Z0-9_-]+$filenamestringerforderlichcontentTypestringerforderlichOne of the MIME types listed inCollectionTemplateField.allowed_types.sizeBytesintegererforderlichmax: 2097152
200
Signed upload URL.
uploadUrlstringerforderlichformat: uristoragePathstringerforderlichuploadHeadersmap of stringerforderlichSend every one of these headers with the PUT.
400 | The request is missing required fields or contains invalid values. |
401 | Missing, expired or invalid bearer token. |
403 | Authenticated, but your role or organization does not allow this action. |
404 | The record does not exist or is not in your organization. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
