{"info":{"name":"BudSense Partner API Docs - prod","description":"API functions for BudSense Partner Integrations.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Authentication","description":{"content":"Authentication endpoints for BudSense Partner API."},"item":[{"name":"Get OAuth2 Token","event":[{"listen":"test","script":{"type":"text/javascript","exec":["// This script automatically sets the PartnerToken collection variable","// to the access_token value from the response, so that it can be used in subsequent API requests.","var jsonData = pm.response.json();","if (jsonData.access_token) {","    pm.collectionVariables.set(\"PartnerToken\", jsonData.access_token);","    console.log('PartnerToken has been updated');","}"]}}],"request":{"url":{"raw":"https://auth.partner.mybudsense.com/oauth2/token","protocol":"https","host":["auth","partner","mybudsense","com"],"path":["oauth2","token"]},"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"grant_type","value":"client_credentials"},{"key":"client_id","value":"{{client_id}}"},{"key":"client_secret","value":"{{client_secret}}","type":"secret"},{"key":"scope","value":"budsense/read"}]},"description":"Use this endpoint to obtain an access token for the BudSense Partner API. Response will include an access_token, token_type, and expires_in time in seconds."}}]},{"name":"Locations","item":[{"name":"Get Location Config","request":{"url":{"raw":"https://partner.mybudsense.com/v1/:companyId/location/:locationId","protocol":"https","host":["partner","mybudsense","com"],"path":["v1",":companyId","location",":locationId"]},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{PartnerToken}}","description":"Authentication token from Cognito"},{"key":"Accept","value":"application/json"}],"description":"Retrieves the configuration settings for a specific location within a company."}}],"_postman_isSubFolder":true},{"name":"Partner","item":[{"name":"Get Partner Configuration","request":{"url":{"raw":"https://partner.mybudsense.com/v1/partner","protocol":"https","host":["partner","mybudsense","com"],"path":["v1","partner"]},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{PartnerToken}}","description":"Authentication token from Cognito"},{"key":"Accept","value":"application/json"}],"description":"Retrieves the your partner configuration, including a list of companies and respective locations you have access to."}},{"name":"Update Partner Config","request":{"url":{"raw":"https://partner.mybudsense.com/v1/partner","protocol":"https","host":["partner","mybudsense","com"],"path":["v1","partner"]},"method":"PUT","header":[{"key":"Authorization","value":"Bearer {{PartnerToken}}","description":"Authentication token from Cognito"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"allowedCompanies\": [\n    {\n      \"allowedFields\": {\n        \"badges\": false,\n        \"cannabinoidOverrides\": true,\n        \"displayNameOverrides\": false,\n        \"labels\": false\n      },\n      \"id\": \"many\",\n      \"locations\": [\n        {\n          \"id\": \"previously\",\n          \"name\": \"behind\",\n          \"providerId\": \"other\"\n        }\n      ],\n      \"name\": \"these\",\n      \"provider\": \"host\",\n      \"providerId\": \"nobody\"\n    }\n  ],\n  \"enabled\": true,\n  \"partnerId\": \"all\",\n  \"partnerName\": \"any\",\n  \"webhook\": {\n    \"enabled\": true,\n    \"url\": \"wade\"\n  }\n}"},"description":"Update partner API configuration."}},{"name":"Enable Shared Customer","request":{"url":{"raw":"https://partner.mybudsense.com/v1/partner/enabled-shared-customer","protocol":"https","host":["partner","mybudsense","com"],"path":["v1","partner","enabled-shared-customer"]},"method":"POST","header":[{"key":"Authorization","value":"Bearer {{PartnerToken}}","description":"Authentication token from Cognito"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"provider\": \"DutchieMed\",\n  \"providerId\": \"817076\"\n}"},"description":"Enable partner api access for a shared customer. With the given POS Provider and POS Provider Company ID, the shared customer will be added to the partner's allowed customers list. Allowed Providers: `Cova`, `Greenline`"}}],"_postman_isSubFolder":true},{"name":"Service","item":[{"name":"Health check endpoint","request":{"url":{"raw":"https://partner.mybudsense.com/v1/service/health","protocol":"https","host":["partner","mybudsense","com"],"path":["v1","service","health"]},"method":"GET","header":[{"key":"Authorization","value":"Bearer {{PartnerToken}}","description":"Authentication token from Cognito"},{"key":"Accept","value":"application/json"}],"description":"This endpoint is used to verify that the service is up and running."}}],"_postman_isSubFolder":true},{"name":"Variants","item":[{"name":"Batch Get Variants","request":{"url":{"raw":"https://partner.mybudsense.com/v1/:companyId/variants/batch-get","protocol":"https","host":["partner","mybudsense","com"],"path":["v1",":companyId","variants","batch-get"]},"method":"POST","header":[{"key":"Authorization","value":"Bearer {{PartnerToken}}","description":"Authentication token from Cognito"},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"locationId\": 135430,\n  \"barcodes\": [\n    \"9d2ddac7-cfaf-429b-b4e7-e5db98aa2de7\",\n    \"b9c74b2b-bbbb-45c4-950c-9f9ef8d15ad5\"\n  ],\n  \"skus\": [\n    \"039a8492-9861-4100-affd-44ae91a90ef1\",\n    \"a774b233-78c2-49e1-8522-bd3ca2542501\"\n  ],\n  \"stateCode\": \"MB\"\n}"},"description":"Retrieves a batch of product variants for a specified company and location. You can look up variants using a list of barcodes, a list of SKUs, or a combination of both."}}],"_postman_isSubFolder":true},{"name":"budsense-partner-api","description":{"content":"BudSense Partner API","type":"text/plain"},"_postman_isSubFolder":true}]}
