From 0b6e4fdb06787219141287908672cbe2844b63ce Mon Sep 17 00:00:00 2001 From: LApple Date: Mon, 30 Mar 2026 17:00:06 +0200 Subject: [PATCH 01/14] chore: adds api walkthrough docs --- .../walkthroughs/create-product.md | 545 ++++++++++++++++++ .../integrations-api/walkthroughs/index.md | 16 + 2 files changed, 561 insertions(+) create mode 100644 guides/development/integrations-api/walkthroughs/create-product.md create mode 100644 guides/development/integrations-api/walkthroughs/index.md diff --git a/guides/development/integrations-api/walkthroughs/create-product.md b/guides/development/integrations-api/walkthroughs/create-product.md new file mode 100644 index 000000000..47e3f7b0a --- /dev/null +++ b/guides/development/integrations-api/walkthroughs/create-product.md @@ -0,0 +1,545 @@ +--- +nav: + title: Create a Product and Complete Checkout + position: 10 + +--- + +# Create a Product and Complete Checkout + +This guide shows a tested local end-to-end flow for Shopware development: + +1. create a category and product with the Admin API +2. read the product with the Store API +3. add the product to a cart +4. register a customer in the current Store API context +5. place an order +6. handle payment if needed + +It is written as a golden path for local development on `http://127.0.0.1:8000`. Troubleshooting tips appear below. + +## What to expect in local development + +A few details matter a lot in local setups: + +- Store API requests use `sw-access-key`, not `sw-access-token` +- on this setup, `/store-api/context` is called with `GET` +- Store API context tokens are ephemeral and may expire during longer debugging sessions +- `register` or `login` may return a new `Sw-Context-Token` +- if the context changes, your cart may no longer contain the items you added earlier +- product creation requires a price in the **system default currency** +- customer registration requires real IDs such as `salutationId` and `countryId` + +Because of that, the safest approach is to follow one known good sequence from start to finish. + +## Before you start + +Make sure your local Shopware instance is running: + +- Storefront: `http://127.0.0.1:8000` +- Administration: `http://127.0.0.1:8000/admin` + +You also need: + +- `curl` +- `jq` +- an admin user, for example `admin / shopware` in a local default setup +- a Store API sales channel access key + +## Step 1: Get an Admin API token + +For local development, you can use the Administration password grant shortcut: + +```bash +ADMIN_TOKEN=$(curl -s -X POST "http://127.0.0.1:8000/api/oauth/token" \ + -H "Content-Type: application/json" \ + -d '{ + "grant_type": "password", + "client_id": "administration", + "scopes": "write", + "username": "admin", + "password": "shopware" + }' | jq -r '.access_token') + +printf '%s\n' "$ADMIN_TOKEN" +``` + +## Step 2: Inspect your local API schemas + +Use the generated schemas for two different questions: + +- **OpenAPI spec**: which endpoint should I call, and what does the payload look like? +- **Entity schema**: which fields and associations exist on product, category, order, and other entities? + +Download the Admin API schemas: + +```bash +curl -s "http://127.0.0.1:8000/api/_info/openapi3.json" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -o openapi.json +``` + +Download the entity schema as well: + +```bash +curl -s "http://127.0.0.1:8000/api/_info/open-api-schema.json" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -o entity-schema.json +``` + +Quick checks: + +```bash +ls -lh openapi.json entity-schema.json +head -n 5 openapi.json +head -n 5 entity-schema.json +``` + +You can do the same for the Store API later with `store-api/_info/openapi3.json`. + +## Step 3: Look up the IDs you need before creating products + +A product usually needs related IDs such as: + +- `taxId` +- `salesChannelId` +- `currencyId` + +Use Admin API search endpoints for this. + +### Find a tax ID + +```bash +curl -s -X POST "http://127.0.0.1:8000/api/search/tax" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "limit": 10, + "sort": [{ "field": "name", "order": "ASC" }] + }' | jq +``` + +Choose the tax rate you want to use — for example, the standard rate. + +### Find a sales channel ID and Store API access key + +```bash +curl -s -X POST "http://127.0.0.1:8000/api/search/sales-channel" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "limit": 10, + "includes": { + "sales_channel": ["id", "name", "accessKey"] + } + }' | jq +``` + +Pick the sales channel you want to test against — for example, `Storefront`. + +### Find a currency ID + +Use the system default currency, because product writes require a price in the default currency: + +```bash +curl -s -X POST "http://127.0.0.1:8000/api/search/currency" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "limit": 10, + "includes": { + "currency": ["id", "name", "isoCode", "isSystemDefault"] + } + }' | jq +``` + +### Save the IDs you want to use + +```bash +TAX_ID="" +SALES_CHANNEL_ID="" +CURRENCY_ID="" +STORE_API_ACCESS_KEY="" +``` + +### Step 4: Create a category with the Admin API + +```bash +CATEGORY_ID=$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-') + +curl -s -X POST "http://127.0.0.1:8000/api/category" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"id\": \"$CATEGORY_ID\", + \"name\": \"My Example Category\", + \"active\": true + }" +``` + +Verify it: + +```bash +curl -s -X POST "http://127.0.0.1:8000/api/search/category" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"ids\": [\"$CATEGORY_ID\"], + \"includes\": { + \"category\": [\"id\", \"name\", \"active\"] + } + }" | jq +``` + +The `ids` and `includes` criteria are standard search-criteria features. + +## Step 5: Create a product with the Admin API + +```bash +PRODUCT_ID=$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-') +PRODUCT_NUMBER="MyExample-001" + +curl -s -X POST "http://127.0.0.1:8000/api/product" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"id\": \"$PRODUCT_ID\", + \"name\": \"My Example Product\", + \"productNumber\": \"$PRODUCT_NUMBER\", + \"stock\": 10, + \"active\": true, + \"taxId\": \"$TAX_ID\", + \"price\": [ + { + \"currencyId\": \"$CURRENCY_ID\", + \"gross\": 19.99, + \"net\": 16.80, + \"linked\": true + } + ], + \"visibilities\": [ + { + \"salesChannelId\": \"$SALES_CHANNEL_ID\", + \"visibility\": 30 + } + ], + \"categories\": [ + { \"id\": \"$CATEGORY_ID\" } + ] + }" +``` + +Verify it: + +```bash +curl -s -X POST "http://127.0.0.1:8000/api/search/product" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Content-Type: application/json" \ + -H "sw-inheritance: 1" \ + -d "{ + \"ids\": [\"$PRODUCT_ID\"], + \"associations\": { + \"categories\": {} + }, + \"includes\": { + \"product\": [\"id\", \"name\", \"productNumber\", \"active\", \"translated\", \"categories\"], + \"category\": [\"id\", \"name\"] + } + }" | jq +``` + +The `sw-inheritance` header tells the API to consider parent-child inheritance when reading products and variants. + +## Step 6: Create a Store API context + +The Store API uses two important headers: + +- `sw-access-key`: authenticates against the Store API sales channel +- `sw-context-token`: identifies the shopper context + +Get a fresh Store API context: + +```bash +curl -i "http://127.0.0.1:8000/store-api/context" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" +``` + +Look for the `Sw-Context-Token` response header and store its value: + +```bash +STORE_CONTEXT_TOKEN="REPLACE_ME" +echo "$STORE_CONTEXT_TOKEN" +``` + +You can also extract it automatically: + +```bash +STORE_CONTEXT_TOKEN=$(curl -si "http://127.0.0.1:8000/store-api/context" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + | tr -d '\r' | awk -F': ' 'tolower($1)=="sw-context-token" {print $2}') + +echo "$STORE_CONTEXT_TOKEN" +``` + +## Step 7: Read the product with the Store API + +Use a Store API search request with search criteria. An example of searching by term and sorting by name: + +```bash +curl -s -X POST "http://127.0.0.1:8000/store-api/search" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "term": "My Example Product", + "limit": 5, + "sort": [ + { "field": "name", "order": "ASC", "naturalSorting": true } + ], + "includes": { + "product": ["id", "name", "translated", "calculatedPrice"] + } + }' | jq +``` + +An example to prove you can find the created product in a storefront-style listing: + +```bash +curl -s -X POST "http://127.0.0.1:8000/store-api/search" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"filter\": [ + { \"type\": \"equals\", \"field\": \"active\", \"value\": true }, + { \"type\": \"equals\", \"field\": \"productNumber\", \"value\": \"$PRODUCT_NUMBER\" } + ], + \"sort\": [ + { \"field\": \"name\", \"order\": \"ASC\" } + ], + \"page\": 1, + \"limit\": 10, + \"includes\": { + \"product\": [\"id\", \"name\", \"productNumber\", \"translated\", \"calculatedPrice\"] + } + }" | jq +``` + +Useful search-criteria knobs: + +- `includes` restricts the response to the fields you need +- `page` and `limit` control pagination +- `filter` applies exact or nested filtering +- `term` performs weighted text search +- `sort` controls ordering + +If your project uses a different Store API search/listing endpoint, confirm the exact path in your local `store-api/_info/openapi3.json`. + +## Step 8: Add the product to the cart + +Use the product ID from the previous step: + +```bash +curl -s -X POST "http://127.0.0.1:8000/store-api/checkout/cart/line-item" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"items\": [ + { + \"id\": \"$PRODUCT_ID\", + \"referencedId\": \"$PRODUCT_ID\", + \"type\": \"product\", + \"quantity\": 1 + } + ] + }" | jq +``` + +Verify the cart: + +```bash +curl -s -X GET "http://127.0.0.1:8000/store-api/checkout/cart" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" | jq +``` + +If your local schema shows slightly different cart payload requirements, trust your local `store-api` OpenAPI spec. + +## Step 9: Prepare checkout state + +Before placing an order, you typically need: + +- a customer in the current Store API context +- active billing and shipping addresses +- a shipping method +- a payment method + +You can inspect your local Store API reference in the browser at `http://127.0.0.1:8000/store-api/_info/stoplightio.html`, or inspect the raw schema: + +```bash +curl -s "http://127.0.0.1:8000/store-api/_info/openapi3.json" -o store-openapi.json +jq -r '.paths | keys[]' store-openapi.json | grep -E 'checkout|account|address|payment|shipping|order|context' +``` + +Typical relevant endpoints include: + +- `/account/register` +- `/account/login` +- `/account/address` +- `/context` +- `/payment-method` +- `/shipping-method` +- `/checkout/cart` +- `/checkout/order` +- `/handle-payment` + +Rule of thumb: + +- Admin API: create and manage test data +- Store API: act like a shopper + +## Step 10: Register or log in a customer, then place the order + +On a typical local setup, `POST /store-api/checkout/order` requires a logged-in customer. If you call it with an anonymous context, Shopware returns `Customer is not logged in.` Register or log in a customer in the current Store API context first. + +### 10.1 Fetch salutationId and countryId + +For registration, fetch real IDs for: + +- `salutationId` from `/store-api/salutation` +- `countryId` from `/store-api/country` + +For example: + +```bash +COUNTRY_ID="019d2b446e29724fa4715c70c9c3eae1" +SALUTATION_ID="019d2b446e2573ba9a3ea2d002050cbe" +``` + +### 10.2 Register the customer + +```bash +curl -i -X POST "http://127.0.0.1:8000/store-api/account/register" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"salutationId\": \"$SALUTATION_ID\", + \"firstName\": \"FirstName\", + \"lastName\": \"LastName\", + \"email\": \"name-test@example.com\", + \"password\": \"shopware123!\", + \"acceptedDataProtection\": true, + \"storefrontUrl\": \"http://127.0.0.1:8000\", + \"billingAddress\": { + \"firstName\": \"FirstName\", + \"lastName\": \"LastName\", + \"street\": \"Teststr. 1\", + \"zipcode\": \"12345\", + \"city\": \"Test City\", + \"countryId\": \"$COUNTRY_ID\" + } + }" +``` + +Use the latest returned `Sw-Context-Token` header for subsequent requests: + +```bash +STORE_CONTEXT_TOKEN="REPLACE_ME_WITH_NEW_TOKEN" +``` + +### 10.3 Re-add the product if the context token changed + +After `/store-api/account/register` or `/store-api/account/login`, Shopware may return a new `Sw-Context-Token`. If the token changes, add the product to the cart again in that new context before calling `/store-api/checkout/order`. + +```bash +curl -s -X POST "http://127.0.0.1:8000/store-api/checkout/cart/line-item" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ + -H "Content-Type: application/json" \ + -d "{ + \"items\": [ + { + \"id\": \"$PRODUCT_ID\", + \"referencedId\": \"$PRODUCT_ID\", + \"type\": \"product\", + \"quantity\": 1 + } + ] + }" | jq +``` + +Verify that the cart is not empty: + +```bash +curl -s "http://127.0.0.1:8000/store-api/checkout/cart" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" | jq +``` + +### 10.4 Place the order + +Once the Store API context has: + +- a logged-in customer +- a cart with your product +- valid billing and shipping data + +you can usually place the order directly on a local default setup. If your instance requires an explicit payment or shipping selection first, inspect `/payment-method`, `/shipping-method`, and `/context`. + +Create the order: + +```bash +curl -s -X POST "http://127.0.0.1:8000/store-api/checkout/order" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{ + "customerComment": "Test order from local API walkthrough" + }' | jq +``` + +If the cart is empty, Shopware returns: `Cart is empty.` + +In that case, add the product to the cart again in the current context, then retry the order request. + +### 10.5 Handle payment if required + +Some payment methods require an extra payment step after order creation: + +```bash +curl -s -X POST "http://127.0.0.1:8000/store-api/handle-payment" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "orderId": "REPLACE_ME", + "finishUrl": "http://127.0.0.1:8000/checkout/finish", + "errorUrl": "http://127.0.0.1:8000/checkout/confirm" + }' | jq +``` + +If `/store-api/handle-payment` returns `"redirectUrl": null`, the selected payment method does not require an additional redirect-based flow. + +## Troubleshooting + +### Schema endpoints return `500` or missing-table errors + +Your database may not be initialized correctly. Re-run installation and setup. + +### Product does not show up in the Store API + +Check all of the following: + +- the product is `active` +- the product has a valid `price` +- the product has `visibilities` for your sales channel +- you are using the correct Store API access key +- your Storefront sales channel domain matches your local URL + +### Which headers matter most? + +For this walkthrough: + +- Admin API: `Authorization: Bearer $ADMIN_TOKEN`, optionally `sw-language-id`, `sw-version-id`, `sw-inheritance`, `sw-currency-id` depending on your use case +- Store API: `sw-access-key`, `sw-context-token` diff --git a/guides/development/integrations-api/walkthroughs/index.md b/guides/development/integrations-api/walkthroughs/index.md new file mode 100644 index 000000000..b5a185af3 --- /dev/null +++ b/guides/development/integrations-api/walkthroughs/index.md @@ -0,0 +1,16 @@ +--- +nav: + title: API Walkthroughs + position: 10 + +--- + +# API Walkthroughs + +These guides focus on concrete end-to-end flows where it helps to see API calls together, rather than as isolated endpoint reference. + +## Available walkthroughs + +- [Create a Product and Complete Checkout](./create-product.md): Create category and product data with the Admin API, read it through the Store API, add it to a cart, register a customer, place an order, and handle payment if needed. + +More walkthroughs to be added over time. From adabb0384a78a40cde0b2f4e14eb39fecf17819f Mon Sep 17 00:00:00 2001 From: somethings Date: Mon, 30 Mar 2026 17:08:51 +0200 Subject: [PATCH 02/14] Update guides/development/integrations-api/walkthroughs/create-product.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../development/integrations-api/walkthroughs/create-product.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/development/integrations-api/walkthroughs/create-product.md b/guides/development/integrations-api/walkthroughs/create-product.md index 47e3f7b0a..34738ca87 100644 --- a/guides/development/integrations-api/walkthroughs/create-product.md +++ b/guides/development/integrations-api/walkthroughs/create-product.md @@ -162,7 +162,7 @@ CURRENCY_ID="" STORE_API_ACCESS_KEY="" ``` -### Step 4: Create a category with the Admin API +## Step 4: Create a category with the Admin API ```bash CATEGORY_ID=$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-') From 3efb61d4c42e76805cad1f0fe92245a340f82504 Mon Sep 17 00:00:00 2001 From: somethings Date: Mon, 30 Mar 2026 17:09:03 +0200 Subject: [PATCH 03/14] Update guides/development/integrations-api/walkthroughs/index.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- guides/development/integrations-api/walkthroughs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/development/integrations-api/walkthroughs/index.md b/guides/development/integrations-api/walkthroughs/index.md index b5a185af3..c50334270 100644 --- a/guides/development/integrations-api/walkthroughs/index.md +++ b/guides/development/integrations-api/walkthroughs/index.md @@ -7,7 +7,7 @@ nav: # API Walkthroughs -These guides focus on concrete end-to-end flows where it helps to see API calls together, rather than as isolated endpoint reference. +These guides focus on concrete end-to-end flows where it helps to see API calls together, rather than as isolated endpoint references. ## Available walkthroughs From e382ebd559b2ed192b269640db0144f4d7d50ea0 Mon Sep 17 00:00:00 2001 From: somethings Date: Mon, 30 Mar 2026 17:09:14 +0200 Subject: [PATCH 04/14] Update guides/development/integrations-api/walkthroughs/create-product.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../development/integrations-api/walkthroughs/create-product.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/development/integrations-api/walkthroughs/create-product.md b/guides/development/integrations-api/walkthroughs/create-product.md index 34738ca87..5bb56d8be 100644 --- a/guides/development/integrations-api/walkthroughs/create-product.md +++ b/guides/development/integrations-api/walkthroughs/create-product.md @@ -95,7 +95,7 @@ head -n 5 openapi.json head -n 5 entity-schema.json ``` -You can do the same for the Store API later with `store-api/_info/openapi3.json`. +You can do the same for the Store API later with `/store-api/_info/openapi3.json`. ## Step 3: Look up the IDs you need before creating products From cda4606d505a4901dfb4408ede99c8df4b2bb6fd Mon Sep 17 00:00:00 2001 From: somethings Date: Mon, 30 Mar 2026 17:12:09 +0200 Subject: [PATCH 05/14] Update index.md --- guides/development/integrations-api/walkthroughs/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guides/development/integrations-api/walkthroughs/index.md b/guides/development/integrations-api/walkthroughs/index.md index c50334270..116f748ed 100644 --- a/guides/development/integrations-api/walkthroughs/index.md +++ b/guides/development/integrations-api/walkthroughs/index.md @@ -1,16 +1,16 @@ --- nav: - title: API Walkthroughs + title: API Walk-Throughs position: 10 --- -# API Walkthroughs +# API Walk-Throughs These guides focus on concrete end-to-end flows where it helps to see API calls together, rather than as isolated endpoint references. -## Available walkthroughs +## Available walk-throughs - [Create a Product and Complete Checkout](./create-product.md): Create category and product data with the Admin API, read it through the Store API, add it to a cart, register a customer, place an order, and handle payment if needed. -More walkthroughs to be added over time. +More walk-throughs to be added over time. From ad89ac8c4d5525492a5079177de81a74182592d8 Mon Sep 17 00:00:00 2001 From: somethings Date: Mon, 30 Mar 2026 19:27:37 +0200 Subject: [PATCH 06/14] Update index.md --- guides/development/integrations-api/walkthroughs/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guides/development/integrations-api/walkthroughs/index.md b/guides/development/integrations-api/walkthroughs/index.md index 116f748ed..97c8701cf 100644 --- a/guides/development/integrations-api/walkthroughs/index.md +++ b/guides/development/integrations-api/walkthroughs/index.md @@ -1,16 +1,16 @@ --- nav: - title: API Walk-Throughs + title: API Flows position: 10 --- -# API Walk-Throughs +# API Flows These guides focus on concrete end-to-end flows where it helps to see API calls together, rather than as isolated endpoint references. -## Available walk-throughs +## Available flows - [Create a Product and Complete Checkout](./create-product.md): Create category and product data with the Admin API, read it through the Store API, add it to a cart, register a customer, place an order, and handle payment if needed. -More walk-throughs to be added over time. +More flows to be added over time. From 0e31fdd8054837dd076c1f366df7f9bf6803b6cd Mon Sep 17 00:00:00 2001 From: LApple Date: Mon, 30 Mar 2026 19:35:19 +0200 Subject: [PATCH 07/14] Rename docs folder --- .../integrations-api/{walkthroughs => flows}/create-product.md | 0 .../development/integrations-api/{walkthroughs => flows}/index.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename guides/development/integrations-api/{walkthroughs => flows}/create-product.md (100%) rename guides/development/integrations-api/{walkthroughs => flows}/index.md (100%) diff --git a/guides/development/integrations-api/walkthroughs/create-product.md b/guides/development/integrations-api/flows/create-product.md similarity index 100% rename from guides/development/integrations-api/walkthroughs/create-product.md rename to guides/development/integrations-api/flows/create-product.md diff --git a/guides/development/integrations-api/walkthroughs/index.md b/guides/development/integrations-api/flows/index.md similarity index 100% rename from guides/development/integrations-api/walkthroughs/index.md rename to guides/development/integrations-api/flows/index.md From ae3b28467e248a6721bd7bb0f043c07a008b52d2 Mon Sep 17 00:00:00 2001 From: somethings Date: Tue, 31 Mar 2026 09:43:51 +0200 Subject: [PATCH 08/14] Update guides/development/integrations-api/flows/create-product.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- guides/development/integrations-api/flows/create-product.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guides/development/integrations-api/flows/create-product.md b/guides/development/integrations-api/flows/create-product.md index 5bb56d8be..66366db28 100644 --- a/guides/development/integrations-api/flows/create-product.md +++ b/guides/development/integrations-api/flows/create-product.md @@ -511,6 +511,7 @@ Some payment methods require an extra payment step after order creation: ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/handle-payment" \ -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "orderId": "REPLACE_ME", From 6da99d75f2055b9f0d63fb396a94174e99cd161c Mon Sep 17 00:00:00 2001 From: somethings Date: Tue, 31 Mar 2026 10:05:40 +0200 Subject: [PATCH 09/14] Update guides/development/integrations-api/flows/create-product.md Co-authored-by: Michael Telgmann --- guides/development/integrations-api/flows/create-product.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/development/integrations-api/flows/create-product.md b/guides/development/integrations-api/flows/create-product.md index 66366db28..1e2d4e218 100644 --- a/guides/development/integrations-api/flows/create-product.md +++ b/guides/development/integrations-api/flows/create-product.md @@ -396,7 +396,7 @@ Typical relevant endpoints include: Rule of thumb: -- Admin API: create and manage test data +- Admin API: create and manage data - Store API: act like a shopper ## Step 10: Register or log in a customer, then place the order From 3bcc2830474e2c38418c1ace5cfd9162c1e48056 Mon Sep 17 00:00:00 2001 From: somethings Date: Tue, 31 Mar 2026 13:00:42 +0200 Subject: [PATCH 10/14] Update create-product.md --- .../integrations-api/flows/create-product.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/guides/development/integrations-api/flows/create-product.md b/guides/development/integrations-api/flows/create-product.md index 1e2d4e218..5d6567abc 100644 --- a/guides/development/integrations-api/flows/create-product.md +++ b/guides/development/integrations-api/flows/create-product.md @@ -229,6 +229,27 @@ curl -s -X POST "http://127.0.0.1:8000/api/product" \ }" ``` +### About `visibilities` + +Use `visibilities` to assign a product to one or more sales channels and define how visible it should be there. + +Each visibility entry contains: + +```bash +{ + "salesChannelId": "", + "visibility": 30 +} +``` + +`visibility` is required because product availability is resolved per sales channel. A product is only considered available in a sales-channel context when it has a matching visibility entry for that `salesChannelId`. + +Allowed values: + +- `10` (`VISIBILITY_LINK`): hide in listings and search +- `20` (`VISIBILITY_SEARCH`): hide in listings +- `30` (`VISIBILITY_ALL`): visible everywhere + Verify it: ```bash From 718725c6a93c1daa1b584cc6609914a7fb740301 Mon Sep 17 00:00:00 2001 From: LApple Date: Tue, 31 Mar 2026 13:33:31 +0200 Subject: [PATCH 11/14] chore: add API terms to wordlist --- .wordlist.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index 52b8bef41..719b870ec 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -1277,6 +1277,7 @@ control copyToClipboard copyable cors +countryId createActionResponse createCategoryFixture createCmsFixture @@ -1843,6 +1844,7 @@ salesChannelId salesChannelLoaded saleschannel saleschannelrepositoryfacade +salutationId sandboxed sarven scalability From 553cd0b08d2d53715067891a9f98970a70393ab9 Mon Sep 17 00:00:00 2001 From: Bojan Rajh <117360292+bojanrajh@users.noreply.github.com> Date: Wed, 1 Apr 2026 11:19:14 +0200 Subject: [PATCH 12/14] Apply suggestion from @bojanrajh --- guides/development/integrations-api/flows/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guides/development/integrations-api/flows/index.md b/guides/development/integrations-api/flows/index.md index 97c8701cf..98e30346b 100644 --- a/guides/development/integrations-api/flows/index.md +++ b/guides/development/integrations-api/flows/index.md @@ -14,3 +14,4 @@ These guides focus on concrete end-to-end flows where it helps to see API calls - [Create a Product and Complete Checkout](./create-product.md): Create category and product data with the Admin API, read it through the Store API, add it to a cart, register a customer, place an order, and handle payment if needed. More flows to be added over time. + From e93b291f7f098e7c3331d70fe67cb8524f3df4de Mon Sep 17 00:00:00 2001 From: Bojan Rajh Date: Wed, 1 Apr 2026 11:22:13 +0200 Subject: [PATCH 13/14] Revert "Apply suggestion from @bojanrajh" This reverts commit 553cd0b08d2d53715067891a9f98970a70393ab9. --- guides/development/integrations-api/flows/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/guides/development/integrations-api/flows/index.md b/guides/development/integrations-api/flows/index.md index 98e30346b..97c8701cf 100644 --- a/guides/development/integrations-api/flows/index.md +++ b/guides/development/integrations-api/flows/index.md @@ -14,4 +14,3 @@ These guides focus on concrete end-to-end flows where it helps to see API calls - [Create a Product and Complete Checkout](./create-product.md): Create category and product data with the Admin API, read it through the Store API, add it to a cart, register a customer, place an order, and handle payment if needed. More flows to be added over time. - From 359b47b96b16d2cccead9ee449b2ac9a7456fab4 Mon Sep 17 00:00:00 2001 From: sushmangupta Date: Wed, 1 Apr 2026 15:59:21 +0200 Subject: [PATCH 14/14] Grammar fixes --- .../integrations-api/flows/create-product.md | 252 +++++++++--------- .../integrations-api/flows/index.md | 2 +- 2 files changed, 127 insertions(+), 127 deletions(-) diff --git a/guides/development/integrations-api/flows/create-product.md b/guides/development/integrations-api/flows/create-product.md index 5d6567abc..75fab3e75 100644 --- a/guides/development/integrations-api/flows/create-product.md +++ b/guides/development/integrations-api/flows/create-product.md @@ -9,12 +9,12 @@ nav: This guide shows a tested local end-to-end flow for Shopware development: -1. create a category and product with the Admin API -2. read the product with the Store API -3. add the product to a cart -4. register a customer in the current Store API context -5. place an order -6. handle payment if needed +1. Create a category and product with the Admin API +2. Read the product with the Store API +3. Add the product to a cart +4. Register a customer in the current Store API context +5. Place an order +6. Handle payment if needed It is written as a golden path for local development on `http://127.0.0.1:8000`. Troubleshooting tips appear below. @@ -23,12 +23,12 @@ It is written as a golden path for local development on `http://127.0.0.1:8000`. A few details matter a lot in local setups: - Store API requests use `sw-access-key`, not `sw-access-token` -- on this setup, `/store-api/context` is called with `GET` +- On this setup, `/store-api/context` is called with `GET` - Store API context tokens are ephemeral and may expire during longer debugging sessions - `register` or `login` may return a new `Sw-Context-Token` -- if the context changes, your cart may no longer contain the items you added earlier -- product creation requires a price in the **system default currency** -- customer registration requires real IDs such as `salutationId` and `countryId` +- If the context changes, your cart may no longer contain the items you added earlier +- Product creation requires a price in the **system default currency** +- Customer registration requires real IDs such as `salutationId` and `countryId` Because of that, the safest approach is to follow one known good sequence from start to finish. @@ -43,8 +43,8 @@ You also need: - `curl` - `jq` -- an admin user, for example `admin / shopware` in a local default setup -- a Store API sales channel access key +- An admin user, for example `admin / shopware` in a local default setup +- A Store API sales channel access key ## Step 1: Get an Admin API token @@ -52,14 +52,14 @@ For local development, you can use the Administration password grant shortcut: ```bash ADMIN_TOKEN=$(curl -s -X POST "http://127.0.0.1:8000/api/oauth/token" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d '{ - "grant_type": "password", - "client_id": "administration", - "scopes": "write", - "username": "admin", - "password": "shopware" - }' | jq -r '.access_token') + "grant_type": "password", + "client_id": "administration", + "scopes": "write", + "username": "admin", + "password": "shopware" + }' | jq -r '.access_token') printf '%s\n' "$ADMIN_TOKEN" ``` @@ -68,14 +68,14 @@ printf '%s\n' "$ADMIN_TOKEN" Use the generated schemas for two different questions: -- **OpenAPI spec**: which endpoint should I call, and what does the payload look like? -- **Entity schema**: which fields and associations exist on product, category, order, and other entities? +- **OpenAPI spec**: Which endpoint should I call, and what does the payload look like? +- **Entity schema**: Which fields and associations exist on product, category, order, and other entities? Download the Admin API schemas: ```bash curl -s "http://127.0.0.1:8000/api/_info/openapi3.json" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -o openapi.json ``` @@ -83,7 +83,7 @@ Download the entity schema as well: ```bash curl -s "http://127.0.0.1:8000/api/_info/open-api-schema.json" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -o entity-schema.json ``` @@ -99,7 +99,7 @@ You can do the same for the Store API later with `/store-api/_info/openapi3.json ## Step 3: Look up the IDs you need before creating products -A product usually needs related IDs such as: +A product usually needs related IDs, such as: - `taxId` - `salesChannelId` @@ -111,12 +111,12 @@ Use Admin API search endpoints for this. ```bash curl -s -X POST "http://127.0.0.1:8000/api/search/tax" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -d '{ + -d '{ "limit": 10, "sort": [{ "field": "name", "order": "ASC" }] - }' | jq + }' | jq ``` Choose the tax rate you want to use — for example, the standard rate. @@ -125,14 +125,14 @@ Choose the tax rate you want to use — for example, the standard rate. ```bash curl -s -X POST "http://127.0.0.1:8000/api/search/sales-channel" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -d '{ + -d '{ "limit": 10, "includes": { "sales_channel": ["id", "name", "accessKey"] - } - }' | jq + } + }' | jq ``` Pick the sales channel you want to test against — for example, `Storefront`. @@ -143,14 +143,14 @@ Use the system default currency, because product writes require a price in the d ```bash curl -s -X POST "http://127.0.0.1:8000/api/search/currency" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -d '{ + -d '{ "limit": 10, "includes": { "currency": ["id", "name", "isoCode", "isSystemDefault"] - } - }' | jq + } + }' | jq ``` ### Save the IDs you want to use @@ -168,27 +168,27 @@ STORE_API_ACCESS_KEY="" CATEGORY_ID=$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-') curl -s -X POST "http://127.0.0.1:8000/api/category" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -d "{ + -d "{ \"id\": \"$CATEGORY_ID\", \"name\": \"My Example Category\", \"active\": true - }" + }" ``` Verify it: ```bash curl -s -X POST "http://127.0.0.1:8000/api/search/category" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -d "{ + -d "{ \"ids\": [\"$CATEGORY_ID\"], \"includes\": { \"category\": [\"id\", \"name\", \"active\"] - } - }" | jq + } + }" | jq ``` The `ids` and `includes` criteria are standard search-criteria features. @@ -200,9 +200,9 @@ PRODUCT_ID=$(uuidgen | tr '[:upper:]' '[:lower:]' | tr -d '-') PRODUCT_NUMBER="MyExample-001" curl -s -X POST "http://127.0.0.1:8000/api/product" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -d "{ + -d "{ \"id\": \"$PRODUCT_ID\", \"name\": \"My Example Product\", \"productNumber\": \"$PRODUCT_NUMBER\", @@ -210,28 +210,28 @@ curl -s -X POST "http://127.0.0.1:8000/api/product" \ \"active\": true, \"taxId\": \"$TAX_ID\", \"price\": [ - { + { \"currencyId\": \"$CURRENCY_ID\", \"gross\": 19.99, \"net\": 16.80, \"linked\": true - } - ], + } + ], \"visibilities\": [ - { + { \"salesChannelId\": \"$SALES_CHANNEL_ID\", \"visibility\": 30 - } - ], + } + ], \"categories\": [ - { \"id\": \"$CATEGORY_ID\" } - ] - }" + { \"id\": \"$CATEGORY_ID\" } + ] + }" ``` ### About `visibilities` -Use `visibilities` to assign a product to one or more sales channels and define how visible it should be there. +Use `visibilities` to assign a product to one or more sales channels and define how visible it should be in each channel. Each visibility entry contains: @@ -254,19 +254,19 @@ Verify it: ```bash curl -s -X POST "http://127.0.0.1:8000/api/search/product" \ - -H "Authorization: Bearer $ADMIN_TOKEN" \ + -H "Authorization: Bearer $ADMIN_TOKEN" \ -H "Content-Type: application/json" \ - -H "sw-inheritance: 1" \ + -H "sw-inheritance: 1" \ -d "{ \"ids\": [\"$PRODUCT_ID\"], \"associations\": { \"categories\": {} - }, + }, \"includes\": { \"product\": [\"id\", \"name\", \"productNumber\", \"active\", \"translated\", \"categories\"], \"category\": [\"id\", \"name\"] - } - }" | jq + } + }" | jq ``` The `sw-inheritance` header tells the API to consider parent-child inheritance when reading products and variants. @@ -282,7 +282,7 @@ Get a fresh Store API context: ```bash curl -i "http://127.0.0.1:8000/store-api/context" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" + -H "sw-access-key: $STORE_API_ACCESS_KEY" ``` Look for the `Sw-Context-Token` response header and store its value: @@ -296,7 +296,7 @@ You can also extract it automatically: ```bash STORE_CONTEXT_TOKEN=$(curl -si "http://127.0.0.1:8000/store-api/context" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ | tr -d '\r' | awk -F': ' 'tolower($1)=="sw-context-token" {print $2}') echo "$STORE_CONTEXT_TOKEN" @@ -304,54 +304,54 @@ echo "$STORE_CONTEXT_TOKEN" ## Step 7: Read the product with the Store API -Use a Store API search request with search criteria. An example of searching by term and sorting by name: +Use a Store API search request with search criteria. The following example searches by term and sorts by name: ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/search" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d '{ - "term": "My Example Product", - "limit": 5, - "sort": [ - { "field": "name", "order": "ASC", "naturalSorting": true } - ], - "includes": { - "product": ["id", "name", "translated", "calculatedPrice"] - } - }' | jq + "term": "My Example Product", + "limit": 5, + "sort": [ + { "field": "name", "order": "ASC", "naturalSorting": true } + ], + "includes": { + "product": ["id", "name", "translated", "calculatedPrice"] + } + }' | jq ``` -An example to prove you can find the created product in a storefront-style listing: +The following example shows how to find the product you created in a storefront-style listing: ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/search" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d "{ \"filter\": [ - { \"type\": \"equals\", \"field\": \"active\", \"value\": true }, - { \"type\": \"equals\", \"field\": \"productNumber\", \"value\": \"$PRODUCT_NUMBER\" } - ], + { \"type\": \"equals\", \"field\": \"active\", \"value\": true }, + { \"type\": \"equals\", \"field\": \"productNumber\", \"value\": \"$PRODUCT_NUMBER\" } + ], \"sort\": [ - { \"field\": \"name\", \"order\": \"ASC\" } - ], + { \"field\": \"name\", \"order\": \"ASC\" } + ], \"page\": 1, \"limit\": 10, \"includes\": { \"product\": [\"id\", \"name\", \"productNumber\", \"translated\", \"calculatedPrice\"] - } - }" | jq + } + }" | jq ``` -Useful search-criteria knobs: +Useful search-criteria options: - `includes` restricts the response to the fields you need - `page` and `limit` control pagination - `filter` applies exact or nested filtering -- `term` performs weighted text search +- `term` performs a weighted text search - `sort` controls ordering If your project uses a different Store API search/listing endpoint, confirm the exact path in your local `store-api/_info/openapi3.json`. @@ -362,26 +362,26 @@ Use the product ID from the previous step: ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/checkout/cart/line-item" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d "{ \"items\": [ - { + { \"id\": \"$PRODUCT_ID\", \"referencedId\": \"$PRODUCT_ID\", \"type\": \"product\", \"quantity\": 1 - } - ] - }" | jq + } + ] + }" | jq ``` Verify the cart: ```bash curl -s -X GET "http://127.0.0.1:8000/store-api/checkout/cart" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" | jq ``` @@ -420,9 +420,9 @@ Rule of thumb: - Admin API: create and manage data - Store API: act like a shopper -## Step 10: Register or log in a customer, then place the order +## Step 10: Register or log in as a customer, then place the order -On a typical local setup, `POST /store-api/checkout/order` requires a logged-in customer. If you call it with an anonymous context, Shopware returns `Customer is not logged in.` Register or log in a customer in the current Store API context first. +On a typical local setup, `POST /store-api/checkout/order` requires a logged-in customer. If you call it with an anonymous context, Shopware returns `Customer is not logged in.` First, register a customer or log in within the current Store API context. ### 10.1 Fetch salutationId and countryId @@ -442,9 +442,9 @@ SALUTATION_ID="019d2b446e2573ba9a3ea2d002050cbe" ```bash curl -i -X POST "http://127.0.0.1:8000/store-api/account/register" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d "{ \"salutationId\": \"$SALUTATION_ID\", \"firstName\": \"FirstName\", @@ -460,11 +460,11 @@ curl -i -X POST "http://127.0.0.1:8000/store-api/account/register" \ \"zipcode\": \"12345\", \"city\": \"Test City\", \"countryId\": \"$COUNTRY_ID\" - } - }" + } + }" ``` -Use the latest returned `Sw-Context-Token` header for subsequent requests: +Use the `Sw-Context-Token` value from the response for subsequent requests: ```bash STORE_CONTEXT_TOKEN="REPLACE_ME_WITH_NEW_TOKEN" @@ -476,26 +476,26 @@ After `/store-api/account/register` or `/store-api/account/login`, Shopware may ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/checkout/cart/line-item" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d "{ \"items\": [ - { + { \"id\": \"$PRODUCT_ID\", \"referencedId\": \"$PRODUCT_ID\", \"type\": \"product\", \"quantity\": 1 - } - ] - }" | jq + } + ] + }" | jq ``` Verify that the cart is not empty: ```bash curl -s "http://127.0.0.1:8000/store-api/checkout/cart" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" | jq ``` @@ -503,25 +503,25 @@ curl -s "http://127.0.0.1:8000/store-api/checkout/cart" \ Once the Store API context has: -- a logged-in customer -- a cart with your product -- valid billing and shipping data +- A logged-in customer +- A cart with your product +- Valid billing and shipping data -you can usually place the order directly on a local default setup. If your instance requires an explicit payment or shipping selection first, inspect `/payment-method`, `/shipping-method`, and `/context`. +You can usually place the order directly on a local default setup. If your instance requires an explicit payment or shipping selection first, inspect `/payment-method`, `/shipping-method`, and `/context`. Create the order: ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/checkout/order" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d '{ - "customerComment": "Test order from local API walkthrough" - }' | jq + "customerComment": "Test order from local API walkthrough" + }' | jq ``` -If the cart is empty, Shopware returns: `Cart is empty.` +If the cart is empty, Shopware returns the message: `Cart is empty.` In that case, add the product to the cart again in the current context, then retry the order request. @@ -531,14 +531,14 @@ Some payment methods require an extra payment step after order creation: ```bash curl -s -X POST "http://127.0.0.1:8000/store-api/handle-payment" \ - -H "sw-access-key: $STORE_API_ACCESS_KEY" \ + -H "sw-access-key: $STORE_API_ACCESS_KEY" \ -H "sw-context-token: $STORE_CONTEXT_TOKEN" \ - -H "Content-Type: application/json" \ + -H "Content-Type: application/json" \ -d '{ - "orderId": "REPLACE_ME", - "finishUrl": "http://127.0.0.1:8000/checkout/finish", - "errorUrl": "http://127.0.0.1:8000/checkout/confirm" - }' | jq + "orderId": "REPLACE_ME", + "finishUrl": "http://127.0.0.1:8000/checkout/finish", + "errorUrl": "http://127.0.0.1:8000/checkout/confirm" + }' | jq ``` If `/store-api/handle-payment` returns `"redirectUrl": null`, the selected payment method does not require an additional redirect-based flow. @@ -553,11 +553,11 @@ Your database may not be initialized correctly. Re-run installation and setup. Check all of the following: -- the product is `active` -- the product has a valid `price` -- the product has `visibilities` for your sales channel -- you are using the correct Store API access key -- your Storefront sales channel domain matches your local URL +- The product is `active` +- The product has a valid `price` +- The product has `visibilities` for your sales channel +- You are using the correct Store API access key +- Your Storefront sales channel domain matches your local URL ### Which headers matter most? diff --git a/guides/development/integrations-api/flows/index.md b/guides/development/integrations-api/flows/index.md index 97c8701cf..f32b62e48 100644 --- a/guides/development/integrations-api/flows/index.md +++ b/guides/development/integrations-api/flows/index.md @@ -11,6 +11,6 @@ These guides focus on concrete end-to-end flows where it helps to see API calls ## Available flows -- [Create a Product and Complete Checkout](./create-product.md): Create category and product data with the Admin API, read it through the Store API, add it to a cart, register a customer, place an order, and handle payment if needed. +[Create a Product and Complete Checkout](./create-product.md): Create a category and a product with the Admin API, read them through the Store API, add the product to a cart, register a customer, place an order, and handle payment if needed. More flows to be added over time.