1b.app
Link copied -

API Document (Document)

Add document to process, method: /api/document/add/

Parameters

Example:

http://myboxurl/api/document/add/?login=LOGIN&password=PASSWORD&ordercode=1&templateid=14&name=TEST

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/

Parameters
Parameters for getting one document:

Example:

http://myboxurl/api/document/get/?login=LOGIN&password=PASSWORD&documentid=7927

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/
Parameters for getting all documents:

Example:

http://myboxurl/api/document/get/?login=LOGIN&password=PASSWORD&part=1
http://myboxurl/api/document/get/?login=LOGIN&password=PASSWORD&part=2

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

More details
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

Errors may also occur:

502 Bad Gateway - If this error occurs it is necessary:
1. Check if you have internet access (go to any other site).
2. If there are no problems with access — cookies can be deleted.
If the above doesn't work — server side problem. Please contact your site system administrator.

503 (Service Temporarily Unavailable) - this error may occur as a result of too many server requests. If you see this error, you should wait a couple of minutes and try again.

504 Gateway Timeout - cmost likely the reason is the increased load on the site, in which Apache is not has time to send HTTP responses and new requests are queued. You can add resources to the server, in particular RAM, and increase the number of httpd (Apache) processes.
Another possible reason for error 504 is that the executable script does not fit within the allotted limit time. This happens when the request is too heavy. Try to split your request into a few more small.

Error 505 HTTP Version not supported means the website is not Supports the version of the HTTP protocol that the browser uses to request a web page