Stores

Markdown

View as Markdown

The stores your API key can act in, and your role in each.

All paths are relative to the base URL https://api.store.link/v1. Every request needs your API key; see Overview.

Endpoints

EndpointWhat it does
GET /storesList stores
GET /stores/{storeId}Get a store

List stores

GET /stores

The stores this key can act in, with your role in each.

Example request

curl 'https://api.store.link/v1/stores' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

FieldTypeDescription
dataarray of object
data[].idstring
data[].namestring, nullable
data[].urlstring (URL)The storefront.
data[].rolestringYour role in this store, which decides what the key can do in it. One of: owner, manager, designer, orders.

Example response

{
  "data": [
    {
      "id": "665f1c2ab4e8a90012ab34cd",
      "name": "Bean & Brew",
      "url": "https://beanandbrew.store.link",
      "role": "owner"
    }
  ]
}

Errors

The common errors: 401 unauthorized, 429 rate_limited, 500 internal_error. See Errors in the Overview.

Get a store

GET /stores/{storeId}

The store with its plan and limits, currency, language, status, SEO, categories, variant options, and the payment and shipping methods that are on. Any role can read it.

Path parameters

NameTypeDescription
storeIdstring
required
A store id from GET /stores.

Example request

curl 'https://api.store.link/v1/stores/665f1c2ab4e8a90012ab34cd' \
  -H 'Authorization: Bearer YOUR_API_KEY'

Response

FieldTypeDescription
idstring
namestring, nullable
urlstring (URL)The storefront.
rolestringYour role in this store, which decides what the key can do in it. One of: owner, manager, designer, orders.
planstringfree, lite, standard or unlimited; older stores can have pro or plus.
plan_limitsobject
plan_limits.monthly_ordersinteger, nullableOrders a month the dashboard and this API show; null for unlimited.
plan_limits.discount_couponsboolean
plan_limits.custom_pagesboolean
plan_limits.analyticsboolean
plan_limits.custom_domainboolean
plan_limits.max_team_membersinteger, nullableTeam members besides the owner; null for unlimited.
currencystringISO 4217 code.
languagestringThe storefront's language code.
statusstringtesting: password protected, and orders are test orders. One of: open, closed, testing.
password_protectedboolean
seoobject
seo.titlestring, nullable
seo.descriptionstring, nullable
seo.image_urlstring, nullable
seo.favicon_urlstring, nullable
product_typestring, nullableWhat the store sells, e.g. physical or digital.
categoriesarray of objectIn storefront order.
categories[].slugstring
categories[].namestring
categories[].image_urlstring, nullable
variant_optionsarray of stringThe Product Sheet columns a product's variants differ by, e.g. Size or Color.
paymentsobject
payments.methodsarray of stringThe payment methods that are on.
payments.editablebooleanAlways false: payment settings change in the dashboard only.
shipping_methodsarray of objectThe methods that are on.
shipping_methods[].labelstringWhat POST /orders takes as shipping_method.
shipping_methods[].pickupboolean
shipping_methods[].fee_typestring, nullablecollect_later: the fee is agreed after the order. null for pickup. One of: fixed, collect_later.
shipping_methods[].ratenumber, nullable
shipping_methods[].free_delivery_abovenumber, nullable
shipping_methods[].min_order_amountnumber, nullable
shipping_methods[].pickup_locationsarray of stringFor pickup, the addresses POST /orders takes as the order's address.

Example response

{
  "id": "665f1c2ab4e8a90012ab34cd",
  "name": "Bean & Brew",
  "url": "https://beanandbrew.store.link",
  "role": "owner",
  "plan": "standard",
  "plan_limits": {
    "monthly_orders": 500,
    "discount_coupons": true,
    "custom_pages": true,
    "analytics": true,
    "custom_domain": true,
    "max_team_members": 3
  },
  "currency": "USD",
  "language": "en",
  "status": "open",
  "password_protected": false,
  "seo": {
    "title": "Bean & Brew",
    "description": "Small-batch coffee, roasted weekly.",
    "image_url": "https://cdn.store.link/images/classic-tee.jpg",
    "favicon_url": "https://cdn.store.link/images/favicon.png"
  },
  "product_type": "physical",
  "categories": [
    {
      "slug": "t-shirts",
      "name": "T-shirts",
      "image_url": "https://cdn.store.link/images/classic-tee.jpg"
    }
  ],
  "variant_options": [
    "Size"
  ],
  "payments": {
    "methods": [
      "Cash on delivery"
    ],
    "editable": false
  },
  "shipping_methods": [
    {
      "label": "Standard delivery",
      "pickup": false,
      "fee_type": "fixed",
      "rate": 5,
      "free_delivery_above": 100,
      "min_order_amount": 30,
      "pickup_locations": [
        "221 Market St, San Francisco, CA"
      ]
    }
  ]
}

Errors

The common errors: 400 invalid_request, 401 unauthorized, 404 store_not_found, 429 rate_limited, 500 internal_error. See Errors in the Overview.

Related Articles

Was this article helpful?