- HTTP request
- Request body
- Response body
- GetCouponClippingStatusResponse
- GetCouponClippingStatusResult
- SuccessDetails
- Coupon
- CouponState
- Unavailable
- RedemptionEvent
Returns coupon clipping status(es) for a linked user.
This method allows Google to retrieve coupon clipping statuses.
The response will either contain the coupon clipping statuses, or a decline due to unlinked user account.
If the endpoint encounters an error while processing the request, the response body from this endpoint should be of type .ErrorResponse
An example request looks like:
{
"requestHeader": {
"protocolVersion": {
"major": 1
},
"requestId": "randomRequestId67890",
"requestTimestamp": {
"epochMillis": "1481899949606"
},
"paymentIntegratorAccountId": "GoldenPartner123"
},
"linkUserAccountRequestId": "qierozie12345",
"couponIdentifier": {"couponId": "couponId12345"}
}
An example response looks like:
{
"responseHeader": {
"responseTimestamp": {
"epochMillis": "1481899949611"
}
},
"result": {
"success": {
"coupons": [
{
"couponIdentifier": {
"couponId": "couponId12345"
},
"state": {
"clipped": {}
},
"redemptionEvents": [
{
"merchantId": "merchantId54321",
"redemptionTime": {
"epochMillis": "1481899949606"
}
}
]
},
{
"couponIdentifier": {
"couponId": "couponId67890"
},
"state": {
"unavailable": {
"completed": {}
}
}
}
]
}
}
}
HTTP request
POST https://www.integratorhost.example.com/integrator-base-path/partner-user-account-linking-v1/getCouponClippingStatus
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "requestHeader": { object ( |
| Fields | |
|---|---|
requestHeader |
REQUIRED: Common header for requests. |
linkUserAccountRequestId |
REQUIRED: A reference to an earlier |
Union field identifier. REQUIRED: Specifies the scope of the coupon status to fetch. identifier can be only one of the following: |
|
couponIdentifier |
Fetch the status of this particular coupon. |
allCoupons |
No particular coupon is specified, hence fetch statuses of all the coupons for the user. |
Response body
This method supports multiple return types. For additional information about what 4XX or 5XX HTTP status code to return with an ErrorResponse, consult the ErrorResponse object and HTTP status codes documentation.
| Possible response messages | |
|---|---|
| HTTP 200 Status |
|
| HTTP 4XX / 5XX Status |
|
GetCouponClippingStatusResponse
Response for coupon clipping status.
| JSON representation |
|---|
{ "responseHeader": { object ( |
| Fields | |
|---|---|
responseHeader |
Common header for responses. |
result |
REQUIRED: Contains the result of the request |
GetCouponClippingStatusResult
Details corresponding to the result.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field result. REQUIRED: Contains the possible result types. Exactly one must be set. result can be only one of the following: |
|
success |
Associated coupons, if any, are returned. |
userAccountUnlinked |
Declined because the user's account has been unlinked. |
SuccessDetails
Contains the result of a successful request.
| JSON representation |
|---|
{
"coupons": [
{
object ( |
| Fields | |
|---|---|
coupons[] |
REQUIRED: List of coupons and their statuses. If no coupons are found, this will be an empty list. |
Coupon
Contains details of a coupon including its identifier, state and redemption history.
| JSON representation |
|---|
{ "couponIdentifier": { object ( |
| Fields | |
|---|---|
couponIdentifier |
REQUIRED: A unique identifier for the coupon. |
state |
REQUIRED: The current state of the coupon. |
redemptionEvents[] |
OPTIONAL: The redemption history of this coupon by the user. |
CouponState
Defines the state of a coupon.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field state. The current state of the coupon. state can be only one of the following: |
|
clipped |
Coupon is clipped and still redeemable by the user. |
unavailable |
Coupon clipped but no longer redeemable due to expiry or exhausted limits. |
unclipped |
Coupon has been unclipped or deleted by the user in the partner's app |
RedemptionEvent
A record of when and where a coupon was redeemed.
| JSON representation |
|---|
{
"merchantId": string,
"redemptionTime": {
object ( |
| Fields | |
|---|---|
merchantId |
REQUIRED: The |
redemptionTime |
REQUIRED: The time that the redemption occurred |