Product Purchase

Make a call to this endpoint when a user generates an order or purchase.

Example Mutation

Copy
Copied
mutation productPurchase($sendInput: SendProductPurchaseEventInput!) {
    productPurchaseEvent(input: $sendInput) {
        occurredAt
        products {
            productId
            productPrices {
                amount
                currency
            }
        }
        visitor {
            phone
            email
        }
    }
}

Example Input Variable

{
    "sendInput": {
        "occurredAt": "2022-03-30T14:38:29+00:00",
        "visitor": {"email": "test@gmail.com", "phone": "7075299002"},
        "products": [{
            "productPrices":
                [{"amount":"7.01", "currency":"CAD"},{"amount":"123.99", "currency":"USD"}]
                ,
            "productId": "productId",
            "productImage": "none.jpeg",
            "productName": "Best Product",
            "productVariantId": "varId",
            "quantity": "1"
            },
            {
            "productPrices":
                [{"amount":"7.01", "currency":"USD"},{"amount":"123.99", "currency":"USD"}]
                ,
            "productId": "productId2",
            "productImage": "blagh2",
            "productName": "pName2",
            "productVariantId": "varId2",
            "quantity": "1"
            }]
    }
}