Welcome‎ > ‎Version 3‎ > ‎Publisher Api‎ > ‎Methods‎ > ‎4 - Publisher Related‎ > ‎

Grant Credit

** The Authentication of this method will change.  If you'd like to be notified of the change, please post in the comment section below so you can be notified before the change. **

Will give the specified user credits for a number of reasons.

Method: POST /api/v3/publisher/consumer/{userKey}/credit

Authentication: oauth

  userKey - The UserKey of the consumer receiving the credits.

Required Form Name Data Type Explanation
Amount decimal The amount of the credit in the specified IsoCurrencyCode, can be negative with restrictions.
CreditType string The type of credit.
Description string The description that should be set on the credit.
No ExpirationDate int64
The optional expiration time for the credit in Unix time or POSIX time.
Yes IsoCurrencyCode string The 3 character iso currency code.  Must be supported by the publisher.  eg USD, JPY
No OrderId int The optional OrderId to be tracked along with the credit.

Value Signage
Marketing  + The credit is a result from a marketing operation.
CustomerSupport  +/- The credit is a result from a customer support inquiry.

success - Whether the credit was successfully applied to the consumer.

Sample Request:

POST https://api.groupcommerce.com/api/v3/publisher/consumer/UserKey1/credit

Form: Amount=10&CreditType=Marketing&Description=Because%20they%20were%20awesome!&ExpirationDate=1508472000&IsoCurrencyCode=USD&OrderId=33

Authorization: OAuth oauth_signature="Ehr7mLrjQ6xn5PjzoUMbIxey29c%3D", oauth_nonce="2324570", oauth_timestamp="1345065979", oauth_consumer_key="eeb6b959-b854-4ad1-b563-e801c83cf81d", oauth_signature_method="HMAC-SHA1", oauth_version="1.0"

Sample JSON Response:


Sample XML Response:

<grantCreditResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <errors />