customer
Collection: customers
A customer is the person who completes a transaction. Whenever a transaction takes place, a customer must be involved. If using a guest_checkout, an anonymous customer will be created with each transaction.
If you create custom attributes for a customer, they will automatically be included in the response as embedded resources without having to zoom in on them.
Required Scopes
store_full_access customers_read customers_write Actions
Properties (16)
id Integer · Read-only The FoxyCart customer id, useful for Single Sign On integrations.
last_login_date Date · Read-only The date of the last time this customer authenticated with the FoxyCart checkout.
first_name String · Optional · max 50 The customer's given name.
last_name String · Optional · max 50 The customer's surname.
email String · Required · max 100 The customer's email address. This is used as the login to the FoxyCart checkout for this customer.
tax_id String · Optional · max 50 A tax identification number for this customer.
password String · max 50 Your customer's clear text password. This value is never stored, not displayed for this resource, and is not available in our system. You can, however, pass it via clear text when creating or modifying a customer. When creating a customer, if you leave this blank, a random value will be generated for you which you can modify later as needed.
password_salt String · max 200 The salt for this customer's login password. If your integration syncs passwords, you will need to keep this value in sync as well.
password_hash String · max 200 The hash of this customer's login password. If your integration syncs passwords, you will need to keep this value in sync as well.
password_hash_type String This will be a copy of your store's current password_hash_type at the time of creation or modification. This way, if you change your store's settings, your customer will still be able to login. It will be updated automatically to match that of the store the next time the customer logs in.
See customer_password_hash_types property helper.
password_hash_config String This will be a copy of your store's current password_hash_config at the time of creation or modification. This way, if you change your store's settings, your customer will still be able to login. It will be updated automatically to match that of the store the next time the customer logs in.
See the documentation for the customer_password_hash_type you are using.
forgot_password String · max 50 If your customer forgot their password and requested a forgotten password, it will be set here.
forgot_password_timestamp Date · Read-only The exact time the forgot password was set.
is_anonymous Boolean · Read-only If this customer checks out as a guest, this will be set to true. Once it is set, it can not be changed.
date_created Date · Read-only The date this resource was created.
date_modified Date · Read-only The date this resource was last modified.
Link Relations (12)
self This Customer If this customer has gift card codes associated with them
Only present when the customer has associated gift card codes.
Zoomable Resources
Embed related resources using ?zoom=<resource>.
Filter with ?resource:property=value.
fx:customer on billing_address·fx:customer on cart·fx:customer on customer_address·fx:customer on default_payment_method·fx:customer on discount·fx:customer on downloadable_purchase·fx:customer on error_entry·fx:customer on gift_card_code·fx:customer on payment_method_expiring·fx:customer on shipment·fx:customer on subscription·fx:customer on subscription_event·fx:customer on transaction·fx:customer on transaction_log Example Representation
{
"_links": {
"curies": [
{
"name": "fx",
"href": "https://api.foxycart.com/rels/{rel}",
"templated": true
}
],
"self": {
"href": "https://api.foxycart.com/customers/123",
"title": "This Customer"
},
"fx:attributes": {
"href": "https://api.foxycart.com/customers/123/attributes",
"title": "Attributes for this Customer"
},
"fx:store": {
"href": "https://api.foxycart.com/stores/456",
"title": "This Store"
},
"fx:default_billing_address": {
"href": "https://api.foxycart.com/customers/123/default_billing_address",
"title": "Default Billing Address for this Customer"
},
"fx:default_shipping_address": {
"href": "https://api.foxycart.com/customers/123/default_shipping_address",
"title": "Default Shipping Address for this Customer"
},
"fx:default_payment_method": {
"href": "https://api.foxycart.com/customers/123/default_payment_method",
"title": "Default Payment Method for this Customer"
},
"fx:transactions": {
"href": "https://api.foxycart.com/stores/456/transactions?customer_id=123",
"title": "Transactions for this Customer"
},
"fx:subscriptions": {
"href": "https://api.foxycart.com/stores/456/subscriptions?customer_id=123",
"title": "Subscriptions for this Customer"
},
"fx:send_webhooks": {
"href": "https://api.foxycart.com/customers/123/send_webhooks",
"title": "Refeed webhooks v2 for this Customer"
},
"fx:customer_addresses": {
"href": "https://api.foxycart.com/customers/123/addresses",
"title": "Addresses for this Customer"
}
},
"last_login_date": null,
"first_name": "Test",
"last_name": "User",
"email": "luke.stokes+apitest998@example.com",
"password_salt": null,
"password_hash": "4443fe50df6b177ba84b78dd91f0958a",
"password_hash_type": "md5",
"password_hash_config": null,
"forgot_password": "blah",
"forgot_password_timestamp": "2013-08-16T14:13:54-0700",
"is_anonymous": false,
"date_created": null,
"date_modified": "2013-08-16T14:13:54-0700"
}