Picart Storefront Graphql

Schema breakdown for Picart

Overview

🚧

Cart operations should be run client side. Only sync carts to server side storage when needed. Please check rate limit guidelines.

Required Headers

NameValueExample
x-nacelle-space-idThe spaceID for the request"x-nacelle-space-id": "a space id"
AuthorizationAn authorization token granting access to the space id"Authorization": "Bearer ey...."
📘

The authorization token is used to embed a customer id to allow a customer to query records from a frontend.

Schema Types

Table of Contents

- Query

Query

FieldArgumentTypeDescription
getCheckoutCheckout!This query will return a checkout.
checkoutIDID!The checkout ID to retrieve.

Mutation

FieldArgumentTypeDescription
createCheckoutString!This mutation will create a checkout session.
Returns a new checkout ID.
cartCartInput!The cart to store.
updateCheckoutCheckout!This mutation will update the existing checkout session.
cartCartInput!The cart to update.
promoteCheckoutOrderDetails!This mutation will promote this checkout session to an order, and it will delete the checkout. It will also create the order in noms
cartCartInput!The cart to promote.

Objects

Address

The Address type represents a shipping or billing address associated with a cart

FieldArgumentTypeDescription
idStringThe unique address id
countryISO2StringThe country ISO2 code of the address, e.g. US
provinceStringThe province of the address
stateStringThe state of the address e.g. CA
cityStringThe city of the address e.g. San Francisco
postalCodeStringThe postal code of the address e.g. 94111
address1StringThe first line of the address e.g. 123 Main St
address2StringThe second line of the address e.g. Apt 1
commentStringA comment about the address

CalcResult

Represents a tax result calculated by a tax service containing the tax data for the cart

FieldArgumentTypeDescription
createdAtIntWhen the tax result was created
serviceServiceThe service used to calculate the tax result
currencyStringThe currency of the tax result
itemsCalcResultItemsDataThe line item data of the tax result
shippingCalcResultShippingDataThe shipping data of the tax result
expiresAtIntWhen the tax result expires
externalIDStringThe external ID of the tax result
taxDateIntThe tax date of the tax result

CalcResultEntry

Represents a tax result entry

FieldArgumentTypeDescription
orderItemIDStringThe unique ID of the order item
amountStringThe amount of the item
taxAmountStringThe tax amount of the item
quantityUintThe positive quantity of the item
taxBehaviorStringThe tax behavior of the item
taxCodeStringThe tax code of the item
breakdown[CalcResultEntryBreakdown]The tax breakdown of the item

CalcResultEntryBreakdown

Represents a breakdown of a tax result entry

FieldArgumentTypeDescription
amountStringThe amount of the breakdown
taxabilityReasonStringThe tax ability reason for the breakdown
displayNameStringA display name for the breakdown
percentageStringThe percentage of the breakdown
taxTypeStringThe tax type of the breakdown

CalcResultItemsData

Represents a tax result of all item data

FieldArgumentTypeDescription
totalAmountStringThe total amount of the items without tax
totalTaxAmountStringThe total tax amount of the items
totalWithTaxAmountStringThe total amount of the items with tax
entries[CalcResultEntry]The line item data of the tax result

CalcResultShippingData

Represents a tax result of shipping data

FieldArgumentTypeDescription
totalAmountStringThe total amount of the shipping without tax
totalTaxAmountStringThe total tax amount of the shipping
totalWithTaxAmountStringThe total amount of the shipping with tax
entriesCalcResultEntryThe shipping data of the tax result

Checkout

Checkout represents a cart with associated data such as customer, shipping address, billing address, and payment. It also contains the tax breakdown for the cart.

FieldArgumentTypeDescription
idUUID!The unique checkout id
createdAtTimeWhen the checkout was created
modifiedAtTimeWhen the checkout was last modified
emailStringThe email associated with this checkout
phoneStringThe phone associated with this checkout
currencyStringThe currency of the checkout, e.g. USD
totalPriceMoney!The total price of the checkout
totalSubtotalPriceMoney!The sub total price of the checkout
totalTotalTaxMoney!The total tax of the checkout
totalDiscountsMoney!The total discounts of the checkout
shippingMethodStringThe shipping method of the checkout
shippingPriceMoney!The shipping price of the checkout
taxRateStringThe tax rate of the checkout
customerCustomerThe customer associated with this checkout
shippingAddressAddressThe shipping address associated with this checkout
billingAddressAddressThe billing address associated with this checkout
items[Item!]!The items associated with this checkout
taxDataCalcResultThe tax breakdown associated with this checkout
metadataMapMerchant metadata associated with this checkout

Customer

A Customer represents a customer associated with a cart

FieldArgumentTypeDescription
idUUID!The unique customer id
firstNameStringThe first name of the customer
lastNameStringThe last name of the customer
emailStringThe email of the customer
phoneStringThe phone of the customer

Item

An item represents a product variant in a cart

FieldArgumentTypeDescription
productIDString!The nacelle product ID of the item
variantIDString!The nacelle variant ID of the item
priceMoney!The price of the item
subtotalPriceMoney!The subtotal price of the item
taxMoney!The tax of the item
discountsMoney!The discounts of the item
quantityUint!The positive quantity of the item
skuStringThe sku of the item
metadataMapMerchant metadata associated with this item

Money

Represents financial amounts, such as prices or total discounts.

FieldArgumentTypeDescription
amountInt![source] An amount for the money
currencyCodeString![source] A currencyCode identifier for the amount
precisionDigitsInt[source] (optional) The precision to which the currency amount should be displayed

OrderDetails

OrderDetails represents the successful promotion of a checkout to an order

FieldArgumentTypeDescription
orderIDString!The unique order id
customerIDString!The unique customer id
shippingAddressIDString!The unique shipping address id
billingAddressIDString!The unique billing address id
paymentIDString!The unique payment id

Inputs

AddressInput

An input type for associated address data

FieldTypeDescription
idStringThe unique address id
countryIso2StringThe country ISO2 code of the address, e.g. US
provinceStringThe province of the address
stateStringThe state of the address e.g. CA
cityStringThe city of the address e.g. San Francisco
postalCodeStringThe postal code of the address e.g. 94111
address1StringThe first line of the address e.g. 123 Main St
address2StringThe second line of the address e.g. Apt 1
commentStringA comment about the address

CartInput

An input type for associated cart data

FieldTypeDescription
idIDThe unique checkout id, used to update an existing checkout
emailStringThe email associated with this cart
phoneStringThe phone associated with this cart
currencyStringThe currency of the cart, e.g. USD
totalPriceStringThe total price of the cart, e.g. 100.00
totalSubtotalPriceStringThe sub total price of the cart, e.g. 90.00
totalTotalTaxStringThe total tax of the cart, e.g. 10.00
totalDiscountsStringThe total discounts of the cart, e.g. 0.00
shippingMethodStringThe shipping method of the cart, e.g. StandardGround
shippingPriceStringThe shipping price of the cart, e.g. 10.00
taxRateStringThe tax rate of the cart, e.g. 0.10
customerCustomerInputThe customer associated with this cart
shippingAddressAddressInputThe shipping address associated with this cart
billingAddressAddressInputThe billing address associated with this cart
paymentPaymentInputThe payment associated with this cart
items[ItemInput!]The items associated with this cart
metadataMapMerchant metadata associated with this cart

CustomerInput

An input type for associated customer data

FieldTypeDescription
firstNameStringThe first name of the customer
lastNameStringThe last name of the customer
emailStringThe email of the customer
phoneStringThe phone of the customer

ItemInput

An input type for associated item data

FieldTypeDescription
productIDString!The nacelle product ID of the item
variantIDString!The nacelle variant ID of the item
priceStringThe price of the item, e.g. 100.00
subtotalPriceStringThe subtotal price of the item, e.g. 90.00
taxStringThe tax of the item, e.g. 10.00
discountsStringThe discounts of the item, e.g. 0.00
quantityUint!The positive quantity of the item, e.g. 1
skuStringThe sku of the item
metadataMapMerchant metadata associated with this item

PaymentInput

An input type for associated payment data

FieldTypeDescription
statusString!The status of the payment
amountString!The amount of the payment e.g. 100.00
currencyString!The currency of the payment e.g. USD
externalIDString!The external ID of the payment e.g. the stripe payment intent ID
processorNameStringThe payment processor name e.g. stripe
paymentTypeStringThe payment type e.g. card
cardBrandStringThe brand of the card e.g. visa
processorStatusStringThe status of the payment processor e.g. succeeded, created
paymentMethodIDString!The payment method ID e.g. the stripe payment method ID

Scalars

Boolean

The Boolean scalar type represents true or false.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Map

Service

Represents the enum for services used for calculating TaxResult values are "avalara" and "stripe"

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Time

Represents a date and time according to ISO-8601

UUID

Represents a UUID according to RFC 4122

Uint

Represents a positive integer value