Repository navigation
Printing
Sondre Haugen edited this page Oct 18, 2023
·
15 revisions
| Endpoint | /printers |
| Formats | XML, JSON |
| Authentication required? | Yes |
| Sender ID required? | No |
| Requires DirectPrint physically connected to thermal printer(s) |
cURL
curl -g -XGET -H'X-Cargonizer-Key: 12345' 'https://cargonizer.no/printers.json'HTTP
GET /printers.json HTTP/1.1
Host: cargonizer.no
X-Cargonizer-Key: 12345
Pseudocode
http = new HTTPRequest();
http.method = 'GET';
http.url = 'https://cargonizer.no/printers.json';
http.headers.add('X-Cargonizer-Key', '12345');
response = http.execute();
| Endpoint | /printers |
| Formats | XML, JSON |
| Authentication required? | Yes |
| Sender ID required? | Yes |
| Requires DirectPrint physically connected to thermal printer(s) |
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.
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'