GraphQL Queries
GraphQL API Documentation
Query: checkffl
checkfflChecks whether the specified cart contains any FFL (Federal Firearms License) products.
If so, it returns the list of FFL items along with their product details, the FFL status of the cart, and the NFA (National Firearms Act) status.
Syntax
query {
checkffl(cart_id: "YHJilyyB5DhiZMnhxOCzJmQQFRaJdJSI") {
id
fflItems {
id
product {
name
sku
}
quantity
}
fflstatus
nfastatus
}
}Sample Response
{
"data": {
"checkffl": {
"id": "51",
"fflItems": [
{
"id": "118",
"product": {
"name": "FFL Catgory Product",
"sku": "FFL Catgory Product"
},
"quantity": 1
}
],
"fflstatus": "true",
"nfastatus": "true"
}
}
}Arguments
cart_id(String, Required): The unique identifier of the cart (quote) to check.
Returns
id(Int): The identifier of the cart (quote ID).fflItems(Array): List of FFL items in the cart.id(Int): The ID of the FFL cart item.product(Object): Product details.name(String): Name of the product.sku(String): SKU of the product.
quantity(Int): Quantity of the item in the cart.
fflstatus(String): FFL validation status of the cart.nfastatus(String): NFA compliance status for items in the cart.
Mutation: setDealerIdToCart
setDealerIdToCartAssigns a dealer ID to a specific cart (quote).
This is typically used for FFL dealer selection during checkout for regulated items.
Syntax
mutation {
setDealerIdToCart(
dealer_id: "12345678",
cart_id: "NAcOReBZ3sqZq8YN5kw7Tjy9JHKXcPj9"
) {
cart {
dealer_id
shipping_addresses {
selected_shipping_method {
carrier_code
carrier_title
method_code
method_title
amount {
value
currency
}
}
}
}
}
}Sample Response
{
"data": {
"setDealerIdToCart": {
"cart": {
"dealer_id": "15822932",
"shipping_addresses": [
{
"selected_shipping_method": {
"carrier_code": "flatrate",
"carrier_title": "Flat Rate",
"method_code": "flatrate",
"method_title": "Fixed",
"amount": {
"value": 5,
"currency": "USD"
}
}
}
]
}
}
}
}Arguments
dealer_id(Int, Required): Short FFL license number of Dealer.cart_id(String, Required): The unique identifier of the cart (quote) to assign the dealer to.
Returns
cart(Object): The updated cart object.dealer_id(Int): The dealer ID that was set on the cart.shipping_addresses(Array): List of shipping addresses.selected_shipping_method(Object): The currently selected shipping method.carrier_code(String): Shipping carrier code.carrier_title(String): Shipping carrier display name.method_code(String): Shipping method code.method_title(String): Shipping method display name.amount(Object): Shipping cost.value(Float): Monetary value.currency(String): Currency code.
Updated 3 months ago
Did this page help you?