Address files

Resource type: file

The call can be used to read the URL and metadata of address files under “Address >> Files”.

An address ID must be specified. If the user has read rights to the address, then the address files are also readable.

Parameters:

  • addressid
    Address ID. INTEGER. MANDATORY
  • listlimit
    Number of data records to be output. Default: 20, Maximum: 100. INTEGER. OPTIONAL
  • listoffset
    Offset of the list, that means from which data record onwards the list should be output. INTEGER. OPTIONAL

Example:

...
    {
        "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
        "resourceid": "address",
        "identifier": "",
        "resourcetype": "file",
        "parameters": {
            "addressid": "15185"
        }
    }
...

Response:

  • type
    Type of file
  • url
    URL of the file
  • name
    Name of the file
  • originalname
    Original name of the file
  • modified
    Timestamp of last modification (number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970)
  • date
    Upload date of the file
...
{
    "status": {
        "code": 200,
        "errorcode": 0,
        "message": "OK"
    },
    "response": {
        "results": [
            {
                "actionid": "urn:onoffice-de-ns:smart:2.5:smartml:action:get",
                "resourceid": "address",
                "resourcetype": "file",
                "cacheable": true,
                "identifier": "",
                "data": {
                    "meta": {
                        "cntabsolute": 1
                    },
                    "records": [
                        {
                            "id": 28181,
                            "type": "file",
                            "elements": {
                                "type": "Foto",
                                "url": "https:\/\/beta.smart.onoffice.de\/smart\/app\/shared\/crm\/AppFileDownload.php?params=LOzEi7j%2BbaWZL8gAn58F7F2mflhlIlh78rnDWlHgJMGsCC4Ky0V43kNrUfJISWB8PO7VEGftuxK7QfYLbDi2EnZjPYhO7a9kRyn78nZZeNpzPpYuVN4ZT%2BfxyqLuvb3E",
                                "name": "Rechnung.png",
                                "originalname": "Rechnungen.png",
                                "modified": 1637602153,
                                "date": "2021-11-22"
                            }
                        }
                    ]
                },
                "status": {
                    "errorcode": 0,
                    "message": "OK"
                }
            }
        ]
    }
}
...