{"id":"d54e611b-083c-465a-ba14-63dfcdacb698","name":"ListHub API - Publisher Examples","description":"","auth":{"type":"bearer","bearer":[{"key":"token","value":""}]},"events":[{"listen":"prerequest","script":{"id":"eb386a30-ed4e-4e8a-9692-6e744c767c08","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"64bad325-080f-405f-b1ed-67ba949ca886","type":"text/javascript","exec":[""]}}],"variables":[{"key":"lh_client_id","value":"public_sandbox","disabled":false},{"key":"lh_client_secret","value":"public_sandbox","disabled":false},{"key":"lh_bearer_token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImNsaWVudElkIjoicHVibGljX3NhbmRib3giLCJjaGFubmVsSWQiOjAsInNjaGVtYVByZWZpeCI6InB1YmxpY19zYW5kYm94XCIuXCJyZXNvXyIsInNjaGVtYVN1ZmZpeCI6IiIsImNoYW5uZWxOYW1lIjoicHVibGljX3NhbmRib3gifSwiaWF0IjoxNTc5NDAzMjc4LCJleHAiOjE1Nzk0MjQ4NzgsImF1ZCI6ImFscGhhLmxpc3RodWIuY29tIiwiaXNzIjoiYWxwaGEubGlzdGh1Yi5jb20iLCJzdWIiOiJwdWJsaWNfc2FuZGJveCJ9.09nx25DSjweDYCeXlxNcazkon9tz_G1JRaZWfvM4e2c","disabled":false}],"order":["42388f98-f91b-4865-bf70-bf2c04974a08","f1f6e4cf-d3c8-449e-a393-c182586e9c8c","8b9c2963-a1db-4d7d-8071-f6a8ec63e372","8173639d-fc22-4b46-8d15-bc34166702af","d355206b-0136-4f48-9645-0409b792f4d9","6bb393d9-c92a-4e00-9b1e-37472f464cca","757764af-998c-4346-b856-5495286ba77a","f7a910a6-0ccf-45c5-ac22-487a1ca15da5","a558f69f-d254-419e-9812-648c8aafd8b4","9dc0713e-70a7-4fbe-aaf9-273360562c95","a2ac620a-21da-45b2-972b-59f8c98b5a91"],"folders_order":[],"protocolProfileBehavior":{},"folders":[],"requests":[{"id":"42388f98-f91b-4865-bf70-bf2c04974a08","name":"Oauth token","url":"https://api.listhub.com/oauth2/token","description":"","data":[{"key":"grant_type","value":"client_credentials","description":null,"type":"text","enabled":true},{"key":"client_id","value":"{{lh_client_id}}","description":null,"type":"text","enabled":true},{"key":"client_secret","value":"{{lh_client_secret}}","description":null,"type":"text","enabled":true}],"dataOptions":null,"dataMode":"urlencoded","headerData":[{"description":null,"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"method":"POST","pathVariableData":[],"queryParams":[],"auth":null,"events":[{"listen":"test","script":{"id":"f11bf62e-72c9-482e-bcb5-54603457c2f2","exec":["pm.test(\"Test 1\", function() {","    let jsonData = JSON.parse(responseBody); ","    console.log(jsonData);","    pm.collectionVariables.set(\"lh_bearer_token\", jsonData.access_token);","});",""],"type":"text/javascript"}}],"folder":null,"preRequestScript":null,"tests":"pm.test(\"Test 1\", function() {\n    let jsonData = JSON.parse(responseBody); \n    console.log(jsonData);\n    pm.collectionVariables.set(\"lh_bearer_token\", jsonData.access_token);\n});\n","currentHelper":null,"helperAttributes":null,"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"Content-Type: application/x-www-form-urlencoded\n","pathVariables":{}},{"id":"6bb393d9-c92a-4e00-9b1e-37472f464cca","name":"Get listings - $filter by date","url":"https://api.listhub.com/odata/Property?$filter=date(ModificationTimestamp) gt 2020-01-01&$top=100","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"$filter","value":"date(ModificationTimestamp) gt 2020-01-01","equals":true,"description":"","enabled":true},{"key":"$top","value":"100","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"757764af-998c-4346-b856-5495286ba77a","name":"Get listings - $filter by enumerated values","url":"https://api.listhub.com/odata/Property?$top=10&$filter=Flooring has PropertyEnums.Flooring'Wood'","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"$top","value":"10","equals":true,"description":"","enabled":true},{"key":"$filter","value":"Flooring has PropertyEnums.Flooring'Wood'","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"8173639d-fc22-4b46-8d15-bc34166702af","name":"Get listings - using $select","url":"https://api.listhub.com/odata/Property?$top=100&$select=ListingKey,ListPrice","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"$top","value":"100","equals":true,"description":"","enabled":true},{"key":"$select","value":"ListingKey,ListPrice","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"8b9c2963-a1db-4d7d-8071-f6a8ec63e372","name":"Get listings","url":"https://api.listhub.com/odata/Property?$top=100","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"$top","value":"100","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"9dc0713e-70a7-4fbe-aaf9-273360562c95","name":"Replication/bulk endpoint - full sync","url":"https://replication.listhub.com/query?limit=100","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"limit","value":"100","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"a2ac620a-21da-45b2-972b-59f8c98b5a91","name":"Replication/bulk endpoint - using select","url":"https://replication.listhub.com/query?limit=100&select=ListingKey","description":"This example shows you how you can use the select parameter to download ListingKey, so you can cleanup old/stale listings on your database.","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"limit","value":"100","equals":true,"description":"","enabled":true},{"key":"select","value":"ListingKey","description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"a558f69f-d254-419e-9812-648c8aafd8b4","name":"Replication/bulk endpoint - checking metadata","url":"https://replication.listhub.com/metadata","description":"You can use this request to check when listings in your feed have been last updated","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"d355206b-0136-4f48-9645-0409b792f4d9","name":"Get listings - $filter","url":"https://api.listhub.com/odata/Property?$filter=ListPrice gt 100000 and StandardStatus eq 'Active'&$top=100","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"$filter","value":"ListPrice gt 100000 and StandardStatus eq 'Active'","equals":true,"description":"","enabled":true},{"key":"$top","value":"100","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"f1f6e4cf-d3c8-449e-a393-c182586e9c8c","name":"Get metadata","url":"https://api.listhub.com/odata/$metadata","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[],"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{lh_bearer_token}}"}]},"events":[],"folder":null,"protocolProfileBehavior":{"followAuthorizationHeader":true},"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}},{"id":"f7a910a6-0ccf-45c5-ac22-487a1ca15da5","name":"Get listings - $filter by nested properties","url":"https://api.listhub.com/odata/Property?$filter=CustomFields/ListOfficeCity eq 'Lake Dedric'&$top=100","description":"","data":null,"dataOptions":null,"dataMode":null,"headerData":[],"method":"GET","pathVariableData":[],"queryParams":[{"key":"$filter","value":"CustomFields/ListOfficeCity eq 'Lake Dedric'","equals":true,"description":"","enabled":true},{"key":"$top","value":"100","equals":true,"description":"","enabled":true}],"auth":{"bearer":[{"key":"token","value":"{{lh_bearer_token}}"}],"type":"bearer"},"events":[],"folder":null,"currentHelper":"bearerAuth","helperAttributes":{"id":"bearer","token":"{{lh_bearer_token}}"},"collectionId":"d54e611b-083c-465a-ba14-63dfcdacb698","headers":"","pathVariables":{}}]}