Redeem

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
(New page: ==Summary== Redeem for an item '''Resource''' POST api/v1/redeem '''Parameters''' pid memberId itemId updateAddress address1 address2 city state zipCode '''Example Call''' http://de...)
Current revision (17:39, 29 June 2016) (edit) (undo)
m (Summary)
 
Line 5: Line 5:
'''Resource'''
'''Resource'''
-
POST
+
POST api/v1/redeem
-
api/v1/redeem
+
'''Parameters'''
'''Parameters'''
-
pid
+
* pid
-
memberId
+
* memberId
-
itemId
+
* itemId
-
updateAddress
+
* updateAddress
-
address1
+
* address1
-
address2
+
* address2
-
city
+
* city
-
state
+
* state
-
zipCode
+
* zipCode
-
 
+
-
'''Example Call'''
+
-
http://demo-loyalty.promodev.eprize.com/api/v1/submitCode
+
Example Request Body:
Example Request Body:
-
{
+
{
-
“pid” : “546854646894”,
+
"pid" : "546854646894",
-
"memberId": 278000000118,
+
"memberId": 278000000118,
-
“itemId”: 211602000000061,
+
"itemId": 211602000000061,
-
“updateAddress” : true,
+
"updateAddress" : true,
-
"address1": “Tower 2000”,
+
"address1": "2000 Town Center",
-
“address2”: Suite Suit Site”,
+
"address2”: "Suite 2100",
-
“city” : “Southfield”,
+
"city” : "Southfield",
-
"state": MI,
+
"state": "MI",
-
“zipCode”: “48034”
+
"zipCode": "48034"
-
}
+
}
Example Response: Success
Example Response: Success
-
{
+
{
-
"success" : true,
+
"success" : true,
-
“points” : 150
+
"points" : 150
-
}
+
}
-
'Example Response: Member Id not Found
+
Example Response: Member Id not Found
-
{
+
{
-
"Error": {
+
"Error": {
-
"Code": "error.business.Validation",
+
"Code": "error.business.Validation",
-
"Message": "Error for attribute: Member Id\nThis information is required.\n"
+
"Message": "Error for attribute: Member Id\nThis information is required.\n"
 +
}
}
}
-
}
 
Example Response: Invalid Item Id
Example Response: Invalid Item Id
-
{
+
{
-
"Error": {
+
"Error": {
-
"Code": "error.business.Validation",
+
"Code": "error.business.Validation",
-
"Message": "Error for attribute: Item Id\nThis is an invalid code.\n"
+
"Message": "Error for attribute: Item Id\nThis is an invalid code.\n"
 +
}
}
}
-
}
 
Example Response: Invalid User Primary Id
Example Response: Invalid User Primary Id
-
{
+
{
-
"Error": {
+
"Error": {
-
"Code": "error.business.Validation",
+
"Code": "error.business.Validation",
-
"Message": "Error for attribute: Pid\nThis user was not found in the system.\nError for attribute: Item Id\nThis is an invalid code.\n"
+
"Message": "Error for attribute: Pid\nThis user was not found in the system.\nError for attribute: Item Id\nThis is an invalid code.\n"
 +
}
}
}
-
}
 

Current revision

Summary

Redeem for an item

Resource

POST api/v1/redeem

Parameters

  • pid
  • memberId
  • itemId
  • updateAddress
  • address1
  • address2
  • city
  • state
  • zipCode

Example Request Body:

   {
       "pid" : "546854646894", 
       "memberId": 278000000118,
       "itemId": 211602000000061,
       "updateAddress" :  true, 
       "address1": "2000 Town Center",
       "address2”: "Suite 2100",
       "city” : "Southfield", 
       "state": "MI",
       "zipCode": "48034"
   }

Example Response: Success

   {
       "success" : true,
       "points" :  150
   }

Example Response: Member Id not Found

   {
       "Error": {
           "Code": "error.business.Validation",
           "Message": "Error for attribute: Member Id\nThis information is required.\n"
       }
   }

Example Response: Invalid Item Id

   {
       "Error": {
           "Code": "error.business.Validation",
           "Message": "Error for attribute: Item Id\nThis is an invalid code.\n"
       }
   }

Example Response: Invalid User Primary Id

   {
       "Error": {
           "Code": "error.business.Validation",
           "Message": "Error for attribute: Pid\nThis user was not found in the system.\nError for attribute: Item Id\nThis is an invalid code.\n"
       }
   }
Personal tools