Document record

Endpoints

Retrieval of document record

POST/api/RPC.common.Api.DocInfo.get?token=<TOKEN>

Key DocInfo.get · Open page

Parameters

4 body parameters inside data[]
FieldTypeDescription
numrequiredStringDocument #
typerequiredStringOperation type
columnsStringColumns in operation
row_columnsStringColumns of the rows of the operation

File attachment to operation

POST/api/RPC.common.Api.DocInfo.attachFileToOperation?token=<TOKEN>

Key DocInfo.attachFileToOperation · Open page

Parameters

7 body parameters inside data[]
FieldTypeDescription
idrequiredStringDocument ID
numrequiredStringDocument #
typerequiredStringOperation type
attached_filesrequiredObjectAttached_files object.
attached_files.file_namerequiredStringFile name
attached_files.file_urlStringFile URL
attached_files.base64_fileStringFile

Request example

Attach File To Operation / File Url:
{
   "data" : [
      {
         "num" : "0000000795",
         "type" : "invoice",
         "attached_files" : [
            {
               "file_url" : "https://signs.bg/wp-content/uploads/2022/02/smiley.png",
               "file_name" : "smiley.png"
            }
         ]
      }
   ]
}
Attach File To Operation / Base64 File:
{
   "data" : [
      {
         "num" : "0000000795",
         "type" : "invoice",
         "attached_files" : [
            {
               "base64_file" : "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAQSURBVHjaYvj//z8DQIABAAj8Av7bok0WAAAAAElFTkSuQmCC",
               "file_name" : "small_pics.png"
            }
         ]
      }
   ]
}

cURL

Attach File To Operation / File Url:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "num" : "0000000795",         "type" : "invoice",         "attached_files" : [            {               "file_url" : "token=<TOKEN>",               "file_name" : "smiley.png"            }         ]      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.DocInfo.attachFileToOperation?token=<TOKEN>"
Attach File To Operation / Base64 File:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{   "data" : [      {         "num" : "0000000795",         "type" : "invoice",         "attached_files" : [            {               "base64_file" : "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAQSURBVHjaYvj//z8DQIABAAj8Av7bok0WAAAAAElFTkSuQmCC",               "file_name" : "small_pics.png"            }         ]      }   ]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.DocInfo.attachFileToOperation?token=<TOKEN>"

Response example

    HTTP/1.1 200 OK
{
   "result" : [
      {
         "file_path" : "/tmp/filename",
         "file_name" : "file_name"
      }
   ]
}