Request urls API | Method POST

[<https://content.view-travel.com/v3/api/attachments/>](<https://content.view-travel.com/v3/api/attachments/>)

List of parameters for uploading files

PARAMETERS MANDATORY TYPE VALUES THAT CAN BE TAKEN
transport YES string Transport ID. Obtained by adding files type transport
file_type YES string File type code see list of file types
name only file type others string only file type others
file YES file File to transport. You can upload files with the extension (.jpg,.jpeg,.png,.pdf,.PDF,.doc,.docx,.csv,.xlx,.xlsx,.ppt,.ppsx) and in a maximum of 4mb.
file_link NO string Only when you want to add a file link
is_public YES boolean true o false

Include in headers

headers: {
    'Authorization': Bearer YOUR_TOKEN_REFRESH' ,
}

Parameters to send the request

{
    "transport": 3811,
    "file_type": 9,
    "file": 'Bahamas-Viewtravel.pdf',
    "is_public": true
}

Response to the request

{
    "id": 271,
    "category": 2,
    "name": "",
    "file": "<http://staticfiles.view-travel.com/attachments/files/69fb6c85f06f4a24af747627e8d4966e.pdf>",
    "file_link": "",
    "file_extension": ".pdf",
    "date_at": "2025-05-20T22:52:30.111645Z",
    "is_public": true,
    "is_dynamic_table": false,
    "order": 1,
    "transport": {
        "id": 3811,
        "package_code": "ONE",
        "my_view": {
            "code": "TXnmRVrt",
            "title": "Un view completo con fechas",
           .
           .
           .
        },
        "transport_type": {
            "id": 24,
            "code": "files",
            "name": "Archivos",
            .
            .
            .
        },
        "order": 1,
        "dnd_order": 1,
        "is_active": true,
        "slug": "none",
        "user": {
            "id": 615,
            "first_name": "Lenin",
            "last_name": "Espinoza Cueva",
            "email": "[email protected]",
            "username": "leninesc"
        }
    },
    "file_type": {
        "id": 9,
        "nombre": "Documento",
        "agencia": null,
        "categoria": 2
    },
    "user": {
         "id": 615,
         "first_name": "Lenin",
         "last_name": "Espinoza Cueva",
         "email": "[email protected]",
         "username": "leninesc"
   }
}