Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

HTTP method: GET

URL: /services/rest/admin/balance

Parameters

parameter name
description
example value
resellerReseller's usernamereseller
passwordReseller's passwordpassword
customerName of customer to add credits to. Customer must belong to the reseller.cheescakeshop

Example

/services/rest/admin/balance?reseller=reseller&password=password&customer=cheescakeshop

Return values

return value name
description
example
creditsNumber of credits on account1500
statusError code, 0 for no error1

Response

Service receive parameters as request parameters, and return responses in JSON.
Used status numbers are: 0, 1, 2, 3, 300, 9999 (Status code table is available on User and Reseller REST API Response Status Codes)

Mock

Mock REST service is implemented for now. It returns status based on reseller parameter.

reseller request parameter valuestatus
good0 - OK, returns customer balance 1000 credits
bad1 - Reseller authentication failed
norights2 - Reseller does not have rights to the customer
<any other value>500 - Internal error
  • No labels