{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"optional","examples":{"codes":[]},"method":"get","results":{"codes":[{"language":"text","code":""}]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Convert Price","type":"endpoint","slug":"convert-currency","excerpt":"","body":"##Definition\nhttps<span>://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?{parameters}</span>\n\n<hr>\n\n##Documentation\nThe Convert Price service enables you to convert amounts from a source currency to a target currency.\n[block:html]\n{\n  \"html\": \"<ul class=\\\"nav nav-pills nav-justified\\\">\\n  <li class=\\\"active\\\"><a data-toggle=\\\"pill\\\" href=\\\"#menujson\\\">JSON</a></li>\\n  <li><a data-toggle=\\\"tab\\\" href=\\\"#menuxml\\\">XML</a></li>\\n</ul>\\n<div class=\\\"tab-content\\\">\\n  <div id=\\\"menujson\\\" class=\\\"tab-pane fade in active\\\">\"\n}\n[/block]\n### JSON Request Content\nEnter the following parameters into the web service URL in the format:\n`/services/2/tools/merchant-currency-convertor?from={currency_code}&to={currency_code}&amount={amount}`\n\n  * **from**: 3-letter code of the currency to convert from\n  * **to**: 3-letter code of the currency to convert to\n  * **amount**: Amount to convert\n\nFor example:\n`https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100`\n\n### JSON Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response body contains the converted price.\n\n<hr>\n\n## JSON Examples\n\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100 \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"Convert Price Request: from USD to EUR\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"value\\\": 72.72,\\n  \\\"currency\\\": \\\"EUR\\\",\\n  \\\"formattedPrice\\\": {\\n    \\\"iso\\\": \\\"EUR 72.72\\\",\\n    \\\"symbol\\\": \\\"&#8364;72.72\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Convert Price Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \" </div>\\n <div id=\\\"menuxml\\\" class=\\\"tab-pane fade\\\">\"\n}\n[/block]\n### XML Request Content\nEnter the following parameters into the web service URL in the format:\n`/services/2/tools/merchant-currency-convertor?from={currency_code}&to={currency_code}&amount={amount}`\n\n  * **from**: 3-letter code of the currency to convert from\n  * **to**: 3-letter code of the currency to convert to\n  * **amount**: Amount to convert\n\nFor example:\n`https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100`\n\n### XML Response Details\nIf successful, the response HTTP status code is 200 OK.\nThe response body contains the converted price.\n\n<hr>\n\n## XML Examples\n\n###Request Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -v -X GET https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?from=USD&to=EUR&amount=100 \\\\\\n-H 'Accept: application/xml' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='\",\n      \"language\": \"curl\",\n      \"name\": \"Convert Price Request: from USD to EUR\"\n    }\n  ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/ 1.1 200 OK\\n\\n<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<price xmlns=\\\"http://ws.plimus.com\\\">\\n  <value>72.72</value>\\n  <currency>EUR</currency>\\n  <formatted-price>\\n    <iso>EUR 72.72</iso>\\n    <symbol>€72.72</symbol>\\n  </formatted-price>\\n</price>\",\n      \"language\": \"xml\",\n      \"name\": \"Convert Price Response: 200 OK\"\n    }\n  ]\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"</div>\\n</div>\"\n}\n[/block]\n\n<a class=\"btn btn-primary\" href=\"#\" role=\"button\">Back to Top</a>","updates":[],"order":0,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f076ef5f118570458067cd1","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Convert Currency","slug":"convert-currency","order":4,"from_sync":false,"reference":true,"_id":"5f076ef5f118570458067cc9","version":"5f076ef5f118570458067d0f","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2016-05-17T12:18:56.501Z","__v":0},"user":"560d5913af97231900938124","parentDoc":null,"project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-Tools","version_clean":"8976.0.0-Tools","codename":"3.34.2 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5f076ef5f118570458067cc0","5f076ef5f118570458067cc1","5f076ef5f118570458067cc2","5f076ef5f118570458067cc3","5f076ef5f118570458067cc4","5f076ef5f118570458067cc5","5f076ef5f118570458067cc6","5f076ef5f118570458067cc7","5f076ef5f118570458067cc8","5f076ef5f118570458067cc9","5f076ef5f118570458067cca","5f076ef5f118570458067ccb","5b34c737e0dca2000311de6a","5f076ef5f118570458067ccc","5f076ef5f118570458067ccd","5f076ef5f118570458067cce","5f1f0388102a1500503c17b3"],"_id":"5f076ef5f118570458067d0f","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"5ecfffa62b00c0001886626b","createdAt":"2018-04-23T15:17:35.680Z","releaseDate":"2018-04-23T15:17:35.680Z"},"createdAt":"2016-06-22T18:19:18.352Z","githubsync":"","__v":0}

Definition

https://sandbox.bluesnap.com/services/2/tools/merchant-currency-convertor?{parameters}


Documentation

The Convert Price service enables you to convert amounts from a source currency to a target currency.