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

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
idString

The unique address id

countryISO2String

The country ISO2 code of the address, e.g. US

provinceString

The province of the address

stateString

The state of the address e.g. CA

cityString

The city of the address e.g. San Francisco

postalCodeString

The postal code of the address e.g. 94111

address1String

The first line of the address e.g. 123 Main St

address2String

The second line of the address e.g. Apt 1

commentString

A comment about the address

CalcResult

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

FieldArgumentTypeDescription
createdAtInt

When the tax result was created

serviceService

The service used to calculate the tax result

currencyString

The currency of the tax result

itemsCalcResultItemsData

The line item data of the tax result

shippingCalcResultShippingData

The shipping data of the tax result

expiresAtInt

When the tax result expires

externalIDString

The external ID of the tax result

taxDateInt

The tax date of the tax result

CalcResultEntry

Represents a tax result entry

FieldArgumentTypeDescription
orderItemIDString

The unique ID of the order item

amountString

The amount of the item

taxAmountString

The tax amount of the item

quantityUint

The positive quantity of the item

taxBehaviorString

The tax behavior of the item

taxCodeString

The tax code of the item

breakdown[CalcResultEntryBreakdown]

The tax breakdown of the item

CalcResultEntryBreakdown

Represents a breakdown of a tax result entry

FieldArgumentTypeDescription
amountString

The amount of the breakdown

taxabilityReasonString

The tax ability reason for the breakdown

displayNameString

A display name for the breakdown

percentageString

The percentage of the breakdown

taxTypeString

The tax type of the breakdown

CalcResultItemsData

Represents a tax result of all item data

FieldArgumentTypeDescription
totalAmountString

The total amount of the items without tax

totalTaxAmountString

The total tax amount of the items

totalWithTaxAmountString

The 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
totalAmountString

The total amount of the shipping without tax

totalTaxAmountString

The total tax amount of the shipping

totalWithTaxAmountString

The total amount of the shipping with tax

entriesCalcResultEntry

The 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

createdAtTime

When the checkout was created

modifiedAtTime

When the checkout was last modified

emailString

The email associated with this checkout

phoneString

The phone associated with this checkout

currencyString

The 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

shippingMethodString

The shipping method of the checkout

shippingPriceMoney!

The shipping price of the checkout

taxRateString

The tax rate of the checkout

customerCustomer

The customer associated with this checkout

shippingAddressAddress

The shipping address associated with this checkout

billingAddressAddress

The billing address associated with this checkout

items[Item!]!

The items associated with this checkout

taxDataCalcResult

The tax breakdown associated with this checkout

metadataMap

Merchant metadata associated with this checkout

Customer

A Customer represents a customer associated with a cart

FieldArgumentTypeDescription
idUUID!

The unique customer id

firstNameString

The first name of the customer

lastNameString

The last name of the customer

emailString

The email of the customer

phoneString

The 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

skuString

The sku of the item

metadataMap

Merchant 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
idString

The unique address id

countryIso2String

The country ISO2 code of the address, e.g. US

provinceString

The province of the address

stateString

The state of the address e.g. CA

cityString

The city of the address e.g. San Francisco

postalCodeString

The postal code of the address e.g. 94111

address1String

The first line of the address e.g. 123 Main St

address2String

The second line of the address e.g. Apt 1

commentString

A comment about the address

CartInput

An input type for associated cart data

FieldTypeDescription
idID

The unique checkout id, used to update an existing checkout

emailString

The email associated with this cart

phoneString

The phone associated with this cart

currencyString

The currency of the cart, e.g. USD

totalPriceString

The total price of the cart, e.g. 100.00

totalSubtotalPriceString

The sub total price of the cart, e.g. 90.00

totalTotalTaxString

The total tax of the cart, e.g. 10.00

totalDiscountsString

The total discounts of the cart, e.g. 0.00

shippingMethodString

The shipping method of the cart, e.g. StandardGround

shippingPriceString

The shipping price of the cart, e.g. 10.00

taxRateString

The tax rate of the cart, e.g. 0.10

customerCustomerInput

The customer associated with this cart

shippingAddressAddressInput

The shipping address associated with this cart

billingAddressAddressInput

The billing address associated with this cart

paymentPaymentInput

The payment associated with this cart

items[ItemInput!]

The items associated with this cart

metadataMap

Merchant metadata associated with this cart

CustomerInput

An input type for associated customer data

FieldTypeDescription
firstNameString

The first name of the customer

lastNameString

The last name of the customer

emailString

The email of the customer

phoneString

The 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

priceString

The price of the item, e.g. 100.00

subtotalPriceString

The subtotal price of the item, e.g. 90.00

taxString

The tax of the item, e.g. 10.00

discountsString

The discounts of the item, e.g. 0.00

quantityUint!

The positive quantity of the item, e.g. 1

skuString

The sku of the item

metadataMap

Merchant 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

processorNameString

The payment processor name e.g. stripe

paymentTypeString

The payment type e.g. card

cardBrandString

The brand of the card e.g. visa

processorStatusString

The 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