v41

latestOpenAPI 3.1.0raw.githubusercontent.com2025-08-053715199.1 KB
Miscellaneous

Get app data

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

get/view/init

Response

Initial app data.

Example response

{
  "data": {
    "profile": {
      "user": {
        "id": "usr_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "name": "John Doe",
        "email": "john@example.com",
        "fingerprint": "183ded44-24d0-480e-9908-c022eff8d111",
        "stripeCustomerID": "cus_XXXXXXXXXXXXXXXXX"
      }
    },
    "products": [
      {
        "id": "prd_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "name": "[object Object]",
        "description": "The interpolation of Caturra and Castillo varietals from Las Cochitas creates this refreshing citrusy and complex coffee.",
        "variants": [
          {
            "id": "var_XXXXXXXXXXXXXXXXXXXXXXXXX",
            "name": "12oz",
            "price": 2200
          }
        ],
        "order": 100,
        "subscription": "allowed",
        "tags": {
          "featured": true
        },
        "filters": []
      }
    ],
    "cart": {
      "subtotal": 4400,
      "items": [
        {
          "id": "itm_XXXXXXXXXXXXXXXXXXXXXXXXX",
          "productVariantID": "var_XXXXXXXXXXXXXXXXXXXXXXXXX",
          "quantity": 2,
          "subtotal": 4400
        }
      ],
      "amount": {
        "subtotal": 4400,
        "shipping": 800
      },
      "addressID": "shp_XXXXXXXXXXXXXXXXXXXXXXXXX",
      "cardID": "crd_XXXXXXXXXXXXXXXXXXXXXXXXX",
      "shipping": {
        "service": "USPS Ground Advantage",
        "timeframe": "3-5 days"
      }
    },
    "addresses": [
      {
        "id": "shp_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "name": "John Doe",
        "street1": "123 Main St",
        "street2": "Apt 1",
        "city": "Anytown",
        "province": "CA",
        "zip": "12345",
        "country": "US",
        "phone": "5555555555",
        "created": "2024-06-29T19:36:19.000Z"
      }
    ],
    "cards": [
      {
        "id": "crd_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "brand": "Visa",
        "expiration": {
          "month": 12,
          "year": 2023
        },
        "last4": "1234",
        "created": "2024-06-29T19:36:19.000Z"
      }
    ],
    "subscriptions": [
      {
        "id": "sub_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "productVariantID": "var_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "price": 2200,
        "quantity": 1,
        "addressID": "shp_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "cardID": "crd_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "schedule": {
          "type": "weekly",
          "interval": 3
        },
        "next": "2025-02-01T19:36:19.000Z",
        "created": "2024-06-29T19:36:19.000Z"
      }
    ],
    "orders": [
      {
        "id": "ord_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "index": 0,
        "shipping": {
          "name": "John Doe",
          "street1": "123 Main St",
          "street2": "Apt 1",
          "city": "Anytown",
          "province": "CA",
          "zip": "12345",
          "country": "US",
          "phone": "5555555555"
        },
        "amount": {
          "subtotal": 4400,
          "shipping": 800
        },
        "created": "2024-06-29T19:36:19.000Z",
        "tracking": {
          "service": "USPS Ground Advantage",
          "number": "92346903470167000000000019",
          "url": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=92346903470167000000000019",
          "status": "DELIVERED",
          "statusDetails": "Your shipment has been delivered.",
          "statusUpdatedAt": "2025-04-08T12:00:00.000Z"
        },
        "items": [
          {
            "id": "itm_XXXXXXXXXXXXXXXXXXXXXXXXX",
            "amount": 4400,
            "quantity": 2,
            "productVariantID": "var_XXXXXXXXXXXXXXXXXXXXXXXXX"
          }
        ]
      }
    ],
    "tokens": [
      {
        "id": "pat_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "token": "trm_test_******XXXX",
        "created": "2024-06-29T19:36:19.000Z"
      }
    ],
    "apps": [
      {
        "id": "cli_XXXXXXXXXXXXXXXXXXXXXXXXX",
        "secret": "sec_******XXXX",
        "name": "Example App",
        "redirectURI": "https://example.com/callback"
      }
    ],
    "region": "na"
  }
}