Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -66,19 +66,26 @@ 66 66 )))|((( 67 67 The quantity of the specific basket item that the customer selected. 68 68 ))) 69 +|(% colspan="1" %)(% colspan="1" %) 70 +((( 71 +basketItems/element/id 72 +)))|(% colspan="1" %)(% colspan="1" %) 73 +((( 74 +SellableId of the sellable you want to put into the basket. 75 +))) 69 69 |((( 70 -basketItems/type 77 +basketItems/element/type 71 71 )))|((( 72 72 A constant for all Partner Area based shops. Always use "sprd:sellable". 73 73 ))) 74 74 |((( 75 -basketItems/properties 82 +basketItems/element/properties 76 76 )))|((( 77 77 This array of key-value-pairs must always contain values for "size" and "appearance". 78 78 ))) 79 79 |(% colspan="1" %)(% colspan="1" %) 80 80 ((( 81 -basketItems/shop/id 88 +basketItems/element/shop/id 82 82 )))|(% colspan="1" %)(% colspan="1" %) 83 83 ((( 84 84 The id of your shop. ... ... @@ -97,3 +97,274 @@ 97 97 98 98 (% class="auto-cursor-target" %) 99 99 \\ 107 + 108 +(% class="auto-cursor-target" %) 109 += Read a basket = 110 + 111 +|=((( 112 +Method 113 +)))|=((( 114 +URL 115 +)))|=((( 116 +Example 117 +))) 118 +|((( 119 +GET 120 +)))|((( 121 +/api/v1/baskets/<basketId> 122 +)))|((( 123 +[[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"]] 124 +))) 125 + 126 +(% class="auto-cursor-target" %) 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 + 129 +{{code language="js" title="Example Response Payload"}} 130 + 131 +{ 132 + "href" : "https://api.spreadshirt.net/api/v1/baskets/5ad33740-30ad-41b0-846f-9e1f0c6824b5", 133 + "id" : "5ad33740-30ad-41b0-846f-9e1f0c6824b5", 134 + "shop" : 135 + { 136 + "href" : "https://api.spreadshirt.net/api/v1/shops/100488332", 137 + "id" : "100488332" 138 + }, 139 + "currency" : 140 + { 141 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 142 + "id" : "1" 143 + }, 144 + "language" : 145 + { 146 + "href" : "https://api.spreadshirt.net/api/v1/languages/2", 147 + "id" : "2" 148 + }, 149 + "country" : 150 + { 151 + "href" : "https://api.spreadshirt.net/api/v1/countries/1", 152 + "id" : "1" 153 + }, 154 + "shipping" : 155 + { 156 + "price" : 157 + { 158 + "vatExcluded" : 4.16, 159 + "vatIncluded" : 4.99, 160 + "display" : 4.99, 161 + "vat" : 20, 162 + "currency" : 163 + { 164 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 165 + "id" : "1" 166 + } 167 + }, 168 + "priceItem" : 169 + { 170 + "vatExcluded" : 4.16, 171 + "vatIncluded" : 4.99, 172 + "display" : 4.99, 173 + "vat" : 20, 174 + "currency" : 175 + { 176 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 177 + "id" : "1" 178 + } 179 + } 180 + }, 181 + "priceItems" : 182 + { 183 + "vatExcluded" : 14.58, 184 + "vatIncluded" : 17.49, 185 + "display" : 17.49, 186 + "currency" : 187 + { 188 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 189 + "id" : "1" 190 + } 191 + }, 192 + "priceTotal" : 193 + { 194 + "vatExcluded" : 18.74, 195 + "vatIncluded" : 22.48, 196 + "display" : 22.48, 197 + "currency" : 198 + { 199 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 200 + "id" : "1" 201 + } 202 + }, 203 + "basketItems" : 204 + [ 205 + { 206 + "href" : "https://api.spreadshirt.net/api/v1/baskets/5ad33740-30ad-41b0-846f-9e1f0c6824b5/items/672b26f1-e9e5-479b-973a-cfba1d1c8139", 207 + "id" : "672b26f1-e9e5-479b-973a-cfba1d1c8139", 208 + "description" : "Men’s Premium T-Shirt", 209 + "quantity" : 1, 210 + "element" : 211 + { 212 + "id" : "praawgg73zU5gzZN0gaM-812-7", 213 + "type" : "sprd:sellable", 214 + "shop" : 215 + { 216 + "href" : "https://api.spreadshirt.net/api/v1/shops/100488332", 217 + "id" : "100488332" 218 + }, 219 + "properties" : 220 + [ 221 + { 222 + "key" : "size", 223 + "value" : "3" 224 + }, 225 + { 226 + "key" : "sizeLabel", 227 + "value" : "M" 228 + }, 229 + { 230 + "key" : "appearance", 231 + "value" : "2" 232 + }, 233 + { 234 + "key" : "appearanceLabel", 235 + "value" : "black" 236 + }, 237 + { 238 + "key" : "sellable", 239 + "value" : "praawgg73zU5gzZN0gaM-812-7" 240 + }, 241 + { 242 + "key" : "idea", 243 + "value" : "5d22f8ebb264a16f6b87fb6f" 244 + }, 245 + { 246 + "key" : "product", 247 + "value" : "524053687" 248 + }, 249 + { 250 + "key" : "productType", 251 + "value" : "812" 252 + }, 253 + { 254 + "key" : "appearanceLink", 255 + "value" : "http://image.spreadshirtmedia.net/image-server/v1/appearances/2" 256 + } 257 + ] 258 + }, 259 + "shop" : 260 + { 261 + "href" : "https://api.spreadshirt.net/api/v1/shops/100488332", 262 + "id" : "100488332" 263 + }, 264 + "priceItem" : 265 + { 266 + "vatExcluded" : 14.58, 267 + "vatIncluded" : 17.49, 268 + "display" : 17.49, 269 + "vat" : 20, 270 + "currency" : 271 + { 272 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 273 + "id" : "1" 274 + } 275 + }, 276 + "price" : 277 + { 278 + "vatExcluded" : 14.58, 279 + "vatIncluded" : 17.49, 280 + "display" : 17.49, 281 + "vat" : 20, 282 + "currency" : 283 + { 284 + "href" : "https://api.spreadshirt.net/api/v1/currencies/1", 285 + "id" : "1" 286 + } 287 + } 288 + } 289 + ], 290 + "links" : 291 + [ 292 + { 293 + "type" : "defaultCheckout", 294 + "href" : "https://checkout.spreadshirt.de/en?basketId=5ad33740-30ad-41b0-846f-9e1f0c6824b5" 295 + }, 296 + { 297 + "type" : "shopCheckout", 298 + "href" : "https://checkout.spreadshirt.de/en?basketId=5ad33740-30ad-41b0-846f-9e1f0c6824b5&shopId=100488332" 299 + }, 300 + { 301 + "type" : "platformCheckout", 302 + "href" : "https://checkout.spreadshirt.de/en?basketId=5ad33740-30ad-41b0-846f-9e1f0c6824b5" 303 + } 304 + ] 305 +} 306 +{{/code}} 307 + 308 +The most important fields are summarized as follows: 309 + 310 +|=((( 311 +Field 312 +)))|=((( 313 +Description 314 +))) 315 +|((( 316 +shipping/priceItem/display 317 +)))|((( 318 +Assumed shipping price for standard shipping without shipping discounts. (The exact price depends on the customer's location.) 319 +))) 320 +|((( 321 +shipping/price/display 322 +)))|((( 323 +Assumed shipping price for standard shipping with shipping discounts subtracted. (The exact price depends on the customer's location.) 324 +))) 325 +|((( 326 +priceItems/display 327 +)))|((( 328 +Total price of all basket items with discounts already subtracted. 329 +))) 330 +|((( 331 +priceTotal/display 332 +)))|((( 333 +Total price of all basket items (with discounts already subtracted) plus shipping/price/display. This is what you usually want to dispay as **total**. 334 +))) 335 +|((( 336 +basketItems/description 337 +)))|((( 338 +Human-readable product type description. 339 +))) 340 +|((( 341 +basketItems/quantity 342 +)))|((( 343 +This is what you sent when creating the basket. 344 +))) 345 +|((( 346 +basketItems/element/id 347 +)))|((( 348 +This is what you sent when creating the basket. 349 +))) 350 +|((( 351 +basketItems/element/properties 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". 354 +))) 355 +|(% colspan="1" %)(% colspan="1" %) 356 +((( 357 +basketItems/priceItem/display 358 +)))|(% colspan="1" %)(% colspan="1" %) 359 +((( 360 +The price for an item with quantity=1 without taking discounts into account. 361 +))) 362 +|(% colspan="1" %)(% colspan="1" %) 363 +((( 364 +basketItems/price/display 365 +)))|(% colspan="1" %)(% colspan="1" %) 366 +((( 367 +The price for an item with quantity=1 with discounts subtracted. 368 +))) 369 +|(% colspan="1" %)(% colspan="1" %) 370 +((( 371 +links 372 +)))|(% colspan="1" %)(% colspan="1" %) 373 +((( 374 +Use the link with type "shopCheckout" to redirect your customer to Spreadshirt's checkout. 375 +))) 376 + 377 +\\
- Confluence.Code.ConfluencePageClass[0]
-
- id
-
... ... @@ -1,1 +1,1 @@ 1 -282788 581 +28278863 - url
-
... ... @@ -1,1 +1,1 @@ 1 -https://developer.spreadshirt.net/wiki/spaces/API/pages/282788 58/Baskets1 +https://developer.spreadshirt.net/wiki/spaces/API/pages/28278863/Baskets