Customer data object specification for the Cratejoy Merchant API
Properties
| Property | Filter | Edit | Type | Description |
|---|---|---|---|---|
| id | INT | Unique identifier | ||
| country | STRING | Two letter country code for the customer as determined by the primary address | ||
| STRING | The customer's email address | |||
| first_name | STRING | First name as parsed from name |
||
| last_name | STRING | Last name as parsed from name |
||
| location | STRING | The customer's location (e.g. State + Country) | ||
| name | STRING | The customer's full name. Will update based on edits to first_name or last_name |
||
| num_orders | INT | How many orders this customer has placed | ||
| num_subscriptions | INT | How many subscriptions the customer has ordered | ||
| subscription_status | STRING | User friendly name of this customers subscription status. Includes Active, Past Due, Expired, Cancelled, and Mixed (if the customer has multiple subscriptions with different statuses) | ||
| total_revenue | INT | The dollar amount this customer has paid | ||
| type | STRING | The type of the element. In this case, customer |
||
| note | STRING | Only supports prepend (via PUT) and delete. | ||
| url | STRING | Direct link to GET the full details of the customer |
Relation Properties
| Property | Resource | Description | Filter? |
|---|---|---|---|
| addresses | Address | A collection of addresses for this customer | Yes |
| _md | CustomerMetadata | User defined data about the customer | Yes |
Additional Related Properties
see Working with Object Relationships
| Property | Resource | Description | Filter? |
|---|---|---|---|
| logs | CustomerLog | A collection of customer log entries. | Yes |
| carts | Cart | A collection of carts associated with the customer. | Yes |
| notes | Yes | ||
| orders | Order | A collection of orders associated with the customer. | Yes |
| shipments | Shipment | A collection of shipments associated with the customer. | Yes |
| subscriptions | Subscription | A collection of subscriptions associated with the customer | Yes |
The above properties on the customer are references to another Cratejoy resource or another collection of Cratejoy resources. The properties can either be a url to fetch the related resources OR contain the resources themselves
