Repository navigation
Transfers
| Endpoint | /consignments/transfer |
| Authentication required? | Yes |
| Sender ID required? | Yes |
Creating a Consignment will not transfer information to the Carrier by default. At some point it must be transferred. You have two options. Set attribute transfer="true" in your consignments.xml or use this resource.
Setting transfer="true" in consignments.xml means "Transfer this consignment to the carrier immediately". That also means you have no options to change the Consignment information in cargonizer.no after creation.
Setting transfer="false" in consignments.xml and use this transfer resource afterwards, makes you in full control of when to ship to Carrier. It also lets your customer do whatever changes they need with the Consignment between creation and shipping.
We strongly recommend you to supply many consignment id's in each call/transfer instead of one transfer per consignment.
cURL
curl -g -XPOST -H'X-Cargonizer-Key: 12345' -H'X-Cargonizer-Sender: 678' \
'https://api.cargonizer.logistra.no/consignments/transfer?consignment_ids[]=5077&consignment_ids[]=590742'HTTP
POST /consignments/transfer?consignment_ids[]=50690777&consignment_ids[]=50690742 HTTP/1.1
Host: cargonizer.no
X-Cargonizer-Key: 12345 X-Cargonizer-Sender: 678
Pseudocode
http = new HTTPRequest();
http.method = 'POST';
http.url = 'https://api.cargonizer.logistra.no/consignments/transfer;
http.queryStringParameters.set('consignment_ids[]', '134');
http.queryStringParameters.set('consignment_ids[]', '23');
http.headers.add('X-Cargonizer-Key', '12345');http.headers.add('X-Cargonizer-Sender: 678');response = http.execute();