Users

Add, edit, and delete anything related to users (WP EasyCart customers).

User

user_id
integer

Unique ID in the WP EasyCart system

email
string

Unqiue email address for the customer account

email_other
string

A second email address for the customer account

password
string

The password for the customer account, leave blank to force the customer to set it.

first_name
string

The first name on the account.

last_name
string

The last name on the account.

user_level
string

The user level for a customer account, default is shopper.

vat_registration_number
string

The VAT registration number for this account.

object (Address)
object (Address)
stripe_customer_id
string

The stripe customer ID.

exclude_tax
boolean

This customer will not be charged tax, if enabled.

exclude_shipping
boolean

This customer will not be charged shipping, if enabled.

{
  • "user_id": 0,
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "user_level": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}

Gets a list of users

This allows you to get a list of users

SecuritybearerAuth or basicAuth
Request
query Parameters
page
integer <int64>

Page number starting at 1

perpage
integer <int64>

Number of items per page

sortby
string

Sort results by term

sortdir
string

Sort results ASC or DESC

search
string

Filter users by a search term

Responses
200

Successful operation

400

Unauthorized

get/users
Request samples
Response samples
application/json
[
  • {
    }
]

Add a user

This allows you to add a new user

SecuritybearerAuth
Request
Request Body schema: application/json
required

Submit any or all elements to add a new user.

email
string

Unqiue email address for the customer account

email_other
string

A second email address for the customer account

password
string

The password for the customer account, leave blank to force the customer to set it.

user_level
string

The user level for a customer account, default is shopper.

first_name
string

The first name on the account.

last_name
string

The last name on the account.

vat_registration_number
string

The VAT registration number for this account.

object (AddressAdd)
object (AddressAdd)
stripe_customer_id
string

The stripe customer ID.

exclude_tax
boolean

This customer will not be charged tax, if enabled.

exclude_shipping
boolean

This customer will not be charged shipping, if enabled.

Responses
200

Successful operation

400

Unauthorized

post/users
Request samples
application/json
{
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "user_level": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}
Response samples
application/json
{
  • "user_id": 0,
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "user_level": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}

Gets a user by ID

This allows you to get a user from your store by user ID

SecuritybearerAuth or basicAuth
Request
path Parameters
user_id
required
integer <int64>

User ID

Responses
200

Successful operation

400

Unauthorized

get/users/{user_id}
Request samples
Response samples
application/json
{
  • "user_id": 0,
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "user_level": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}

Updates a user by ID

This allows you to update a user

SecuritybearerAuth
Request
path Parameters
user_id
required
integer <int64>

User ID

Request Body schema: application/json
required

Submit any or all elements to update the user.

email
string

Unqiue email address for the customer account

email_other
string

A second email address for the customer account

password
string

The password for the customer account, leave blank to force the customer to set it.

user_level
string

The user level for a customer account, default is shopper.

first_name
string

The first name on the account.

last_name
string

The last name on the account.

vat_registration_number
string

The VAT registration number for this account.

object (AddressAdd)
object (AddressAdd)
stripe_customer_id
string

The stripe customer ID.

exclude_tax
boolean

This customer will not be charged tax, if enabled.

exclude_shipping
boolean

This customer will not be charged shipping, if enabled.

Responses
200

Successful operation

400

Unauthorized

patch/users/{user_id}
Request samples
application/json
{
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "user_level": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}
Response samples
application/json
{
  • "user_id": 0,
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "user_level": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}

Deletes a user by ID

This allows you to delete a user from your store

SecuritybearerAuth
Request
path Parameters
user_id
required
integer <int64>

User ID

Responses
200

Successful operation

400

Unauthorized

delete/users/{user_id}
Request samples
Response samples
application/json
{
  • "user_id": 0,
  • "email": "string",
  • "email_other": "string",
  • "password": "string",
  • "first_name": "string",
  • "last_name": "string",
  • "user_level": "string",
  • "vat_registration_number": "string",
  • "billing_address": {
    },
  • "shipping_address": {
    },
  • "stripe_customer_id": "string",
  • "exclude_tax": true,
  • "exclude_shipping": true
}