Printing

Listing printers

  • Requires authentication: Yes
  • Requires sender ID: Yes
 
 
Getting printers as XML
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/printers.xml'
HTTP
GET /printers.xml HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/printers.xml'; http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();

 

Printing labels

  • Requires authentication: Yes
  • Requires sender ID: Yes

Labels can be sent directly to a registered printer, or they can be downloaded as a PDF file. Both of these endpoints take a list of consignment- and item IDs, such that you may provide an entire consignment (one or more labels for one or more items) or a single consignment item (one label) to print.

Sending labels to a printer
cURL
curl -g -XPOST -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/consignments/label_direct?printer_id=123&consignment_ids[]=1&consignment_ids[]=2&piece_ids[]=3&piece_ids[]=4'
HTTP
POST /consignments/label_direct?printer_id=123&consignment_ids[]=1&consignment_ids[]=2&piece_ids[]=3&piece_ids[]=4 HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'POST'; http.url = 'https://cargonizer.no/consignments/label_direct?printer_id=123&consignment_ids[]=1&consignment_ids[]=2&piece_ids[]=3&piece_ids[]=4'; http.queryStringParameters.set('printer_id', '123'); http.queryStringParameters.set('consignment_ids[]', '1'); http.queryStringParameters.set('consignment_ids[]', '2'); http.queryStringParameters.set('piece_ids[]', '3'); http.queryStringParameters.set('piece_ids[]', '4'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();
 
Getting labels as PDF
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/consignments/label_pdf?consignment_ids[]=1&consignment_ids[]=2&piece_ids[]=3&piece_ids[]=4'
HTTP
GET /consignments/label_pdf?consignment_ids[]=1&consignment_ids[]=2&piece_ids[]=3&piece_ids[]=4 HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/consignments/label_pdf?consignment_ids[]=1&consignment_ids[]=2&piece_ids[]=3&piece_ids[]=4'; http.queryStringParameters.set('consignment_ids[]', '1'); http.queryStringParameters.set('consignment_ids[]', '2'); http.queryStringParameters.set('piece_ids[]', '3'); http.queryStringParameters.set('piece_ids[]', '4'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();

 

Generating waybill and goods declaration

  • Requires authentication: Yes
  • Requires sender ID: Yes
Getting waybill as PDF
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/consignments/waybill_pdf?consignment_ids[]=1&consignment_ids[]=2'
HTTP
GET /consignments/waybill_pdf?consignment_ids[]=1&consignment_ids[]=2 HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/consignments/waybill_pdf?consignment_ids[]=1&consignment_ids[]=2'; http.queryStringParameters.set('consignment_ids[]', '1'); http.queryStringParameters.set('consignment_ids[]', '2'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();
 
Getting goods declaration as PDF
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' 'https://cargonizer.no/consignments/goods_declaration_pdf?consignment_ids[]=1&consignment_ids[]=2'
HTTP
GET /consignments/goods_declaration_pdf?consignment_ids[]=1&consignment_ids[]=2 HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest(); http.method = 'GET'; http.url = 'https://cargonizer.no/consignments/goods_declaration_pdf?consignment_ids[]=1&consignment_ids[]=2'; http.queryStringParameters.set('consignment_ids[]', '1'); http.queryStringParameters.set('consignment_ids[]', '2'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); response = http.execute();

 

Printing arbitrary PDF data

  • Requires authentication: Yes
  • Requires sender ID: Yes

You can send any PDF data to any printer owned by the sender. This endpoint will return HTTP status 202 when the file has been accepted for printing; 400 otherwise.

Printing file.pdf on printer with ID 123
The data parameter must be sent as multipart/form-data (browser form)
cURL
curl -g -XPOST -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' -F'data=@file.pdf' 'https://cargonizer.no/print?printer_id=123'
HTTP
POST /print?printer_id=123 HTTP/1.1 Host: cargonizer.no X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678 Content-Type: multipart/form-data; boundary=------------------------172c7382be98b03b ------------------------172c7382be98b03b Content-Disposition: form-data; name="data" <contents of file "file.pdf"> ------------------------172c7382be98b03b--
Pseudocode
http = new HTTPRequest(); http.method = 'POST'; http.url = 'https://cargonizer.no/print?printer_id=123'; http.queryStringParameters.set('printer_id', '123'); http.headers.add('X-Cargonizer-Key', '12345'); http.headers.add('X-Cargonizer-Sender', '678'); http.formData.set('data', new File('file.pdf').read()); response = http.execute();

 

 

 

Developer: Cargonizer API Documentation © Logistra AS   Øran Vest, 6300 Åndalsnes   Denne e-postadressen er beskyttet mot programmer som samler e-postadresser. Du må aktivere javaskript for å kunne se den.logistra facebook icon logistra twitter icon

Vi bruker informasjonskapsler (cookies) for å forbedre bruksopplevelsen og for å kunne føre statistikk over våre besøkende.