userBuyerCreateEshopAccount Mutation
Description
Creates an eshop account for an existing buyer who doesn't have one. Generates a password token and sends an account creation confirmation email. The buyer must not already have an account created.
mutation userBuyerCreateEshopAccount($userRef: ID!) {
userBuyerCreateEshopAccount(userRef: $userRef) {
_id
created
updated
lastLogin
active
birthdate
firstName
lastName
email
name
path
telephone
organisation
taxNumber
lists {
_id
ref
added
lastModified
}
accountCreated
addresses {
_id
description
firstName
lastName
addressLine1
addressLine2
streetNumber
city
state
stateCode
postCode
alpha2
country
type
}
notes
verification {
status
token
code
date
hash
}
orderCount
orderTotal
creditNotesCount
wantsCount
vouchersCount
checkoutCount
type
}
}
Variables
{
"userRef": "d452693f8238d60badddd7a1"
}
Response
{
"userBuyerCreateEshopAccount": {
"_id": "4d8855580711f9e8d1eca5b8",
"created": 1735221206944,
"updated": 1724584672807,
"lastLogin": 1772468186672,
"active": true,
"birthdate": 1728525672705,
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"name": "example",
"path": "/release/1763553751/release-artist-release-name",
"telephone": "example",
"organisation": "example",
"taxNumber": "example",
"lists": [
{
"_id": "cc368251559eb2f31bf0fee6",
"ref": "0418fc111c65ec30c035ec04",
"added": 1768587727526,
"lastModified": 1736247717217
}
],
"accountCreated": true,
"addresses": [
{
"_id": "ce32d8a6a11f66e51daac1da",
"description": "example",
"firstName": "example",
"lastName": "example",
"addressLine1": "example",
"addressLine2": "example",
"streetNumber": 42,
"city": "example",
"state": "example",
"stateCode": "example",
"postCode": "example",
"alpha2": "example",
"country": "example",
"type": "example"
}
],
"notes": "example",
"verification": {
"status": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ",
"code": "example",
"date": 1730071338403,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"checkoutCount": 42,
"type": "example"
}
}
Arguments
| Name | Type | Description |
|---|---|---|
userRef | ID! | Reference ID of the buyer to create an eshop account for. |