{"_id":"5bcf3922e8455d049c357e1b","category":{"_id":"5bcf3922e8455d049c357e10","version":"5bcf3922e8455d049c357ed7","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","user":"560d5913af97231900938124","parentDoc":null,"version":{"_id":"5bcf3922e8455d049c357ed7","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5b8ec6a1f8dd7c0003386069","createdAt":"2018-04-24T15:33:45.744Z","releaseDate":"2018-04-24T15:33:45.744Z","categories":["5bcf3922e8455d049c357e0e","5bcf3922e8455d049c357e0f","5bcf3922e8455d049c357e10","5bcf3922e8455d049c357e11","5bcf3922e8455d049c357e12","5bcf3922e8455d049c357e13","5bcf3922e8455d049c357e14","5bcf3922e8455d049c357e15","5bcf3922e8455d049c357e16","5bcf3922e8455d049c357e17","5bcf3922e8455d049c357e18"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"3.27.2 Release","version_clean":"8976.0.0-Extended","version":"8976-Extended"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-05-12T15:05:22.116Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"get","results":{"codes":[]},"settings":"","auth":"optional","params":[],"url":""},"isReference":true,"order":2,"body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/shopping-context/:order-id|:seller-order-id,:seller-id</span>\n\n<hr>\n\n##Documentation\nThe Retrieve Shopping Context request enables you to retrieve details about an existing shopping-context order.\n\n###Request Content\n**Retrieve based on order ID in BlueSnap**\nEnter the `order-id` into the web service URL, in the format:\n`services/2/shopping-context/{order-id}`\n\nFor example:\n`services/2/shopping-context/56765`\n\n\n**Retrieve based on seller order ID**\nEnter the unique ID that you assigned to the order (the `seller-order-id`), **and** your seller ID in BlueSnap (`seller-id`) into the web service URL, in the format:\n`services/2/shopping-context/{seller-order-id},{seller-id}`\n\nFor example:\n`services/2/shopping-context/321654987,111222`\n\n###Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response contains the retrieved `shopping-context` resource (see [shopping-context](doc:shopping-context)).\nFor details about possible errors, see: [General Errors](doc:general-errors).\n\n<hr>\n\n##Examples\n\n###Request Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/shopping-context/3911691 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"Retrieve Shopping Context Request: by order ID\"\n    },\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/shopping-context/36642950,391768 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"by seller order ID\"\n    }\n  ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<shopping-context xmlns=\\\"http://ws.plimus.com\\\">\\n  <step>CREATED</step>\\n  <order-details>\\n    <order>\\n      <order-id>3911691</order-id>\\n      <ordering-shopper>\\n        <shopper-id>19494204</shopper-id>\\n      </ordering-shopper>\\n      <cart>\\n        <charged-currency>USD</charged-currency>\\n        <cart-item>\\n          <sku>\\n            <sku-id>2178316</sku-id>\\n            <sku-name>SKU Example</sku-name>\\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        <tax-rate>0</tax-rate>\\n        <total-cart-cost>50.00</total-cart-cost>\\n      </cart>\\n    </order>\\n  </order-details>\\n</shopping-context>\",\n      \"language\": \"xml\",\n      \"name\": \"Retrieve Shopping Context Response: by order ID\"\n    },\n    {\n      \"code\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\n<shopping-context xmlns=\\\"http://ws.plimus.com\\\">\\n  <step>CREATED</step>\\n  <order-details>\\n    <order>\\n      <order-id>3979819</order-id>\\n      <seller-order-id>36642950</seller-order-id>\\n      <ordering-shopper>\\n        <shopper-id>19562772</shopper-id>\\n      </ordering-shopper>\\n      <transaction-payment-info>\\n        <paypal-info>\\n          <url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-8MC833727L375390A</url>\\n        </paypal-info>\\n      </transaction-payment-info>\\n      <cart>\\n        <charged-currency>USD</charged-currency>\\n        <cart-item>\\n          <sku>\\n            <sku-id>2186520</sku-id>\\n            <sku-name>recurring</sku-name>\\n          </sku>\\n          <quantity>1</quantity>\\n          <item-sub-total>0.00</item-sub-total>\\n        </cart-item>\\n        <tax>0.00</tax>\\n        <tax-rate>0</tax-rate>\\n        <total-cart-cost>0.00</total-cart-cost>\\n      </cart>\\n    </order>\\n  </order-details>\\n</shopping-context>\",\n      \"language\": \"xml\",\n      \"name\": \"by seller order ID\"\n    }\n  ]\n}\n[/block]\n<br>\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>","excerpt":"","slug":"retrieve-shopping-context","type":"endpoint","title":"Retrieve Shopping Context"}

getRetrieve Shopping Context


Definition

https://sandbox.bluesnap.com/services/2/shopping-context/:order-id|:seller-order-id,:seller-id


Documentation

The Retrieve Shopping Context request enables you to retrieve details about an existing shopping-context order.

Request Content

Retrieve based on order ID in BlueSnap
Enter the order-id into the web service URL, in the format:
services/2/shopping-context/{order-id}

For example:
services/2/shopping-context/56765

Retrieve based on seller order ID
Enter the unique ID that you assigned to the order (the seller-order-id), and your seller ID in BlueSnap (seller-id) into the web service URL, in the format:
services/2/shopping-context/{seller-order-id},{seller-id}

For example:
services/2/shopping-context/321654987,111222

Response Details

If successful, the response HTTP status code is 200 OK.
The response contains the retrieved shopping-context resource (see shopping-context).
For details about possible errors, see: General Errors.


Examples

Request Examples

curl -v -X GET https://sandbox.bluesnap.com/services/2/shopping-context/3911691 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X GET https://sandbox.bluesnap.com/services/2/shopping-context/36642950,391768 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Examples

<?xml version="1.0" encoding="UTF-8"?>
<shopping-context xmlns="http://ws.plimus.com">
  <step>CREATED</step>
  <order-details>
    <order>
      <order-id>3911691</order-id>
      <ordering-shopper>
        <shopper-id>19494204</shopper-id>
      </ordering-shopper>
      <cart>
        <charged-currency>USD</charged-currency>
        <cart-item>
          <sku>
            <sku-id>2178316</sku-id>
            <sku-name>SKU Example</sku-name>
            <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>
        <tax-rate>0</tax-rate>
        <total-cart-cost>50.00</total-cart-cost>
      </cart>
    </order>
  </order-details>
</shopping-context>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<shopping-context xmlns="http://ws.plimus.com">
  <step>CREATED</step>
  <order-details>
    <order>
      <order-id>3979819</order-id>
      <seller-order-id>36642950</seller-order-id>
      <ordering-shopper>
        <shopper-id>19562772</shopper-id>
      </ordering-shopper>
      <transaction-payment-info>
        <paypal-info>
          <url>https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_express-checkout&token=EC-8MC833727L375390A</url>
        </paypal-info>
      </transaction-payment-info>
      <cart>
        <charged-currency>USD</charged-currency>
        <cart-item>
          <sku>
            <sku-id>2186520</sku-id>
            <sku-name>recurring</sku-name>
          </sku>
          <quantity>1</quantity>
          <item-sub-total>0.00</item-sub-total>
        </cart-item>
        <tax>0.00</tax>
        <tax-rate>0</tax-rate>
        <total-cart-cost>0.00</total-cart-cost>
      </cart>
    </order>
  </order-details>
</shopping-context>