RHP_API

<back to all web services

GetActiveUserCredits

Get current User Credits

Requires Authentication
The following routes are available for this service:
GET/User/Purchase/Credits
UserCreditRecord Parameters:
NameParameterData TypeRequiredDescription
CurrentConversationCreditsformintNoAvailable Conversation Credits
PurchasesformList<UserCreditPurchase>NoPurhcase History for Conversation Credits & Diamonds
CurrentStoreCreditsformintNo
DiamondsformintNoDiamonds available to spend
DiamondsBalanceformintNoTotal available Diamonds
UserCreditPurchase Parameters:
NameParameterData TypeRequiredDescription
CurrencyformCurrencyNo
AmountformdecimalNo
ExpiryDateformDateTimeNo
PurchaseDateformDateTimeNo
PaymentProviderformPaymentProviderNo
PaymentProviderTitleformstringNo
ProductNameformstringNo
CreditAmountformintNo
ProductGroupformPurchaseOrderTypeNo
Currency Parameters:
NameParameterData TypeRequiredDescription
CurrencyIDformintNo
NameformstringNo
SymbolformstringNo
CodeformstringNo
DateCreatedformDateTimeNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /User/Purchase/Credits HTTP/1.1 
Host: tstsrvs.redhotpie.com.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CurrentConversationCredits: 0,
	Purchases: 
	[
		{
			Currency: 
			{
				CurrencyID: 0,
				Name: String,
				Symbol: String,
				Code: String,
				DateCreated: 0001-01-01
			},
			Amount: 0,
			ExpiryDate: 0001-01-01,
			PurchaseDate: 0001-01-01,
			PaymentProvider: Verotel,
			PaymentProviderTitle: String,
			ProductName: String,
			CreditAmount: 0,
			ProductGroup: ConversationCredits
		}
	],
	CurrentStoreCredits: 0,
	Diamonds: 0,
	DiamondsBalance: 0
}