pixiUpdateInvoicePackage
API call procedure which updates invoice package info. This API sends MQ event "PackageLabelSaved" which triggers printing of Shipping label.
Since pixi version: AVA Official - Update 23 (8.4.23.27873) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
PackageId | integer | true | Reference for InvoicePackage table Type: int Default value: Example: 123 Available from: AVA Official - Update 23 (8.4.23.27873) |
InvoiceKey | integer | false | Reference for Invoices table. Type: int Default value: NULL Example: 123 Available from: AVA Official - Update 23 (8.4.23.27873) |
TrackingId | string | false | Used for updating the tracking Id of the package. Type: varchar(512) Default value: NULL Example: abcdefg Available from: AVA Official - Update 23 (8.4.23.27873) |
ReturnLabelUrl | string | false | Used for updating the return label url. Type: varchar(8000) Default value: NULL Example: abcdefg Available from: AVA Official - Update 23 (8.4.23.27873) |
ReturnTrackingId | string | false | Used for updating the return tracking Id of the package. Type: varchar(512) Default value: NULL Example: abcdefg Available from: AVA Official - Update 23 (8.4.23.27873) |
ShippingLabelUrl | string | false | Used for updating the shipping vendor label url. Type: varchar(8000) Default value: NULL Example: abcdefg Available from: AVA Official - Update 23 (8.4.23.27873) |
ExternalShipmentId | string | false | Used for updating the external shipment ID of the package. Type: varchar(512) Default value: NULL Example: abcdefg Available from: AVA 17.11 (8.4.35.32155) |
MessageFromProvider | string | false | Allows to transmit a message from the provider, such as an error message when the label cannot be produced Type: varchar(-1) Default value: NULL Example: abcdefg Available from: AVA 17.11 (8.4.35.32155) |
ResetClientNotifiedFlag | boolean | false | Mark the order for re-export to shop with new tracking or return tracking ID Type: bit Default value: 0 Example: 0 or 1 Available from: 19.04 (9.0.2.38390) |
MessageFromProviderDetail | string | false | Allows to transmit a message from the provider, such as an error message details when the label cannot be produced Type: varchar(-1) Default value: NULL Example: abcdefg Available from: AVA 17.11 (8.4.35.32155) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiUpdateInvoicePackage>
<PackageId>0</PackageId>
<InvoiceKey>0</InvoiceKey>
<ShippingLabelUrl>string</ShippingLabelUrl>
<TrackingId>string</TrackingId>
<ReturnLabelUrl>string</ReturnLabelUrl>
<ReturnTrackingId>string</ReturnTrackingId>
<ExternalShipmentId>string</ExternalShipmentId>
<MessageFromProvider>string</MessageFromProvider>
<MessageFromProviderDetail>string</MessageFromProviderDetail>
<ResetClientNotifiedFlag>true</ResetClientNotifiedFlag>
</pixiUpdateInvoicePackage>
</Body>
</Envelope>
Response
Name | Type | Description |
---|---|---|
Response | string | Returns a message if the execution was successfull (200) or not (400,500) Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiUpdateInvoicePackagePost200TextXmlResponse>
<Response>string</Response>
</PixiUpdateInvoicePackagePost200TextXmlResponse>
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:pixiUpdateInvoicePackage>
<PackageId xsi:type="xsd:integer">123</PackageId> <!-- required -->
<InvoiceKey xsi:type="xsd:integer">123</InvoiceKey>
<TrackingId xsi:type="xsd:string">abcdefg</TrackingId>
<ReturnLabelUrl xsi:type="xsd:string">abcdefg</ReturnLabelUrl>
<ReturnTrackingId xsi:type="xsd:string">abcdefg</ReturnTrackingId>
<ShippingLabelUrl xsi:type="xsd:string">abcdefg</ShippingLabelUrl>
<ExternalShipmentId xsi:type="xsd:string">abcdefg</ExternalShipmentId>
<MessageFromProvider xsi:type="xsd:string">abcdefg</MessageFromProvider>
<ResetClientNotifiedFlag xsi:type="xsd:boolean">0 or 1</ResetClientNotifiedFlag>
<MessageFromProviderDetail xsi:type="xsd:string">abcdefg</MessageFromProviderDetail>
</ns1:pixiUpdateInvoicePackage>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiUpdateInvoicePackage', [
'PackageId' => '123', // integer (required)
'InvoiceKey' => '123', // integer
'TrackingId' => 'abcdefg', // string
'ReturnLabelUrl' => 'abcdefg', // string
'ReturnTrackingId' => 'abcdefg', // string
'ShippingLabelUrl' => 'abcdefg', // string
'ExternalShipmentId' => 'abcdefg', // string
'MessageFromProvider' => 'abcdefg', // string
'ResetClientNotifiedFlag' => '0 or 1', // boolean
'MessageFromProviderDetail' => 'abcdefg', // string
]);
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);
}