# Retrieve a File Certain records may have files attached. For a purchase, you can request a compensation confirmation, for example. SQUAKE can send this via email; you can have it returned from the purchase request immediately or fetch the file from this endpoint later. SQUAKE advises fetching files async after the purchase to keep the latency of the purchase API call low. You will always receive the file ID from the purchase endpoint if files are, or will be, attached to the record. Endpoint: GET /v2/files/{id} Security: Bearer-Auth ## Path parameters: - `id` (string, required) ## Response 200 fields (application/json): - `id` (string, required) - `filename` (string, required) - `purpose` (string, required) Enum: "confirmation_document", "certificate_document", "project_image" - `size` (integer, required) Byte size of the object - `type` (string, required) Enum: "csv", "jpg", "pdf", "png", "webp" - `download_url` (string) The link will expire after 1 year. If blank, the document has not been created yet. Please poll until a link is included. - `notification` (string) Information pertaining to the file, e.g., when the file will be available ## Response 401 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 403 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string) ## Response 404 fields (application/json): - `errors` (array) - `errors.code` (string, required) An application-specific error code, expressed as a string value. Enum: "field_validation_error", "server_error", "not_authorized", "not_found", "invalid_methodology", "invalid_type" - `errors.detail` (string) A human-readable explanation specific to this occurrence of the problem. Like title, this field's value can be localized. - `errors.source` (object) An object containing references to the primary source of the error - `errors.source.id` (string) - `errors.source.attribute` (string, required) - `errors.source.model` (string)