pixiSetCustomerDiscount
The call sets a discount for the specified customer.
Since pixi version: LOU Official - Update 46 (6.9.46.27927) Additional notes:
Request
POST
https://apigateway.descartes.com/tms/pixi/pixiSetCustomerDiscount
Request body
Name | Type | Required | Description |
---|---|---|---|
CustNr | string | false | Customer number. Used to identify the customer. Type: varchar(60) Default value: NULL Example: abcdef Available from: LOU Official - Update 46 (6.9.46.27927) |
CustMail | string | false | Customer email. Used to identify the customer. Type: varchar(256) Default value: NULL Example: abc@def.com Available from: LOU Official - Update 46 (6.9.46.27927) |
Discount | number | false | Discount value for customer in %. (Value is rounded to 2 decimal places) Type: numeric Default value: NULL Example: 12 Available from: LOU Official - Update 46 (6.9.46.27927) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiSetCustomerDiscount>
<CustMail>string</CustMail>
<CustNr>string</CustNr>
<Discount>0</Discount>
</pixiSetCustomerDiscount>
</Body>
</Envelope>
Response
1. Return status
Name | Type | Description |
---|---|---|
Status | string | Status Type: varchar Available from: 25.06 (25.6.0.58802) |
Message | string | Message Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiSetCustomerDiscountPost200TextXmlResponse>
<Status>string</Status>
<Message>string</Message>
</PixiSetCustomerDiscountPost200TextXmlResponse>
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:pixiSetCustomerDiscount>
<CustNr xsi:type="xsd:string">abcdef</CustNr>
<CustMail xsi:type="xsd:string">abc@def.com</CustMail>
<Discount xsi:type="xsd:number">12</Discount>
</ns1:pixiSetCustomerDiscount>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiSetCustomerDiscount', [
'CustNr' => 'abcdef', // string
'CustMail' => 'abc@def.com', // string
'Discount' => '12', // number
]);
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);
}