athacks

Customer's Object

Dec 2nd, 2016
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.89 KB | None | 0 0
  1. #The following is a guide to our objects on our database
  2.  
  3. #-Customers-
  4.  
  5. #Sample of customer objects, * notates a mandatory field if creating
  6.  
  7.  
  8. {
  9.   "birthDay": 0,
  10.   "birthMonth": 0,
  11.   "birthYear": 0,
  12.   "emails": [
  13.     "example@example.com" //*only mandatory if no phone number was provided, return a 400 error with message "No contact method"
  14.   ],
  15.   "firstName": " ",
  16.   "id": " ",
  17.   "initialReferral": {
  18.     "offerID": " ",    //* can be null or empty string
  19.     "used": false,     //*needs to be false if no referredBy id is specified - Return 400 error, "Bad Initial Refferal Object"
  20.     "referredBy": "customer_id"  //Customer's ID that reffered this customer
  21.   },
  22.   "lastName": " ",
  23.   "orders": {
  24.     "merchant_id": {
  25.       "G5HJ4S5B4J4U":["SAMPLE1","SAMPLE2","SAMPLE"]
  26.     }
  27. },
  28.   "phoneNumber": 0, //* Unless an email was set, it's a mandatory field
  29.   "prefContactMethod": 0
  30. }
Add Comment
Please, Sign In to add comment