{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"optional","results":{"codes":[]},"settings":"","examples":{"codes":[]},"method":"put","params":[]},"next":{"description":"","pages":[]},"title":"Update Shopping Context","type":"endpoint","slug":"update-shopping-context","excerpt":"","body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/shopping-context/:order-id</span>\n\n<hr>\n\n##Documentation\nThe Update Shopping Context request enables you to complete the purchase by changing the value of the `step` parameter from **CREATED** to **PLACED**. \n\nIf this transaction uses a credit card, this update action will capture the funds.\n[block:callout]\n{\n \"type\": \"info\",\n \"body\": \"This is the only change that can be made to an existing shopping-context entity.\"\n}\n[/block]\n###Request Content\n`shopping-context` <span style=\"color:#F37500\">**required**</span>, contains the following properties (see [shopping-context](doc:shopping-context)):\n `step` *string* optional\n `web-info` *container* <span style=\"color:#F37500\">**required**</span> (see [web-info](doc:web-info))\n `shopper-details` *container* optional (see [shopper-details](doc:shopper-details))\n `order-details` *container* <span style=\"color:#F37500\">**required**</span> (see [order-details](doc:order-details))\n\n\n###Response Details\nIf successful, the response HTTP status code is 204 No Content.\nThere is no content in the response body.\nFor details about possible errors, see: [General Errors](doc:general-errors), [Payment & Processor Errors](doc:payment-errors).\n\n<hr>\n\n##Examples\n\n###Request Example\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/shopping-context/3911691 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\\n<shopping-context xmlns=\\\"http://ws.plimus.com\\\">\\n <step>PLACED</step>\\n <web-info>\\n <ip>62.219.121.253</ip>\\n <remote-host>www.merchant.com</remote-host>\\n <user-agent>Mozilla/5.0 (Linux; X11)</user-agent>\\n </web-info>\\n <order-details>\\n <order>\\n <ordering-shopper>\\n <shopper-id>19347421</shopper-id>\\n </ordering-shopper>\\n <cart>\\n <cart-item>\\n <sku>\\n <sku-id>2117474</sku-id>\\n <sku-charge-price>\\n <charge-type>initial</charge-type>\\n <amount>50.00</amount>\\n <currency>USD</currency>\\n </sku-charge-price>\\n </sku>\\n <quantity>1</quantity>\\n <item-sub-total>50.00</item-sub-total>\\n </cart-item>\\n <tax>0.00</tax>\\n <total-cart-cost>50.00</total-cart-cost>\\n </cart>\\n <expected-total-price>\\n <amount>50.00</amount>\\n <currency>USD</currency>\\n </expected-total-price>\\n </order>\\n </order-details>\\n</shopping-context>'\",\n \"language\": \"curl\",\n \"name\": \"Update Shopping Context Request: place order\"\n }\n ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"HTTP/ 1.1 204 No Content\",\n \"language\": \"http\",\n \"name\": \"Update Shopping Context Response\"\n }\n ]\n}\n[/block]\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>","updates":[],"order":1,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5c742637ad58c70033b9c6a5","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Shopping Context","slug":"shopping-context","order":2,"from_sync":false,"reference":true,"_id":"5c742637ad58c70033b9c69b","version":"5c742637ad58c70033b9c762","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2016-05-12T14:36:27.755Z","__v":0},"project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"user":"560d5913af97231900938124","version":{"version":"8976-Extended","version_clean":"8976.0.0-Extended","codename":"Main","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5c742637ad58c70033b9c699","5c742637ad58c70033b9c69a","5c742637ad58c70033b9c69b","5c742637ad58c70033b9c69c","5c742637ad58c70033b9c69d","5c742637ad58c70033b9c69e","5c742637ad58c70033b9c69f","5c742637ad58c70033b9c6a0","5c742637ad58c70033b9c6a1","5c742637ad58c70033b9c6a2","5c742637ad58c70033b9c6a3"],"_id":"5c742637ad58c70033b9c762","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5bedbcf19b49e8004462d199","createdAt":"2018-04-24T15:33:45.744Z","releaseDate":"2018-04-24T15:33:45.744Z"},"createdAt":"2016-05-12T15:05:10.128Z","githubsync":"","__v":0}
putUpdate Shopping Context
Definition
https://sandbox.bluesnap.com/services/2/shopping-context/:order-id
Documentation
The Update Shopping Context request enables you to complete the purchase by changing the value of the step
parameter from CREATED to PLACED.
If this transaction uses a credit card, this update action will capture the funds.
This is the only change that can be made to an existing shopping-context entity.
Request Content
shopping-context
required, contains the following properties (see shopping-context):
step
string optional
web-info
container required (see web-info)
shopper-details
container optional (see shopper-details)
order-details
container required (see order-details)
Response Details
If successful, the response HTTP status code is 204 No Content.
There is no content in the response body.
For details about possible errors, see: General Errors, Payment & Processor Errors.
Examples
Request Example
curl -v -X PUT https://sandbox.bluesnap.com/services/2/shopping-context/3911691 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<shopping-context xmlns="http://ws.plimus.com">
<step>PLACED</step>
<web-info>
<ip>62.219.121.253</ip>
<remote-host>www.merchant.com</remote-host>
<user-agent>Mozilla/5.0 (Linux; X11)</user-agent>
</web-info>
<order-details>
<order>
<ordering-shopper>
<shopper-id>19347421</shopper-id>
</ordering-shopper>
<cart>
<cart-item>
<sku>
<sku-id>2117474</sku-id>
<sku-charge-price>
<charge-type>initial</charge-type>
<amount>50.00</amount>
<currency>USD</currency>
</sku-charge-price>
</sku>
<quantity>1</quantity>
<item-sub-total>50.00</item-sub-total>
</cart-item>
<tax>0.00</tax>
<total-cart-cost>50.00</total-cart-cost>
</cart>
<expected-total-price>
<amount>50.00</amount>
<currency>USD</currency>
</expected-total-price>
</order>
</order-details>
</shopping-context>'
HTTP/ 1.1 204 No Content