{"id":128,"date":"2024-11-26T11:11:29","date_gmt":"2024-11-26T05:41:29","guid":{"rendered":"https:\/\/surveybackoffice.com\/help\/?page_id=128"},"modified":"2024-11-26T12:32:56","modified_gmt":"2024-11-26T07:02:56","slug":"sbo-apis-surveys","status":"publish","type":"page","link":"https:\/\/surveybackoffice.com\/help\/sbo-apis-surveys\/","title":{"rendered":"Survey Insights API"},"content":{"rendered":"\n<h2>\n\t\tSetup Of API\n\t<\/h2>\n\t<h5>To use SBO&#8217;s Survey Insights API, you can follow the below steps:-<\/h5>\n<ol>\n<li>Goto Your\u00a0<a href=\"https:\/\/app.surveybackoffice.com\/index.php\/admin\/user\/sa\/edit_account\" target=\"_blank\" rel=\"noopener\">Company&#8217;s Accounts Profile Page<\/a><\/li>\n<li>Add An API Password and Save<\/li>\n<li>Goto\u00a0<a href=\"https:\/\/app.surveybackoffice.com\/index.php\/admin\/contact\/index\" target=\"_blank\" rel=\"noopener\">Edit Company (client\/vendor)<\/a><\/li>\n<li>Under the &#8220;SBO&#8217;s Insights Exchange API&#8221; section add ALL under &#8220;Show Projects or Redirection Insights&#8221;<\/li>\n<li>Now share the below credentials with your companies\n<ol>\n<li>From Company&#8217;s Accounts Profile Page, share\u00a0<b>&#8220;API&#8217;s User Name &amp; API Password&#8221;<\/b><\/li>\n<li>From Company&#8217;s Edit Page, share\u00a0<b>&#8220;Secret API Key&#8221;<\/b><\/li>\n<\/ol>\n<\/li>\n<li>Now share the urls (links) credentials with your companies. Base link must be https:\/\/api.surveybackoffice.com\/\n<ol>\n<li>Add on link for getting list of survey\u00a0<b>surveys<\/b>\u00a0where ### is must be the project number<br \/>\nSo the full link must be\u00a0<b>https:\/\/api.surveybackoffice.com\/surveys<\/b><\/li>\n<\/ol>\n<\/li>\n<li>Along with sharing the above credentials the company (user) using the api also needs to set some api headers\n<ol>\n<li>First the header KEY must be\u00a0<b>app-name<\/b>\u00a0and it&#8217;s value must be\u00a0<b>surey back office<\/b><\/li>\n<li>Second the header KEY must be\u00a0<b>app-auth-user<\/b>\u00a0and it&#8217;s value must be\u00a0<b>[API&#8217;s Username]<\/b>\u00a0(shared from the first credential)<\/li>\n<li>Third the header KEY must be\u00a0<b>app-auth-pwd<\/b>\u00a0and it&#8217;s value must be\u00a0<b>[API Password]<\/b>\u00a0(shared from the first credential)<\/li>\n<li>Fourth the header KEY must be\u00a0<b>secret-key<\/b>\u00a0and it&#8217;s value must be\u00a0<b>[Secret API Key]<\/b>\u00a0(shared from the second credential)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2>\n\t\tFilters &#038; Ordering\n\t<\/h2>\n\t<p>The <strong>SBO (Survey Back Office) Insights Exchange<\/strong> APIs facilitates the developers to filter and order the api&#8217;s response data. To use the same, the developer need to pass api headers with their relative key and value(s).<\/p>\n<ul>\n<li>For <strong>filtering data<\/strong>, the developer needs to add <strong>api-addon-where <\/strong>as key and &#8220;field\/column name equals to value&#8221; as value. Note this filters are addon filters and it won&#8217;t overwrite the mandatory where conditions of the apis. Let&#8217;s check an example, let&#8217;s say you want to filter surveys based on the country america then your api headers must contain <strong>api-addon-where: country_name like &#8220;%America%&#8221;<\/strong><\/li>\n<li>For <strong>ordering data<\/strong>, the developer needs to add <strong>api-order <\/strong>as key and &#8220;field\/column&#8221; as value. Note:- This will overwrite the default order of the api. Now lets check an example, let&#8217;s say you want to order data based on project name then your api headers must contain <strong>api-order: project_name&#8221;<\/strong><\/li>\n<\/ul>\n<p>Note: To know the field\/column names you can refer the data that is provided by the api.<\/p>\n<h4>\n\t\tImage Of Sample Setup Done in Postman :-\n\t<\/h4>\n\t\t\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/surveybackoffice.com\/help\/wp-content\/uploads\/2024\/11\/sbo-ie-api-surveys.jpg\" alt=\"Survey Back Office Survey Insights API\" itemprop=\"image\" height=\"496\" width=\"932\" title=\"Survey Back Office Survey Insights API\" onerror=\"this.style.display='none'\"  \/>\n\n","protected":false},"excerpt":{"rendered":"<p>Setup Of API To use SBO&#8217;s Survey Insights API, you can follow the below steps:- Goto Your\u00a0Company&#8217;s Accounts Profile Page [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"boxed","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"_links":{"self":[{"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/pages\/128"}],"collection":[{"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/comments?post=128"}],"version-history":[{"count":7,"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/pages\/128\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/pages\/128\/revisions\/150"}],"wp:attachment":[{"href":"https:\/\/surveybackoffice.com\/help\/wp-json\/wp\/v2\/media?parent=128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}