---
title: "Get app data"
method: GET
path: "/user/init"
tags: ["User"]
---

# Get app data

`GET /user/init`

Get initial app data, including user, products, cart, addresses, cards, subscriptions, and orders.

## Response `200`

Initial app data.

- object
  - `data` object, required — Initial app data.
    - `user` User, required — A Terminal shop user. (We have users, btw.)
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `name` string, nullable, required — Name of the user.
      - `email` string, nullable, required — Email address of the user.
      - `fingerprint` string, nullable, required — The user's fingerprint, derived from their public SSH key.
      - `stripeCustomerID` string, required — Stripe customer ID of the user.
    - `products` Product[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `name` string, required — Name of the product.
      - `description` string, required — Description of the product.
      - `variants` ProductVariant[], required — List of variants of the product.
        - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
        - `name` string, required — Name of the product variant.
        - `price` number, required — Price of the product variant in cents (USD).
      - `order` integer — Order of the product used when displaying a sorted list of products.
      - `subscription` 'allowed' | 'required' — Whether the product must be or can be subscribed to.
      - `tags` object — Tags for the product.
    - `cart` Cart, required — The current Terminal shop user's cart.
      - `items` CartItem[], required — An array of items in the current user's cart.
        - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
        - `productVariantID` string, required — ID of the product variant for this item in the current user's cart.
        - `quantity` number, required — Quantity of the item in the current user's cart.
        - `subtotal` integer, required — Subtotal of the item in the current user's cart, in cents (USD).
      - `subtotal` number, required — The subtotal of all items in the current user's cart.
      - `addressID` string — ID of the shipping address selected on the current user's cart.
      - `cardID` string — ID of the card selected on the current user's cart.
      - `amount` object, required — The subtotal and shipping amounts for the current user's cart.
        - `subtotal` integer, required — Subtotal of the current user's cart, in cents (USD).
        - `shipping` integer — Shipping amount of the current user's cart, in cents (USD).
      - `shipping` object — Shipping information for the current user's cart.
        - `service` string — Shipping service name.
        - `timeframe` string — Shipping timeframe provided by the shipping carrier.
    - `addresses` Address[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `name` string, required — The recipient's name.
      - `street1` string, required — Street of the address.
      - `street2` string — Apartment, suite, etc. of the address.
      - `city` string, required — City of the address.
      - `province` string — Province or state of the address.
      - `country` string, required — ISO 3166-1 alpha-2 country code of the address.
      - `zip` string, required — Zip code of the address.
      - `phone` string — Phone number of the recipient.
    - `cards` Card[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `brand` string, required — Brand of the card.
      - `expiration` object, required — Expiration of the card.
        - `year` integer, required — Expiration year of the card.
        - `month` integer, required — Expiration month of the card.
      - `last4` string, required — Last four digits of the card.
    - `subscriptions` Subscription[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `productVariantID` string, required — ID of the product variant being subscribed to.
      - `quantity` integer, required — Quantity of the subscription.
      - `addressID` string, required — ID of the shipping address used for the subscription.
      - `cardID` string, required — ID of the card used for the subscription.
      - `frequency` 'fixed' | 'daily' | 'weekly' | 'monthly' | 'yearly', required — Frequency of the subscription.
    - `orders` Order[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `index` number — Zero-based index of the order for this user only.
      - `shipping` object, required — Shipping address of the order.
        - `name` string, required — The recipient's name.
        - `street1` string, required — Street of the address.
        - `street2` string — Apartment, suite, etc. of the address.
        - `city` string, required — City of the address.
        - `province` string — Province or state of the address.
        - `country` string, required — ISO 3166-1 alpha-2 country code of the address.
        - `zip` string, required — Zip code of the address.
        - `phone` string — Phone number of the recipient.
      - `amount` object, required — The subtotal and shipping amounts of the order.
        - `shipping` number, required — Shipping amount of the order, in cents (USD).
        - `subtotal` number, required — Subtotal amount of the order, in cents (USD).
      - `tracking` object, required — Tracking information of the order.
        - `service` string — Shipping service of the order.
        - `number` string — Tracking number of the order.
        - `url` string — Tracking URL of the order.
      - `items` OrderItem[], required — Items in the order.
        - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
        - `description` string — Description of the item in the order.
        - `amount` number, required — Amount of the item in the order, in cents (USD).
        - `quantity` number, required — Quantity of the item in the order.
        - `productVariantID` string — ID of the product variant of the item in the order.

## Other responses

- `404` — User not found

## Changes

- **2024-12-13** `916cf9100f68` — 3 breaking, 1 warning, 19 info
  - the `data/orders/items/shipping` response's property type/format changed from ``/`` to `object`/`` for status `200`
  - removed the required property `data/addresses/items/address` from the response with the `200` status
  - removed the required property `data/subscriptions/items/shippingID` from the response with the `200` status
  - removed the optional property `data/cart/shippingID` from the response with the `200` status
  - …19 more
- **2024-12-13** `43ff7af31b1e` — 1 breaking, 3 info
  - removed the required property `result` from the response with the `200` status
  - api operation id `getUserInit` was added
  - api tag `User` added
  - added the required property `data` to the response with the `200` status
- **2024-12-04** `22edd23e638b` — 1 info
  - added the optional property `result/products/items/tags` to the response with the `200` status
- **2024-12-04** `b62b1152a364` — 1 warning
  - removed the optional property `result/products/items/tags` from the response with the `200` status

[Change history](https://skmtc.dev/terminaldotshop/apis/terminal-api/changes/user/init/get.md)

---

[API](https://skmtc.dev/terminaldotshop/apis/terminal-api.md) · [All operations](https://skmtc.dev/terminaldotshop/apis/terminal-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/terminaldotshop/terminal-api/revisions/2d657e4e5d6b/schema)
