Identity API — client.commerce.identity¶
Version v2.0.0 · base path /commerce/identity/v1 · async twin: the same methods on
AsyncEbayClient, awaited.
Operations¶
Bases: BaseResource
get_user ¶
get_user(*, x_ebay_c_marketplace_id: str | None = None, raw_response: Literal[False] = False) -> commerce_identity_models.UserResponse
get_user(*, x_ebay_c_marketplace_id: str | None = None, raw_response: Literal[True]) -> httpx.Response
get_user(*, x_ebay_c_marketplace_id: str | None = None, raw_response: bool = False) -> commerce_identity_models.UserResponse | httpx.Response
This method retrieves the account profile information for an authenticated user, which requires a User access token . What is returned is controlled by the scopes . For a business account you use the default scope commerce.identity.readonly , which returns all the fields in the businessAccount container. These are returned because this is all public information.
Models¶
AccountTypeEnum ¶
Contact ¶
Bases: EbayModel
CountryCodeEnum ¶
Bases: OpenStrEnum
ErrorParameter ¶
MarketplaceIdEnum ¶
Bases: OpenStrEnum
Phone ¶
Bases: EbayModel
country_code
class-attribute
instance-attribute
¶
country_code = Field(None, alias='countryCode', description='The two-letter ISO 3166 standard of the country to which the phone number belongs.')
number
class-attribute
instance-attribute
¶
number = Field(None, description='The numeric string representing the phone number.')
phone_type
class-attribute
instance-attribute
¶
phone_type = Field(None, alias='phoneType', description='The type of phone service. Valid Values: MOBILE or LAND_LINE Code so that your app gracefully handles any future changes to this list.')
UserStatusEnum ¶
Bases: OpenStrEnum
Address ¶
Bases: EbayModel
address_line1
class-attribute
instance-attribute
¶
address_line1 = Field(None, alias='addressLine1', description='The first line of the street address.')
address_line2
class-attribute
instance-attribute
¶
address_line2 = Field(None, alias='addressLine2', description="The second line of the street address. This field is not always used, but can be used for 'Suite Number' or 'Apt Number'.")
city
class-attribute
instance-attribute
¶
city = Field(None, description='The city of the address.')
country
class-attribute
instance-attribute
¶
country = Field(None, description='The two-letter ISO 3166 standard of the country of the address.')
county
class-attribute
instance-attribute
¶
county = Field(None, description='The county of the address.')
postal_code
class-attribute
instance-attribute
¶
postal_code = Field(None, alias='postalCode', description='The postal code of the address.')
state_or_province
class-attribute
instance-attribute
¶
state_or_province = Field(None, alias='stateOrProvince', description='The state or province of the address.')
BusinessAccount ¶
Bases: EbayModel
address
class-attribute
instance-attribute
¶
address = Field(None, description='The container that returns the address of the business account.')
doing_business_as
class-attribute
instance-attribute
¶
doing_business_as = Field(None, alias='doingBusinessAs', description='An additional name that is used for their business on eBay. The business name is returned in the name field.')
email
class-attribute
instance-attribute
¶
email = Field(None, description='The email address of the business account.')
name
class-attribute
instance-attribute
¶
name = Field(None, description="The business name associated with the user's eBay account.")
primary_contact
class-attribute
instance-attribute
¶
primary_contact = Field(None, alias='primaryContact', description='The container that returns the contact details of the person who is the primary contact for this account.')
primary_phone
class-attribute
instance-attribute
¶
primary_phone = Field(None, alias='primaryPhone', description='The container that returns the primary phone number for the business account.')
secondary_phone
class-attribute
instance-attribute
¶
secondary_phone = Field(None, alias='secondaryPhone', description='The container that returns the secondary phone number for the business account.')
website
class-attribute
instance-attribute
¶
website = Field(None, description='The business website address associated with the eBay account.')
Error ¶
Bases: EbayModel
category
class-attribute
instance-attribute
¶
category = Field(None, description='Identifies the type of erro.')
domain
class-attribute
instance-attribute
¶
domain = Field(None, description='Name for the primary system where the error occurred. This is relevant for application errors.')
error_id
class-attribute
instance-attribute
¶
error_id = Field(None, alias='errorId', description='A unique number to identify the error.')
input_ref_ids
class-attribute
instance-attribute
¶
input_ref_ids = Field(None, alias='inputRefIds', description='An array of request elements most closely associated to the error.')
long_message
class-attribute
instance-attribute
¶
long_message = Field(None, alias='longMessage', description='A more detailed explanation of the error.')
message
class-attribute
instance-attribute
¶
message = Field(None, description="Information on how to correct the problem, in the end user's terms and language where applicable.")
output_ref_ids
class-attribute
instance-attribute
¶
output_ref_ids = Field(None, alias='outputRefIds', description='An array of request elements most closely associated to the error.')
parameters
class-attribute
instance-attribute
¶
parameters = Field(None, description='An array of name/value pairs that describe details the error condition. These are useful when multiple errors are returned.')
subdomain
class-attribute
instance-attribute
¶
subdomain = Field(None, description='Further helps indicate which subsystem the error is coming from. System subcategories include: Initialization, Serialization, Security, Monitoring, Rate Limiting, etc.')
IndividualAccount ¶
Bases: EbayModel
email
class-attribute
instance-attribute
¶
email = Field(None, description="The eBay user's registration email address.")
first_name
class-attribute
instance-attribute
¶
first_name = Field(None, alias='firstName', description="The eBay user's first name.")
last_name
class-attribute
instance-attribute
¶
last_name = Field(None, alias='lastName', description="The eBay user's last name.")
primary_phone
class-attribute
instance-attribute
¶
primary_phone = Field(None, alias='primaryPhone', description="The container that returns the eBay user's primary phone number information.")
registration_address
class-attribute
instance-attribute
¶
registration_address = Field(None, alias='registrationAddress', description="The container that returns the eBay user's address information.")
secondary_phone
class-attribute
instance-attribute
¶
secondary_phone = Field(None, alias='secondaryPhone', description="The container that returns the eBay user's secondary phone number information.")
UserResponse ¶
Bases: EbayModel
account_type
class-attribute
instance-attribute
¶
account_type = Field(None, alias='accountType', description='Indicates the user account type. This is determined when the user registers with eBay. If they register for a business account, this value will be BUSINESS . If they register for a private account, this value will be INDIVIDUAL .')
business_account
class-attribute
instance-attribute
¶
business_account = Field(None, alias='businessAccount', description='The container that returns the business account information of the user.')
individual_account
class-attribute
instance-attribute
¶
individual_account = Field(None, alias='individualAccount', description='The account information of the user.')
registration_marketplace_id
class-attribute
instance-attribute
¶
registration_marketplace_id = Field(None, alias='registrationMarketplaceId', description='The eBay site on which the account is registered.')
status
class-attribute
instance-attribute
¶
status = Field(None, description="Indicates the user's account status. Possible values: CONFIRMED , UNCONFIRMED , ACCOUNTONHOLD and UNDETERMINED .")
user_id
class-attribute
instance-attribute
¶
user_id = Field(None, alias='userId', description="The eBay immutable user ID of the user's account and can always be used to identify the user.")
username
class-attribute
instance-attribute
¶
username = Field(None, description='The user name, which was specified by the user when they created the account. Note: This value can be changed by the user. Note: Effective September 26, 2025, select developers will no longer receive username data for U.S. users through this field. Instead, an immutable user ID will be returned in its place. For more information, please refer to Data Handling Compliance .')