Redeem
From ePrize Developers Wiki
(Difference between revisions)
(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...) |
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 Request Body: | 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 | 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 | 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 | 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" | |
+ | } | ||
} | } | ||
- | } |
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" } }