pixiCreateDirectInvoice
Creating an invoice directly from an order, without ScanIn. Shipout is not done automatically, might though be set through payment type e.g.
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes:
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
LocID | string | false | Location of the Invoice to be created. Type: varchar(3) Default value: 001 Example: 001 Available from: LOU Official - Update 46 (6.9.46.27927) |
OrderNr | integer | true | OrderNr of the order to be created. Type: int Default value: NULL Example: 123 Available from: LOU Official - Update 46 (6.9.46.27927) |
CreateEmp | string | false | User that creates the invoice. Type: varchar(50) Default value: API Example: API Available from: LOU Official - Update 46 (6.9.46.27927) |
OrderlineRefs | string | true | List of all OrderLineKeys to be used. PLEASE NOTE: FORMAT ,1,2,3, - COMMAS ARE VERY IMPORTANT; LEADING AND TRAINLING. Sample Call: exec pipiCreateDirectInvoice @OrderNr = 93877, @OrderlineRefs = ",280727,280728,280729," Type: varchar(2000) Default value: NULL Example: ,1234,1235,1236, Available from: LOU Official - Update 46 (6.9.46.27927) |
AllInvoiceItemsInStock | string | false | Create the invoice only, of all items are on stock. Type: varchar(1) Default value: N Example: (Y/N) Available from: LOU Official - Update 46 (6.9.46.27927) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiCreateDirectInvoice>
<OrderNr>0</OrderNr>
<OrderlineRefs>string</OrderlineRefs>
<AllInvoiceItemsInStock>string</AllInvoiceItemsInStock>
<LocID>string</LocID>
<CreateEmp>string</CreateEmp>
</pixiCreateDirectInvoice>
</Body>
</Envelope>
Response
Name | Type | Description |
---|
Response Example
<PixiCreateDirectInvoicePost200TextXmlResponse />
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:pixiCreateDirectInvoice>
<LocID xsi:type="xsd:string">001</LocID>
<OrderNr xsi:type="xsd:integer">123</OrderNr> <!-- required -->
<CreateEmp xsi:type="xsd:string">API</CreateEmp>
<OrderlineRefs xsi:type="xsd:string">,1234,1235,1236,</OrderlineRefs> <!-- required -->
<AllInvoiceItemsInStock xsi:type="xsd:string">(Y/N)</AllInvoiceItemsInStock>
</ns1:pixiCreateDirectInvoice>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiCreateDirectInvoice', [
'LocID' => '001', // string
'OrderNr' => '123', // integer (required)
'CreateEmp' => 'API', // string
'OrderlineRefs' => ',1234,1235,1236,', // string (required)
'AllInvoiceItemsInStock' => '(Y/N)', // 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);
}