You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The GetProductById function is used to to get an existing product using the product ID.

This function also requires a login token, which is obtained using the Login function.

Return values

The response is of the type Soap_Product

Example request

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http://license.x-formation.com/soap/type/vendor/version/1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:GetProductTemplateById soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <token xsi:type="xsd:string">24daaaaa6cad59284d831a9d7b36713c133d92d4</token>
         <id xsi:type="xsd:int">84</id>
      </ns:GetProductTemplateById>
   </soapenv:Body>
</soapenv:Envelope>

Example response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="http://license.x-formation.com/soap/type/vendor/version/1" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:GetProductTemplateByIdResponse>
         <return xsi:type="ns1:Soap_Response_ProductTemplate">
            <result_object xsi:type="ns1:Soap_ProductTemplate">
               <id xsi:type="xsd:int">84</id>
               <name xsi:type="xsd:string">Test Template 1</name>
            </result_object>
            <result_code xsi:type="xsd:int">0</result_code>
            <result_string xsi:nil="true"/>
         </return>
      </ns1:GetProductTemplateByIdResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels