RobinReturn
Partner API

Uploads

Upload an invoice document to RobinReturn via a presigned URL before creating a case over the Partner API.

Every case carries its original invoice document, so creating a case starts with uploading the invoice. This is a two-part step: ask for a presigned URL, then PUT the file bytes to it.

Request a presigned URL

POST /api/v1/uploads          scope: cases:write
Content-Type: application/json

{ "filename": "invoice-001.pdf", "contentType": "application/pdf" }

Allowed contentType values: application/pdf, image/png, image/jpeg.

Response

{
  "fileKey": "<companyId>/api-uploads/<uuid>/invoice-001.pdf",
  "uploadUrl": "https://…presigned-PUT…",
  "expiresInSeconds": 300
}

Upload the file

PUT the raw file bytes to uploadUrl with the same Content-Type you declared:

PUT <uploadUrl>
Content-Type: application/pdf

<file bytes>

The presigned URL expires after expiresInSeconds (300s). If it lapses, request a new one.

Next

Keep the returned fileKey — you pass it as invoiceFileKey when you create the case. A fileKey is scoped to your company; a case referencing a key outside your company's prefix is rejected (INVALID_FILE_KEY).

On this page