Skip to main content

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": "97d6ac77ee994c78bad6a4aa"
}

Response

{
"userBuyerCreateEshopAccount": {
"_id": "015642df3681811de2af883c",
"created": 1719072772096,
"updated": 1749121652863,
"lastLogin": 1731516596202,
"active": true,
"birthdate": 1742832789625,
"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": "26fa1e0e9daac7fd0cc6d600",
"ref": "d0ddc29530ab6405fd84cd94",
"added": 1734791491126,
"lastModified": 1758747936106
}
],
"accountCreated": true,
"addresses": [
{
"_id": "219a681d5287ce6ffa10e817",
"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": 1718729837933,
"hash": "example"
},
"orderCount": 42,
"orderTotal": 1.23,
"creditNotesCount": 42,
"wantsCount": 42,
"vouchersCount": 42,
"checkoutCount": 42,
"type": "example"
}
}

Arguments

NameTypeDescription
userRefID!Reference ID of the buyer to create an eshop account for.

Returns

Buyer