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
| Name | Value | Example |
|---|---|---|
| x-nacelle-space-id | The spaceID for the request | "x-nacelle-space-id": "a space id" |
| Authorization | An 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
Mutation
| Field | Argument | Type | Description |
|---|---|---|---|
| createCheckout | String! | This mutation will create a checkout session. | |
| cart | CartInput! | The cart to store. | |
| updateCheckout | Checkout! | This mutation will update the existing checkout session. | |
| cart | CartInput! | The cart to update. | |
| promoteCheckout | OrderDetails! | This mutation will promote this checkout session to an order, and it will delete the checkout. It will also create the order in noms | |
| cart | CartInput! | The cart to promote. | |
Objects
Address
The Address type represents a shipping or billing address associated with a cart
| Field | Argument | Type | Description |
|---|---|---|---|
| id | String | The unique address id | |
| countryISO2 | String | The country ISO2 code of the address, e.g. US | |
| province | String | The province of the address | |
| state | String | The state of the address e.g. CA | |
| city | String | The city of the address e.g. San Francisco | |
| postalCode | String | The postal code of the address e.g. 94111 | |
| address1 | String | The first line of the address e.g. 123 Main St | |
| address2 | String | The second line of the address e.g. Apt 1 | |
| comment | String | A comment about the address | |
CalcResult
Represents a tax result calculated by a tax service containing the tax data for the cart
| Field | Argument | Type | Description |
|---|---|---|---|
| createdAt | Int | When the tax result was created | |
| service | Service | The service used to calculate the tax result | |
| currency | String | The currency of the tax result | |
| items | CalcResultItemsData | The line item data of the tax result | |
| shipping | CalcResultShippingData | The shipping data of the tax result | |
| expiresAt | Int | When the tax result expires | |
| externalID | String | The external ID of the tax result | |
| taxDate | Int | The tax date of the tax result | |
CalcResultEntry
Represents a tax result entry
| Field | Argument | Type | Description |
|---|---|---|---|
| orderItemID | String | The unique ID of the order item | |
| amount | String | The amount of the item | |
| taxAmount | String | The tax amount of the item | |
| quantity | Uint | The positive quantity of the item | |
| taxBehavior | String | The tax behavior of the item | |
| taxCode | String | The tax code of the item | |
| breakdown | [CalcResultEntryBreakdown] | The tax breakdown of the item | |
CalcResultEntryBreakdown
Represents a breakdown of a tax result entry
CalcResultItemsData
Represents a tax result of all item data
| Field | Argument | Type | Description |
|---|---|---|---|
| totalAmount | String | The total amount of the items without tax | |
| totalTaxAmount | String | The total tax amount of the items | |
| totalWithTaxAmount | String | 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
| Field | Argument | Type | Description |
|---|---|---|---|
| totalAmount | String | The total amount of the shipping without tax | |
| totalTaxAmount | String | The total tax amount of the shipping | |
| totalWithTaxAmount | String | The total amount of the shipping with tax | |
| entries | CalcResultEntry | 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.
| Field | Argument | Type | Description |
|---|---|---|---|
| id | UUID! | The unique checkout id | |
| createdAt | Time | When the checkout was created | |
| modifiedAt | Time | When the checkout was last modified | |
| String | The email associated with this checkout | ||
| phone | String | The phone associated with this checkout | |
| currency | String | The currency of the checkout, e.g. USD | |
| totalPrice | Money! | The total price of the checkout | |
| totalSubtotalPrice | Money! | The sub total price of the checkout | |
| totalTotalTax | Money! | The total tax of the checkout | |
| totalDiscounts | Money! | The total discounts of the checkout | |
| shippingMethod | String | The shipping method of the checkout | |
| shippingPrice | Money! | The shipping price of the checkout | |
| taxRate | String | The tax rate of the checkout | |
| customer | Customer | The customer associated with this checkout | |
| shippingAddress | Address | The shipping address associated with this checkout | |
| billingAddress | Address | The billing address associated with this checkout | |
| items | [Item!]! | The items associated with this checkout | |
| taxData | CalcResult | The tax breakdown associated with this checkout | |
| metadata | Map | Merchant metadata associated with this checkout | |
Customer
A Customer represents a customer associated with a cart
Item
An item represents a product variant in a cart
| Field | Argument | Type | Description |
|---|---|---|---|
| productID | String! | The nacelle product ID of the item | |
| variantID | String! | The nacelle variant ID of the item | |
| price | Money! | The price of the item | |
| subtotalPrice | Money! | The subtotal price of the item | |
| tax | Money! | The tax of the item | |
| discounts | Money! | The discounts of the item | |
| quantity | Uint! | The positive quantity of the item | |
| sku | String | The sku of the item | |
| metadata | Map | Merchant metadata associated with this item | |
Money
Represents financial amounts, such as prices or total discounts.
OrderDetails
OrderDetails represents the successful promotion of a checkout to an order
Inputs
AddressInput
An input type for associated address data
| Field | Type | Description | |
|---|---|---|---|
| id | String | The unique address id | |
| countryIso2 | String | The country ISO2 code of the address, e.g. US | |
| province | String | The province of the address | |
| state | String | The state of the address e.g. CA | |
| city | String | The city of the address e.g. San Francisco | |
| postalCode | String | The postal code of the address e.g. 94111 | |
| address1 | String | The first line of the address e.g. 123 Main St | |
| address2 | String | The second line of the address e.g. Apt 1 | |
| comment | String | A comment about the address | |
CartInput
An input type for associated cart data
| Field | Type | Description | |
|---|---|---|---|
| id | ID | The unique checkout id, used to update an existing checkout | |
| String | The email associated with this cart | ||
| phone | String | The phone associated with this cart | |
| currency | String | The currency of the cart, e.g. USD | |
| totalPrice | String | The total price of the cart, e.g. 100.00 | |
| totalSubtotalPrice | String | The sub total price of the cart, e.g. 90.00 | |
| totalTotalTax | String | The total tax of the cart, e.g. 10.00 | |
| totalDiscounts | String | The total discounts of the cart, e.g. 0.00 | |
| shippingMethod | String | The shipping method of the cart, e.g. StandardGround | |
| shippingPrice | String | The shipping price of the cart, e.g. 10.00 | |
| taxRate | String | The tax rate of the cart, e.g. 0.10 | |
| customer | CustomerInput | The customer associated with this cart | |
| shippingAddress | AddressInput | The shipping address associated with this cart | |
| billingAddress | AddressInput | The billing address associated with this cart | |
| payment | PaymentInput | The payment associated with this cart | |
| items | [ItemInput!] | The items associated with this cart | |
| metadata | Map | Merchant metadata associated with this cart | |
CustomerInput
An input type for associated customer data
ItemInput
An input type for associated item data
| Field | Type | Description | |
|---|---|---|---|
| productID | String! | The nacelle product ID of the item | |
| variantID | String! | The nacelle variant ID of the item | |
| price | String | The price of the item, e.g. 100.00 | |
| subtotalPrice | String | The subtotal price of the item, e.g. 90.00 | |
| tax | String | The tax of the item, e.g. 10.00 | |
| discounts | String | The discounts of the item, e.g. 0.00 | |
| quantity | Uint! | The positive quantity of the item, e.g. 1 | |
| sku | String | The sku of the item | |
| metadata | Map | Merchant metadata associated with this item | |
PaymentInput
An input type for associated payment data
| Field | Type | Description | |
|---|---|---|---|
| status | String! | The status of the payment | |
| amount | String! | The amount of the payment e.g. 100.00 | |
| currency | String! | The currency of the payment e.g. USD | |
| externalID | String! | The external ID of the payment e.g. the stripe payment intent ID | |
| processorName | String | The payment processor name e.g. stripe | |
| paymentType | String | The payment type e.g. card | |
| cardBrand | String | The brand of the card e.g. visa | |
| processorStatus | String | The status of the payment processor e.g. succeeded, created | |
| paymentMethodID | String! | 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
