OfficeGest
Attachments/{id}

Update attachment

Updates attachment metadata. Does not change the file itself.

PATCH
/attachments/{id}
AuthorizationBearer <token>

In: header

Path Parameters

idstring
description?string

Attachment description

Lengthlength <= 255
entity_type?string

Entity type (C/F/P/R/E/T/Z)

Value in"C" | "F" | "P" | "R" | "E" | "T" | "Z"
entity_id?integer

Entity ID

document_type?string

Document type code

Lengthlength <= 10
document_number?integer

Document number

article_id?string

Article code

Lengthlength <= 50
category_id?integer

Attachment category ID

plate?string

Vehicle plate

Lengthlength <= 20
process_code?string

Process code

Lengthlength <= 50
process_id?string

Workshop process ID

is_public?boolean

Public flag, true/false or 1/0

Response Body

curl -X PATCH "https://og-tenant1.test:8003/api/v2/attachments/string" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "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"
  }
}
{
  "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"
  }
}