pixiGetReturns
Returns the list of created return cases for the specified, or default criteria.
Since pixi version: AVA 17.11 (8.4.35.32155) Additional notes: If "ChangeDateFrom" argumet is not specified, API call will use one month since today. Similarly, if "ChangeDateTo" is not specified, date until today is used.
Request
Request body
Name | Type | Required | Description |
---|---|---|---|
Offset | integer | false | Pagination: record offset Type: int Default value: 0 Example: 100 Available from: AVA 17.11 (8.4.35.32155) |
RowCount | integer | false | Pagination: maximum results per page Type: int Default value: 1000 Example: 100 Available from: AVA 17.11 (8.4.35.32155) |
StatusId | integer | false | Filter: Status id; 1=New; 2=Received; 3=Refunded; 4=Rejected Type: int Default value: NULL Example: 1 Available from: AVA 17.11 (8.4.35.32155) |
InvoiceNr | string | false | Filter: Returns for specific invoice number. Type: varchar(20) Default value: NULL Example: SHO00012345 Available from: AVA 17.11 (8.4.35.32155) |
ChangeDateTo | string | false | Filter: End of time frame of last record update. If not specified, set until current time. Type: datetime Default value: NULL Example: YYYY-MM-DD hh:mm:ss Available from: AVA 17.11 (8.4.35.32155) |
ChangeDateFrom | string | false | Filter: Start of time frame of last record update. If not specified, set 1 month in past from today. Type: datetime Default value: NULL Example: YYYY-MM-DD hh:mm:ss Available from: AVA 17.11 (8.4.35.32155) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiGetReturns>
<StatusId>0</StatusId>
<ChangeDateFrom>string</ChangeDateFrom>
<ChangeDateTo>string</ChangeDateTo>
<InvoiceNr>string</InvoiceNr>
<Offset>0</Offset>
<RowCount>0</RowCount>
</pixiGetReturns>
</Body>
</Envelope>
Response
1. List of Returns
Name | Type | Description |
---|---|---|
Id | integer | Row ID. Type: int Available from: 25.06 (25.6.0.58802) |
StatusId | integer | Status ID (1=New; 2=Received; 3=Refunded; 4=Rejected) Type: int Available from: 25.06 (25.6.0.58802) |
InvoiceId | integer | Invoice ID Type: int Available from: 25.06 (25.6.0.58802) |
CustomerId | integer | Customer ID that Return got created for. Type: int Available from: 25.06 (25.6.0.58802) |
StatusCode | string | Return status code Type: varchar Available from: 25.06 (25.6.0.58802) |
CreditNumber | string | pixi credit number. Type: varchar Available from: 25.06 (25.6.0.58802) |
InvoiceNumber | string | pixi invoice number Type: varchar Available from: 25.06 (25.6.0.58802) |
CreditedAmount | number | Credited amount. Type: money Available from: 25.06 (25.6.0.58802) |
RecordCreatedByUserId | integer | ID of the user that created the record. Type: int Available from: 25.06 (25.6.0.58802) |
RecordModifiedByUserId | integer | ID of the user that last updated the record. Type: int Available from: 25.06 (25.6.0.58802) |
RecordCreatedByUserName | string | Username of the user that created the record. Type: varchar Available from: 25.06 (25.6.0.58802) |
RecordModifiedByUserName | string | Username of the user that last modified the record. Type: varchar Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiGetReturnsPost200TextXmlResponse>
<Id>0</Id>
<StatusId>0</StatusId>
<StatusCode>string</StatusCode>
<InvoiceId>0</InvoiceId>
<InvoiceNumber>string</InvoiceNumber>
<CustomerId>0</CustomerId>
<RecordCreatedByUserId>0</RecordCreatedByUserId>
<RecordCreatedByUserName>string</RecordCreatedByUserName>
<RecordModifiedByUserId>0</RecordModifiedByUserId>
<RecordModifiedByUserName>string</RecordModifiedByUserName>
<CreditNumber>string</CreditNumber>
<CreditedAmount>0</CreditedAmount>
</PixiGetReturnsPost200TextXmlResponse>
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:pixiGetReturns>
<Offset xsi:type="xsd:integer">100</Offset>
<RowCount xsi:type="xsd:integer">100</RowCount>
<StatusId xsi:type="xsd:integer">1</StatusId>
<InvoiceNr xsi:type="xsd:string">SHO00012345</InvoiceNr>
<ChangeDateTo xsi:type="xsd:string">YYYY-MM-DD hh:mm:ss</ChangeDateTo>
<ChangeDateFrom xsi:type="xsd:string">YYYY-MM-DD hh:mm:ss</ChangeDateFrom>
</ns1:pixiGetReturns>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiGetReturns', [
'Offset' => '100', // integer
'RowCount' => '100', // integer
'StatusId' => '1', // integer
'InvoiceNr' => 'SHO00012345', // string
'ChangeDateTo' => 'YYYY-MM-DD hh:mm:ss', // string
'ChangeDateFrom' => 'YYYY-MM-DD hh:mm:ss', // 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);
}