API Operations
Description:
The API enables you to cancel a Sale Order or a Sale Order Item. The reason to cancel a sale order can vary from the customer’s request for doing so to the non-availability of the given item.
API:
<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-5″> <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”>fFnlsJVjDKNAYiIjKz8OqQ==</wsse:Nonce> <wsu:Created>2014-02-26T10:39:57.346Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ser:CancelSaleOrderRequest> <ser:SaleOrder> <ser:Code>?</ser:Code> <!–Optional:–> <ser:CancellationReason>?</ser:CancellationReason> <!–Optional:–> <ser:SaleOrderItems> <!–1 or more repetitions:–> <ser:SaleOrderItem> <ser:Code>?</ser:Code> </ser:SaleOrderItem> </ser:SaleOrderItems> </ser:SaleOrder> </ser:CancelSaleOrderRequest> </soapenv:Body> </soapenv:Envelope> |
API parameters:
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-5″> <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”>fFnlsJVjDKNAYiIjKz8OqQ==</wsse:Nonce> <wsu:Created>2014-02-26T10:39:57.346Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> <ser:CancelSaleOrderRequest> <ser:SaleOrder> <ser:Code>test25</ser:Code> </ser:SaleOrder> </ser:CancelSaleOrderRequest> </soapenv:Body> </soapenv:Envelope> |
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/”> <SOAP-ENV:Header/> <SOAP-ENV:Body> <CancelSaleOrderResponse xmlns=”http://uniware.unicommerce.com/services/”> <Successful>true</Successful> </CancelSaleOrderResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> |
Error Codes:
With the Successful tag = false, the system throws an error. The error codes are as defined below:
Next API: Create or Edit Item Type