{
    "componentChunkName": "component---src-templates-article-page-template-js",
    "path": "/concepts/marketplace-api-integration-api/",
    "result": {"data":{"markdownRemark":{"frontmatter":{"title":"Flex Marketplace API and Integration API","slug":"marketplace-api-integration-api","updated":"2019-11-27T00:00:00.000Z","category":"concepts-api-sdk","ingress":"Description of the different Flex APIs and how to choose which one to use","skills":null},"htmlAst":{"type":"root","children":[{"type":"element","tagName":"h2","properties":{"id":"introduction","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#introduction","ariaLabel":"introduction permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Introduction"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Flex provides two different main APIs for interacting with the\nmarketplace and accessing its data: the "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"Marketplace API"}]},{"type":"text","value":" and the\n"},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"Integration API"}]},{"type":"text","value":". In addition, Flex has also the "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"Authentication API"}]},{"type":"text","value":",\nwhich is used to authenticate and obtain access credentials that are\nneeded to access both the Marketplace API and the Integration API."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"when-to-use-the-marketplace-api","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#when-to-use-the-marketplace-api","ariaLabel":"when to use the marketplace api permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"When to use the Marketplace API"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Marketplace API enables all the core interactions that the end users\nof the marketplace participate in. These include signing up as a new\nuser, managing listings, engaging in transactions, messaging, etc. The\nMarketplace API is best suited for building user-facing marketplace UI\napplications, like the marketplace's web site or mobile apps."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"With the Marketplace API, the authenticated party is always the end user\nand all API calls are made in the name of that authenticated user (with\nthe exception of anonymous public access). Therefore, the Marketplace\nAPI allows access to the individual user's own data and any publicly\navailable data. This allows the Marketplace API to be directly called\nfrom a user-controlled device or web browser, which is the case if you\nare using one of the open source\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/operator-guides/concepts/#flex-templates-for-web-ftw"},"children":[{"type":"text","value":"template applications"}]},{"type":"text","value":"\nprovided by Sharetribe."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Marketplace API does not provide access to any data that an\nindividual user should not access, such as other users' private data,\ntransactions, or messages."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The easiest way to access the Marketplace API is to use the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/js-sdk/#flex-sdk-for-javascript"},"children":[{"type":"text","value":"Flex SDK for JavaScript"}]},{"type":"text","value":".\nSee also the\n"},{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/marketplace.html","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"Marketplace API reference documentation"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"when-to-use-the-integration-api","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#when-to-use-the-integration-api","ariaLabel":"when to use the integration api permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"When to use the Integration API"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Integration API allows trusted secure applications to access the\nentire marketplace data: all users, listings, transactions, messages,\netc. Such trusted applications are for example applications that run in\nyour own backend systems or applications meant to be executed by\nauthorized marketplace operators."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"blockquote","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"IMPORTANT"}]},{"type":"text","value":" Never expose your Integration API\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/applications/"},"children":[{"type":"text","value":"application"}]},{"type":"text","value":" credentials to an untrusted\ndevice or application, such as end user's browser or mobile app."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The Integration API is well suited for building the following types of\napplications:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Integrations with other own or 3rd party systems, which can be\nstand-alone or work in combination with the end-user facing\nmarketplace application and provide advanced features"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Custom reporting"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Custom tooling for operators managing the marketplace"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The easiest way to access the Integration API is to use the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/js-sdk/#flex-integration-sdk-for-javascript"},"children":[{"type":"text","value":"Flex Integration SDK for JavaScript"}]},{"type":"text","value":".\nSee also the\n"},{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/integration.html","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"Integration API reference documentation"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"authentication","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#authentication","ariaLabel":"authentication permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Authentication"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Both the Marketplace API and the Integration API require valid "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"access\ntokens"}]},{"type":"text","value":" to be passed in every API request. Applications obtain those\naccess tokens from the Authentication API."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"As a general rule, applications that access the Marketplace API do so by\nauthenticating an end user of the marketplace (via the user' username\nand password), while Integration API applications authenticate using\ntheir own credentials."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"For more details see the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/authentication-api/"},"children":[{"type":"text","value":"Authentication API"}]},{"type":"text","value":" article and the\n"},{"type":"element","tagName":"a","properties":{"href":"https://www.sharetribe.com/api-reference/authentication.html","target":"_blank","rel":["noopener","noreferrer"]},"children":[{"type":"text","value":"API reference documentation"}]},{"type":"text","value":"."}]}],"data":{"quirksMode":false}},"headings":[{"value":"Introduction","depth":2},{"value":"When to use the Marketplace API","depth":2},{"value":"When to use the Integration API","depth":2},{"value":"Authentication","depth":2}]}},"pageContext":{"slug":"marketplace-api-integration-api","category":"concepts-api-sdk"}},
    "staticQueryHashes": ["3794076007","439097193","717698143"]}