Partner API Documentation Help

User

Summary

The User object represents an API user account in the system. It contains important attributes and permissions of the user, particularly focusing on managing access to stores within a certain partnership.

Key features include varying roles like manager, viewer, and api, with explicit store-level access defined via store_ids. This structured approach enables efficient access control and user management for the system.

You can get current user using method Get current authenticated user info

Schema

_idstringemailstringloginstringrolestringpartner_rolestringpartnerstringstore_ids   first_namestringlast_namestringcreated_atISO Date stringupdated_atISO Date stringstringstring...

Description

_id: string

A unique identifier string for the User.

email: string

The email address associated with the user. This might be used for communication and authentication.

login: string

The login name of the user. This could be used to log into the system.

role: string

The role of the user in the system. This helps in managing user permissions. For this User object, the role is always partner.

partner_role: string

The role of the user within the partner context. This can be manager, viewer or api. Note that for users with api access, this field is always api. This helps the system in granting role-based permissions within the partner scope.

partner: string

This is the common name of the partner. Typically, it aligns with the name of the store or network of stores.

store_ids: [string]

This is an array of identifiers for stores. These identifiers are the stores that the current account can access. This helps in managing store-level permissions for the user.

first_name: string

The first name of the user.

last_name: string

The last name of the user.

created_at: string

The date and time when the user was created in the system. It's in the ISO 8601 date-time format (yyyy-mm-ddThh:mm: ss.sssZ) in UTC.

updated_at: string

The date and time when the user was last updated in the system. It's also in ISO 8601 date-time format (yyyy-mm-ddThh: mm:ss.sssZ) in UTC.

Example

{ "_id": "your-id", "email": "your-email", "login": "your-login", "role": "your-role", "partner_role": "your-partner-role", "partner": "your-partner-name", "store_ids": [ "your-store_id", "..." ], "first_name": "your-first-name", "last_name": "your-last-name", "created_at": "2024-01-01T10:00:00.000Z", "updated_at": "2024-01-01T10:00:00.000Z" }
Last modified: 09 February 2024