@ollie-shop/sdk, for example import type { CheckoutOrder, FulfillmentOrder } from '@ollie-shop/sdk'.
Let your agent build it. The Ollie Shop skill ships with projects created by Don’t have the skill yet? Install it.
npx create-ollie-shop, so you can name the field you want instead of tracing it through these types.Prompt
Show the payment method and installments from the completed order.
CheckoutOrder
The main order object returned after checkout completion.| Property | Type | Description |
|---|---|---|
id | string | Unique identifier for the order |
sessionId | string | undefined | The checkout session the order came from |
fulfillmentOrders | FulfillmentOrder[] | One entry per fulfillment. Most orders have exactly one |
FulfillmentOrder
A single fulfillment: its items, customer, shipping, payments and totals.| Property | Type | Description |
|---|---|---|
id | string | Unique identifier for the fulfillment order |
status | OrderStatus | Current status of the order |
orderItems | Omit<CartItem, "available">[] | The items. Same shape as a cart item without available |
customer | see below | Customer information |
shipping | { addresses: ShippingAddress[]; packages: ShippingPackage[] } | Shipping addresses and packages |
payment | { payments: SelectedPaymentOrder[] } | The payments used |
campaign | { coupons: string[]; promotions: Promotion[] } | Applied coupons and promotions. Both arrays are always present |
taxes | TaxLine[] | Tax breakdown |
totals | Required<Totals> | Order totals. Every field is present, see below |
locale | LocaleInfo | Currency and language information |
createdAt | string | Timestamp when the order was created |
extensions | Record<string, unknown> | undefined | Custom platform-specific fields |
Order items
Order items reuseCartItem minus the available flag. The fields you will use most:
| Property | Type | Description |
|---|---|---|
id | string | SKU id |
uniqueId | string | Unique id of the line; use it as a React key |
seller | { id: string; name: string } | undefined | Seller of record |
name | string | Display name |
variant | string | undefined | Variant name (e.g., “Size Large”, “Red”) |
brand | string | undefined | Brand name |
category | string | undefined | Outermost product category |
categoryTree | string[] | undefined | Full category path, outermost first |
price | number | Current price in minor units |
originalPrice | number | Original price in minor units |
quantity | number | Quantity ordered |
unitOfMeasure | string | undefined | Unit of measure (e.g., “kg”) |
unitMultiplier | number | undefined | Measured amount per unit |
index | number | Position in the order |
image | string | Image URL |
url | string | undefined | Product details URL |
variantDetails | Record<string, string> | undefined | Variant details (color, size, etc.) |
unavailableReason | string | undefined | Set when the platform flagged the item during checkout |
Order customer
| Property | Type | Description |
|---|---|---|
email | string | Customer email |
firstName | string | First name |
lastName | string | Last name |
phone | string | Phone number |
id | string | undefined | Customer ID on the platform |
document | string | undefined | Tax ID or document (e.g., CPF) |
company | CustomerCompany | undefined | Company data when the purchase was made as a company: name, document, phone, tradeName, stateRegistration, all optional |
addresses list; the addresses used are under shipping.addresses.
Shipping
ShippingAddress
| Property | Type | Description |
|---|---|---|
id | string | undefined | Address ID |
type | AddressType | undefined | Type of address |
street | string | undefined | Street address |
number | string | undefined | Street number |
complement | string | undefined | Additional address info |
reference | string | undefined | Reference landmark |
neighborhood | string | undefined | Neighborhood or district |
city | string | undefined | City |
country | string | Country code (e.g., “USA”, “BRA”) |
stateOrProvince | string | undefined | State or province |
postalCode | string | Postal/zip code |
geoCoordinates | number[] | undefined | [longitude, latitude] |
receiverName | string | undefined | Recipient name |
ShippingPackage
| Property | Type | Description |
|---|---|---|
id | string | Package ID, which is also the id of the quote it was placed on |
items | number[] | Indexes of the items in this package |
carrier | string | Carrier name (e.g., “FedEx”) |
method | string | Shipping method (e.g., “Express”) |
vendor | string | undefined | Package vendor |
estimatedDeliveryTime | EstimatedDeliveryTime | undefined | Delivery estimate as a duration |
estimatedDeliveryDate | string | undefined | Delivery estimate as an ISO 8601 date. Prefer it when present |
price | number | Shipping price in minor units |
addressId | string | Associated address ID |
type | "delivery" | "pick_up" | "digital" | How the package is fulfilled |
storeName | string | undefined | Store name for pickups |
timeSlot | TimeSlot | undefined | The delivery or pickup window chosen, with id, price, originalPrice, startDate, endDate |
EstimatedDeliveryTime
| Property | Type | Description |
|---|---|---|
value | number | Numerical value |
unit | "day" | "days" | "hour" | "hours" | "week" | ... | "businessDays" | Time unit. Singular and plural forms of year, quarter, month, week, day, hour, minute and second, plus businessDays |
Payment
SelectedPaymentOrder
| Property | Type | Description |
|---|---|---|
id | string | Payment ID |
methodId | string | Payment method ID |
name | string | Payment method display name |
type | string | Payment type as the platform names it (e.g., “creditCard”) |
referenceValue | number | Base amount for this payment |
total | number | Total amount paid, in minor units |
installments | number | undefined | Number of installments |
savedCardId | string | null | Saved card ID if one was used |
lastDigits | string | null | Last digits of the card |
paymentSessionId | string | undefined | Payment session ID |
Campaign
| Property | Type | Description |
|---|---|---|
coupons | string[] | Applied coupon codes |
promotions | Promotion[] | Applied promotions |
Promotion
| Property | Type | Description |
|---|---|---|
id | string | Promotion ID |
name | string | undefined | Display name |
discountValue | number | undefined | Discount amount in minor units |
code | string | undefined | The coupon that triggered it, absent for automatic promotions |
trigger | "coupon" | "automatic" | What activated the promotion |
applied | boolean | Whether it is applied to the order |
TaxLine
| Property | Type | Description |
|---|---|---|
name | string | Tax name (e.g., “VAT”, “State Tax”) |
value | number | Tax amount in minor units |
Totals
On an order every field is present (Required<Totals>). All values in minor units.
| Property | Type | Description |
|---|---|---|
items | number | Total cost of items |
shipping | number | Total shipping cost |
tax | number | Total tax |
discounts | number | Total discounts |
giftCard | number | Gift card amount applied |
interest | number | Interest from installments |
change | number | Change amount |
custom | CustomTotal[] | Extra totalizer lines from the platform, each { id, label, value }. Display-only |
total | number | Grand total |
LocaleInfo
| Property | Type | Description |
|---|---|---|
currency | string | ISO 4217 currency code (e.g., “USD”) |
language | string | Language code (e.g., “en”, “pt-BR”) |
country | string | Country code in ISO 3166-1 alpha-3 |
OrderStatus
| Value | Description |
|---|---|
"waiting" | Order is waiting to be processed |
"approved" | Order has been approved |
"pending" | Order is pending confirmation |
"canceled" | Order has been canceled |
"ready" | Order is ready for pickup/delivery |
"other" | Other status |
AddressType
| Value | Description |
|---|---|
"home" | Home address |
"billing" | Billing address |
"work" | Work address |
"pick_up" | Pickup location |
"search" | An address found through the address search, not yet saved |
"other" | Other type |