Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

FieldTypeRequiredEdit/UpdateComment
merchantIdstring(30)Yes*Noold password
customerProfileIdstring(30)Yes*No

new password

ididYes*Noan internal identifer to the record. Used during updates/deletes. Do not create your own. The server will assign an id when the object is created and it will be returned from the insert call.
cardTypestringYesYes

A Valid card type. This depends on what the merchant has configured, but the possible values are: VISA, MasterCard, Discover, Diners Club, JCB, AMEX

Case and spaces matter on the card type. Take care.

cardExpMonthintYesYes1-12 corresponding to the 12 months of Jan-Feb
cardExpYearintYesYesFour digit year.
cardNumberstringYesYes

A valid credit card number. Validity depends on the card type.

Warning

When credit card records are returned from the server, they are always masked. The only time this record has the full CC number is upon insert/update. Don't worry about wiping the CC field. Leave the mask in place.

The server is smart enough to check for an updated number and apply it. If the mask is returned, the server will ignore the field.

lastUsedDatestringNoNo

ISO-8601 format. very handy when used with something like moment.js

Updated whenever the card is used or changed. Do not provide or update this value. Any updates are ignored.

This value is assigned on the server.

lastUsedDateFormattedstringNoNo

A formatted version of lastUsedDate.

Format is: dd MMM yyyy HH:mm:ss


CustomerCredentials

This is the wrapper object for the values needed during login. 

FieldTypeRequiredEdit/UpdateComment
merchantIdstring(50)YesN/A 
emailstring(100)YesN/A

 

passwordstring(30)YesN/A 

 

CustomerCredentials

MyAccount

NotReviewedItem

Order

OrderTracking

OrderItem

ReviewedItem

MyAccount

 This contains the high level record for the customer.   While there is overlap between this record and the shipping/billing addresses, this is the address of record.  

It cannot be deleted, except to delete the entire customer.  

This record cannot be created, except during the ordering process by the customer.  It can only be selected / updated / deleted from the MyAccount API

FieldTypeRequiredComment
merchantIdstring(5)Yes 
customerProfileIdintYes*

Object Identifier. This will always be returned from the server.

Do not create one on your own (won't be accepted).

A common problem that causes our json deserializer to vomit is submitting a new Address with an empty string.

Null is okay. A string that is a parsable integer is okay. But a zero length string has no integer equivalent. Be careful not to do this!

titlestring(50)No 
companystring(50)No 
firstNamestring(30)Yes 
lastNamestring(30)Yes 
address1string(32)Yes 
address2string(32)No 
citystring(32)Yes 
statestring(32)Yes 
postalCodestring(20)YesIn the US, this is known as 'zip code'
countrystring(32)Yes 
titlestring(50)No 
dayPhonestring(25)No 
eveningPhonestring(25)No 
faxstring(32)NoDoes anyone even use fax machines any more? If so, this field is for them.
taxIdstring(15)NoVery popular field for wholesale customers.
passwordstring(30)No

This is not returned when the records are selected, and it cannot be updated via this record. It must be updated via a specific call (changePassword).

As I write this, I'm not really sure why it's even a part of this record...

 

NotReviewedItem

This object represents a purchased item that does not yet have a review written by the customer.  It's used on the reviews page and contains enough information to display a line enticing the customer to write a review and then direct them to the review screen.

Reviews cannot be created via this API.  This was done on purpose to drive all reviews through the review cgi.    That cgi has a multitude of functionality chosen not to duplicate.

FieldTypeComment
merchantIdstring(5) 
itemIdstring(30)

The merchant item id.

merchantItemOidstringAn string containing a number that is used to internally identify the item record. Both the item id and oid are provided because both are needed at different times during the display and link creation.
lastOrderDatestring

ISO-8601 format. very handy when used with something like moment.js

Contains the last date the item was ordered. Since the "not reviewed yet" item list is a distinct list, this value helps show the most recent purchases first.

lastOrderDateFormattedstring

A formatted version of lastOrderDate.

Format is: dd MMM yyyy HH:mm:ss

Sometimes it's not practical to format the ISO-8601 string, for example, within a Handlebars template.

itemItemA complex item containing all the details about the item. See its page for specifics.

 

Order

OrderTracking

ReviewedItem

This read-only object contains an item review.

FieldTypeComment
itemIdstringthe item id of the item reviewed
itemItem A complex item containing all the details about the item. See its page for specifics.
reviewOidintegerreview record's internal identifier
merchantIdstringthe merchant id (your merchant id)
customerProfileIdintegercustomer's internal identifier
merchantItemOidintegeritem's internal identifier
overallnumber1-5 The overall rating of the item. This should be featured prominently.
ratingName1stringThe name (category) of this rating. Configured by the merchant. Examples: Ease of Use, Price, Durability, etc.
ratingName2stringThe name (category) of this rating.
ratingName3stringThe name (category) of this rating.
ratingName4stringThe name (category) of this rating.
ratingName5stringThe name (category) of this rating.
ratingName6stringThe name (category) of this rating.
ratingName7stringThe name (category) of this rating.
ratingName8stringThe name (category) of this rating.
ratingName9stringThe name (category) of this rating.
ratingName10stringThe name (category) of this rating.
ratingScore1number1-5, the rating for the associated rating name.
ratingScore2number1-5, the rating for the associated rating name.
ratingScore3number1-5, the rating for the associated rating name.
ratingScore4number1-5, the rating for the associated rating name.
ratingScore5number1-5, the rating for the associated rating name.
ratingScore6number1-5, the rating for the associated rating name.
ratingScore7number1-5, the rating for the associated rating name.
ratingScore8number1-5, the rating for the associated rating name.
ratingScore9number1-5, the rating for the associated rating name.
ratingScore10number1-5, the rating for the associated rating name.
recommendToFriendbooleantrue if the customer would recomment the item to a friend.
titlestringThe title of the review
reviewstringThe review itself. These are the customer's comments.
statusCodestringApproved, Rejected, or Unapproved
featuredbooleantrue if the merchant has chosen to feature this review
recommendStoreToFriendbooleantrue if the customer would recommend your store to friends.
storeFeedbackstringany comments the customer had for your store
submittedDatestring

ISO-8601 format. very handy when used with something like moment.js

Contains the date when the review was submitted

submittedDateFormattedstring

A formatted version of submittedDate.

Format is: dd MMM yyyy HH:mm:ss

Sometimes it's not practical to format the ISO-8601 string, for example, within a Handlebars template.

helpfulYesVotesintegerthe number of times other customers have marked a review as helpful.
helpfulNoVotesintegerthe number of times other customers have marked a review as unhelpful.

 

 

 

 

 

TODO:

/myaccount/loggedIn (GET)

...