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.4/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 information about the document, like an author, type, version, comment etc. Second part contains document itself.

Url https://api.profit365.eu/1.4/storage/documents
Method POST
Content-Type multipart/form-data
Content A new document meta data
Example POST https://api.profit365.eu/1.4/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="document"; filename="docDTO"; Content-Type: application/json;

{ "ownerID": "7cc8559c-e714-4347-b161-4fbbdb06d2c6",
"documentName" : "general license agreement"
}

------------------------------7843256783465987324658743
Content-Disposition: form-data; name="file"; filename="some_picture.png"; Content-Type: application/png;

.. content of some_picture.png ..

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