CheckoutAddKit
A mutation CheckoutAddKit permite adicionar um kit ao carrinho.
Adicionando kit ao carrinho
mutation ($input: CheckoutKitInput!, $recaptchaToken: String) {
checkoutAddKit(input: $input, recaptchaToken: $recaptchaToken) {
checkoutId
url
kits {
alias
imageUrl
kitGroupId
kitId
listPrice
name
price
quantity
totalListPrice
products {
name
productAttributes {
name
value
type
}
listPrice
price
ajustedPrice
productId
productVariantId
imageUrl
quantity
}
}
}
}
Input
{
"input": {
"quantity": 1,
"kitId": 1046,
"id": "7a03a1c6-3158-4cb8-8c84-81a909900e83b",
"products": [
{
"productId": 80135,
"variants": [
{
"productVariantId": 266646,
"quantity": 1
}
]
},
{
"productId": 90129,
"variants": [
{
"productVariantId": 276639,
"quantity": 2
}
]
},
{
"productId": 120129,
"variants": [
{
"productVariantId": 306639,
"quantity": 1
}
]
}
]
}
}
Mostrar resposta
{
"checkoutId": "7a03a1c6-3158-4cb8-8c84-81a90990e80003b",
"url": "https://sualoja.checkout.fbits.store/",
"kits": [
{
"alias": "kit-1-1046",
"imageUrl": "https://sualoja.fbitsstatic.net/img/l/kit-1-1046/2346.jpg",
"kitGroupId": "WMI/ypirmTpYN0f8h7mRTw==",
"kitId": 1046,
"listPrice": 90.0000,
"name": "Kit 1",
"price": 90.00,
"quantity": 1,
"totalListPrice": 90.00,
"products": [
{
"name": "Lapiseira",
"productAttributes": [
{
"name": "Cor",
"value": "Amarelo",
"type": 1
}
],
"listPrice": 12.0000,
"price": 10.00,
"ajustedPrice": 10.00,
"productId": 80135,
"productVariantId": 266646,
"imageUrl": "https://sualoja.fbitsstatic.net/img/p/266646/266646.jpg?w=100\u0026h=100\u0026v=no-change\u0026qs=ignore",
"quantity": 1
},
{
"name": "Caderno Espiral Capa Dura Preto",
"productAttributes": [],
"listPrice": 21.9000,
"price": 10.00,
"ajustedPrice": 10.00,
"productId": 90129,
"productVariantId": 276639,
"imageUrl": "https://sualoja.fbitsstatic.net/img/p/276639/276639.jpg?w=100\u0026h=100\u0026v=no-change\u0026qs=ignore",
"quantity": 2
},
{
"name": "Fichario Escolar",
"productAttributes": [],
"listPrice": 70.0000,
"price": 60.00,
"ajustedPrice": 60.00,
"productId": 120129,
"productVariantId": 306639,
"imageUrl": "https://sualoja.fbitsstatic.net/img/p/306639/306639.jpg?w=100\u0026h=100\u0026v=no-change\u0026qs=ignore",
"quantity": 1
}
]
}
]
}
Aumentando a quantidade do kit no carrinho
mutation ($input: CheckoutKitInput!, $recaptchaToken: String) {
checkoutAddKit(input: $input, recaptchaToken: $recaptchaToken) {
checkoutId
url
kits {
alias
imageUrl
kitGroupId
kitId
listPrice
name
price
quantity
totalListPrice
products {
name
productAttributes {
name
value
type
}
listPrice
price
ajustedPrice
productId
productVariantId
imageUrl
quantity
}
}
}
}
Input
{
"input": {
"quantity": 1,
"kitId": 1053,
"kitGroupId": "AsG5JR8vwWC/JgotDzu8Iw==",
"id": "7a03a1c6-3158-4cb8-8c84-810a90990e83b"
}
}
Mostrar resposta
{
"checkoutId": "7a03a1c6-3158-4cb8-8c84-81a909900e83b",
"url": "https://sualoja.checkout.fbits.store/",
"kits": [
{
"alias": "wake-1053",
"imageUrl": "https://sualoja.fbitsstatic.net/img/l/wake-1053/2352.jpg",
"kitGroupId": "AsG5JR8vwWC/JgotDzu8Iw==",
"kitId": 1053,
"listPrice": 1319.0000,
"name": "Wake",
"price": 1319.00,
"quantity": 2,
"totalListPrice": 2638.00,
"products": [
{
"name": "Mochila Nike Classic",
"productAttributes": [],
"listPrice": 219.0000,
"price": 219.00,
"ajustedPrice": 219.00,
"productId": 70129,
"productVariantId": 256639,
"imageUrl": "https://sualoja.fbitsstatic.net/img/p/256639/256639-1.jpg?w=100\u0026h=100\u0026v=no-change\u0026qs=ignore",
"quantity": 2
},
{
"name": "Bone Converse NBA Chicago Bulls",
"productAttributes": [
{
"name": "Cor",
"value": "Preto e Vermelho",
"type": 1
},
{
"name": "Tamanho",
"value": "M",
"type": 1
}
],
"listPrice": 1200.0000,
"price": 1100.00,
"ajustedPrice": 1100.00,
"productId": 150129,
"productVariantId": 336639,
"imageUrl": "https://sualoja.fbitsstatic.net/img/p/336639/336639-1.jpg?w=100\u0026h=100\u0026v=no-change\u0026qs=ignore",
"quantity": 2
}
]
}
]
}
Updated about 1 month ago