{"_id":"5b19742cb3baf90003cab4f4","category":{"_id":"5b19742cb3baf90003cab4ea","version":"5b19742cb3baf90003cab5ae","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-05-12T14:36:27.755Z","from_sync":false,"order":2,"slug":"shopping-context","title":"Shopping Context"},"project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"user":"560d5913af97231900938124","version":{"_id":"5b19742cb3baf90003cab5ae","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5adf4e59ac13b80003d23152","createdAt":"2018-04-24T15:33:45.744Z","releaseDate":"2018-04-24T15:33:45.744Z","categories":["5b19742cb3baf90003cab4e8","5b19742cb3baf90003cab4e9","5b19742cb3baf90003cab4ea","5b19742cb3baf90003cab4eb","5b19742cb3baf90003cab4ec","5b19742cb3baf90003cab4ed","5b19742cb3baf90003cab4ee","5b19742cb3baf90003cab4ef","5b19742cb3baf90003cab4f0","5b19742cb3baf90003cab4f1","5b19742cb3baf90003cab4f2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.26 Release","version_clean":"8976.0.0-Extended","version":"8976-Extended"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-12T15:05:10.128Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","examples":{"codes":[]},"method":"put","auth":"optional","params":[],"url":""},"isReference":true,"order":1,"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` &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span>, contains the following properties (see [shopping-context](doc:shopping-context)):\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`step` *string* &nbsp;&nbsp;&nbsp;optional\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`web-info` *container* &nbsp;&nbsp;&nbsp;<span style=\"color:#F37500\">**required**</span> (see [web-info](doc:web-info))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`shopper-details` *container* &nbsp;&nbsp;&nbsp;optional (see [shopper-details](doc:shopper-details))\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`order-details` *container* &nbsp;&nbsp;&nbsp;<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>","excerpt":"","slug":"update-shopping-context","type":"endpoint","title":"Update Shopping Context"}

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>'

Response Example

HTTP/ 1.1 204 No Content