---
title: "Get app data"
method: GET
path: "/view/init"
tags: ["Miscellaneous"]
---

# Get app data

`GET /view/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.
    - `profile` Profile, required — A Terminal shop user's profile. (We have users, btw.)
      - `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` integer, 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.
      - `filters` union[], required
        - union
          - 'eu'
          - 'na'
    - `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` integer, 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` integer, required — The subtotal of all items in the current user's cart, in cents (USD).
      - `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.
      - `schedule` union — Schedule of the subscription.
        - object
          - `type` 'fixed', required
        - object
          - `type` 'weekly', required
          - `interval` integer, required
      - `next` string — Next shipment and billing date for the subscription.
    - `orders` Order[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `index` integer — 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` integer, required — Shipping amount of the order, in cents (USD).
        - `subtotal` integer, 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` integer, required — Amount of the item in the order, in cents (USD).
        - `quantity` integer, required — Quantity of the item in the order.
        - `productVariantID` string — ID of the product variant of the item in the order.
    - `tokens` Token[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `created` string, required — The created time for the token.
      - `token` string, required — Personal access token (obfuscated).
    - `apps` App[], required
      - `id` string, required — Unique object identifier. The format and length of IDs may change over time.
      - `name` string, required — Name of the app.
      - `redirectURI` string, required — Redirect URI of the app.
      - `secret` string, required — OAuth 2.0 client secret of the app (obfuscated).

## Changes

- **2025-02-26** `63020ea66b47` — 2 breaking, 1 info
  - removed the required property `data/subscriptions/items/frequency` from the response with the `200` status
  - removed the required property `data/tokens/items/time` from the response with the `200` status
  - added the required property `data/tokens/items/created` to the response with the `200` status
- **2025-02-25** `43a60054211e` — 1 info
  - added the required property `data/apps/items/secret` to the response with the `200` status
- **2025-02-17** `a43b29f86639` — 1 breaking, 1 info
  - added `subschema #1: fixed, subschema #2: weekly` to the `data/subscriptions/items/schedule` response property `oneOf` list for the response status `200`
  - removed `subschema #1, subschema #2` from the `data/subscriptions/items/schedule` response property `oneOf` list for the response status `200`
- **2025-02-16** `d05a14360ad1` — 1 info
  - added the optional property `data/subscriptions/items/schedule` to the response with the `200` status
- **2025-02-06** `628874ec2e5b` — 2 info
  - added the optional property `data/subscriptions/items/next` to the response with the `200` status
  - added the required property `data/products/items/filters` to the response with the `200` status

[Full history](https://skmtc.dev/terminaldotshop/apis/terminal-api/changes/view/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/cb4577d95656/schema)
