Authenticated AccountAPI
The API for interacting with an account in which the customer is fully authenticated.
Anchor to standardapiStandardApi
The base API object provided to this and other customer-account extension targets.
- Anchor to authenticatedAccountauthenticatedAccountAuthenticatedAccountrequired
Information about the authenticated account.
AuthenticatedAccount
- customer
Provides the customer information of the authenticated customer.
StatefulRemoteSubscribable<Customer | undefined> - purchasingCompany
Provides the company info of the authenticated business customer. If the customer is not authenticated or is not a business customer, this value is `undefined`.
StatefulRemoteSubscribable<PurchasingCompany | undefined>
export interface AuthenticatedAccount {
/**
* Provides the company info of the authenticated business customer.
* If the customer is not authenticated or is not a business customer, this value is `undefined`.
*/
purchasingCompany: StatefulRemoteSubscribable<PurchasingCompany | undefined>;
/**
* Provides the customer information of the authenticated customer.
*/
customer: StatefulRemoteSubscribable<Customer | undefined>;
}Customer
Information about the authenticated customer. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
- id
Customer ID.
string
export interface Customer {
/**
* Customer ID.
*
* @example 'gid://shopify/Customer/123'
*/
id: string;
}PurchasingCompany
- company
Include information of the company of the logged in business customer.
Company
export interface PurchasingCompany {
/**
* Include information of the company of the logged in business customer.
*/
company: Company;
}Company
- id
Company ID.
string
export interface Company {
/**
* Company ID.
*/
id: string;
}Anchor to useAuthenticatedAccountCustomeruse Authenticated Account Customer()
Returns the current authenticated Customer. The value is undefined if the customer isn't authenticated.
Customer
Information about the authenticated customer. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
- id
Customer ID.
string
export interface Customer {
/**
* Customer ID.
*
* @example 'gid://shopify/Customer/123'
*/
id: string;
}Anchor to useAuthenticatedAccountPurchasingCompanyuse Authenticated Account Purchasing Company()
Provides information about the company of the authenticated business customer. The value is undefined if a business customer isn't authenticated.
PurchasingCompany
- company
Include information of the company of the logged in business customer.
Company
export interface PurchasingCompany {
/**
* Include information of the company of the logged in business customer.
*/
company: Company;
}Company
- id
Company ID.
string
export interface Company {
/**
* Company ID.
*/
id: string;
}