user_accessess

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

Actions

GET
View a list of user_accessess
POST
Create a new user_access
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:user_accessess": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/user_access">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: user_access

Description

This resource represents a relationship between a FoxyCart store and the FoxyCart admin user who can access that store. Each user can only have one default store. If an access record for a user's default store is deleted or modified to no longer be the default, the last modified store the user has access to will become the new default store.

To add a user to a store, create a new user_access resource. To remove a user, delete their user_access resource.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

Actions

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

Properties

Property Description Type Constraints
user_uri A full API URI of the user resource used in this relationship. When working with hypermedia, it's important to save URIs and not just numeric ids. URI Required. Must be a valid user uri.
store_uri A full API URI of the store resource used in this relationship. When working with hypermedia, it's important to save URIs and not just numeric ids. URI Required. Must be a valid store uri.
is_default_store Set this to true to make this store the default store for this user. That means it will be the first store they see when the log in to the FoxyCart admin. Boolean true or false, 1 or 0.
date_created The date this resource was created. Date Read only
date_modified The date this resource was last modified. Date Read only

Example Representation

{
    "_links": {
        "curies": [
            {
                "name": "fx",
                "href": "https://api.foxycart.com/rels/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://api.foxycart.com/user_accesses/256",
            "title": "This User Access"
        },
        "fx:store": {
            "href": "https://api.foxycart.com/stores/66",
            "title": "This Store"
        },
        "fx:user": {
            "href": "https://api.foxycart.com/users/1",
            "title": "This User"
        }
    },
    "user_uri": "https://api.foxycart.com/users/1",
    "store_uri": "https://api.foxycart.com/stores/66",
    "is_default_store": true,
    "date_created": "2012-02-06T14:29:36-0800",
    "date_modified": "2012-02-06T14:29:36-0800"
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="https://api.foxycart.com/user_accesses/256" rel="https://api.foxycart.com/rels/user_access">
  <link rel="self" href="https://api.foxycart.com/user_accesses/256" title="This User Access"/>
  <link rel="https://api.foxycart.com/rels/store" href="https://api.foxycart.com/stores/66" title="This Store"/>
  <link rel="https://api.foxycart.com/rels/user" href="https://api.foxycart.com/users/1" title="This User"/>
  <user_uri>https://api.foxycart.com/users/1</user_uri>
  <store_uri>https://api.foxycart.com/stores/66</store_uri>
  <is_default_store>true</is_default_store>
  <date_created>2012-02-06T14:29:36-0800</date_created>
  <date_modified>2012-02-06T14:29:36-0800</date_modified>
</resource>
{
    "class": [
        "user_access"
    ],
    "properties": {
        "user_uri": "https://api.foxycart.com/users/1",
        "store_uri": "https://api.foxycart.com/stores/66",
        "is_default_store": true,
        "date_created": "2012-02-06T14:29:36-0800",
        "date_modified": "2012-02-06T14:29:36-0800"
    },
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "https://api.foxycart.com/user_accesses/256"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/store"
            ],
            "href": "https://api.foxycart.com/stores/66"
        },
        {
            "rel": [
                "https://api.foxycart.com/rels/user"
            ],
            "href": "https://api.foxycart.com/users/1"
        }
    ]
}

Zoomable Resources

This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.