{"info":{"_postman_id":"458fa60e-351c-e977-9bb5-113ee4f8e9ae","name":"Mastera","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>Mastera is an online knowledge platform for your business. To develop &amp; integrate an application with Mastera, you can use our REST APIs. Our APIs can be used to pull data from your Mastera account or push data into the Mastera account.</p>\n<h1 id=\"overview\">Overview</h1>\n<p>To get started, you'll need to </p>\n<ol>\n<li>Create a paid account with Mastera</li>\n<li>Go to Account Settings &gt; API</li>\n<li>Generate the API Keys and use the API Key &amp; Secret Key for authentication.</li>\n</ol>\n<p>Use <strong><a href=\"https://app.mastera.io/v1/api\">https://app.mastera.io/v1/api</a></strong> for {{base_url}}</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>To use the Mastera API, you need to get an access token in exchange for the API Key &amp; Secret Key.</p>\n<h2 id=\"get-access-token\">Get Access Token</h2>\n<ol>\n<li>Use the API Key &amp; Secret key from within your Account Settings, make a POST request to <a href=\"https://app.mastera.io/api/getAccessToken\">https://app.mastera.io/api/getAccessToken</a> with a JSON object <code>{username:\"API-Key\", password: \"Secret-Key\"}</code>.</li>\n<li>Save the access token you get in the response and use that as a Bearer token for all API requests.</li>\n</ol>\n<h2 id=\"making-api-requests\">Making API Requests</h2>\n<p>Use the access token in the header request as <code>Authorization: Bearer &lt;access-token&gt;</code></p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<ol>\n<li>Status Code 401 - The access token is invalid. Get a new access token.</li>\n<li>Status Code 400 - The request is invalid. Refer \"error\" for more details</li>\n</ol>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<p>You are limited to 1000 calls per day per account. Please reach out to <a href=\"mailto:support@mastera.io\">support@mastera.io</a> if your use case requires more than that.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"},{"content":"Rate limit","slug":"rate-limit"}],"owner":"17419870","collectionId":"458fa60e-351c-e977-9bb5-113ee4f8e9ae","publishedId":"U16htRyG","public":true,"customColor":{"top-bar":"000000","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-09-08T06:35:28.000Z"},"item":[{"name":"getPlans","id":"ce1e0a10-1731-273d-f6e9-90531bf3c14d","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/getPlans","description":"<p>Get a list of all plans in your account</p>\n","urlObject":{"path":["getPlans"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ce1e0a10-1731-273d-f6e9-90531bf3c14d"},{"name":"getCustomers","id":"cd4f06f1-3673-efa1-464a-fd40fb4b640a","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"status\":\"Member\",\n\t\"tags\":\"vip\"\n}"},"url":"{{base_url}}/getCustomers","description":"<p>Get all the customers &amp; prospects in your account. Filter by status (Member or Prospects) and filter by tags (comma separated list)</p>\n","urlObject":{"path":["getCustomers"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd4f06f1-3673-efa1-464a-fd40fb4b640a"},{"name":"getPrograms","id":"9c0bdf6a-5d09-2008-6c3f-4d3382cd3d29","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/getPrograms","description":"<p>Get a list of all programs in your account</p>\n","urlObject":{"path":["getPrograms"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c0bdf6a-5d09-2008-6c3f-4d3382cd3d29"},{"name":"getProgramSignups","id":"ea4fff2c-ffa7-e3f3-c736-90a3b5558c25","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"program\": 53\n}"},"url":"{{base_url}}/getProgramSignups","description":"<p>Get a list of your customers who have joined your program.</p>\n","urlObject":{"path":["getProgramSignups"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ea4fff2c-ffa7-e3f3-c736-90a3b5558c25"},{"name":"getProgramCompleted","id":"b658d148-8ccc-9cae-9401-df32e4e423d1","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"program\": 53\n}"},"url":"https://app.mastera.io/v1/api/getProgramCompleted","description":"<p>Get a list of customers who have completed your program.</p>\n","urlObject":{"protocol":"https","path":["v1","api","getProgramCompleted"],"host":["app","mastera","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"b658d148-8ccc-9cae-9401-df32e4e423d1"},{"name":"getSubscriptions","id":"30310cb0-6a35-2199-f0c7-268ba3aef254","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"plan\": 81\n}"},"url":"{{base_url}}/getSubscriptions","urlObject":{"path":["getSubscriptions"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"30310cb0-6a35-2199-f0c7-268ba3aef254"},{"name":"getClasses","id":"27f135e1-9a0a-7cec-5694-1e9ff505cb02","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/getClasses","description":"<p>Get a list of all classes &amp; schedule in your account</p>\n","urlObject":{"path":["getClasses"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"27f135e1-9a0a-7cec-5694-1e9ff505cb02"},{"name":"getOrders","id":"29c3e0bd-a363-e195-6164-9150d7e209b2","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/getOrders","description":"<p>Get all product orders in your account</p>\n","urlObject":{"path":["getOrders"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"29c3e0bd-a363-e195-6164-9150d7e209b2"},{"name":"updatedOrders","id":"1d53e252-a0ea-d53c-7871-db18b8a7788f","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"status\": \"Completed\"\n}"},"url":"{{base_url}}/updatedOrders","description":"<p>Get all updated orders by order status</p>\n","urlObject":{"path":["updatedOrders"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1d53e252-a0ea-d53c-7871-db18b8a7788f"},{"name":"subscriptionCancelled","id":"77346d2a-e687-2d49-631c-0e47bef18b4f","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":""},"url":"{{base_url}}/subscriptionCancelled","description":"<p>Get all cancelled subscriptions in your account</p>\n","urlObject":{"path":["subscriptionCancelled"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"77346d2a-e687-2d49-631c-0e47bef18b4f"},{"name":"newCustomer","id":"b2eb8c5c-5aec-9b43-6e35-faf7ecffd419","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"name\": \"John Smith\",\n\t\"email\": \"johnsmith@mastera.io\",\n\t\"phone\": \"5129055336\",\n\t\"gender\": \"Male\",\n\t\"status\": \"Prospects\",\n\t\"city\": \"Austin\",\n\t\"state\": \"Tx\",\n\t\"address\": \"10 Pacific Ave\",\n\t\"zipcode\": \"78613\",\n\t\"dob\": \"1990-06-01\",\n\t\"password\": \"a-secure-password\"\n}"},"url":"{{base_url}}/newCustomer","description":"<p>Create a new customer or prospect in your account</p>\n","urlObject":{"path":["newCustomer"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"b2eb8c5c-5aec-9b43-6e35-faf7ecffd419"},{"name":"updateCustomer","id":"70743655-b7b4-d63c-94e0-08e2f6af4afd","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"customer_id\": 486,\n\t\"customer_email\": \"(optional - if customer_id provided)\",\n\t\"phone\":\"\",\n\t\"email\":\"\",\n\t\"tags\":[\"tag1\"],\n\t\"status\": \"Member\",\n\t\"password\": \"(optional - to change)\",\n\t\"notes\":\"\",\n\t\"city\":\"Austin\",\n\t\"state\":\"Tx\",\n\t\"address\":\"10 Pacific Ave\",\n\t\"zipcode\": \"78613\"\n}"},"url":"{{base_url}}/updateCustomer","description":"<p>Update a customer record in your account.</p>\n","urlObject":{"path":["updateCustomer"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"70743655-b7b4-d63c-94e0-08e2f6af4afd"},{"name":"newClassBooking","id":"4797cb21-4c92-de30-97c9-9159051d9708","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"class\": \"132\",\n\t\"date\": \"2021-09-01\",\n\t\"time\":  \"5:00 am\",\n\t\"customer\": \"28891\",\n\t\"override\": 0\n}"},"url":"{{base_url}}/newClassBooking","description":"<p>Add a new class booking for a customer</p>\n","urlObject":{"path":["newClassBooking"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4797cb21-4c92-de30-97c9-9159051d9708"},{"name":"cancelBooking","id":"e4fc0954-2865-aa2c-b336-7fdf5e36cbf6","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"booking_id\": \"05a15715-1057-11ec-8c9d-7e0769d39a0e\"\n}"},"url":"{{base_url}}/cancelBooking","description":"<p>Cancel a class, trainer or appointment booking with a booking ID</p>\n","urlObject":{"path":["cancelBooking"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e4fc0954-2865-aa2c-b336-7fdf5e36cbf6"},{"name":"newSubscription","id":"4181cd4b-9014-a3ce-65ad-1c37d07d4033","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"customer_id\": \"28817\",\n\t\"plan_id\": \"12\",\n\t\"start_date\": \"2021-09-01\",\n\t\"payment_method\": \"Cash / Check\"\n}"},"url":"{{base_url}}/newSubscription","description":"<p>Create a new subscription by attaching a plan to a customer</p>\n","urlObject":{"path":["newSubscription"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4181cd4b-9014-a3ce-65ad-1c37d07d4033"},{"name":"cancelSubscription","id":"e2845791-d519-957e-2fde-23ab2f07317c","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"},{"key":"Authorization","value":"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ0ZXN0dXNlcjpUZXN0OjE2MzEwNzQ3ODEifQ.QlG9bxeqNK0IfsSyHoDLEqotmWbVi-jlfPBIFdaZ7so"}],"body":{"mode":"raw","raw":"{\n\t\"subscription_id\": \"1057\"\n}"},"url":"{{base_url}}/cancelSubscription","description":"<p>Cancel a subscription in your account using the subscription ID.</p>\n","urlObject":{"path":["cancelSubscription"],"host":["{{base_url}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"e2845791-d519-957e-2fde-23ab2f07317c"}]}