Introduction
The Uniware SOAP API comprises API definitions for different business operations, which would involve many steps in the process of Order Fulfillment, Vendor Management and Sales & Purchases. The core structures <request> and <response> form the basis of the SOAP XML for each API.
Security
The SOAP API service is protected to allow only an authorized access to it. Thus, the APIs will require:
-
An API username and
-
API password
for authentication.
<wsse:Security soapenv:mustUnderstand=”1″ xmlns:wsse=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:wsu=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”> <wsse:UsernameToken wsu:Id=”UsernameToken-5″> <wsse:Username>xyz@unicommerce.com</wsse:Username> <wsse:Password Type=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText”>xyz@123</wsse:Password> <wsse:Nonce EncodingType=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary”>nvPjKUgjKSIcKYcsJdiVSg==</wsse:Nonce> <wsu:Created>2012-12-20T19:49:43.570Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> |
Authentication failure denies access to the API service.
SOAP Request Envelope
A SOAP envelope consists of the header and the body. While the header contains security parameters to authorize a user, the body contains elements specific to an API. The following diagram illustrates the contents of a SOAP envelope:
SOAP Request Envelope
Sandbox
Sandbox is typically known as a security mechanism, providing a confined environment, where you can do anything without propagating its effects on the outside. In general, it is an isolated computing environment used for testing.
We at Unicommerce use sandbox to execute the API requests against the production environment for development and testing purposes.
The Sandbox API must be accessed with the following credentials:
Username : Sandbox Password : 91561781f43921dd2803fa63a7ee5519 |
Learn how to generate your own API key.
The API end points are discussed later in this article.
Request Structure
The following description of the SOAP request structure shows the elements required by the API, it contains the header and the body:
General structure of SOAP Request
<soapenv:Envelope xmlns:ser=”http://uniware.unicommerce.com/services/” xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/”> <soapenv:Header> <wsse:Security soapenv:mustUnderstand=”1″ xmlns:wsse=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:wsu=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”> <wsse:UsernameToken wsu:Id=”UsernameToken-1″> <wsse:Username>staging</wsse:Username> <wsse:Password Type=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText”>staging</wsse:Password> <wsse:Nonce EncodingType=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary”>kscIjg0DVsIcWj5JExeUfQ==</wsse:Nonce> <wsu:Created>2014-01-24T06:29:58.415Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ser:GetPurchaseOrderDetailRequest> <ser:PurchaseOrderCode>UL-MUM/13-14/53</ser:PurchaseOrderCode> </ser:GetPurchaseOrderDetailRequest> </soapenv:Body> </soapenv:Envelope> |
Response Structure
The typical Response structure contains the header and the body. The body contains the response for the SOAP request made.
General structure of the SOAP response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/”> <SOAP-ENV:Header/> <SOAP-ENV:Body> <GetPurchaseOrderDetailResponse xmlns=”http://uniware.unicommerce.com/services/”> <Successful>true</Successful> <Id>11371</Id> <Code>UL-MUM/13-14/53</Code> <Type>CART</Type> <FromParty>mumbai</FromParty> <StatusCode>COMPLETE</StatusCode> <VendorCode>IN0025</VendorCode> <VendorName>Essentials</VendorName> <Created>2013-12-19T08:30:37Z</Created> <VendorAgreementName>IN00025</VendorAgreementName> <InflowReceiptsCount>1</InflowReceiptsCount> <CustomFields/> <PurchaseOrderItems> <PurchaseOrderItem> <Id>8874</Id> <ItemSKU>FNSF51LDSL30321</ItemSKU> <ItemTypePageUrl/> <ItemTypeName>Lloyd Steel Standard Set 3-2-1</ItemTypeName> <VendorSkuCode>FNSF51LDSL30321</VendorSkuCode> <Quantity>4</Quantity> <RejectedQuantity>2</RejectedQuantity> <PendingQuantity>0</PendingQuantity> <UnitPrice>27537.00</UnitPrice> <MaxRetailPrice>56999.00</MaxRetailPrice> <Discount>0.00</Discount> <DiscountPercentage>0.00</DiscountPercentage> <Subtotal>96621.05</Subtotal> <Total>110148.00</Total> </PurchaseOrderItem> </PurchaseOrderItems> <PartyAddress> <AddressType>SHIPPING</AddressType> <AddressTypeName>Shipping Address</AddressTypeName> <StateCode>MH</StateCode> <StateName>Maharashtra</StateName> <CountryCode>IN</CountryCode> <AddressLine1>F-5, Nand dham Industrial Estate,</AddressLine1> <AddressLine2>Near Marol Fire Brigade, Opp. Marol Gaon Bus stop</AddressLine2> <City>Mumbai</City> <Pincode>400059</Pincode> <Phone>0000000000</Phone> <Enabled>true</Enabled> </PartyAddress> </GetPurchaseOrderDetailResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Error Responses
If an API request contains some error, the SOAP response contains the Error element. An error must be corrected prior to complete execution of the request initiated.
The general structure of an error message is as follows:
<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/”> <SOAP-ENV:Header/> <SOAP-ENV:Body> <GetPurchaseOrderDetailResponse xmlns=”http://uniware.unicommerce.com/services/”> <Successful>false</Successful> <Errors> <Error code=”80060″ description=”Invalid purchase order code” message=”INVALID_PURCHASE_ORDER_CODE”/> </Errors> <PurchaseOrderItems/> </GetPurchaseOrderDetailResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
It contains: The Error Code (Error Message)
Warning Responses
A “Warning” response alerts you to a potential trouble with your data which may require additional explanation.
It contains:
The Warning Code
Warning Message
Description (optional)
Filters
Much of the Web Service Enhancement functionality is enveloped in a set of filters contained in incoming and outgoing channels that connect the client and the servers hosting them. These filters are used in alliance with the base classes to pass information to and from the code. Filters are applied to a SOAP request in order to enable the feature of modifying a SOAP response.
For an API result, you might require a result set in between a date range or its current status. These APIs contain the filters (wherever applicable) and provide accurate results, as desired.
The general structure to illustrate a filter application in a request sent:
<soapenv:Envelope xmlns:ser=”http://uniware.unicommerce.com/services/” xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/”> <soapenv:Header> <wsse:Security soapenv:mustUnderstand=”1″ xmlns:wsse=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:wsu=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”> <wsse:UsernameToken wsu:Id=”UsernameToken-3″> <wsse:Username>staging</wsse:Username> <wsse:Password Type=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText”>staging</wsse:Password> <wsse:Nonce EncodingType=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary”>W+j2ESLu6risoqYDtILFmg==</wsse:Nonce> <wsu:Created>2014-01-23T07:34:33.471Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ser:GetPurchaseOrdersRequest> </soapenv:Envelope> <!–Optional:–> <ser:ApprovedDateRange> <ser:Start>?</ser:Start> <ser:End>?</ser:End> </ser:ApprovedDateRange> <!–Optional:–> <ser:CreatedDateRange> <ser:Start>?</ser:Start> <ser:End>?</ser:End> </ser:CreatedDateRange> </ser:GetPurchaseOrdersRequest> </soapenv:Body> |
WSDL Path:
The WSDL path to access our APIs:
https://staging.unicommerce.com/services/soap/uniware16.wsdl?facility=01
API End points
The table below includes the end points for the APIs. The first link is that for the sandbox while the second one can be used for each client (replacing the respective tenant name and the facility ID).
https://staging.unicommerce.com:443/services/soap/?version=1.6&facility=01
https://tenant_name.unicommerce.com:443/services/soap/?version=1.6&facility=01
Click on the name of each API to learn about them in detail:
Recommended for you: