GET
Download a return-related document

Authorizations

X-InStockRx-Api-Key
string
header
required

Scoped partner API key. Send the whole key, e.g. ik_live_a1b2c3…, on every request.

Headers

X-Pharmacy-Id
string<uuid>

Which pharmacy in your group you are acting as. Required whenever your group holds more than one pharmacy — omitting it is then 400 missing-pharmacy-context. With exactly one pharmacy it may be omitted, but send it anyway: the call starts failing the day a second pharmacy is added.

Path Parameters

id
string<uuid>
required
documentType
enum<string>
required

Which document to fetch. Access is role-scoped on the return: a credential bound to the buying pharmacy can fetch buyer-invoice and rma; a credential bound to the selling pharmacy can fetch rma and seller-restocking-invoice. A partner credential is never "admin" — admin-only access does not apply to V2 partners.

Requests outside a partner's role return 403 with problem.type = "document-not-accessible-to-role".

Available options:
buyer-invoice,
rma,
seller-restocking-invoice

Response

PDF document

The response is of type file.