Users

Where your customers CRUD is kept.

User Object

The User Object holds all the usual info you'd expect, name, phone number, address, etc. You can also add tags to users, which can be used to search, and come in handy when you get into our ML tools.

Attributes

Type

Description

first_name

string

First name of the user.

last_name

string

Last name of the user.

salutation

string

Title of the user.

email

string

E-mail of the user.

mobile_phone_number

string

Phone number of the user.

addresses

array

An array of Addresses associated with the user.

billing_address

object

Billing Address of the user.

default_payment_method

string

Default payment method of the user.

last_login

string

Date when user last logged in. Timestampformat.

bio

string

Biographical note about the user.

tags

array

List of tags associated with user.

note

string

Additional notes regarding the user.

human_id

string

Human readable ID that identifies the order easily, e.g. 3AG7UA.

image

object

Image object for this user.

User Role

Changes since API version 2019-02-01

2020-02-13 - Create a User - New route

  • The route/v2/usersis now deprecated: to create a user you must use/users.

Create a User*

And on the 6th day, you can make pancakes and watch cartoons, cuz creating new users is super easy. Just use POST /users.

We use the JWT in the header to identify a User. According to the JWT specs, the subclaim is the identifier of the subject, i.e. the user. So, whenever you send us a JWT, we extract the subvalue and use that as the user ID.

See Authentication for how to get a JWT. With the route POST /users, you could both create a new user with a JWT and login a user with their JWT.

Body Parameters

Type

Description

first_name

string

First name of the user.

last_name

string

Last name of the user.

salutation

string

Title of the user.

email

string

E-mail of the user.

mobile_phone_number

string

Phone number of the user.

addresses

array

An array of Addresses associated with the user.

billing_address

object

Billing Address of the user.

bio

string

Biographical note about the user.

tags

array

List of tags associated with the user.

note

string

Additional notes regarding the user.

image

string

An Image ID

Retrieve a User

Path Parameters

Type

Description

<user_id>

string

User ID

To retrieve, update, or delete your currently logged-in user, you can replace the user id in the query parameter with me.

Update a User

Path Parameter

Type

Description

<user_id>

string

User ID

Body Parameters

Type

Description

first_name

string

First name of the user.

last_name

string

Last name of the user.

salutation

string

Title of the user.

email

string

E-mail of the user.

mobile_phone_number

string

Phone number of the user.

default_payment_method

string

Default payment method of the user.

addresses

array

An arrayof Addressesassociated with the user.

billing_address

object

Address used for billing purposes.

bio

string

Biographical note about the user.

tags

array

List of tags associated with the user.

note

string

Additional notes regarding the user.

Update a User's Addresses

Path Parameter

Type

Description

<user_id>

string

User ID

Body Parameters

Type

Description

addresses

array

An arrayof Addressesassociated with the user.

Delete a User

Path Parameter

Type

Description

<user_id>

string

User ID

List All Orders for a User

Path Parameter

Type

Description

<user_id>

string

User ID

Query Parameters

Type

Description

size

number

Number of items to retrieve.

page

number

Which page to retrieve. Default is 10.

sort

string

Field used for sorting results. Default is created.

from_date

number

Start date, timestamp format. Default is current date minus 15 days.

to_date

number

End date, timestamp format. Default is current date plus 15 days.

date_filter

string

Date field used to filter results. Default is created.

order_status

string

Orders with a specific status are also listed. Values can be separated by a comma, e.g., success, processing.

delivery_status

string

Orders with a specific delivery status are also listed. Values can be separated by a comma, e.g., assigned, done, created.

List All Payment Methods for a User

Path Parameter

Type

Description

<user_id>

string

User ID

Query Parameters

Type

Description

size

number

Number of items to retrieve.

page

number

Which page to retrieve. Default is 10.

sort

string

Field used for sorting results. Default is created.

from_date

number

Start date, timestamp format. Default is current date minus 15 days.

to_date

number

End date, timestamp format. Default is current date plus 15 days.

date_filter

string

Date field used to filter results. Default is created.

List All Subscriptions for a User

Receives a list of all Subscriptions associated with the user.

Path Parameter

Type

Description

<user_id>

string

User ID

Query Parameters

Type

Description

include_deleted

boolean

If true, the request also returns all deleted subscriptions.

size

number

Number of subscriptions per page. Default is 10.

page

number

Which page to retrieve. Default is 0.

sort

string

Field used to sort results. Default is -modified.

status

string

The subscription status Default is ACTIVE.

Admin Role

*Paths listed above and denoted with a star are accessible to both Users and Admins. Additional Admin Role paths are listed below.

Retrieve a User

Path Parameter

Type

Description

<user_id>

string

User ID

Retrieve All Users

Query Parameters

Type

Description

size

number

Number of items to retrieve.

page

number

Which page to retrieve. Default is 10.

sort

string

Field used for sorting results. Default is created.

from_date

number

Start date, timestamp format. Default is current date minus 15 days.

to_date

number

End date, timestamp format. Default is current date plus 15 days.

date_filter

string

Date field used to filter results. Default is created.

Update a User

Path Parameter

Type

Description

<user_id>

string

User ID

Body Parameters

Type

Description

first_name

string

First name of the user.

last_name

string

Last name of the user.

salutation

string

Title of the user.

email

string

E-mail of the user.

mobile_phone_number

string

Phone number of the user.

default_payment_method

string

Default payment method of the user.

addresses

array

An arrayof Addressesassociated with the user.

billing_address

object

Address used for billing purposes.

bio

string

Biographical note about the user.

tags

array

List of tags associated with the user.

notes

string

Additional notes regarding the user.

image

string

An Image ID

Update a User's Addresses

Path Parameter

Type

Description

<user_id>

string

User ID

Body Parameters

Type

Description

addresses

array

An arrayof Addressesassociated with the user.

Delete a User

Path Parameters

Type

Description

<user_id>

string

User ID

List All Orders for a User

Path Parameters

Type

Description

<user_id>

string

User ID

Query Parameters

Type

Description

size

number

Number of items to retrieve.

page

number

Which page to retrieve. Default is 10.

sort

string

Field used for sorting results. Default is created.

from_date

number

Start date, timestamp format. Default is current date minus 15 days.

to_date

number

End date, timestamp format. Default is current date plus 15 days.

date_filter

string

Date field used to filter results. Default is created.

order_status

string

Orders with a specific status are also listed. Values can be separated by a comma, e.g., success, processing.

delivery_status

string

Orders with a specific delivery status are also listed. Values can be separated by a comma, e.g., assigned, done, created.

List All Payment Methods for a User

Path Parameters

Type

Description

<user_id>

string

User ID

Query Parameters

Type

Description

size

number

Number of items to retrieve.

page

number

Which page to retrieve. Default is 10.

sort

string

Field used for sorting results. Default is created.

from_date

number

Start date, timestamp format. Default is current date minus 15 days.

to_date

number

End date, timestamp format. Default is current date plus 15 days.

date_filter

string

Date field used to filter results. Default is created.

List All Subscriptions for a User

Path Parameters

Type

Description

<user_id>

string

User ID

Query Parameters

Type

Description

include_deleted

boolean

If true, the request also returns all deleted subscriptions.

size

number

Number of subscriptions per page. Default is 10.

page

number

Which page to retrieve. Default is 0.

sort

string

Field used to sort results. Default is -modified.

status

string

The subscription status Default is ACTIVE.

Last updated