Mutations
Authorize
mutation {
CoreShopAuthorize(authorize: {username: "demo@testinger.com", password: "test@testinger.com"}) {
... on CoreShopAuthorizeResult {
token
}
... on CoreShopError {
message
}
}
}
Use the token as "Authorization": "Bearer ..."
token.
Add to Order
mutation {
CoreShopAddToOrder(addToOrder: {order: {token: "x1mJsJOx8c"}, orderItem: {productId: 85, quantity: 1}}) {
... on CoreShopAddToOrderResult {
order {
id
token
items {
... on object_CoreShopOrderItem {
quantity
product {
... on object_CoreShopProduct {
name
}
}
}
}
}
}
... on CoreShopError {
message
}
}
}
Remove Order Item
mutation {
CoreShopRemoveOrderItem(removeOrderItem: {order: {token: "x1mJsJOx8c"}, orderItem: {id: 150}}) {
... on CoreShopRemoveOrderItemResult {
order {
id
token
items {
... on object_CoreShopOrderItem {
id
quantity
product {
... on object_CoreShopProduct {
name
}
}
}
}
}
}
... on CoreShopError {
message
}
}
}
Update Order Item
mutation {
CoreShopUpdateOrderItem(updateOrderItem: {order: {token: "x1mJsJOx8c"}, orderItem: {id: 152, quantity: 1}}) {
... on CoreShopUpdateOrderItemResult {
order {
id
token
items {
... on object_CoreShopOrderItem {
id
quantity
product {
... on object_CoreShopProduct {
name
}
}
}
}
}
}
... on CoreShopError {
message
}
... on CoreShopValidationError {
message
}
}
}
Password Reset Request
mutation {
CoreShopPasswordResetRequest(passwordResetRequest: {username: "test@testinger.com"}) {
... on CoreShopPasswordResetRequestResult {
success
}
... on CoreShopError {
message
}
}
}
Password Reset Request Validate
mutation {
CoreShopPasswordResetRequestValidate(passwordResetRequestValidate:{token: "656fa9db64f4895870b1cc5e045afe20"}) {
... on CoreShopPasswordResetRequestValidateResult {
success
}
... on CoreShopError {
message
}
}
}
Password Reset
mutation {
CoreShopPasswordReset(passwordReset: {token: "656fa9db64f4895870b1cc5e045afe20", password: "test@testinger.com"}) {
... on CoreShopPasswordResetResult {
success
}
... on CoreShopError {
message
}
}
}
Add Order Voucher Code
mutation {
CoreShopAddOrderVoucherCode(addOrderVoucherCode: {order: {token: "x1mJsJOx8c"}, orderVoucherCode: {code: "test"}}) {
... on CoreShopAddOrderVoucherCodeResult {
order {
id
token
priceRuleItems {
... on fieldcollection_CoreShopProposalCartPriceRuleItem {
cartPriceRule {
name
}
voucherCode
}
}
items {
... on object_CoreShopOrderItem {
id
quantity
product {
... on object_CoreShopProduct {
name
}
}
}
}
}
}
... on CoreShopError {
message
}
... on CoreShopValidationError {
message
}
}
}
Remove Order Voucher Code
mutation {
CoreShopRemoveOrderVoucherCode(removeOrderVoucherCode: {order: {token: "x1mJsJOx8c"}, orderVoucherCode: {code: "test"}}) {
... on CoreShopRemoveOrderVoucherCodeResult {
order {
id
token
priceRuleItems {
... on fieldcollection_CoreShopProposalCartPriceRuleItem {
cartPriceRule {
name
}
voucherCode
}
}
items {
... on object_CoreShopOrderItem {
id
quantity
product {
... on object_CoreShopProduct {
name
}
}
}
}
}
}
... on CoreShopError {
message
}
... on CoreShopValidationError {
message
}
}
}
Guest Registration
mutation {
CoreShopCheckoutGuestRegistration(checkoutGuestRegistration: {
customer:{
salutation: "mr"
gender: "herr"
firstname:"test"
lastname:"test"
email:"test@testinger123.com"
address: {
salutation: "mr"
firstname:"test"
lastname:"testinger"
street:"test"
number:"1"
postcode:"4600"
city:"wels"
country:Austria
}
}
order: {
token: "123"
}
}) {
__typename
}
}
Guest Checkout Address
mutation {
CoreShopCheckoutGuestAddress(checkoutGuestAddress: {
shippingAddress: {
country: Austria
salutation: "mr"
firstname:"Test"
lastname:"Testinger"
street:"test"
city:"test"
postcode:"test"
number: "123"
}
invoiceAddress: {
country: Austria
salutation: "mr"
firstname:"blub"
lastname:"Blubinger"
street:"blub"
city:"blub"
postcode:"blub"
number: "123"
}
order: {
token: "x1mJsJOx8c"
}
invoiceAddressIsShippingAddress: false
}) {
... on CoreShopCheckoutGuestAddressResult {
order {
id
}
}
... on CoreShopError {
message
}
... on CoreShopValidationError {
message
violations {
propertyPath
message
}
}
}
}
Checkout Shipping
mutation {
CoreShopCheckoutShipping(checkoutShipping: {order: {token: "x1mJsJOx8c"}, carrier: SEcond}) {
... on CoreShopCheckoutShippingResult {
order {
id
carrier {
identifier
translations {
... on CoreshopCarrierTranslation__List {
items {
... on CoreshopCarrierTranslation {
title
}
}
}
}
}
}
}
... on CoreShopError {
__typename
message
}
... on CoreShopValidationError {
message
violations {
propertyPath
message
}
}
}
}
Checkout Payment
mutation {
CoreShopCheckoutPaymentProvider(checkoutPaymentProvider: {order: {token: "123"}, paymentProvider: Bankwire}) {
... on CoreShopCheckoutPaymentProviderResult {
order {
id
paymentProvider {
identifier
translations {
total
items {
locale
title
}
}
}
totalGross
totalNet
}
}
... on CoreShopError {
__typename
message
}
... on CoreShopValidationError {
message
violations {
propertyPath
message
}
}
}
}
Checkout - Do
mutation {
CoreShopCheckoutOrder(checkoutOrder: {order: {token: "123"}}) {
... on CoreShopCheckoutOrderResult {
response
}
... on CoreShopError {
__typename
message
}
... on CoreShopValidationError {
message
violations {
propertyPath
message
}
}
}
}
Address Update
mutation {
CoreShopUpdateAddress(updateAddress: {
addressId: 404
address: {
salutation: "mr"
company: "blub"
firstname: "asd"
lastname: "lastname"
street: "street"
number: "number"
postcode: "postcode"
city: "city"
country: Austria
phoneNumber: "phoneNumber"
}
}) {
__typename
... on CoreShopUpdateAddressResult {
address {
city
}
}
... on CoreShopError {
__typename
message
}
... on CoreShopValidationError {
message
violations {
propertyPath
message
}
}
}
}
Address Create
mutation {
CoreShopCreateAddress(createAddress: {
address: {
salutation: "mr"
company: "blub"
firstname: "asd"
lastname: "lastname"
street: "street"
number: "number"
postcode: "postcode"
city: "city"
country: Austria
phoneNumber: "phoneNumber"
}
}) {
__typename
... on CoreShopCreateAddressResult {
address {
city
}
}
... on CoreShopError {
__typename
message
}
... on CoreShopValidationError {
message
violations {
propertyPath
message
}
}
}
}
Checkout Address
mutation {
CoreShopCheckoutAddress(checkoutAddress: {order: {token:"asdf"}, invoiceAddressId: 403, invoiceAddressIsShippingAddress: true}) {
__typename
... on CoreShopCheckoutAddressResult {
order {
shippingAddress {
... on object_CoreShopAddress {
id
}
}
invoiceAddress {
... on object_CoreShopAddress {
id
}
}
}
}
... on CoreShopError {
message
}
}
}