Validate Coupon Code — XML Reference
Validate a coupon code and retrieve its available details. Code validation alone does not establish whether a promotion will apply to a particular basket; submit that basket to Validate Basket (10300) to evaluate it.
Endpoint and formats
POST /api/{companyKey}/basket/validatecouponcode
Send Content-Type: application/xml. Select the service host and company key documented in the API Reference. Normal application responses use HTTP 200; inspect summary.result and summary.messages for success or failure.
WCF service and method
Method ValidateCouponCode
| Environment | WCF service address |
|---|---|
| Evaluation/Development | https://evaluation.qixolpromo.com/BasketService.svc |
| Production | https://basketmanager.qixolpromo.com/BasketService.svc |
Service contract string ValidateCouponCode(string companyKey, string couponCode)
Use the WCF service contract to determine method parameters and message wrapping. The XML examples below describe the business payload. See WCF integration guidance.
XML Request Example
These examples illustrate the XML request and response structure. Use your own company data and the operation’s schema when building requests; promotion results depend on your company configuration.
<request>
<code>SAMPLE_CODE1</code>
</request>
XML Response Example
Example XML response. Actual values depend on the request and configured promotions.
<response>
<summary result="true">
<action id="10200">Validate Coupon Code</action>
<messages/>
</summary>
<coupon type="SourceCode" importexportkey="vu3AMbxkRUq5BBkevu_g0w">
<name>SAMPLE_SOURCE_CODE</name>
<statistics created="2026-06-20T14:00:00" createdby="Sample.Generator" codescount="1" issuingpromotionscount="0" redeemingpromotionscount="1" locksinuse="false" lockreleasetime="0"/>
<codes>
<code code="SAMPLE_CODE1" status="ACTIVE" validfrom="2026-01-01T00:00:00" validto="2028-12-31T23:59:59" uses="2" isredeemable="true">
<statistics created="2026-06-20T14:00:00" createdby="Sample.Generator" usescount="2" locksactive="0"/>
</code>
</codes>
</coupon>
</response>
Illustrative XML Failure Response
Illustrative failure response (not captured from a live API call). The actual error code and message depend on the failure.
<response><summary result="false"><messages><message code="IM190">A problem was encountered deserializing the request data.</message></messages></summary></response>
XML Schemas (XSD)
- Request XSD — QPSchema_Basket_Request_ValidateCouponCode.xsd
- Response XSD — QPSchema_Basket_Response_ValidateCouponCode.xsd
These XML Schema Definition (XSD) files define the supported XML request and response structures, including elements, attributes, data types and validation constraints. Use them to validate XML payloads when integrating with the QixolPromo API.
XML Validation Notes
- Preserve the XML root, attributes, nested elements and collection wrappers shown above; JSON-shaped objects are not XML request documents.
- Follow the XSD’s element/attribute distinctions, compositor rules, cardinalities, enumerations and value limits. Examples are complete samples, not exhaustive demonstrations of every optional branch.
- Repeating elements are validated against the XSD; do not flatten a collection into attributes or change item names.
- Validate XML before sending it. For example, download the linked request XSD, save the XML request example as
request.xmlin the same folder, and run:
xmllint --noout --schema QPSchema_Basket_Request_ValidateCouponCode.xsd request.xml
Save the XML response as response.xml alongside the downloaded response XSD, then run:
xmllint --noout --schema QPSchema_Basket_Response_ValidateCouponCode.xsd response.xml
Sending XML Requests
To submit an XML request, use the XML Request Example provided above.
Set the HTTP Content-Type header to application/xml and send the XML payload to the appropriate QixolPromo API endpoint.
You can use any HTTP client that supports XML request bodies, such as Postman or cURL.
The corresponding XSD files are available above to help validate your XML requests and responses. For the browser walkthrough and response viewer, see Test an XML request.
Return to API Reference — Validate Coupon Code.
Evaluation request limits
In Evaluation/Development, Validate Basket (10300) and Validate Coupon Code (10200) share a default limit of 10 requests per second. The limit can be configured for your company.
API access and security
Services Interaction Keys (API keys) for evaluation companies can be obtained through the QixolPromo Portal; production keys are supplied directly by Qixol. Production API access is IP-restricted by default, unless Qixol disables the restriction. Permitted IP addresses are configured in the Portal under Configuration → Permitted IP Addresses; allowlist changes may take up to 24 hours. Evaluation companies have no IP restrictions. Basket operations use Basket Service Access; other operations use Data Management Service Access. Keep keys confidential.
Transaction safety and evaluation limit
In Evaluation/Development, Validate Basket (10300) and Validate Coupon Code (10200) share a default limit of 10 requests per second. The limit can be configured for your company. Production Basket requests are not subject to these evaluation limits. Keep the same basket ID throughout modification, confirmation and resubmission. Previously recorded coupon or voucher effects are not automatically reversed if a modified basket no longer qualifies.
