shopperBwPEligibility

Version 2024-11-01

📘

Important

The Buy with Prime API is offered as a preview and might change as we receive feedback and iterate on the interfaces. We are sharing this early documentation to help you learn about the Buy with Prime API as we write and iterate on the content.

Overview

Returns the Buy with Prime eligibility status for the shopper.

ℹ️

Required scope(s)

View Shopper Buy with Prime Eligibility

Response

Return type ShopperBwPEligibility

Arguments

ArgumentDescription
identityToken (IdentityTokenInput required)

Specifies the input fields required to capture a shopper identity token.

Examples


Query Shopper Buy With Prime Eligibility With Lwa Token

Request

query shopperBwPEligibility {
    shopperBwPEligibility(
        identityToken: {         
            lwaAccessToken: {
                value: "tc2hvcHBlciyJ0eXBlIjoiQ0hFQ0tPVVRfU0VTU0lPTl9JRCIsInZ02Mjg4N2U3My03ZmY3LTRkYmMehbHVlIjoic2Fsc2EtdGVzdC1ub24tcHJpbWUtODU5ZC0zMWQxYWc4ZjgyZmUifQ=="
            }
        }
    ) {
        shopperId
        bwpEligibilityStatus
    }
}

Response

{
    "data": {
        "shopperBwPEligibility": {
            "shopperId": "amzn.96847-4c5999512e-bbc26-a-621492042ca",
            "bwpEligibilityStatus": "PRIME"
        }
    },
    "extensions": {}
}

Query Shopper Buy With Prime Eligibility With Apay Token

Request

query shopperBwPEligibility {
    shopperBwPEligibility(
        identityToken: {         
            apayCheckoutSessionId: {
                value: "tcBlIjoiQ0hTU0lPTl9JRCIsInZ02Mjg4N2U3My03ZmY3LTRkYmMehbHVlIjoic2Fsc2EtdGVzdC1ub24tcHJpbWUtODU5ZC0zMWQxYWc4Zj2hvcHBlciyJ0eXFQ0tPVVRfU0VgyZmUifQ"    
                externalId: "lfQ0hFU0GnEEV"
            }
        }
    ) {
        shopperId
        bwpEligibilityStatus
    }
}

Response

{
    "data": {
        "shopperBwPEligibility": {
            "shopperId": "amzn.96bc2847-12492e-b99952ca6-a-621044c5",
            "bwpEligibilityStatus": "PRIME"
        }
    },
    "extensions": {}
}