Skip to main content

GraphQL objects reference

This section outlines the GraphQL objects related to store credit, detailing their attributes and how they interact with carts and customers.

To download Credit GraphQl collection press this download

Cart object

The Cart object represents a customer's shopping cart and contains store credit details.

AttributeData TypeDescription
creditCartCreditStore credit information associated with the cart

CartCredit object

The CartCredit object defines store credit details applied to a cart.

AttributeData TypeDescription
amountMoneyThe amount of store credit applied to the cart
is_appliedBooleanIndicates whether store credit has been applied

Customer object

The Customer object stores customer-related details, including name, address, and store credit information.

AttributeData TypeDescription
creditCreditStore credit details associated with the customer

Credit object

The Credit object contains store credit information specific to a customer.

AttributeData TypeDescription
balanceCreditBalanceStore credit balance details
transactions[CreditTransaction]List of store credit transactions

CreditBalance object

The CreditBalance object provides details about a customer's store credit balance.

AttributeData TypeDescription
amountMoneyCurrent store credit balance
currency_codeStringCurrency code for the balance

CreditTransaction object

The CreditTransaction object defines store credit transaction details.

AttributeData TypeDescription
actionStringType of store credit transaction (e.g., addition, deduction)
balance_amountMoneyStore credit balance after the transaction
balance_deltaMoneyAmount added or deducted in the transaction
created_atStringTimestamp of the transaction
currency_codeStringCurrency code for the transaction
is_notifiedBooleanIndicates if the customer was notified of the transaction
messageStringDescription of the transaction
transaction_idIntUnique identifier for the transaction

Mutation object

The Mutation object defines operations that modify store credit data.

AttributeData TypeDescription
applyCreditToCartApplyCreditToCartOutputApplies store credit to the cart

ApplyCreditToCartInput object

The ApplyCreditToCartInput object specifies the input parameters for the applyCreditToCart mutation.

AttributeData TypeDescription
amountFloatAmount of store credit to apply
cart_idString!Unique identifier of the customer's cart

ApplyCreditToCartOutput object

The ApplyCreditToCartOutput object defines the response of the applyCreditToCart mutation.

AttributeData TypeDescription
cartCart!Updated cart details after applying store credit