Add document to process, method: /api/document/add/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | templateid | integer | Document Template ID | Required field. | Please enter a document template ID to create a document. |
4 | orderid | integer | Process ID | Required field. | Please enter the ID or external code of the process for which you want to create a document |
5 | ordercode | integer | Process external code | Required field. | Please enter the ID or external code of the process for which you want to create a document |
6 | name | string | document name | Optional field. | |
7 | clientview | 1 / 0 | Available for viewing in the client's account | Optional field. | For the document to be available for viewing in the client's office, specify 1 in this field |
8 | fileoriginal | string | Original file | Optional field. |
Get one document and get all documents, method: /api/document/get/
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | documentid | string | Document ID | Required field. | If you need a specific order, then you pass either the document id or the document number in this field. The engine will find this one by itself. Return field values id - id document number - Document Number, name - document name, contractorid - id legal entity in the BOX system, contactorname - legal entity name, templateid - id document template, templatename - document template name, userid - id the user who created the document, cdate - document creation date, sdate - date the document was sent, bdate - date when the document was received back, adate - date when the document was archived, edate - document modified date, fileoriginal - link to original file, file - link to scan copy, content - HTML document content, clientview - available for viewing in your account, clientpay - available for payment in your account, sum - document amount, currencyid - id document currency, currencyname - document currency name, orderid - id document process |
4 | clientinfo | boolean | Process client data array | Optional field. | The array will contain all system and additional fields of the client of the process in which the document was created, specified in the request response / api / contact-get / json/ |
Example:
№ | Field | Type | Description | Required or not | Comment |
1 | login | string | Login in BOX system | Required field. | |
2 | password | string | Password in md5 format | Required field. | Contact tech support and we will give you a hash for the API |
3 | orderid | string | ID process | Optional field. | Please enter the ID of the process whose documents you want to receive |
4 | templateid | string | ID document template | Optional field. | Specify the id of the document template by which to filter documents. |
5 | cdate | date | document creation date | Optional field. | Specify the creation date and the final selection will include only those documents whose creation date is greater than or equal to the specified one |
6 | part | integer | Document part | Required field. | API gives up to 1000 documents in the 1st part, to get the next 1000 documents send 2 there (it turns out part 2) and so on. Return field values id - id document number - Document Number, name - document name, contractorid - id legal entity in the BOX system, contactorname - legal entity name, templateid - id document template, templatename - document template name, userid - id the user who created the document, cdate - document creation date, sdate - date the document was sent, bdate - date when the document was received back, adate - date when the document was archived, edate - document modified date, fileoriginal - link to original file, file - link to scan copy, content - HTML document content, clientview - available for viewing in your account, clientpay - available for payment in your account, sum - document amount, currencyid - id document currency, currencyname - document currency name, orderid - id document process |
7 | clientinfo | boolean | Process client data array | Optional field. | The array will contain all system and additional fields of the client of the process in which the document was created, specified in the request response / api / contact-get / json/ |
Possible responses to the request
№ | Status | Message | Message Description |
1 | fail | login_empty | Login missing |
2 | fail | password_empty | Missing password |
3 | fail | Bad user level! | Low user level to perform this action (requires level 2 or higher) |
4 | fail | Login or password not correct! | Login or password entered incorrectly |