Object Model
These json objects are used with the REST MyAccount API.
- id fields are only required for existing objects. When creating/adding new objects, the id field is always blank and provided by the UltraCart servers.
- Any string fields larger than their maximum size are silently truncated. The field sizes are large enough to handle most data, and the truncation is rarely a problem. The biggest issue with with email addresses. But, an email over 100 characters is also a rarity (pity the soul that has that address).
Address
Field | Type | Required | Comment |
id | int | Yes* | 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! |
company | string(50) | No | |
firstName | string(30) | Yes | |
lastName | string(30) | Yes | |
address1 | string(32) | Yes | |
address2 | string(32) | No | |
city | string(32) | Yes | |
state | string(32) | Yes | |
postalCode | string(20) | Yes | In the US, this is known as 'zip code' |
country | string(32) | Yes | |
title | string(50) | No | |
dayPhone | string(25) | No | |
eveningPhone | string(25) | No |
Case
CaseMessage
ChangePasswordRequest
CreditCard
CustomerCredentials
MyAccount
NotReviewedItem
Order
OrderTracking
OrderItem
ReviewedItem
TODO:
/myaccount/loggedIn (GET)
/myaccount/login (GET/POST)
/myaccount/logout (GET)
/myaccount/changePassword (POST)
/myaccount/forgotPassword (POST)
/myaccount/settings (GET)
/myaccount/settings (POST)
/myaccount/settings (PUT)
/myaccount/settings (DELETE)
/myaccount/shippingAddresses (GET)
/myaccount/shippingAddresses/id (GET)
/myaccount/shippingAddresses (POST)
/myaccount/shippingAddresses/id (PUT)
/myaccount/shippingAddresses/id (DELETE)
/myaccount/billingAddresses (GET)
/myaccount/billingAddresses/id (GET)
/myaccount/billingAddresses (POST)
/myaccount/billingAddresses/id (PUT)
/myaccount/billingAddresses/id (DELETE)
/myaccount/creditCards (GET)
/myaccount/creditCards/id (GET)
/myaccount/creditCards (POST)
/myaccount/creditCards/id (PUT)
/myaccount/creditCards/id (DELETE)
/myaccount/orders (GET)
/myaccount/orders/orderId (GET)
/myaccount/orders/orderId/tracking (GET)
/myaccount/orders/orderId/case (GET)
/myaccount/orders/orderId/case (POST)
/myaccount/notReviewedYet (GET)
/myaccount/reviews (GET)