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

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

Packaging labels

Обновлено 30.10.2023
127 кб

General information

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

Packaging labels directory

Method request

Request structure

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

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

Method address: https://api.dellin.ru/v1/references/marking/packaging_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":"pallet",
         "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>pallet</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 packaging types
data.namestring

Packaging type.

Possible values see in the table below

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

Packaging types
ValueDescriptionLabel
palletPalletПБ
crateWooden crateЖУ
crate_plusWooden boxЖК
boxCardboard boxКК
bagBagМешок
bubbleBubble wrapВПП
tapeAdditional packagingДУ
pallet_with_bubbleBubble wrap and palletСпец ПБ
crate_with_bubbleBubble wrap and wooden crateСпец ЖУ
protect_auto_partSpecial packaging for auto partsСпец Бампер
protect_auto_glassSpecial packaging for auto glassСпец Стекло
amortizingAmortizing packagingАморт

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 packaging labels

Method request

Request structure

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

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

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

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <type>jpg</type>
   <oneFile>false</oneFile>
   <per>10</per>
   <page>1</page>
   <packagingMarks>
      <name>pallet</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

Packaging type.

Possible values see in the table above

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":"pallet",
         "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>
   <state>processed</state>
   <data>
      <name>pallet</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

Packaging type.

Possible values see in the table above.

If generating multipage document (2) the value is "result"

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.