Changes for page Baskets

Last modified by Shop Team on 2023/02/13 22:55

<
From version < 3.1 >
edited by Shop Team
on 2019/08/01 12:05
To version < 4.1 >
edited by Shop Team
on 2019/08/01 12:22
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -106,7 +106,7 @@
106 106  \\
107 107  
108 108  (% class="auto-cursor-target" %)
109 -= Read a basket =
109 += Retrieve a basket =
110 110  
111 111  |=(((
112 112  Method
... ... @@ -124,6 +124,22 @@
124 124  )))
125 125  
126 126  (% class="auto-cursor-target" %)
127 +\\
128 +
129 +|=(((
130 +Query Parameter
131 +)))|=(((
132 +Description
133 +)))
134 +|(((
135 +locale
136 +)))|(((
137 +Using values like "en_GB" or "de_DE", this will affect the assumed shipping costs as well as the localized names of "description", "sizeLabel" and "appearanceLabel".
138 +)))
139 +
140 +\\
141 +
142 +(% class="auto-cursor-target" %)
127 127  Given an id obtained from creating a basket, this resource allows to read the basket data and it contains additional information that can be useful to show to the customer.
128 128  
129 129  {{code language="js" title="Example Response Payload"}}
... ... @@ -335,7 +335,7 @@
335 335  |(((
336 336  basketItems/description
337 337  )))|(((
338 -Human-readable product type description.
354 +Human-readable product type description. Depends on the locale parameter.
339 339  )))
340 340  |(((
341 341  basketItems/quantity
... ... @@ -350,7 +350,7 @@
350 350  |(((
351 351  basketItems/element/properties
352 352  )))|(((
353 -Aside from the properties that you sent yourself when creating the basket, this also includes the useful human-readable fields "sizeLabel" and "appearanceLabel".
369 +Aside from the properties that you sent yourself when creating the basket, this also includes the useful human-readable fields "sizeLabel" and "appearanceLabel". These depend on the locale parameter.
354 354  )))
355 355  |(% colspan="1" %)(% colspan="1" %)
356 356  (((
... ... @@ -374,4 +374,33 @@
374 374  Use the link with type "shopCheckout" to redirect your customer to Spreadshirt's checkout.
375 375  )))
376 376  
393 +(% class="auto-cursor-target" %)
377 377  \\
395 +
396 +(% class="auto-cursor-target" %)
397 += Update a basket =
398 +
399 +|=(((
400 +Method
401 +)))|=(((
402 +URL
403 +)))|=(((
404 +Example
405 +)))
406 +|(((
407 +PUT
408 +)))|(((
409 +/api/v1/baskets/<basketId>
410 +)))|(((
411 +[[https:~~/~~/api.spreadshirt.net/api/v1/baskets/5ad33740-30ad-41b0-846f-9e1f0c6824b5?mediaType=json>>url:https://api.spreadshirt.net/api/v1/currencies/1?mediaType=json||shape="rect"]]
412 +)))
413 +
414 +(% class="auto-cursor-target" %)
415 +Allows to update an existing basket by overwriting its content. This works as follows:
416 +
417 +1. Retrieve an existing basket via GET.
418 +1. Modify the response payload according to your needs.
419 +1. Send the modified payload via PUT.
420 +1. In the response body, the result of the update is returned. Save and display this response; an additional GET request is thus not required.
421 +
422 +"Modifying the payload" might mean increasing or decreasing a basket item's quantity, adding or removing basket items from the "basketItems" array. Fields like prices can of course not be set by you. It is irrelevant whether you send them with the PUT request or not. However, you need to know how prices change when you increased an item's quantity - that is what the response body is for.
Confluence.Code.ConfluencePageClass[0]
id
... ... @@ -1,1 +1,1 @@
1 -28278863
1 +28278882
url
... ... @@ -1,1 +1,1 @@
1 -https://developer.spreadshirt.net/wiki/spaces/API/pages/28278863/Baskets
1 +https://developer.spreadshirt.net/wiki/spaces/API/pages/28278882/Baskets