MEMBER RELATED

Update Member

Mobile API Path: /update
Web API Path: /update

JSON body

{
“phone”: <string>,
“spendgo_id”: <string>,
“sms_opt_in”: <boolean>, (optional)
“password”: <string> (optional),
“email”: <string> (optional),
“email_opt_in”: <boolean>,
“first_name”:<string> (optional),
“last_name”:<string> (optional),
“dob”: <date string> (YYYY-MM-DD format optional),
“gender”: <string> (optional - “M” | “F”)
“marital_status”: <string> (optional - “Single” | “Married” |  “Divorced” | “Domestic Partner”),
“street”: <string> (optional),
“city”: <string> (optional),
“state”: <string> (optional),
“zip”: <string> (optional),
“favorite_store_id”: <number> (optional),
“research_opt_in”: <string> (optional),
“addtl_info: [{     (optional)

“name”: <string>,
“value”: <string>
}, {
..

}],
“email_validated”: <boolean> // default false
}

Either a phone or spendgo_id is required for a update. NOTE: phone and spendgo_id fields are not updated.

If email is being updated and is not validated, returns status code 202. The user is sent an email to validate this change and once validated, the changes take place.

On success returns a HTTP status code of 200.
If member does not exist returns HTTP status code of 404


Get member

Mobile API Path: /get
Web API Path: /get

JSON body {

“phone”: <string>,  // Optional
“email”: <string>,  // Optional
“spendgo_id”: <string>  // Optional
}

Need one of the above - phone or email or username or spendgo_id value
On success returns a HTTP status code of 200 with

JSON body {

“phone”: <string>,
“spendgo_id”: <string>,
“sms_opt_in”: <boolean> (optional),
“email”: <string> (optional),

“email_opt_in”: <boolean>,
“first_name”:<string> (optional),
“last_name”:<string> (optional),
“dob”: <date string> (YYYY-MM-DD format optional),
“gender”: <string> (optional - “M” | “F”),
“marital_status”: <string> (optional - “Single” | “Married” |  “Divorced” | “Domestic Partner”),

“street”: <string> (optional),
“city”: <string> (optional),
"state”: <string> (optional),
“zip”: <string> (optional),
"favorite_store”:  {

"id": <number> (Store Id) ,
"name": "<string>" (Store Name),
"code": "<string>" (Store Code - if available),
"street": "<string>" (Street),
"city": " <string>" (City),
"state": "<string>" (State Code),
"zip": "<string>" (Zip Code),
"phone": "<string>" (Store Phone Number),
"hours": "<string>" (Store Hours),
"latitude":<number>,
"longitude": <number>

},
“addtl_info: [{  (optional)

“name” <string> :  “value” <string>
}, {

..

}]

}

If member does not exist returns HTTP status code of 404


Validate Member / Sign in For Web

Mobile API Path: This is not available / applicable for Mobile.
Web API Path: /signin

JSON body {

“phoneorusername”: <string>,
“password”: <string>
}

On success returns a HTTP status code of 200 with

JSON body {

“phone”: <string>,
“spendgo_id”: <string>,
“sms_opt_in”: <boolean>, (optional)
“email”: <string> (optional),
“email_opt_in”: <boolean>,
"first_name”:<string> (optional),
“last_name”:<string> (optional),
“dob”: <date string> (YYYY-MM-DD format optional),
“gender”: <string> (optional - “M” | “F”),
“marital_status”: <string> (optional - “Single” | “Married” |  “Divorced” | “Domestic Partner”),

“street”: <string> (optional),
“city”: <string> (optional),
“state”: <string> (optional),
“zip”: <string> (optional),

"favorite_store”:  {

"id": <number> (Store Id) ,
"name": "<string>" (Store Name),
"code": "<string>" (Store Code - if available),
"street": "<string>" (Street),
"city": " <string>" (City),
"state": "<string>" (State Code),
"zip": "<string>" (Zip Code),
"phone": "<string>" (Store Phone Number),
"hours": "<string>" (Store Hours),
"latitude":<number>,
"longitude": <number>

},
“addtl_info: [{     (optional)

“name” <string> :  “value”<string>
}, {
...

}]
}

Returns HTTP status code 404 is member not found and 401 if member userid/password is invalid.


Loyalty and Member Activity APIs

Get User Rewards and Offers

Mobile API Path: /rewardsAndOffers
Web API Path: /rewardsAndOffers

JSON body {

"spendgo_id": <string>,
"account_id": <string> (optional)
}

Response body {

"point_total": <number>,
“spend_threshold’: <number>,
"rewards_count": <number>,
"rewards_list": [{

“type”:<string>,
"reward_title": <string>,
"description": <string>,
"quantity": <number>

},{

..

}]

}


Get User Activity

Mobile API Path: /activity
Web API Path: /activity

JSON body {

“spendgo_id“:<string>    (mandatory),
“activity_month”:<string> (YYYY-MM-DD)    (mandatory),
“activity_type”:<string> (All | Purchases | Rewards | Offers)   (mandatory)
}

Response JSON {

“activity”: [{

“type”: <String>,
“id”: <Integer>,
“details”: <String>,
"merchant": <String>,
"origin": <String>, // Optional, i.e. store name
"timestamp": <UTC Timestamp>,
“transaction_num”: <String>,
“expires”: <UTC Timestamp>, // Optional - valid only for rewards/offers
“total": <Double>, // Optional  - Valid only for
"points": <Double> // Optional
},{

..

}]
}