pixiShipoutInvoice
API Call to ship out an invoice programmatically
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes: The API call can only be used when "Centralized Ship-Out" or "Premium API" setting are enabled.
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
BoxNr | integer | false | Box number of order due for ship out (mandatory if InvoiceNr is not provided) Type: int Default value: NULL Example: 123 Available from: AVA 17.09 (8.4.33.31482) |
LocID | string | false | Location ID of the invoice being shipped out Type: char Default value: 001 Example: abc Available from: LOU Official - Update 46 (6.9.46.27927) |
Weight | string | false | Total weight of the invoice Type: float Default value: NULL Example: 1.5 Available from: AVA 17.09 (8.4.33.31482) |
UserName | string | false | User which has shipped out that invoice Type: varchar(50) Default value: API Example: abcdefg Available from: LOU Official - Update 46 (6.9.46.27927) |
InvoiceNr | string | false | pixi InvoiceNr to ship out (mandatory if BoxNr is not provided) Type: varchar(20) Default value: NULL Example: abcdefg Available from: LOU Official - Update 46 (6.9.46.27927) |
TrackingID | string | false | Tracking ID(s) for the invoice Type: varchar(8000) Default value: NULL Example: 1234;1235;1236 Available from: AVA 17.09 (8.4.33.31482) |
ShipVendorCode | string | false | Shipping vendor code Type: varchar(3) Default value: NULL Example: abcdefg Available from: AVA 17.09 (8.4.33.31482) |
AmountOfPackages | integer | false | Amount of packages for the invoice Type: int Default value: 1 Example: 123 Available from: AVA 17.09 (8.4.33.31482) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiShipoutInvoice>
<InvoiceNr>string</InvoiceNr>
<UserName>string</UserName>
<LocID>string</LocID>
<BoxNr>0</BoxNr>
<Weight>string</Weight>
<AmountOfPackages>0</AmountOfPackages>
<ShipVendorCode>string</ShipVendorCode>
<TrackingID>string</TrackingID>
</pixiShipoutInvoice>
</Body>
</Envelope>
Response
1. Status output
Name | Type | Description |
---|---|---|
Status | string | Execution status (OK/ERROR) Type: varchar Available from: 25.06 (25.6.0.58802) |
StatusMessage | string | Description of the status Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiShipoutInvoicePost200TextXmlResponse>
<Status>string</Status>
<StatusMessage>string</StatusMessage>
</PixiShipoutInvoicePost200TextXmlResponse>
HTTP Example
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
# echo -n '{{username}}:{{password}}' | base64 | pbcopy
Authorization: Basic {{token}}
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://apigateway.descartes.com/tms/pixi/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:pixiShipoutInvoice>
<BoxNr xsi:type="xsd:integer">123</BoxNr>
<LocID xsi:type="xsd:string">abc</LocID>
<Weight xsi:type="xsd:string">1.5</Weight>
<UserName xsi:type="xsd:string">abcdefg</UserName>
<InvoiceNr xsi:type="xsd:string">abcdefg</InvoiceNr>
<TrackingID xsi:type="xsd:string">1234;1235;1236</TrackingID>
<ShipVendorCode xsi:type="xsd:string">abcdefg</ShipVendorCode>
<AmountOfPackages xsi:type="xsd:integer">123</AmountOfPackages>
</ns1:pixiShipoutInvoice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiShipoutInvoice', [
'BoxNr' => '123', // integer
'LocID' => 'abc', // string
'Weight' => '1.5', // string
'UserName' => 'abcdefg', // string
'InvoiceNr' => 'abcdefg', // string
'TrackingID' => '1234;1235;1236', // string
'ShipVendorCode' => 'abcdefg', // string
'AmountOfPackages' => '123', // integer
]);
function getPixiSoapClientResponse(string $method, array $arguments = [])
{
$soapArguments = [];
foreach ($arguments as $key => $value) {
$soapArguments[] = new SoapVar($value, null, '', '', $key);
}
$soapClient = new SoapClient(null, [
'login' => '...',
'password' => '...',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
]);
return $soapClient->__call($method, $soapArguments);
}