@spree/docs 0.1.179 → 0.1.180
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Authenticate Seller API requests with JWTs and the seller header"
|
|
3
|
+
sidebarTitle: "Authentication"
|
|
4
|
+
description: "Authenticate Spree Seller API requests with a seller-audience JWT and select which seller to act as using the X-Spree-Seller-Id header."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The Seller API has exactly one authentication method: a **JWT issued to a signed-in seller**. There is deliberately no secret API key on this branch — a credential that could act as a seller without a seller signing in is exactly what the separate token audience exists to prevent.
|
|
8
|
+
|
|
9
|
+
## Two things every request needs
|
|
10
|
+
|
|
11
|
+
1. `Authorization: Bearer <token>` — the JWT returned by login.
|
|
12
|
+
2. `X-Spree-Seller-Id: <seller_id>` — which seller the signed-in user is acting as.
|
|
13
|
+
|
|
14
|
+
The only authenticated endpoint that does not need the second is `GET /api/v3/seller/me`, because that is what tells the panel which seller to name.
|
|
15
|
+
|
|
16
|
+
## Signing in
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { createSellerClient } from '@spree/seller-sdk'
|
|
20
|
+
|
|
21
|
+
const client = createSellerClient({ baseUrl: 'https://store.example.com' })
|
|
22
|
+
|
|
23
|
+
const { token, user, sellers } = await client.auth.login({
|
|
24
|
+
email: 'seller@example.com',
|
|
25
|
+
password: 'password123',
|
|
26
|
+
})
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The response carries three things: the access token, the team member who signed in, and **every seller this user may act for**.
|
|
30
|
+
|
|
31
|
+
> **NOTE:** The refresh token is **not** in the response body. It is set as an HttpOnly cookie scoped to `/api/v3/seller/auth`, so a session issued for the seller panel cannot be redeemed on any other surface.
|
|
32
|
+
|
|
33
|
+
### Membership is required, not just credentials
|
|
34
|
+
|
|
35
|
+
A marketplace's own staff share the same user class as sellers. Authenticating is therefore not enough: a user who runs no seller is refused with `401`, because issuing a token would hand out an audience its holder can do nothing with.
|
|
36
|
+
|
|
37
|
+
## Choosing a seller
|
|
38
|
+
|
|
39
|
+
A person may run more than one seller — so capability is per seller, and a request that names none has no tenant at all.
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
client.setToken(token)
|
|
43
|
+
client.setSeller(sellers[0].id)
|
|
44
|
+
|
|
45
|
+
// Every subsequent call now carries both headers
|
|
46
|
+
const { data: products } = await client.products.list()
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Sending a seller ID the caller has no role on resolves to nothing, so it reads as **"no such seller"** rather than "denied" — which is also what stops the header being used to enumerate the marketplace's sellers.
|
|
50
|
+
|
|
51
|
+
> **WARNING:** A request with a valid token but no `X-Spree-Seller-Id` header — or one naming a seller the caller does not belong to — is rejected with `403`. There is no fallback to a default seller.
|
|
52
|
+
|
|
53
|
+
## Token audiences
|
|
54
|
+
|
|
55
|
+
Every Spree JWT carries an audience, and each surface accepts only its own:
|
|
56
|
+
|
|
57
|
+
| Surface | Audience | Accepted by |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| Storefront | `store_api` | Store API |
|
|
60
|
+
| Back office | `admin_api` | Admin API |
|
|
61
|
+
| Seller panel | `seller_api` | Seller API |
|
|
62
|
+
|
|
63
|
+
An admin token presented to the Seller API is a `401`, and a seller token presented to the Admin API is likewise refused. The refresh endpoint narrows by audience too, so a refresh token minted elsewhere cannot be exchanged for a seller session.
|
|
64
|
+
|
|
65
|
+
## Refreshing a session
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
const { token } = await client.auth.refresh()
|
|
69
|
+
client.setToken(token)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
No request body and no `Authorization` header — the cookie alone authenticates the call, and a fresh refresh cookie is rotated in.
|
|
73
|
+
|
|
74
|
+
Membership is re-checked here, so a user whose last seller role was revoked mid-session is refused at their next refresh rather than continuing until the access token happens to expire.
|
|
75
|
+
|
|
76
|
+
## Signing out
|
|
77
|
+
|
|
78
|
+
```typescript
|
|
79
|
+
await client.auth.logout()
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Revokes the refresh token server-side and clears the cookie.
|
|
83
|
+
|
|
84
|
+
## Accepting an invitation
|
|
85
|
+
|
|
86
|
+
Someone invited onto a seller's team arrives through an emailed link carrying an invitation ID and a token. Both acceptance endpoints are unauthenticated — the link **is** the credential.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
// Read the invitation to decide what to ask for
|
|
90
|
+
const invitation = await client.auth.lookupInvitation(invitationId, token)
|
|
91
|
+
|
|
92
|
+
// Accept, and land in the panel already signed in
|
|
93
|
+
const { token: jwt, sellers } = await client.auth.acceptInvitation(invitationId, token, {
|
|
94
|
+
password: 'password123',
|
|
95
|
+
password_confirmation: 'password123',
|
|
96
|
+
first_name: 'Robin',
|
|
97
|
+
last_name: 'Ellis',
|
|
98
|
+
})
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The invited email address is never taken from the request — it always comes from the invitation itself, which is what stops the link being redirected to another address.
|
|
102
|
+
|
|
103
|
+
`password` sets a new password when no account exists for that address; when one does, the same field is how the person proves the account is theirs.
|
|
104
|
+
|
|
105
|
+
> **NOTE:** A wrong token is indistinguishable from an unknown invitation: both answer `404`. So does an invitation onto the marketplace's own staff rather than a seller.
|
|
106
|
+
|
|
107
|
+
## Rate limiting
|
|
108
|
+
|
|
109
|
+
Sign-in, refresh, provider discovery, and invitation acceptance are all rate limited, and answer `429` with a `rate_limit_exceeded` code when a client exceeds the window.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Seller API error responses, status codes, and handling"
|
|
3
|
+
sidebarTitle: "Errors"
|
|
4
|
+
description: "Reference for the Spree Seller API error response format, HTTP status codes, and what a 403 versus a 404 means on the seller branch."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The Seller API uses the same error format as the rest of the Spree v3 API. Every error response carries a machine-readable `code` and a human-readable `message`.
|
|
8
|
+
|
|
9
|
+
## Error response format
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"error": {
|
|
14
|
+
"code": "record_not_found",
|
|
15
|
+
"message": "Product not found"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Validation errors include a `details` field with per-field messages:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"error": {
|
|
25
|
+
"code": "validation_error",
|
|
26
|
+
"message": "Validation failed",
|
|
27
|
+
"details": {
|
|
28
|
+
"name": ["can't be blank"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Permission errors name the key the caller was missing:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"error": {
|
|
39
|
+
"code": "access_denied",
|
|
40
|
+
"message": "Missing permission: write_products",
|
|
41
|
+
"details": {
|
|
42
|
+
"required_permission": "write_products"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Status codes
|
|
49
|
+
|
|
50
|
+
| Status | Meaning on the seller branch |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `200` | Success |
|
|
53
|
+
| `201` | Resource created |
|
|
54
|
+
| `204` | Success, no body — deletes and logout |
|
|
55
|
+
| `401` | No token, an expired one, or a token minted for another surface |
|
|
56
|
+
| `403` | Authenticated, but no seller named — or the acting seller's role lacks the permission |
|
|
57
|
+
| `404` | The record does not exist **for this seller** |
|
|
58
|
+
| `422` | Validation failed, or a workflow refused the request |
|
|
59
|
+
| `429` | Rate limit exceeded |
|
|
60
|
+
|
|
61
|
+
## 403 versus 404 — the distinction that matters
|
|
62
|
+
|
|
63
|
+
This is the most important thing to understand about the seller branch, because the two codes answer different questions.
|
|
64
|
+
|
|
65
|
+
**`403` means "you have not told me who you are acting as, or you may not do this."** It comes from one of two places:
|
|
66
|
+
|
|
67
|
+
- No `X-Spree-Seller-Id` header, or one naming a seller the caller has no role on.
|
|
68
|
+
- The acting seller's role lacks the permission key the action requires.
|
|
69
|
+
|
|
70
|
+
**`404` means "no such record, for you."** Every lookup is rooted in the acting seller, so an ID belonging to another seller — or to the marketplace operator — is simply not found.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"error": {
|
|
75
|
+
"code": "record_not_found",
|
|
76
|
+
"message": "Product not found"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This is deliberate. Answering `403` for another seller's product would confirm the record exists, which is how a seller could probe the marketplace's catalog one ID at a time. The seller is never told the difference between "this belongs to someone else" and "this does not exist".
|
|
82
|
+
|
|
83
|
+
## Common error codes
|
|
84
|
+
|
|
85
|
+
| Code | Status | When |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| `authentication_failed` | 401 | Bad credentials, or a user who runs no seller |
|
|
88
|
+
| `invalid_refresh_token` | 401 | The refresh cookie is missing, expired, or for another audience |
|
|
89
|
+
| `access_denied` | 403 | No seller named, or a missing permission key |
|
|
90
|
+
| `record_not_found` | 404 | The record does not belong to the acting seller |
|
|
91
|
+
| `validation_error` | 422 | Model validation failed; see `details` |
|
|
92
|
+
| `processing_error` | 422 | A workflow refused — for example, submitting for review with requirements outstanding |
|
|
93
|
+
| `parameter_missing` | 400 | A required parameter was absent |
|
|
94
|
+
| `rate_limit_exceeded` | 429 | Too many requests to an auth endpoint |
|
|
95
|
+
|
|
96
|
+
## Handling errors with the SDK
|
|
97
|
+
|
|
98
|
+
The SDK throws a `SpreeError` carrying the code, status, and details:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
import { SpreeError } from '@spree/seller-sdk'
|
|
102
|
+
|
|
103
|
+
try {
|
|
104
|
+
await client.products.create({ name: '' })
|
|
105
|
+
} catch (error) {
|
|
106
|
+
if (error instanceof SpreeError) {
|
|
107
|
+
if (error.status === 422) {
|
|
108
|
+
// error.details → { name: ["can't be blank"] }
|
|
109
|
+
showFieldErrors(error.details)
|
|
110
|
+
} else if (error.status === 403) {
|
|
111
|
+
showMessage("You don't have permission to do that.")
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Requirements that block submission
|
|
118
|
+
|
|
119
|
+
Submitting for review with something required still outstanding returns `422` with a message naming what is blocking. The seller's status is unchanged — nothing partial happens.
|
|
120
|
+
|
|
121
|
+
```json
|
|
122
|
+
{
|
|
123
|
+
"error": {
|
|
124
|
+
"code": "processing_error",
|
|
125
|
+
"message": "Add a billing address"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Read the checklist from `GET /api/v3/seller/onboarding` to see each requirement's `status` and whether it is `blocking`.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Spree Seller API introduction and SDK quick start"
|
|
3
|
+
sidebarTitle: "Introduction"
|
|
4
|
+
description: "Overview of the Spree Seller API — the marketplace seller panel for managing a seller's own catalog, team, stock locations, and onboarding."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import { Since } from '/snippets/since.mdx';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
The Seller API is a REST API for the **marketplace seller panel** — where a seller runs their own shop inside someone else's marketplace. It powers a seller's catalog, their team, their stock locations, and the onboarding checklist the marketplace asks them to complete.
|
|
11
|
+
|
|
12
|
+
All routes are prefixed with `/api/v3/seller`. During development the API is available under `http://localhost:3000/api/v3/seller`. For production, replace `http://localhost:3000` with your Spree application URL.
|
|
13
|
+
|
|
14
|
+
## A branch of its own, not a narrowing of the Admin API
|
|
15
|
+
|
|
16
|
+
Sellers never call the Admin API. Every Seller API endpoint is scoped server-side to the seller the request acts as, which makes cross-seller access impossible by construction rather than by rule: a product ID belonging to another seller answers `404`, not `403`.
|
|
17
|
+
|
|
18
|
+
The store is **derived from the seller**, never sent alongside it, so no header a seller controls can widen what they reach.
|
|
19
|
+
|
|
20
|
+
| | Seller API | Admin API |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| **Purpose** | Run one seller's shop | Run the whole marketplace |
|
|
23
|
+
| **Audience** | Marketplace sellers and their staff | The marketplace operator's staff |
|
|
24
|
+
| **Authentication** | Seller JWT only (`seller_api` audience) | Secret API key (`sk_…`) or admin JWT |
|
|
25
|
+
| **Tenancy** | Scoped to the acting seller | Scoped to the store |
|
|
26
|
+
| **Server-to-server credential** | None, by design | Secret API keys |
|
|
27
|
+
|
|
28
|
+
The marketplace operator manages sellers — approving them, reviewing what they submit, setting commission — through the Admin API's own [seller endpoints](../admin-api/introduction.md), not through this API.
|
|
29
|
+
|
|
30
|
+
## Using the SDK
|
|
31
|
+
|
|
32
|
+
We recommend `@spree/seller-sdk` for interacting with the Seller API. It provides typed clients, automatic retries, and handles the seller header for you.
|
|
33
|
+
|
|
34
|
+
### Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install @spree/seller-sdk
|
|
38
|
+
# or
|
|
39
|
+
yarn add @spree/seller-sdk
|
|
40
|
+
# or
|
|
41
|
+
pnpm add @spree/seller-sdk
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Quick start
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { createSellerClient } from '@spree/seller-sdk'
|
|
48
|
+
|
|
49
|
+
const client = createSellerClient({
|
|
50
|
+
baseUrl: 'http://localhost:3000',
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
// Sign in, then pick which seller to act as
|
|
54
|
+
const { token, sellers } = await client.auth.login({
|
|
55
|
+
email: 'seller@example.com',
|
|
56
|
+
password: 'password123',
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
client.setToken(token)
|
|
60
|
+
client.setSeller(sellers[0].id)
|
|
61
|
+
|
|
62
|
+
const { data: products } = await client.products.list({ limit: 25 })
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## What a seller can do
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
- **Catalog** — List, create, update, and delete the products they own outright.
|
|
69
|
+
- **Profile** — Maintain presentation, contact details, addresses, and tax registration.
|
|
70
|
+
- **Team** — Invite colleagues, list the team, and revoke access.
|
|
71
|
+
- **Onboarding** — Read the marketplace's checklist and submit against each requirement.
|
|
72
|
+
- **Stock locations** — Manage where they keep stock, and so where returns are sent.
|
|
73
|
+
- **Uploads** — Presign direct uploads for the documents onboarding asks for.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
## What a seller cannot do
|
|
77
|
+
|
|
78
|
+
Some fields are readable but never writable, because they belong to the marketplace rather than the seller:
|
|
79
|
+
|
|
80
|
+
- **`status`** — the seller lifecycle belongs to the operator's workflows. A seller says they are ready via `POST /api/v3/seller/onboarding/submit_for_review`; the operator decides.
|
|
81
|
+
- **`slug`** — renaming a storefront address would break every link pointing at it.
|
|
82
|
+
- **Settlement and commission terms** — what the marketplace charges is the marketplace's to set.
|
|
83
|
+
- **Tax category, delivery profile, and promotionability on products** — marketplace-wide merchandising settings.
|
|
84
|
+
|
|
85
|
+
Sending these fields is not an error; they are simply ignored.
|
|
@@ -368,13 +368,10 @@ paths:
|
|
|
368
368
|
publishableKey: '<api-key>',
|
|
369
369
|
})
|
|
370
370
|
|
|
371
|
-
const auth = await client.passwordResets.update(
|
|
372
|
-
'
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
password_confirmation: 'newsecurepassword',
|
|
376
|
-
}
|
|
377
|
-
)
|
|
371
|
+
const auth = await client.passwordResets.update('reset-token-from-email', {
|
|
372
|
+
password: 'newsecurepassword',
|
|
373
|
+
password_confirmation: 'newsecurepassword',
|
|
374
|
+
})
|
|
378
375
|
parameters:
|
|
379
376
|
- name: x-spree-api-key
|
|
380
377
|
in: header
|
|
@@ -879,8 +876,8 @@ paths:
|
|
|
879
876
|
example:
|
|
880
877
|
data:
|
|
881
878
|
- id: prod_UkLWZg9DAJ
|
|
882
|
-
name: Product
|
|
883
|
-
slug: product-
|
|
879
|
+
name: Product 1576979
|
|
880
|
+
slug: product-1576979
|
|
884
881
|
meta_title:
|
|
885
882
|
meta_description:
|
|
886
883
|
meta_keywords:
|
|
@@ -1054,8 +1051,8 @@ paths:
|
|
|
1054
1051
|
example:
|
|
1055
1052
|
data:
|
|
1056
1053
|
- id: prod_UkLWZg9DAJ
|
|
1057
|
-
name: Product
|
|
1058
|
-
slug: product-
|
|
1054
|
+
name: Product 2029085
|
|
1055
|
+
slug: product-2029085
|
|
1059
1056
|
meta_title:
|
|
1060
1057
|
meta_description:
|
|
1061
1058
|
meta_keywords:
|
|
@@ -1086,8 +1083,8 @@ paths:
|
|
|
1086
1083
|
original_price:
|
|
1087
1084
|
seller_id:
|
|
1088
1085
|
- id: prod_gbHJdmfrXB
|
|
1089
|
-
name: Product
|
|
1090
|
-
slug: product-
|
|
1086
|
+
name: Product 2038209
|
|
1087
|
+
slug: product-2038209
|
|
1091
1088
|
meta_title:
|
|
1092
1089
|
meta_description:
|
|
1093
1090
|
meta_keywords:
|
|
@@ -1215,8 +1212,8 @@ paths:
|
|
|
1215
1212
|
application/json:
|
|
1216
1213
|
example:
|
|
1217
1214
|
id: prod_UkLWZg9DAJ
|
|
1218
|
-
name: Product
|
|
1219
|
-
slug: product-
|
|
1215
|
+
name: Product 2306885
|
|
1216
|
+
slug: product-2306885
|
|
1220
1217
|
meta_title:
|
|
1221
1218
|
meta_description:
|
|
1222
1219
|
meta_keywords:
|
|
@@ -1565,8 +1562,8 @@ paths:
|
|
|
1565
1562
|
preorder_ships_at:
|
|
1566
1563
|
quantity: 1
|
|
1567
1564
|
currency: USD
|
|
1568
|
-
name: Product
|
|
1569
|
-
slug: product-
|
|
1565
|
+
name: Product 131715
|
|
1566
|
+
slug: product-131715
|
|
1570
1567
|
options_text: ''
|
|
1571
1568
|
price: '10.0'
|
|
1572
1569
|
display_price: "$10.00"
|
|
@@ -1674,8 +1671,8 @@ paths:
|
|
|
1674
1671
|
preorder_ships_at:
|
|
1675
1672
|
quantity: 1
|
|
1676
1673
|
currency: USD
|
|
1677
|
-
name: Product
|
|
1678
|
-
slug: product-
|
|
1674
|
+
name: Product 1322171
|
|
1675
|
+
slug: product-1322171
|
|
1679
1676
|
options_text: ''
|
|
1680
1677
|
price: '10.0'
|
|
1681
1678
|
display_price: "$10.00"
|
|
@@ -1760,9 +1757,7 @@ paths:
|
|
|
1760
1757
|
|
|
1761
1758
|
// Create a cart with items
|
|
1762
1759
|
const cartWithItems = await client.carts.create({
|
|
1763
|
-
items: [
|
|
1764
|
-
{ variant_id: 'variant_abc123', quantity: 2 },
|
|
1765
|
-
],
|
|
1760
|
+
items: [{ variant_id: 'variant_abc123', quantity: 2 }],
|
|
1766
1761
|
})
|
|
1767
1762
|
parameters:
|
|
1768
1763
|
- name: x-spree-api-key
|
|
@@ -1969,7 +1964,7 @@ paths:
|
|
|
1969
1964
|
total_quantity: 0
|
|
1970
1965
|
warnings:
|
|
1971
1966
|
- code: line_item_removed
|
|
1972
|
-
message: Product
|
|
1967
|
+
message: Product 136307 was removed because it was sold out
|
|
1973
1968
|
line_item_id: li_UkLWZg9DAJ
|
|
1974
1969
|
variant_id: variant_UkLWZg9DAJ
|
|
1975
1970
|
coupon_code:
|
|
@@ -2177,8 +2172,8 @@ paths:
|
|
|
2177
2172
|
preorder_ships_at:
|
|
2178
2173
|
quantity: 1
|
|
2179
2174
|
currency: USD
|
|
2180
|
-
name: Product
|
|
2181
|
-
slug: product-
|
|
2175
|
+
name: Product 1373263
|
|
2176
|
+
slug: product-1373263
|
|
2182
2177
|
options_text: ''
|
|
2183
2178
|
price: '10.0'
|
|
2184
2179
|
display_price: "$10.00"
|
|
@@ -2453,8 +2448,8 @@ paths:
|
|
|
2453
2448
|
preorder_ships_at:
|
|
2454
2449
|
quantity: 1
|
|
2455
2450
|
currency: USD
|
|
2456
|
-
name: Product
|
|
2457
|
-
slug: product-
|
|
2451
|
+
name: Product 1398992
|
|
2452
|
+
slug: product-1398992
|
|
2458
2453
|
options_text: ''
|
|
2459
2454
|
price: '10.0'
|
|
2460
2455
|
display_price: "$10.00"
|
|
@@ -2657,8 +2652,8 @@ paths:
|
|
|
2657
2652
|
preorder_ships_at:
|
|
2658
2653
|
quantity: 1
|
|
2659
2654
|
currency: USD
|
|
2660
|
-
name: Product
|
|
2661
|
-
slug: product-
|
|
2655
|
+
name: Product 1424794
|
|
2656
|
+
slug: product-1424794
|
|
2662
2657
|
options_text: ''
|
|
2663
2658
|
price: '10.0'
|
|
2664
2659
|
display_price: "$10.00"
|
|
@@ -2986,8 +2981,8 @@ paths:
|
|
|
2986
2981
|
preorder_ships_at:
|
|
2987
2982
|
quantity: 1
|
|
2988
2983
|
currency: USD
|
|
2989
|
-
name: Product
|
|
2990
|
-
slug: product-
|
|
2984
|
+
name: Product 1684241
|
|
2985
|
+
slug: product-1684241
|
|
2991
2986
|
options_text: ''
|
|
2992
2987
|
price: '10.0'
|
|
2993
2988
|
display_price: "$10.00"
|
|
@@ -3175,8 +3170,8 @@ paths:
|
|
|
3175
3170
|
preorder_ships_at:
|
|
3176
3171
|
quantity: 1
|
|
3177
3172
|
currency: USD
|
|
3178
|
-
name: Product
|
|
3179
|
-
slug: product-
|
|
3173
|
+
name: Product 1703461
|
|
3174
|
+
slug: product-1703461
|
|
3180
3175
|
options_text: ''
|
|
3181
3176
|
price: '10.0'
|
|
3182
3177
|
display_price: "$10.00"
|
|
@@ -3249,11 +3244,16 @@ paths:
|
|
|
3249
3244
|
publishableKey: '<api-key>',
|
|
3250
3245
|
})
|
|
3251
3246
|
|
|
3252
|
-
const cart = await client.carts.fulfillments.update(
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3247
|
+
const cart = await client.carts.fulfillments.update(
|
|
3248
|
+
'cart_abc123',
|
|
3249
|
+
'ful_abc123',
|
|
3250
|
+
{
|
|
3251
|
+
selected_delivery_rate_id: 'dr_abc123',
|
|
3252
|
+
},
|
|
3253
|
+
{
|
|
3254
|
+
token: '<token>',
|
|
3255
|
+
},
|
|
3256
|
+
)
|
|
3257
3257
|
parameters:
|
|
3258
3258
|
- name: x-spree-api-key
|
|
3259
3259
|
in: header
|
|
@@ -3347,8 +3347,8 @@ paths:
|
|
|
3347
3347
|
preorder_ships_at:
|
|
3348
3348
|
quantity: 1
|
|
3349
3349
|
currency: USD
|
|
3350
|
-
name: Product
|
|
3351
|
-
slug: product-
|
|
3350
|
+
name: Product 1728182
|
|
3351
|
+
slug: product-1728182
|
|
3352
3352
|
options_text: ''
|
|
3353
3353
|
price: '10.0'
|
|
3354
3354
|
display_price: "$10.00"
|
|
@@ -3633,8 +3633,8 @@ paths:
|
|
|
3633
3633
|
preorder_ships_at:
|
|
3634
3634
|
quantity: 1
|
|
3635
3635
|
currency: USD
|
|
3636
|
-
name: Product
|
|
3637
|
-
slug: product-
|
|
3636
|
+
name: Product 1745702
|
|
3637
|
+
slug: product-1745702
|
|
3638
3638
|
options_text: ''
|
|
3639
3639
|
price: '10.0'
|
|
3640
3640
|
display_price: "$10.00"
|
|
@@ -3877,8 +3877,8 @@ paths:
|
|
|
3877
3877
|
preorder_ships_at:
|
|
3878
3878
|
quantity: 1
|
|
3879
3879
|
currency: USD
|
|
3880
|
-
name: Product
|
|
3881
|
-
slug: product-
|
|
3880
|
+
name: Product 1789569
|
|
3881
|
+
slug: product-1789569
|
|
3882
3882
|
options_text: ''
|
|
3883
3883
|
price: '10.0'
|
|
3884
3884
|
display_price: "$10.00"
|
|
@@ -3966,12 +3966,16 @@ paths:
|
|
|
3966
3966
|
publishableKey: '<api-key>',
|
|
3967
3967
|
})
|
|
3968
3968
|
|
|
3969
|
-
const cart = await client.carts.items.create(
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3969
|
+
const cart = await client.carts.items.create(
|
|
3970
|
+
'cart_abc123',
|
|
3971
|
+
{
|
|
3972
|
+
variant_id: 'variant_abc123',
|
|
3973
|
+
quantity: 2,
|
|
3974
|
+
},
|
|
3975
|
+
{
|
|
3976
|
+
token: '<token>',
|
|
3977
|
+
},
|
|
3978
|
+
)
|
|
3975
3979
|
parameters:
|
|
3976
3980
|
- name: x-spree-api-key
|
|
3977
3981
|
in: header
|
|
@@ -4021,10 +4025,10 @@ paths:
|
|
|
4021
4025
|
total_quantity: 2
|
|
4022
4026
|
warnings:
|
|
4023
4027
|
- code: delivery_unavailable
|
|
4024
|
-
message: Product
|
|
4028
|
+
message: Product 18163 cannot be delivered to the selected address
|
|
4025
4029
|
line_item_id: li_UkLWZg9DAJ
|
|
4026
4030
|
- code: delivery_unavailable
|
|
4027
|
-
message: Product
|
|
4031
|
+
message: Product 182298 cannot be delivered to the selected address
|
|
4028
4032
|
line_item_id: li_gbHJdmfrXB
|
|
4029
4033
|
coupon_code:
|
|
4030
4034
|
item_total: '29.99'
|
|
@@ -4078,8 +4082,8 @@ paths:
|
|
|
4078
4082
|
preorder_ships_at:
|
|
4079
4083
|
quantity: 1
|
|
4080
4084
|
currency: USD
|
|
4081
|
-
name: Product
|
|
4082
|
-
slug: product-
|
|
4085
|
+
name: Product 18163
|
|
4086
|
+
slug: product-18163
|
|
4083
4087
|
options_text: ''
|
|
4084
4088
|
price: '10.0'
|
|
4085
4089
|
display_price: "$10.00"
|
|
@@ -4109,8 +4113,8 @@ paths:
|
|
|
4109
4113
|
preorder_ships_at:
|
|
4110
4114
|
quantity: 1
|
|
4111
4115
|
currency: USD
|
|
4112
|
-
name: Product
|
|
4113
|
-
slug: product-
|
|
4116
|
+
name: Product 182298
|
|
4117
|
+
slug: product-182298
|
|
4114
4118
|
options_text: ''
|
|
4115
4119
|
price: '19.99'
|
|
4116
4120
|
display_price: "$19.99"
|
|
@@ -4217,11 +4221,16 @@ paths:
|
|
|
4217
4221
|
publishableKey: '<api-key>',
|
|
4218
4222
|
})
|
|
4219
4223
|
|
|
4220
|
-
const cart = await client.carts.items.update(
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4224
|
+
const cart = await client.carts.items.update(
|
|
4225
|
+
'cart_abc123',
|
|
4226
|
+
'li_abc123',
|
|
4227
|
+
{
|
|
4228
|
+
quantity: 5,
|
|
4229
|
+
},
|
|
4230
|
+
{
|
|
4231
|
+
token: '<token>',
|
|
4232
|
+
},
|
|
4233
|
+
)
|
|
4225
4234
|
parameters:
|
|
4226
4235
|
- name: x-spree-api-key
|
|
4227
4236
|
in: header
|
|
@@ -4324,8 +4333,8 @@ paths:
|
|
|
4324
4333
|
preorder_ships_at:
|
|
4325
4334
|
quantity: 1
|
|
4326
4335
|
currency: USD
|
|
4327
|
-
name: Product
|
|
4328
|
-
slug: product-
|
|
4336
|
+
name: Product 1889165
|
|
4337
|
+
slug: product-1889165
|
|
4329
4338
|
options_text: ''
|
|
4330
4339
|
price: '10.0'
|
|
4331
4340
|
display_price: "$10.00"
|
|
@@ -4542,11 +4551,15 @@ paths:
|
|
|
4542
4551
|
publishableKey: '<api-key>',
|
|
4543
4552
|
})
|
|
4544
4553
|
|
|
4545
|
-
const session = await client.carts.paymentSessions.create(
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4554
|
+
const session = await client.carts.paymentSessions.create(
|
|
4555
|
+
'cart_abc123',
|
|
4556
|
+
{
|
|
4557
|
+
payment_method_id: 'pm_abc123',
|
|
4558
|
+
},
|
|
4559
|
+
{
|
|
4560
|
+
token: '<token>',
|
|
4561
|
+
},
|
|
4562
|
+
)
|
|
4550
4563
|
parameters:
|
|
4551
4564
|
- name: x-spree-api-key
|
|
4552
4565
|
in: header
|
|
@@ -4735,11 +4748,16 @@ paths:
|
|
|
4735
4748
|
publishableKey: '<api-key>',
|
|
4736
4749
|
})
|
|
4737
4750
|
|
|
4738
|
-
const session = await client.carts.paymentSessions.update(
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4751
|
+
const session = await client.carts.paymentSessions.update(
|
|
4752
|
+
'cart_abc123',
|
|
4753
|
+
'ps_abc123',
|
|
4754
|
+
{
|
|
4755
|
+
amount: '50.00',
|
|
4756
|
+
},
|
|
4757
|
+
{
|
|
4758
|
+
token: '<token>',
|
|
4759
|
+
},
|
|
4760
|
+
)
|
|
4743
4761
|
parameters: []
|
|
4744
4762
|
responses:
|
|
4745
4763
|
'200':
|
|
@@ -4832,11 +4850,16 @@ paths:
|
|
|
4832
4850
|
publishableKey: '<api-key>',
|
|
4833
4851
|
})
|
|
4834
4852
|
|
|
4835
|
-
const session = await client.carts.paymentSessions.complete(
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4853
|
+
const session = await client.carts.paymentSessions.complete(
|
|
4854
|
+
'cart_abc123',
|
|
4855
|
+
'ps_abc123',
|
|
4856
|
+
{
|
|
4857
|
+
session_result: 'success',
|
|
4858
|
+
},
|
|
4859
|
+
{
|
|
4860
|
+
token: '<token>',
|
|
4861
|
+
},
|
|
4862
|
+
)
|
|
4840
4863
|
parameters:
|
|
4841
4864
|
- name: Idempotency-Key
|
|
4842
4865
|
in: header
|
|
@@ -4915,11 +4938,15 @@ paths:
|
|
|
4915
4938
|
publishableKey: '<api-key>',
|
|
4916
4939
|
})
|
|
4917
4940
|
|
|
4918
|
-
const payment = await client.carts.payments.create(
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4941
|
+
const payment = await client.carts.payments.create(
|
|
4942
|
+
'cart_abc123',
|
|
4943
|
+
{
|
|
4944
|
+
payment_method_id: 'pm_abc123',
|
|
4945
|
+
},
|
|
4946
|
+
{
|
|
4947
|
+
token: '<token>',
|
|
4948
|
+
},
|
|
4949
|
+
)
|
|
4923
4950
|
parameters:
|
|
4924
4951
|
- name: x-spree-api-key
|
|
4925
4952
|
in: header
|
|
@@ -5116,8 +5143,8 @@ paths:
|
|
|
5116
5143
|
preorder_ships_at:
|
|
5117
5144
|
quantity: 1
|
|
5118
5145
|
currency: USD
|
|
5119
|
-
name: Product
|
|
5120
|
-
slug: product-
|
|
5146
|
+
name: Product 2509789
|
|
5147
|
+
slug: product-2509789
|
|
5121
5148
|
options_text: ''
|
|
5122
5149
|
price: '10.0'
|
|
5123
5150
|
display_price: "$10.00"
|
|
@@ -5324,8 +5351,8 @@ paths:
|
|
|
5324
5351
|
preorder_ships_at:
|
|
5325
5352
|
quantity: 1
|
|
5326
5353
|
currency: USD
|
|
5327
|
-
name: Product
|
|
5328
|
-
slug: product-
|
|
5354
|
+
name: Product 252179
|
|
5355
|
+
slug: product-252179
|
|
5329
5356
|
options_text: ''
|
|
5330
5357
|
price: '10.0'
|
|
5331
5358
|
display_price: "$10.00"
|
|
@@ -5388,9 +5415,13 @@ paths:
|
|
|
5388
5415
|
publishableKey: '<api-key>',
|
|
5389
5416
|
})
|
|
5390
5417
|
|
|
5391
|
-
const order = await client.orders.get(
|
|
5392
|
-
|
|
5393
|
-
|
|
5418
|
+
const order = await client.orders.get(
|
|
5419
|
+
'or_abc123',
|
|
5420
|
+
{},
|
|
5421
|
+
{
|
|
5422
|
+
token: '<token>',
|
|
5423
|
+
},
|
|
5424
|
+
)
|
|
5394
5425
|
parameters:
|
|
5395
5426
|
- name: x-spree-api-key
|
|
5396
5427
|
in: header
|
|
@@ -5485,8 +5516,8 @@ paths:
|
|
|
5485
5516
|
preorder_ships_at:
|
|
5486
5517
|
quantity: 1
|
|
5487
5518
|
currency: USD
|
|
5488
|
-
name: Product
|
|
5489
|
-
slug: product-
|
|
5519
|
+
name: Product 192496
|
|
5520
|
+
slug: product-192496
|
|
5490
5521
|
options_text: ''
|
|
5491
5522
|
price: '10.0'
|
|
5492
5523
|
display_price: "$10.00"
|
|
@@ -5675,9 +5706,12 @@ paths:
|
|
|
5675
5706
|
publishableKey: '<api-key>',
|
|
5676
5707
|
})
|
|
5677
5708
|
|
|
5678
|
-
const addresses = await client.customer.addresses.list(
|
|
5679
|
-
|
|
5680
|
-
|
|
5709
|
+
const addresses = await client.customer.addresses.list(
|
|
5710
|
+
{},
|
|
5711
|
+
{
|
|
5712
|
+
token: '<token>',
|
|
5713
|
+
},
|
|
5714
|
+
)
|
|
5681
5715
|
parameters:
|
|
5682
5716
|
- name: x-spree-api-key
|
|
5683
5717
|
in: header
|
|
@@ -6059,11 +6093,15 @@ paths:
|
|
|
6059
6093
|
publishableKey: '<api-key>',
|
|
6060
6094
|
})
|
|
6061
6095
|
|
|
6062
|
-
const address = await client.customer.addresses.update(
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6096
|
+
const address = await client.customer.addresses.update(
|
|
6097
|
+
'addr_abc123',
|
|
6098
|
+
{
|
|
6099
|
+
city: 'Los Angeles',
|
|
6100
|
+
},
|
|
6101
|
+
{
|
|
6102
|
+
token: '<token>',
|
|
6103
|
+
},
|
|
6104
|
+
)
|
|
6067
6105
|
parameters:
|
|
6068
6106
|
- name: x-spree-api-key
|
|
6069
6107
|
in: header
|
|
@@ -6205,9 +6243,12 @@ paths:
|
|
|
6205
6243
|
publishableKey: '<api-key>',
|
|
6206
6244
|
})
|
|
6207
6245
|
|
|
6208
|
-
const cards = await client.customer.creditCards.list(
|
|
6209
|
-
|
|
6210
|
-
|
|
6246
|
+
const cards = await client.customer.creditCards.list(
|
|
6247
|
+
{},
|
|
6248
|
+
{
|
|
6249
|
+
token: '<token>',
|
|
6250
|
+
},
|
|
6251
|
+
)
|
|
6211
6252
|
parameters:
|
|
6212
6253
|
- name: x-spree-api-key
|
|
6213
6254
|
in: header
|
|
@@ -6575,8 +6616,8 @@ paths:
|
|
|
6575
6616
|
preorder_ships_at:
|
|
6576
6617
|
quantity: 1
|
|
6577
6618
|
currency: USD
|
|
6578
|
-
name: Product
|
|
6579
|
-
slug: product-
|
|
6619
|
+
name: Product 1585270
|
|
6620
|
+
slug: product-1585270
|
|
6580
6621
|
options_text: ''
|
|
6581
6622
|
price: '10.0'
|
|
6582
6623
|
display_price: "$10.00"
|
|
@@ -6785,9 +6826,13 @@ paths:
|
|
|
6785
6826
|
publishableKey: '<api-key>',
|
|
6786
6827
|
})
|
|
6787
6828
|
|
|
6788
|
-
const order = await client.customer.orders.get(
|
|
6789
|
-
|
|
6790
|
-
|
|
6829
|
+
const order = await client.customer.orders.get(
|
|
6830
|
+
'or_abc123',
|
|
6831
|
+
{},
|
|
6832
|
+
{
|
|
6833
|
+
token: '<token>',
|
|
6834
|
+
},
|
|
6835
|
+
)
|
|
6791
6836
|
parameters:
|
|
6792
6837
|
- name: x-spree-api-key
|
|
6793
6838
|
in: header
|
|
@@ -6875,8 +6920,8 @@ paths:
|
|
|
6875
6920
|
preorder_ships_at:
|
|
6876
6921
|
quantity: 1
|
|
6877
6922
|
currency: USD
|
|
6878
|
-
name: Product
|
|
6879
|
-
slug: product-
|
|
6923
|
+
name: Product 1605633
|
|
6924
|
+
slug: product-1605633
|
|
6880
6925
|
options_text: ''
|
|
6881
6926
|
price: '10.0'
|
|
6882
6927
|
display_price: "$10.00"
|
|
@@ -7334,13 +7379,16 @@ paths:
|
|
|
7334
7379
|
publishableKey: '<api-key>',
|
|
7335
7380
|
})
|
|
7336
7381
|
|
|
7337
|
-
const customer = await client.customer.update(
|
|
7338
|
-
|
|
7339
|
-
|
|
7340
|
-
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7382
|
+
const customer = await client.customer.update(
|
|
7383
|
+
{
|
|
7384
|
+
first_name: 'John',
|
|
7385
|
+
last_name: 'Doe',
|
|
7386
|
+
metadata: { preferred_contact: 'email' },
|
|
7387
|
+
},
|
|
7388
|
+
{
|
|
7389
|
+
token: '<token>',
|
|
7390
|
+
},
|
|
7391
|
+
)
|
|
7344
7392
|
parameters:
|
|
7345
7393
|
- name: x-spree-api-key
|
|
7346
7394
|
in: header
|
|
@@ -7519,9 +7567,12 @@ paths:
|
|
|
7519
7567
|
publishableKey: '<api-key>',
|
|
7520
7568
|
})
|
|
7521
7569
|
|
|
7522
|
-
const giftCards = await client.customer.giftCards.list(
|
|
7523
|
-
|
|
7524
|
-
|
|
7570
|
+
const giftCards = await client.customer.giftCards.list(
|
|
7571
|
+
{},
|
|
7572
|
+
{
|
|
7573
|
+
token: '<token>',
|
|
7574
|
+
},
|
|
7575
|
+
)
|
|
7525
7576
|
parameters:
|
|
7526
7577
|
- name: x-spree-api-key
|
|
7527
7578
|
in: header
|
|
@@ -7702,11 +7753,14 @@ paths:
|
|
|
7702
7753
|
publishableKey: '<api-key>',
|
|
7703
7754
|
})
|
|
7704
7755
|
|
|
7705
|
-
const session = await client.customer.paymentSetupSessions.create(
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7756
|
+
const session = await client.customer.paymentSetupSessions.create(
|
|
7757
|
+
{
|
|
7758
|
+
payment_method_id: 'pm_abc123',
|
|
7759
|
+
},
|
|
7760
|
+
{
|
|
7761
|
+
token: '<token>',
|
|
7762
|
+
},
|
|
7763
|
+
)
|
|
7710
7764
|
parameters:
|
|
7711
7765
|
- name: x-spree-api-key
|
|
7712
7766
|
in: header
|
|
@@ -7891,9 +7945,13 @@ paths:
|
|
|
7891
7945
|
publishableKey: '<api-key>',
|
|
7892
7946
|
})
|
|
7893
7947
|
|
|
7894
|
-
const session = await client.customer.paymentSetupSessions.complete(
|
|
7895
|
-
|
|
7896
|
-
|
|
7948
|
+
const session = await client.customer.paymentSetupSessions.complete(
|
|
7949
|
+
'pss_abc123',
|
|
7950
|
+
{},
|
|
7951
|
+
{
|
|
7952
|
+
token: '<token>',
|
|
7953
|
+
},
|
|
7954
|
+
)
|
|
7897
7955
|
parameters: []
|
|
7898
7956
|
responses:
|
|
7899
7957
|
'200':
|
|
@@ -7960,9 +8018,12 @@ paths:
|
|
|
7960
8018
|
publishableKey: '<api-key>',
|
|
7961
8019
|
})
|
|
7962
8020
|
|
|
7963
|
-
const credits = await client.customer.storeCredits.list(
|
|
7964
|
-
|
|
7965
|
-
|
|
8021
|
+
const credits = await client.customer.storeCredits.list(
|
|
8022
|
+
{},
|
|
8023
|
+
{
|
|
8024
|
+
token: '<token>',
|
|
8025
|
+
},
|
|
8026
|
+
)
|
|
7966
8027
|
parameters:
|
|
7967
8028
|
- name: x-spree-api-key
|
|
7968
8029
|
in: header
|
|
@@ -8808,9 +8869,12 @@ paths:
|
|
|
8808
8869
|
publishableKey: '<api-key>',
|
|
8809
8870
|
})
|
|
8810
8871
|
|
|
8811
|
-
const wishlists = await client.wishlists.list(
|
|
8812
|
-
|
|
8813
|
-
|
|
8872
|
+
const wishlists = await client.wishlists.list(
|
|
8873
|
+
{},
|
|
8874
|
+
{
|
|
8875
|
+
token: '<token>',
|
|
8876
|
+
},
|
|
8877
|
+
)
|
|
8814
8878
|
parameters:
|
|
8815
8879
|
- name: x-spree-api-key
|
|
8816
8880
|
in: header
|
|
@@ -8899,12 +8963,15 @@ paths:
|
|
|
8899
8963
|
publishableKey: '<api-key>',
|
|
8900
8964
|
})
|
|
8901
8965
|
|
|
8902
|
-
const wishlist = await client.wishlists.create(
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8966
|
+
const wishlist = await client.wishlists.create(
|
|
8967
|
+
{
|
|
8968
|
+
name: 'Birthday Ideas',
|
|
8969
|
+
is_private: true,
|
|
8970
|
+
},
|
|
8971
|
+
{
|
|
8972
|
+
token: '<token>',
|
|
8973
|
+
},
|
|
8974
|
+
)
|
|
8908
8975
|
parameters:
|
|
8909
8976
|
- name: x-spree-api-key
|
|
8910
8977
|
in: header
|
|
@@ -9058,11 +9125,15 @@ paths:
|
|
|
9058
9125
|
publishableKey: '<api-key>',
|
|
9059
9126
|
})
|
|
9060
9127
|
|
|
9061
|
-
const wishlist = await client.wishlists.update(
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9128
|
+
const wishlist = await client.wishlists.update(
|
|
9129
|
+
'wl_abc123',
|
|
9130
|
+
{
|
|
9131
|
+
name: 'Updated Name',
|
|
9132
|
+
},
|
|
9133
|
+
{
|
|
9134
|
+
token: '<token>',
|
|
9135
|
+
},
|
|
9136
|
+
)
|
|
9066
9137
|
parameters:
|
|
9067
9138
|
- name: x-spree-api-key
|
|
9068
9139
|
in: header
|
|
@@ -9167,12 +9238,16 @@ paths:
|
|
|
9167
9238
|
publishableKey: '<api-key>',
|
|
9168
9239
|
})
|
|
9169
9240
|
|
|
9170
|
-
const item = await client.wishlists.items.create(
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9241
|
+
const item = await client.wishlists.items.create(
|
|
9242
|
+
'wl_abc123',
|
|
9243
|
+
{
|
|
9244
|
+
variant_id: 'variant_abc123',
|
|
9245
|
+
quantity: 1,
|
|
9246
|
+
},
|
|
9247
|
+
{
|
|
9248
|
+
token: '<token>',
|
|
9249
|
+
},
|
|
9250
|
+
)
|
|
9176
9251
|
parameters:
|
|
9177
9252
|
- name: x-spree-api-key
|
|
9178
9253
|
in: header
|
|
@@ -9203,7 +9278,7 @@ paths:
|
|
|
9203
9278
|
variant:
|
|
9204
9279
|
id: variant_gbHJdmfrXB
|
|
9205
9280
|
product_id: prod_gbHJdmfrXB
|
|
9206
|
-
sku: SKU-
|
|
9281
|
+
sku: SKU-306
|
|
9207
9282
|
options_text: ''
|
|
9208
9283
|
track_inventory: true
|
|
9209
9284
|
media_count: 0
|