Finish an upload and attach the file to the expiry

posthttps://api.expiryedge.com/v1/completeExpiryAttachmentUpload
editor or admin; must be the user who started the upload60/minIdempotency-Key
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/completeExpiryAttachmentUpload' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "upload_id": "pUp7x1"
}'
Antwort
{
  "attachment": {
    "index": 1,
    "name": "Gas Safety Certificate 2026.pdf",
    "url": "https://firebasestorage.googleapis.com/v0/b/stylingsphere.appspot.com/o/user_files%2Forg_northwind%2Fu_71bXq%2Fexpiry_exp_4Tq9sLm2%2F1790517900000_Gas_Safety_Certificate_2026.pdf?alt=media&token=9c2e4d1a-7b3f-4e6a-8d5c-1f0a2b3c4d5e"
  },
  "attachments": [
    {
      "index": 0,
      "name": "Gas Safety Certificate 2025.pdf",
      "url": "https://firebasestorage.googleapis.com/v0/b/stylingsphere.appspot.com/o/user_files%2Forg_northwind%2Fu_71bXq%2Fexpiry_exp_4Tq9sLm2%2FGas_Safety_Certificate_2025.pdf?alt=media&token=5b1f0c7e-2a41-4d8e-9f3a-0c6d2e7b9a11"
    },
    {
      "index": 1,
      "name": "Gas Safety Certificate 2026.pdf",
      "url": "https://firebasestorage.googleapis.com/v0/b/stylingsphere.appspot.com/o/user_files%2Forg_northwind%2Fu_71bXq%2Fexpiry_exp_4Tq9sLm2%2F1790517900000_Gas_Safety_Certificate_2026.pdf?alt=media&token=9c2e4d1a-7b3f-4e6a-8d5c-1f0a2b3c4d5e"
    }
  ]
}

Step 3 of 3. Checks the uploaded file matches what you declared, adds it to the end of the expiry's file list (it appears in the app straight away) and counts it towards your storage. Single use.

Header

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body-Parameter

application/json
  • upload_idstringerforderlich
    upload_id from getExpiryAttachmentUploadUrl.

Rückgabe

201
File attached.
  • attachmentobjecterforderlich
    A file attached to an expiry. Stored on the expiry as matching entries in fileUrls and fileNames.
  • attachmentsarray of objectserforderlich
    All attachments on the expiry after this upload.

Fehler

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
Upload not found (wrong id, other user or organization), or the expiry was deleted.
405
The endpoint does not accept this HTTP method.
409
Already completed (CONFLICT), or the expiry reached 50 attachments meanwhile (TOO_MANY_ATTACHMENTS).; or a request with the same Idempotency-Key is still being processed (code IDEMPOTENCY_IN_PROGRESS).
410
The upload link expired (15 minutes). Start a new upload.
422
No file was uploaded (UPLOAD_MISSING), or it does not match the declared size or type (UPLOAD_MISMATCH).
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.