publicAccountBySlug
Overview
This query takes an input slug as a string and searches all borderless accounts by the given input, returning relevant information about a public account.
Special Considerations
- The account of which you are searching must be a business
- Must be logged in to search all accounts
Inputs
publicAccountbySlugArgs
Required Data
slug (required): string
Returns
Promise<PublicAccount>
A promise containing the following object / data:
PublicAccount: {
accountType: ACCOUNTTYPE,
displayName: string,
currency: CURRENCY,
slug: string
}
Example
Running this query:
mutation {
createLoginPersonAndAccount(slug:"test") {
accountType
displayName
currency
slug
}
}
Gives us:
{
"data": {
"publicAccountBySlug": {
"accountType": "BUSINESS"
"displayName": "test business"
"currency": "USD"
"slug": "test"
}
}
}
Common Errors
When running this query some of the common errors encountered include:
No business account exists with this PayMe Handle. (I-5104)
- The account handle you've searched up is a personal account
No account with this PayMe Handle exists. (I-5103)
- The account handle you've searched up doesn't exist
Not a valid account. (I-5105)
- The account is either deactivated or forbidden