Merchants
Create a staff merchant
By running the payload below, the merchant will receive two email, the first is an activation email and the second contains an auto generated password for him to login.
mutation (
$email: String!
$firstname: String!
$lastname: String!
$phoneNumber: String
$country: String
$city: String
$street: String
$zipCode: String
$birthday: Date
$stores: [ID]
$roles: [ID]
) {
createMerchant(
input: {
email: $email
firstname: $firstname
lastname: $lastname
birthday: $birthday
phoneNumber: $phoneNumber
country: $country
city: $city
zipCode: $zipCode
street: $street
stores: $stores
roles: $roles
}
) {
success
errors
merchant {
id
}
}
}
Delete a merchant
Recruit a merchant to a store
mutation (
$merchantId: ID!
$storeId: ID!
) {
addStoreToMerchant(
input: {
merchantId: $merchantId
storeId: $storeId
}
) {
success
errors
}
}
Remove a merchant from a store
mutation (
$merchantId: ID!
$storeId: ID!
) {
removeStoreFromMerchant(
input: {
merchantId: $merchantId
storeId: $storeId
}
) {
success
errors
}
}
Recruit a merchant to a store group
mutation (
$merchantId: ID!
$storeGroupId: ID!
) {
addStoreGroupToMerchant(
input: {
merchantId: $merchantId
storeGroupId: $storeGroupId
}
) {
success
errors
}
}