Поиск по сайту

API
Главная / API - Handling labels

Handling labels

Обновлено 20.01.2023
122 кб

General information

The service allows getting information on manipulation signs as well as initiating the process of generating handling labels. The service is available to authorized users only.

Handling labels directory

Method request

Request structure

Method address: https://api.dellin.ru/v1/references/marking/handling_marks.json

 
{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000"
}

Method address: https://api.dellin.ru/v1/references/marking/handling_marks.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2020-06-17 15:15:58"
   },
   "data":[
      {
         "name":"fragile_cargo",
         "format":"a4",
         "type":"image/jpeg",
         "base64":"hgrkhgkjtrhukthi..."
      }
   ]
} 
<response>
   <metadata>
      <status>200</status>
      <generated_at>2020-06-17 15:15:58</generated_at>
   </metadata>
   <data>
      <name>fragile_cargo</name>
      <format>a4</format>
      <type>image/jpeg</type>
      <base64>hgrkhgkjtrhukthi...</base64>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

Emulated status http-code. If successful, code 200 (Success) is returned

metadata.generated_atstring

Server response date and time.

Format: YYYY-MM-DD HH:MM:SS

dataarray of DataInformation on handling labels
data.namestring

Handling label identifier.

Possible values:

  • fragile_cargo;
  • this_way_up;
  • stack_forbidden;
  • beacon - radio emission
data.formatstring

Labels size.

Possible values: 80x50, a4

data.typestring

MIME-type file.

Possible values: image/jpeg, application/pdf, image/png

data.base64stringBase64-code of the file with the labels

Error handling

The common API errors are used with the method, for errors format description and errors list see Errors of API methods.

Getting the handling labels

Method request

Request structure

Method address: https://api.dellin.ru/v1/references/marking/handling_marks/get.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "type":"jpg",
   "format":"a4",
   "oneFile":false,
   "per":10,
   "page":1,
   "packagingMarks":[
      {
         "name":"fragile_cargo",
         "format":"a4",
         "count":2
      }
   ]
}

Method address: https://api.dellin.ru/v1/references/marking/handling_marks/get.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <type>jpg</type>
   <format>a4</format>
   <oneFile>false</oneFile>
   <per>10</per>
   <page>1</page>
   <packagingMarks>
      <name>fragile_cargo</name>
      <format>a4</format>
      <count>2</count>
   </packagingMarks>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
typeNostring

Type of the file with the labels.

Available values: jpg, pdf, png.

Default value - pdf

oneFileNoboolean

Flag indicating whether to generate one multipage document (one label per page) or several individual files.

Available values:

  • true - generate one multipage document. The value can only be passed if "type" parameter value is "pdf".
  • false - generate individual files. 

Default value - false

perNointeger

The number of links on files with the labels per page (1). Maximum value - 50.

Default value - 30

pageNointeger

Page number (1). 

Default value - 1

packagingMarksYesarray of PackagingMarksParameters of labels array
packagingMarks.nameYesstring

Manipulation label identifier

Available values:

  • fragile_cargo;
  • this_way_up;
  • stack_forbidden;
  • beacon - radio emission
packagingMarks.formatNostring

Labels size.

Available values: 80x50, a4.

Default value - 80х50

packagingMarks.countYesintegerNumber of labels

Notes:

  1. If generating individual files (that is if "type" parameter value is "jpg" or "png") the files links are organized into pages, 30 links per page. It is possible to change the number of links per page (see "per" parameter description) as well as indicate the number of the page that need to be received in the response (see "page" parameter description)

Method response

Response structure

{
   "metadata":{
      "status":200,
      "current_page":2,
      "next_page":3,
      "prev_page":1,
      "total_pages":6,
      "generated_at":"2022-03-16 16:29:47"
   },
   "data":[
      {
         "name":"fragile_cargo",
         "format":"a4",
         "type":"image/jpeg",
         "base64":"JVBERi0xLjMKJf////8KMSAw..."
      }
   ]
} 
<response>
   <metadata>
      <status>200</status>
      <current_page>2</current_page>
      <next_page>3</next_page>
      <prev_page>1</prev_page>
      <total_pages>6</total_pages>
      <generated_at>2022-03-16 16:29:47</generated_at>
   </metadata>
   <data>
      <name>fragile_cargo</number>
      <format>a4</format>
      <type>image/jpeg</type>
      <base64>JVBERi0xLjMKJf////8KMSAw...</base64>
   </data>
</response>

Description of parameters

Response
Response
ParameterTypeDescription
metadataobjectSystem information
metadata.statusinteger

Emulated status http-code. If successful, code 200 (Success) is returned

metadata.current_pageinteger

The current page number.

The value is different from 1, only if generating individual files and requesting the specific page data (1)

metadata.next_pageinteger

The next page number.

If generating individual files the value is different from 2 only if specific page data are requested (1). If generating multipage document (2) the value is "null"

metadata.prev_pageinteger

The previous page number.

The value is different from "null" only if specific page data are requested (1)

metadata.total_pagesinteger

The total number of pages with the links.

In case of multipage document (2) the value is always 1 

metadata.generated_atstring

Server response date and time.

Format: YYYY-MM-DD HH:MM:SS

dataarray of DataLabels data
data.namestring

Manipulation label identifier

Possible values:

  • fragile_cargo;
  • this_way_up;
  • stack_forbidden;
  • beacon - radio emission:
  • result - the value is present in the response when generating multipage document 
data.formatstring

Labels size.

Possible values: 80x50, a4

If generating multipage document (2) the value is empty

data.typestring

MIME-type file.

Possible values: image/jpeg, application/pdf, image/png

data.base64stringBase64-code of the file with the labels

Notes:

  1. The "type" request parameter value is "jpg" or "png" and the "page" request parameter value is different from 1.
  2. The "type" request parameter value is "pdf" and the "oneFile" request parameter value is "true"

Error handling

The common API errors are used with the method, for errors format description and errors list see Errors of API methods.