user

Collection: users

A FoxyCart User is someone who manages and configures a FoxyCart Store. It is often the owner of that store, but might also be someone paid to be responsible for aspects of the store. There can be many users per store and any user can access many stores. Before creating a user, you must create a client. When you create a user, you'll get a response back containing an OAuth token giving you access to the user.

As part of security protections against abuse, an hCaptcha header is required as part of user creation. It is passed through a h-captcha-code header with the POST request to create a user. If you have a need to create users as part of a platform integration, please get in touch with our support team to discuss this requirement further.

To modify a user, you must be connected to the API using an OAuth token with user_full_access scope.

If you create custom attributes for a user, they will automatically be included in the response as embedded resources without having to zoom in on them.

Required Scopes

Full user_full_access
Read users_read
Write users_write

Actions

GET View a user
PATCH Update a user (send only the properties you want to modify)
PUT Replace a user (send the entire representation)
DELETE Delete a user
HEAD Get just the header response
OPTIONS Get a response explaining which HTTP methods are supported

Properties (11)

first_name String · Required · max 50

The user's given name.

last_name String · Required · max 50

The user's surname.

email String · Required · max 100

The user's email address. This is used as the login to the FoxyCart admin for this user.

phone String · max 50

The user's phone number.

affiliate_id Number

This can only be set during user creation. Contact us if you need this value changed later.

Can only be set on creation.

is_programmer Boolean

If this user is a programmer who writes server side code in languages like PHP, .NET, Python, Java, Ruby, etc.

is_front_end_developer Boolean

If this user is a front end developer who writes code in things like HTML, CSS, and maybe some JavaScript.

is_designer Boolean

If this user is a front end designer who works in wireframes, graphic designs, and user interfaces.

is_merchant Boolean

If this user is a merchant or store admin involved in the item and money side of the e-commerce business.

date_created String (nullable) · Read-only

The date this resource was created.

date_modified String (nullable) · Read-only

The date this resource was last modified.

Link Relations (6)

self This User
fx:attributes GET POST PATCH PUT Attributes for This User
fx:default_store GET PATCH PUT Default Store for This User
fx:stores GET POST Stores for This User
fx:user_invitations GET POST User Invitations for This User
fx:user_passkeys Passkeys for This User

Zoomable Resources

Embed related resources using ?zoom=<resource>. Filter with ?resource:property=value.

https://api.foxycart.com/users/{id}
Available via fx:user on api_home·fx:user on integration·fx:user on passkey·fx:user on report·fx:user on store_changelog·fx:user on transaction_log·fx:user on user_access·fx:user on user_invitation

Example Representation

Zoom
{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "https://api.foxycart.com/users/123",
      "title": "This User"
    },
    "fx:attributes": {
      "href": "https://api.foxycart.com/users/123/attributes",
      "title": "Attributes for This User"
    },
    "fx:default_store": {
      "href": "https://api.foxycart.com/stores/456",
      "title": "Default Store for This User"
    },
    "fx:stores": {
      "href": "https://api.foxycart.com/users/123/stores",
      "title": "Stores for This User"
    },
    "fx:user_invitations": {
      "href": "https://api.foxycart.com/users/123/user_invitations",
      "title": "User Invitations for This User"
    },
    "fx:user_passkeys": {
      "href": "https://api.foxycart.com/users/123/passkeys",
      "title": "Passkeys for This User"
    }
  },
  "first_name": "John",
  "last_name": "Doe",
  "email": "john.doe@example.com",
  "phone": "555-555-5555",
  "affiliate_id": 0,
  "is_programmer": true,
  "is_front_end_developer": false,
  "is_designer": false,
  "is_merchant": true,
  "date_created": "2007-05-23T16:09:12-0700",
  "date_modified": "2013-07-10T22:37:49-0700"
}