REST Order CouponCode Contacts

List redeemed coupon codes of a certain contact.

List redeemed coupon codes of a contact

Lists the redeemed coupon codes of contact. The ID of the contact must be specified.

/rest/orders/coupons/codes/contacts/{contactId}

Parameters

Field Type Description
contactId Int The ID of the contact
page Int The page to get. The default page that will be returned is page 1.
itemsPerPage Int The number of coupons to be displayed per page. The default number of coupons per page is 50.

Success 200

Field Type Description
page Int Current page of the response
totalsCount Int The total number of entries in the response
isLastPage Bool Flag that indicates if the page shown is the last page of the response
lastPageNumber Int The last page number
firstOnPage Int The index of the first item of the current page result
lastOnPage Int The index of the last item of the current page result
itemsPerPage Int The requested amount of items per result page
entries CouponCodeContact[] List of CouponCodeContact
 code String The coupon code
 contactId Int The ID of the contact that redeemed the coupon
 openAmount Float The coupon amount that can still be redeemed
 redeemCount Int How many times a coupon code has already been redeemed
 updatedAt String|\Carbon The date that the coupon code was updated last.
 campaignId Int The ID of the campaign that the coupon belongs to
 externalTransactionId Int The ID that is assigned to a coupon by the external coupon service provider, when the coupon is redeemed.
{"page":1,"totalsCount":2,"isLastPage":true,"entries":[{"code":"December69","contactId":66,"openAmount":6.04,"redeemCount":4,"updatedAt":"2018-06-21T04:54:49+02:00","campaignId":98,"externalTransactionId":67},{"code":"February50","contactId":51,"openAmount":17.24,"redeemCount":3,"updatedAt":"2018-12-23T18:49:12+01:00","campaignId":93,"externalTransactionId":21}],"lastPageNumber":1,"firstOnPage":1,"lastOnPage":2,"itemsPerPage":25}

Errors 4xx

Code Exception Description
401 League\OAuth2\Server\Exception\AccessDeniedException The resource owner or authorization server denied the request.
401 League\OAuth2\Server\Exception\InvalidRequestException The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the "access token" parameter.

Is this article helpful?

 

Thank you for your Feedback

you can close this field now!