CouponRedemptionSearch resource (Data API 19.10)

Summary

Http Method Resource Description
POST /sites/{site_id}/coupon_redemption_search

Searches for coupon redemptions.

The Coupon Redemption Search document contains a search object that allows filtering on various attributes.

The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

  • code - String
  • coupon_id - String
  • customer_email - String
  • order_no - String

Note that only searchable attributes can be used in sorting.

If the role to which the user belongs does not have View_Coupon_Codes permission, then the coupon codes returned will be masked.

Search Coupon Redemptions

Searches for coupon redemptions.

The Coupon Redemption Search document contains a search object that allows filtering on various attributes.

The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

Note that only searchable attributes can be used in sorting.

If the role to which the user belongs does not have View_Coupon_Codes permission, then the coupon codes returned will be masked.

Url

POST https://hostname:port/dw/data/v19_10/sites/{site_id}/coupon_redemption_search

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

SearchRequest

Response Document

CouponRedemptionSearchResult

Path Parameters

Parameter Type Description Constraints
site_id String The site context. minLength=1

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedSearchParameterException   Thrown if the query is ill-formed.

Sample

REQUEST:
POST /s/-/dw/data/v19_10/sites/SiteGenesis/coupon_redemption_search HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Accept: application/json

{
    "query" : {
        "text_query": {
            "fields": ["id", "description"],
            "search_phrase": "my"
        }
    },
    "select" : "(**)"
}

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8

{
  "_v" : "19.10",
  "_type" : "coupon_redemption_search_response",
  "count" : 2,
  "hits" : [ {
    "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
    "creation_date" : "2014-01-08T09:23Z"'
    "code": "xmas",
    "coupon_id": "xmas-special-1",
    "customer_email": "[email protected]",
    "order_no": "123DAJ",
    "view_order_url": "https://example.net/s/-/dw/data/v19_10/sites/SiteGenesis/orders/order_no"
  },
  ...
  ],
  "query" : { "text_query": { "fields": ["id", "description"], "search_phrase": "my" } },
  "select": "**",
  "start" : 5,
  "count": 10,
  "total" : 2
}
X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. By continuing to use this site you are giving us your consent to do this.