OfficeGest
Attachments

List attachments

Returns a paginated list of attachments with optional filtering by entity, document, category, article and more. Supports eager loading of relations via include parameter.

GET
/attachments
AuthorizationBearer <token>

In: header

Query Parameters

id?integerDeprecated

Filter by attachment ID

description?stringDeprecated

Filter by description (supports operators: sw, ew, ct, eq)

entity_type?string

Filter by entity type (C=Client, F=Supplier, R=HR, T=Third-party)

Value in"C" | "F" | "R" | "T" | "c" | "f" | "r" | "t"
entity_id?integerDeprecated

Filter by entity ID

document_type?stringDeprecated

Filter by document type code

document_number?integerDeprecated

Filter by document number

article_id?stringDeprecated

Filter by article code (supports operators: sw, ew, ct, eq)

category_id?integerDeprecated

Filter by category ID

plate?stringDeprecated

Filter by vehicle plate (supports operators: sw, ew, ct, eq)

process_code?stringDeprecated

Filter by process code

process_id?stringDeprecated

Filter by process ID

file_type?stringDeprecated

Filter by MIME type (supports operators: sw, ew, ct, eq)

origin?string

Filter by origin (email, ftp, upload)

Value in"email" | "ftp" | "upload"
is_public?boolean

Filter by public status, true/false or 1/0

created_at?stringDeprecated

Filter by creation date (supports operators: gte, lte, eq)

Formatdate
updated_at?stringDeprecated

Filter by update date (supports operators: gte, lte, eq)

Formatdate
date?stringDeprecated

Filter by attachment date (supports operators: gte, lte, eq)

Formatdate
include_private?boolean

Include private attachments (default: false)

include?string

Comma-separated relations to include (category, author, article)

filter[id][operator]?integer

Operators: eq. Example: filter[id][eq]=value

filter[description][operator]?string

Operators: sw, ew, ct, eq. Example: filter[description][sw]=value

filter[entity_id][operator]?integer

Operators: eq. Example: filter[entity_id][eq]=value

filter[document_type][operator]?string

Operators: eq. Example: filter[document_type][eq]=value

filter[document_number][operator]?integer

Operators: eq. Example: filter[document_number][eq]=value

filter[article_id][operator]?string

Operators: sw, ew, ct, eq. Example: filter[article_id][sw]=value

filter[category_id][operator]?integer

Operators: eq. Example: filter[category_id][eq]=value

filter[plate][operator]?string

Operators: sw, ew, ct, eq. Example: filter[plate][sw]=value

filter[process_code][operator]?string

Operators: eq. Example: filter[process_code][eq]=value

filter[process_id][operator]?string

Operators: eq. Example: filter[process_id][eq]=value

filter[file_type][operator]?string

Operators: sw, ew, ct, eq. Example: filter[file_type][sw]=value

filter[created_at][operator]?string

Operators: gte, lte, eq. Example: filter[created_at][gte]=value

Formatdate
filter[updated_at][operator]?string

Operators: gte, lte, eq. Example: filter[updated_at][gte]=value

Formatdate
filter[date][operator]?string

Operators: gte, lte, eq. Example: filter[date][gte]=value

Formatdate
limit?integer

Items per page. Default 50, maximum 250; a larger value is truncated to 250.

Default50
Range1 <= value <= 250
sort?string

Sort field, prefix with - for DESC (e.g., -created_at)

page?integer

Page number. Default 1; a value below 1 counts as 1.

Default1
Range1 <= value

Response Body

curl -X GET "https://og-tenant1.test:8003/api/v2/attachments?id=0&description=string&entity_type=C&entity_id=0&document_type=string&document_number=0&article_id=string&category_id=0&plate=string&process_code=string&process_id=string&file_type=string&origin=email&is_public=true&created_at=2019-08-24&updated_at=2019-08-24&date=2019-08-24&include_private=true&include=string&filter%5Bid%5D%5Boperator%5D=0&filter%5Bdescription%5D%5Boperator%5D=string&filter%5Bentity_id%5D%5Boperator%5D=0&filter%5Bdocument_type%5D%5Boperator%5D=string&filter%5Bdocument_number%5D%5Boperator%5D=0&filter%5Barticle_id%5D%5Boperator%5D=string&filter%5Bcategory_id%5D%5Boperator%5D=0&filter%5Bplate%5D%5Boperator%5D=string&filter%5Bprocess_code%5D%5Boperator%5D=string&filter%5Bprocess_id%5D%5Boperator%5D=string&filter%5Bfile_type%5D%5Boperator%5D=string&filter%5Bcreated_at%5D%5Boperator%5D=2019-08-24&filter%5Bupdated_at%5D%5Boperator%5D=2019-08-24&filter%5Bdate%5D%5Boperator%5D=2019-08-24&limit=50&sort=string&page=1"
{
  "data": [
    {
      "id": 0,
      "description": "string",
      "show_name": "string",
      "file_type": "string",
      "file_size": 0,
      "entity_type": "string",
      "entity_id": 0,
      "document_type": "string",
      "document_number": 0,
      "article_id": "string",
      "category_id": 0,
      "plate": "string",
      "is_public": true,
      "date": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "url": "string"
    }
  ],
  "meta": {
    "per_page": 50,
    "current_page": 1,
    "has_more": true
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}
{
  "data": {
    "code": "VALIDATION_FAILED",
    "message": "The given data was invalid.",
    "errors": {
      "email": [
        "The email field is required."
      ]
    }
  },
  "meta": {
    "trace_id": "9f86d081884c7d659a2feaa0c55ad01568f3a1c2b4d5e"
  }
}