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

API
Главная / API - Cargo places labeling

Cargo places labeling

Обновлено 06.02.2023
193 кб

General information

The service allows transferring the cargo places code numbers (and thus initiate the process of generating labels for packages / shipping documents) and downloading the generated labels. The service is available to authorized users only.

It is only possible to generate the labels if the order has one of the following statuses:
  • Processing,
  • Pickup,
  • Waiting

Passing the packages code numbers

Method request

Request structure

Method address: https://api.dellin.ru/v2/request/cargo/shipment_labels.json

 
{
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"111111",
   "cargoPlaces":[
      {
         "cargoPlace":"123123",
         "amount":1
      },
      {
         "cargoPlace":"22222",
         "amount":1
      }
   ]
}

Method address: https://api.dellin.ru/v2/request/cargo/shipment_labels.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <orderID>111111</requestID>
   <cargoPlaces>
      <cargoPlace>123123</cargoPlace>
      <amount>1</amount>
   </cargoPlaces>
   <cargoPlaces>
      <cargoPlace>22222</cargoPlace>
      <amount>1</amount>
   </cargoPlaces>
</request>

Description of parameters

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

ID of order for which it is necessary to generate the labels for packages / shipping documents

To place an order use "Placing LTL orders" method

cargoPlaces

Yesarray of CargoPlacesCargo places data

cargoPlaces.cargoPlace

Yesstring

Cargo place code number (cargo places to be marked by the client), the values does not need to be unique.

If information is not available or it is not possible to pass the information, but it is necessary to generate the labels, "null" can be passed as parameter value

cargoPlaces.amount

NointegerNumber of the cargo places with the same code number. If the values is not passed, the the parameter takes the value 1

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2020-06-17 15:15:58"
   },
   "data":{
      "state":"enqueued"
   }
} 
<response>
   <metadata>
      <status>200</status>
      <generated_at>2020-06-17 15:15:58</generated_at>
   </metadata>
   <data>
      <state>enqueued</state>
   </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

dataobjectInformation on the operation completion
data.statestringStatus. Possible value - "enqueued"

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 labels for packages

To generate the packages labels it is necessary first to pass the information on the order cargo places, see "Passing the packages code numbers" method

Method request

Request structure

Method address: https://api.dellin.ru/v2/request/cargo/shipment_labels/get.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"2000395000025",
   "type":"jpg",
   "format":"a4",
   "oneFile":false,
   "per":10,
   "page":1
}

Method address: https://api.dellin.ru/v2/request/cargo/shipment_labels/get.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <orderID>2000395000025</orderID>
   <type>jpg</type>
   <format>a4</format>
   <oneFile>false</oneFile>
   <per>10</per>
   <page>1</page>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
orderIDYesstring
The order number for which it is necessary to generate the labels
typeNostring

Type of the file with the labels.

Available values: jpg, pdf, png.

Default value - pdf

formatNostring

Labels size.

Available values: 80x50, a4.

Default value - 80х50

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

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"
   },
   "state":"processed",
   "data":[
      {
         "cargoPlace":"123123",
         "number":"11",
         "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>
      <cargoPlace>123123</cargoPlace>
      <number>11</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

statestring

Status of process of generating the labels.

Possible values:

  • enqueued;
  • processed
dataarray of DataLabels data
data.cargoPlacestring

Cargo place code number.

In case of multipage document (2) the parameter value is empty

data.numberstring

The number of the cargo place.

In case of multipage document (2) the parameter value is "result"

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

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.

Getting the labels for shipping documents

The method can only be used if delivery/return of shipping documents has been ordered (delivery.accompanyingDocuments parameter has been passed in the request of "Placing LTL orders" method). To generate the shipping documents labels it is necessary first to pass the information on the order cargo places, see "Passing the packages code numbers" method 

Method request

Request structure

Method address: https://api.dellin.ru/v2/request/cargo/docs_shipment_labels/get.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"2000395000025",
   "format":"a4",
   "type":"pdf"
}

Method address: https://api.dellin.ru/v2/request/cargo/docs_shipment_labels/get.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <orderID>2000395000025</orderID>
   <format>a4</format>
   <type>pdf</type>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
orderIDYesstringThe order number for which it is necessary to generate the labels
formatNostring

Labels size.

Available values: 80x50, a4.

Default value - 80х50

typeNostring

Type of the file with the labels.

Available values: jpg, pdf, png.

Default value - pdf

Method response

Response structure

{
   "metadata":{
      "status":200,
      "generated_at":"2022-03-16 16:29:47"
   },
   "state":"processed",
   "data":[
      {
         "format":"a4",
         "type":"application/pdf",
         "base64":"JVBERi0xLjMKJf////8KMSAw..."
      }
   ]
} 
<response>
   <metadata>
      <status>200</status>
      <generated_at>2022-03-16 16:29:47</generated_at>
   </metadata>
   <state>processed</state>
   <data>
      <format>a4</format>
      <type>application/pdf</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.generated_atstring

Server response date and time.

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

statestring

Status of process of generating the labels.

Possible values:

  • enqueued;
  • processed
dataarray of DataLabels data
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.

Information the cargo places statuses

Method request

Request structure

Method address: https://api.dellin.ru/v3/orders/cargo/statuses.json

{  
   "appkey":"00000000-0000-0000-0000-000000000000",
   "sessionID":"00000000-0000-0000-0000-000000000000",
   "orderID":"2000395000025",
   "per":10,
   "page":1
}

Method address: https://api.dellin.ru/v3/orders/cargo/statuses.xml

<request>
   <appkey>00000000-0000-0000-0000-000000000000</appkey>
   <sessionID>00000000-0000-0000-0000-000000000000</sessionID>
   <orderID>2000395000025</orderID>
   <per>10</per>
   <page>1</page>
</request>

Description of parameters

Request
Request
ParameterRequiredTypeDescription
appkeyYesstringApplication key. To get the key, register
sessionIDYesstringTo get the session ID, use the User Authorization method
orderIDYesstring
The order number for which it is necessary to find out the cargo places status
perNointeger

The number of statuses per page (1). Maximum value - 50.

Default value - 30

pageNointeger

Page number (1). 

Default value - 1

Notes:

  1. The statuses information is organized into pages, 30 statuses per page. It is possible to change the number of statuses 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":[
      {
         "cargoPlace":"123123",
         "number":"11",
         "state":"new"
      }
   ]
} 
<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>
      <cargoPlace>123123</cargoPlace>
      <number>11</number>
      <state>new</state>
   </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 the specific page data are requested (1)

metadata.next_pageinteger

The next page number.

The value is different from 2 only if the specific page data are requested (1)

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

metadata.generated_atstring

Server response date and time.

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

dataarray of DataStatuses data
data.cargoPlacestring

Cargo place code number

data.numberstring

The number of the cargo place

data.statestring

Cargo place status.

Possible values: 

  • new - the status from the moment when info on cargo places has been transferred till the moment when the were accepted at the terminal;
  • accepted;
  • not_accepted;
  • unindentified - the status of the cargo places that has not been labelled;
  • no_info

Notes:

  1. The "page" request parameter value is different from 1

Error handling

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