Method: clipCoupon

Notifies a partner that a Google user has clipped a partner's coupon on a Google surface.

The response should return success if the coupon can be clipped in the partner's system. If the coupon can not be clipped, a non-success response should be returned.

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": {}
  }
}

HTTP request

POST https://www.integratorhost.example.com/integrator-base-path/partner-user-account-linking-v1/clipCoupon

Request body

The request body contains data with the following structure:

JSON representation
{
  "requestHeader": {
    object (RequestHeader)
  },
  "linkUserAccountRequestId": string,
  "couponIdentifier": {
    object (CouponIdentifier)
  }
}
Fields
requestHeader

object (RequestHeader)

REQUIRED: Common header for requests.

couponIdentifier

object (CouponIdentifier)

REQUIRED: A unique identifier for the coupon.

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 (ClipCouponResponse)

HTTP 4XX / 5XX Status

object (ErrorResponse)

ClipCouponResponse

Response for marking a coupon as clipped

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

object (ResponseHeader)

Common header for responses.

result

object (ClipCouponResult)

REQUIRED: Contains the result of the request

ClipCouponResult

Details corresponding to the result.

JSON representation
{

  // Union field result can be only one of the following:
  "success": {
    object (Empty)
  },
  "userAccountUnlinked": {
    object (Empty)
  },
  "notEligibleForGoogle": {
    object (Empty)
  },
  "invalidState": {
    object (Empty)
  },
  "expired": {
    object (Empty)
  },
  "validityPeriodFuture": {
    object (Empty)
  },
  "userNotEligible": {
    object (Empty)
  },
  "privacyPolicyNotAgreed": {
    object (Empty)
  },
  "userCouponClippingLimitReached": {
    object (Empty)
  },
  "alreadyClipped": {
    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 (Empty)

Coupon successfully clipped

userAccountUnlinked

object (Empty)

Declined because the user's account has been unlinked.

notEligibleForGoogle

object (Empty)

Google is not eligible for this coupon, but it may be clipped on the partner's platform.

invalidState

object (Empty)

The coupon is not in a clippable state. E.g. the merchant has terminated the coupon.

expired

object (Empty)

The coupon is expired

validityPeriodFuture

object (Empty)

The coupon's validity period hasn't started yet

userNotEligible

object (Empty)

The coupon has restrictions that this user doesn't satisfy

privacyPolicyNotAgreed

object (Empty)

The user hasn't provided consent yet

userCouponClippingLimitReached

object (Empty)

The user has reached the maximum limit of coupons and can't clip any more

alreadyClipped

object (Empty)

The user has already clipped this coupon on the partner's platform, and it shouldn't be shown on Google surfaces.