Documents

Documents API allows you to upload documents as attachments to invoices or other documents in Profit365. Further administration of documents is provided in Profit365 module Office -> Documents.

Content:

Resource information

Url https://api.profit365.eu/1.6/storage/documents
Authentication required
Access level company
Response JSON / XML
Class Business entity

Upload document

HTTP request to upload document to Profit365 API is type of 'multipart/form-data' and must consist from exactly two parts. First part contains the file itself. Second part contains information about the document, like an author, type, version, comment etc.

Url https://api.profit365.eu/1.6/storage/documents
Method POST
Content-Type multipart/form-data
Content A new document meta data
Example POST https://api.profit365.eu/1.6/storage/documents

Authorization: Basic *** hidden credentials ***
ClientID: C7A36D...
ClientSecret: j7896WnI0U1...
CompanyID: CCA256B...
Content-Type: multipart/form-data; boundary=---------------------------7843256783465987324658743
Content-Length: 834
------------------------------7843256783465987324658743
Content-Disposition: form-data; name="file"; filename="some_picture.png"; Content-Type: application/png;

.. content of some_picture.png ..

------------------------------7843256783465987324658743
Content-Disposition: form-data; name="document"; filename="docDTO"; Content-Type: application/json;

{ "ownerID": "1a1ec753-25a7-464e-9b88-3c9c72bd367e",
"documentName" : "general license agreement"
}

Document data

ownerId

optional

ID of an document owner. This may be any transaction (invoice, issue card) or partner

Type: GUID

request, response

documentName

required

Name of the document. May contain any text.

Type: string

request, response