pixiSetItemTags
Set Tags for Items.
Since pixi version: LOU Official (6.3.0.4452) Additional notes: It is possible to set new tag to item and match item with existing tag.
**TagsXML** parameter sample VARCHAR(containing XML):
<ItemTags>
<Item>
<ItemKey>12549</ItemKey>
<TagList>
<Tag>
<Name>HW2018</Name>
<Description>Season</Description>
</Tag>
<Tag>
<Name>Tom Tailor</Name>
<Description>Brand</Description>
</Tag>
</TagList>
</Item>
</ItemTags>
Items are referenced by ItemKey, ItemNrInt or EANUPC
Request
POST
https://apigateway.descartes.com/tms/pixi/pixiSetItemTags
Request body
Name | Type | Required | Description |
---|---|---|---|
TagsXML | string | true | XML with tags for items. Type: varchar(-1) Default value: NULL Example: Available from: LOU Official (6.3.0.4452) |
TagPrefix | string | false | Tag prefix. Type: varchar(20) Default value: API Example: Available from: LOU Official (6.3.0.4452) |
Request Example
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body xmlns="">
<pixiSetItemTags>
<TagsXML>string</TagsXML>
<TagPrefix>string</TagPrefix>
</pixiSetItemTags>
</Body>
</Envelope>
Response
1. Result with ADDED item-tag matchings.
Name | Type | Description |
---|---|---|
Action | string | Action performed ("ADDED"). Type: varchar (7) Available from: 25.06 (25.6.0.58802) |
TagKey | integer | Tag ID. Type: int Available from: 25.06 (25.6.0.58802) |
ItemKey | integer | Item ID. Type: int Available from: 25.06 (25.6.0.58802) |
TagName | string | Tag name. Type: varchar (50) Available from: 25.06 (25.6.0.58802) |
Response Example
<PixiSetItemTagsPost200TextXmlResponse>
<TagKey>0</TagKey>
<TagName>string</TagName>
<ItemKey>0</ItemKey>
<Action>string</Action>
</PixiSetItemTagsPost200TextXmlResponse>
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:pixiSetItemTags>
<TagsXML xsi:type="xsd:string"></TagsXML> <!-- required -->
<TagPrefix xsi:type="xsd:string"></TagPrefix>
</ns1:pixiSetItemTags>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
PHP Example
<?php
getPixiSoapClientResponse('pixiSetItemTags', [
'TagsXML' => '', // string (required)
'TagPrefix' => '', // 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);
}