Method: getCouponClippingStatus

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 (RequestHeader)
  },
  "linkUserAccountRequestId": string,

  // Union field identifier can be only one of the following:
  "couponIdentifier": {
    object (CouponIdentifier)
  },
  "allCoupons": {
    object (Empty)
  }
  // End of list of possible types for union field identifier.
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for requests.

Union field identifier. REQUIRED: Specifies the scope of the coupon status to fetch. identifier can be only one of the following:
couponIdentifier

object (CouponIdentifier)

Fetch the status of this particular coupon.

allCoupons

object (Empty)

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

object (GetCouponClippingStatusResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

GetCouponClippingStatusResponse

Response for coupon clipping status.

JSON representation
{
  "responseHeader": {
    object (ResponseHeader)
  },
  "result": {
    object (GetCouponClippingStatusResult)
  }
}
Fields
responseHeader

object (ResponseHeader)

Common header for responses.

result

object (GetCouponClippingStatusResult)

REQUIRED: Contains the result of the request

GetCouponClippingStatusResult

Details corresponding to the result.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (SuccessDetails)
  },
  "userAccountUnlinked": {
    object (Empty)
  }
  // End of list of possible types for union field result.
}
Fields
Union field result. REQUIRED: Contains the possible result types. Exactly one must be set. result can be only one of the following:
success

object (SuccessDetails)

Associated coupons, if any, are returned.

userAccountUnlinked

object (Empty)

Declined because the user's account has been unlinked.

SuccessDetails

Contains the result of a successful request.

JSON representation
{
  "coupons": [
    {
      object (Coupon)
    }
  ]
}
Fields
coupons[]

object (Coupon)

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 (CouponIdentifier)
  },
  "state": {
    object (CouponState)
  },
  "redemptionEvents": [
    {
      object (RedemptionEvent)
    }
  ]
}
Fields
couponIdentifier

object (CouponIdentifier)

REQUIRED: A unique identifier for the coupon.

state

object (CouponState)

REQUIRED: The current state of the coupon.

redemptionEvents[]

object (RedemptionEvent)

OPTIONAL: The redemption history of this coupon by the user.

CouponState

Defines the state of a coupon.

JSON representation
{

  // Union field state can be only one of the following:
  "clipped": {
    object (Empty)
  },
  "unavailable": {
    object (Unavailable)
  },
  "unclipped": {
    object (Empty)
  }
  // End of list of possible types for union field state.
}
Fields
Union field state. The current state of the coupon. state can be only one of the following:
clipped

object (Empty)

Coupon is clipped and still redeemable by the user.

unavailable

object (Unavailable)

Coupon clipped but no longer redeemable due to expiry or exhausted limits.

unclipped

object (Empty)

Coupon has been unclipped or deleted by the user in the partner's app

Unavailable

Details about why the coupon is unavailable.

JSON representation
{

  // Union field reason can be only one of the following:
  "completed": {
    object (Empty)
  },
  "redemptionLimitReached": {
    object (Empty)
  }
  // End of list of possible types for union field reason.
}
Fields
Union field reason. The reason for the coupon being unavailable. reason can be only one of the following:
completed

object (Empty)

The coupon has expired or terminated.

redemptionLimitReached

object (Empty)

The user has exhausted the limit for coupon redemption.

RedemptionEvent

A record of when and where a coupon was redeemed.

JSON representation
{
  "merchantId": string,
  "redemptionTime": {
    object (Timestamp)
  }
}
Fields
merchantId

string

REQUIRED: The merchantId value associated with this coupon in the Actions Center by a partner.

redemptionTime

object (Timestamp)

REQUIRED: The time that the redemption occurred