{"info":{"_postman_id":"df9c7deb-8a58-4ca5-9f68-8e03797eb9b8","name":"aMember PRO API v2##","description":"<html><head></head><body><p><strong>aMember PRO</strong> REST API v2 server uses [ OAuth 2.0 ][ <a href=\"https://oauth.net/2\">https://oauth.net/2</a> ] protocol to authorize requests. \nAuthorisation server supports these grant types: \n<strong>password</strong>, <strong>client_credentials</strong>, <strong>authorization_code</strong>, <strong>refresh_token</strong></p>\n<h2 id=\"configuration\">Configuration</h2>\n<p>Download oauth module from your [ amember.com account ][ <a href=\"http://www.amember.com/amember/member\">http://www.amember.com/amember/member</a> ]</p>\n<p>Install and enable module in your aMember CP -&gt; Setup -&gt; Plugins</p>\n<h4 id=\"generate-publicprivate-keys\">Generate Public/Private keys</h4>\n<p>The public/private key pair is required to sign and verify JWT transmitted. \nTo generate the private key run this command on the terminal:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>openssl genrsa -out private.key 2048\n</code></pre><p>then extract the public key from the private key:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>openssl rsa -in private.key -pubout -out public.key\n    \n</code></pre><p>Upload both files to any folder outside of Web Root, set 0600 permissions for both files. \nThen specify paths in the configuration form.</p>\n<h4 id=\"create-oauth-client\">Create Oauth Client</h4>\n<p>Create oauth client at aMember CP -&gt; Oauth 2 Server -&gt; Clients\nWhen you create a client you should select permissions and grant types allowed for this client. \nYou should enable only permissions that are necessary for your application, <strong>DO NOT ALLOW ALL PERMISSIONS</strong></p>\n<h4 id=\"device-registration\">Device registration</h4>\n<p>When device registration is enabled, amember adds new grant type to server: amember_device\nThat grant type allow to exchange client_id and amember_device_id to access token. Device must be registered first. \nAll further API requests require AMEMBER-DEVICE-ID  header to be  set. \nWithout that header with correct device_id 403 error will be returned. </p>\n<h4 id=\"requirements\">Requirements</h4>\n<p>You should pass accept header with each request. </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Accept: application/json\n</code></pre></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"5824812","collectionId":"df9c7deb-8a58-4ca5-9f68-8e03797eb9b8","publishedId":"RzZDicNb","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2018-11-19T06:43:00.000Z"},"item":[{"name":"Supported Grant Types","item":[{"name":"Grant Type: password","item":[{"name":"/amember/oauth/token","id":"2484b64e-6428-48fd-aa6b-cd202ca3f994","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"client_id","value":"CLIENT_ID","description":"<p>Oauth Client ID  (create it in aMember CP -&gt; Oauth Clients )</p>\n","type":"text"},{"key":"client_secret","value":"CLIENT_SECRET","description":"<p>Oauth Client Secret (autogenerated value available once you create client)</p>\n","type":"text"},{"key":"grant_type","value":"password","description":"<p>Grant Type is <em>password</em> for this request</p>\n","type":"text"},{"key":"scope","value":"me.fullprofile me.subscriptions","description":"<p>List of requested scopes. Scopes are unique for each endpoint. Do not request more scopes then necessary.</p>\n","type":"text"},{"key":"username","value":"USERNAME","description":"<p>User's login. Access token will gant an access to user's account. All future reuests will be process on behalf of this user. </p>\n","type":"text"},{"key":"password","value":"PASSWORD","description":"<p>User's password</p>\n","type":"text"}]},"url":"http://example.com/amember/oauth/token","description":"<p>Exchange client login credentials to access token. </p>\n","urlObject":{"protocol":"http","path":["amember","oauth","token"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"db95bd2c-b87e-4445-bdf6-036461365df9","name":"Get Access Token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"client_id","value":"CLIENT_ID","description":"Oauth Client ID  (create it in aMember CP -> Oauth Clients )","type":"text"},{"key":"client_secret","value":"CLIENT_SECRET","description":"Oauth Client Secret (autogenerated value available once you create client)","type":"text"},{"key":"grant_type","value":"password","description":"Grant Type is *password* for this request","type":"text"},{"key":"scope","value":"me.fullprofile me.subscriptions","description":"List of requested scopes. Scopes are unique for each endpoint. Do not request more scopes then necessary.\n","type":"text"},{"key":"username","value":"USERNAME","description":"User's login. Access token will gant an access to user's account. All future reuests will be process on behalf of this user. ","type":"text"},{"key":"password","value":"PASSWORD","description":"User's password","type":"text"}]},"url":"https://example.com/amember/oauth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 08 Nov 2018 20:30:23 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Cache-Control","value":"no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"1959"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=UTF-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 12959999,\n    \"access_token\": \"JWT token\",\n    \"refresh_token\": \"JWT token\"\n}"}],"_postman_id":"2484b64e-6428-48fd-aa6b-cd202ca3f994"}],"id":"a7f9df06-66f2-4754-8d9e-8357dd168e21","description":"<p>Used to authorize thrid-party clients both in web-browser or native applicatons.\nWith <strong>password</strong> grant type, client first need to get login credentials from user and then exchange them to authorizaton token. </p>\n","event":[{"listen":"prerequest","script":{"id":"74ee3590-deda-4566-ac97-e233bf25fb5b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4911c14a-122f-4995-be60-52de4dc4065c","type":"text/javascript","exec":[""]}}],"_postman_id":"a7f9df06-66f2-4754-8d9e-8357dd168e21"},{"name":"Grant Type: client_credentials","item":[{"name":"/amember/oauth/token","id":"172865de-d4d3-4bb6-b6fa-f7879c9e86d6","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"description":"<p>Oauth Client ID  (create it in aMember CP -&gt; Oauth Clients )</p>\n","key":"client_id","type":"text","value":"CLIENT_ID"},{"description":"<p>Oauth Client Secret (autogenerated value available once you create client)</p>\n","key":"client_secret","type":"text","value":"CLIENT_SECRET"},{"description":"<p>Grant Type is <em>client_credentials</em> for this request</p>\n","key":"grant_type","type":"text","value":"client_credentials"},{"description":"<p>List of requested scopes. Scopes are unique for each endpoint. Do not request more scopes then necessary.</p>\n","key":"scope","type":"text","value":"rest.users.index"},{"description":"<p>User's login. Access token will gant an access to user's account. All future reuests will be process on behalf of this user. </p>\n","key":"username","type":"text","value":"USERNAME","disabled":true},{"description":"<p>User's password</p>\n","key":"password","type":"text","value":"PASSWORD","disabled":true}]},"url":"http://localhost/amember/oauth/token","description":"<p>Exchange client login credentials to access token. </p>\n","urlObject":{"protocol":"http","path":["amember","oauth","token"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"e7146ca2-ce20-422b-965c-81faf14bb46f","name":"Grant Type: client_credentials, Get Access Token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"description":"Oauth Client ID  (create it in aMember CP -> Oauth Clients )","key":"client_id","type":"text","value":"325bd0e28b82b1f"},{"description":"Oauth Client Secret (autogenerated value available once you create client)","key":"client_secret","type":"text","value":"429b412525a15d87a87b295ed095f99498849b4248c0c4400c2a93c486289ecf"},{"description":"Grant Type is *client_credentials* for this request","key":"grant_type","type":"text","value":"client_credentials"},{"description":"List of requested scopes. Scopes are unique for each endpoint. Do not request more scopes then necessary.\n","key":"scope","type":"text","value":"rest.users.index"},{"description":"User's login. Access token will gant an access to user's account. All future reuests will be process on behalf of this user. ","key":"username","type":"text","value":"USERNAME","disabled":true},{"description":"User's password","key":"password","type":"text","value":"PASSWORD","disabled":true}]},"url":"http://example.com/amember/oauth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 08 Nov 2018 20:45:48 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Cache-Control","value":"no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"1070"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=UTF-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 12959999,\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjdiNWYyNmY2ZTExM2FhNGQ1ZmY3MTgyMTFmODIzMmMzNmFhZDMwMDQ0ZDMzZDRiZWY5MzljYTEyZWNjZjRkZDNkZTIyNDg1ZTFmYjc4Zjc0In0.eyJhdWQiOiIzMjViZDBlMjhiODJiMWYiLCJqdGkiOiI3YjVmMjZmNmUxMTNhYTRkNWZmNzE4MjExZjgyMzJjMzZhYWQzMDA0NGQzM2Q0YmVmOTM5Y2ExMmVjY2Y0ZGQzZGUyMjQ4NWUxZmI3OGY3NCIsImlhdCI6MTU0MTcwOTk0OSwibmJmIjoxNTQxNzA5OTQ5LCJleHAiOjE1NTQ2Njk5NDgsInN1YiI6IiIsInNjb3BlcyI6W119.RWXBaQr9Uvkm2F4wLKSS3PvhLyiXisa3CJw_wIP69iFmWW0pu1BGuMLwADCN9_QUbjx6HjzKAHWBGzjTliBjRwFHvS-t-U7cSyeS1PxIJPf_jrK4U3YoGPUIv9oWnOQ69eAE76iUDx5_9Q8Q_JEH0eWp9BS2ZHB_G1fRYi613d_DwJjiHRsNwXFysI7tjamp9_i2z0paTFOGGKhXAQCIfaCyYpdkIt6W-MERAMI7MKOtIIH-mkTlfJZF6dh_TMZLKpzlmLA3SIpZ07cv0UXTW-iV-DnOOCDLP-WuBkUYbYs7eFtud2u_Iuo6gcRUOXLkWIIu0LejnITuxQknXi2TEA\"\n}"}],"_postman_id":"172865de-d4d3-4bb6-b6fa-f7879c9e86d6"}],"id":"b293654f-0983-4c28-b902-f787acf593f6","description":"<p>Implements an ability to exchange oAuth client credentials to access token. \nThis grant is useful for server to server api request. <strong>Should be used on trusted systems only</strong>.</p>\n","event":[{"listen":"prerequest","script":{"id":"282e20dc-ba2c-4b65-80f3-f38ed23bd0a5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5ece96b3-b840-4cdb-aef1-abb0136be312","type":"text/javascript","exec":[""]}}],"_postman_id":"b293654f-0983-4c28-b902-f787acf593f6"},{"name":"Grant Type: amember_device","item":[{"name":"/amember/oauth/token","id":"30983f35-a5bb-43b2-8ed6-f2fbfbe9934d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"description":"<p>Oauth Client ID  (create it in aMember CP -&gt; Oauth Clients )</p>\n","key":"client_id","type":"text","value":"7ddf442f82f5ec31053f1a623225c001"},{"description":"<p>ID of registered device</p>\n","key":"amember_device_id","type":"text","value":"0be8b3c934c0be1c3593e80a6cfadc83439f12943281f492d52d912389143be0"},{"description":"<p>Grant Type is <em>amember_device</em> for this request</p>\n","key":"grant_type","type":"text","value":"amember_device"},{"key":"scope","value":"paysystems register available-products","description":"<p>List of requested scopes</p>\n","type":"text"}]},"url":"http://example.com/amember/oauth/token","description":"<p>Exchange client_id and amember_device_id  to access token. </p>\n","urlObject":{"protocol":"http","path":["amember","oauth","token"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"f824c31c-46ff-4aae-97cd-a65acc14f4b0","name":"GET access token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"description":"Oauth Client ID  (create it in aMember CP -> Oauth Clients )","key":"client_id","type":"text","value":"838f5bc4302cf62a15c1f232f902423f"},{"description":"ID of registered device","key":"amember_device_id","type":"text","value":"2343425342534254325342"},{"description":"Grant Type is *client_credentials* for this request","key":"grant_type","type":"text","value":"amember_device"},{"description":"List of requested scopes. Scopes are unique for each endpoint. Do not request more scopes then necessary.\n","key":"scope","type":"text","value":"rest.users.index","disabled":true},{"description":"User's login. Access token will gant an access to user's account. All future reuests will be process on behalf of this user. ","key":"username","type":"text","value":"USERNAME","disabled":true},{"description":"User's password","key":"password","type":"text","value":"PASSWORD","disabled":true}]},"url":"http://example.com/amember/oauth/token"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 20 Dec 2018 12:43:18 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Cache-Control","value":"no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"840"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=UTF-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"scope\": \"\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 3600,\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjQ4MDEyZWM0ZDBkZTQyYmM3NDE4OTk0M2Y5NTUxM2Y2YzcyNjZmYTllZjhhYzQzZmE0MmRjNzNmYTlhOGU1YjI3NjY2MTE3NmM2ZjdhZmFjIn0.eyJhdWQiOiI4MzhmNWJjNDMwMmNmNjJhMTVjMWYyMzJmOTAyNDIzZiIsImp0aSI6IjQ4MDEyZWM0ZDBkZTQyYmM3NDE4OTk0M2Y5NTUxM2Y2YzcyNjZmYTllZjhhYzQzZmE0MmRjNzNmYTlhOGU1YjI3NjY2MTE3NmM2ZjdhZmFjIiwiaWF0IjoxNTQ1MzA5Nzk4LCJuYmYiOjE1NDUzMDk3OTgsImV4cCI6MTU0NTMxMzM5OCwic3ViIjoiIiwic2NvcGVzIjpbXX0.vfPpevwZmr2bS41digww8-yee2dZ6C1gi3qPUY9KPNecn1j30nkSMEdFB7Uk3yHKDZui_7EpuFX9LcvU2XLiRrMRJ5OaMkiT-KaEmkF5L6L5IqD1IXFk-Z23pbxqkxQQxiTiC5U6yE8vf9TCv4rvpiksWaK0GuzqZ_idStm30hvtMVuJhHc8NY9ekVvV-SUUsx3d8ZyFmKYXxdaHF7aoe_mJRlYo0IDZWQW-Ts1pxDH6jBvf3OEIuXyqKhOZ7M6_NwG1SwJ0jRD8USJA0VJvxZpHBpP83vlRWJA8YOPw17YAAYnjHw7zvFl2bRt-zI4rxno-IoxAQXAsoEItPxC76A\"\n}"}],"_postman_id":"30983f35-a5bb-43b2-8ed6-f2fbfbe9934d"}],"id":"cefe27c1-c2e7-4696-8db0-31674d2ab037","description":"<p>Could be used to provide an access to public endpoints. \namember_device_id and client_id will be exchanged to access token, device should be registered first, \nsee register-device api call</p>\n","event":[{"listen":"prerequest","script":{"id":"282e20dc-ba2c-4b65-80f3-f38ed23bd0a5","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"5ece96b3-b840-4cdb-aef1-abb0136be312","type":"text/javascript","exec":[""]}}],"_postman_id":"cefe27c1-c2e7-4696-8db0-31674d2ab037"},{"name":"Grant Type: authorization_code","item":[{"name":"/amember/oauth/authorize","id":"4e0dae34-39a6-4331-bbf6-2530d92fcc2b","request":{"method":"GET","header":[],"url":"http://example.com/amember/oauth/authorize?response_type=code&client_id=325bd0e28b82b1f&redirect_uri=http://localhost/amember&scope=me.fullprofile&state=fdhjks","description":"<p>The client should redirect the user to the authorization server with the following parameters in the query string:</p>\n","urlObject":{"protocol":"http","path":["amember","oauth","authorize"],"host":["example","com"],"query":[{"description":{"content":"<p>Should be set to <strong>code</strong></p>\n","type":"text/plain"},"key":"response_type","value":"code"},{"description":{"content":"<p>Oauth Client ID  (create it in aMember CP -&gt; Oauth Clients )</p>\n","type":"text/plain"},"key":"client_id","value":"325bd0e28b82b1f"},{"description":{"content":"<p>Authorized Redirect URI configured for client. Should be exactly the same as in client settings.</p>\n","type":"text/plain"},"key":"redirect_uri","value":"http://localhost/amember"},{"description":{"content":"<p>List of requested scopes</p>\n","type":"text/plain"},"key":"scope","value":"me.fullprofile"},{"description":{"content":"<p>CSRF Token. Will be stored by server and passed back to verify. </p>\n","type":"text/plain"},"key":"state","value":"fdhjks"}],"variable":[]}},"response":[],"_postman_id":"4e0dae34-39a6-4331-bbf6-2530d92fcc2b"},{"name":"/amember/oauth/token","id":"a2b0ec91-8181-4114-aa3d-6ed97b6812a9","request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"grant_type","value":"authorization_code","description":"<p>Should be set to <em>authorization_code</em> for this request</p>\n","type":"text"},{"key":"client_id","value":"325bd0e28b82b1f","description":"<p>Oauth Client ID  (create it in aMember CP -&gt; Oauth Clients )</p>\n","type":"text"},{"key":"client_secret","value":"429b412525a15d87a87b295ed095f99498849b4248c0c4400c2a93c486289ecf","description":"<p>Oauth Client Secret (autogenerated value available once you create client)</p>\n","type":"text"},{"key":"redirect_uri","value":"http://localhost/amember","description":"<p>Original redirect URI that was send to authorization server in authorize request. </p>\n","type":"text"},{"key":"code","value":"**CODE**","description":"<p>Authorization code received from authorization server</p>\n","type":"text"}]},"url":"http://localhost/amember/oauth/token","description":"<p>Exchange received authorization code to access token. </p>\n","urlObject":{"protocol":"http","path":["amember","oauth","token"],"host":["localhost"],"query":[{"disabled":true,"description":{"content":"<p>Should be set to <em>authorization_code</em> for this request</p>\n","type":"text/plain"},"key":"grant_type","value":"authorization_code"},{"disabled":true,"description":{"content":"<p>Oauth Client ID  (create it in aMember CP -&gt; Oauth Clients )</p>\n","type":"text/plain"},"key":"client_id","value":"325bd0e28b82b1f"},{"disabled":true,"description":{"content":"<p>Oauth Client Secret (autogenerated value available once you create client)</p>\n","type":"text/plain"},"key":"client_secret","value":"429b412525a15d87a87b295ed095f99498849b4248c0c4400c2a93c486289ecf"},{"disabled":true,"description":{"content":"<p>Original redirect URI that was send to authorization server in authorize request. </p>\n","type":"text/plain"},"key":"redirect_uri","value":"http://localhost/amember"},{"disabled":true,"key":"code","value":""}],"variable":[]}},"response":[{"id":"4d8046f2-0b36-42cd-beca-af5f424ed94e","name":"/amember/oauth/token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"grant_type","value":"authorization_code","description":"Should be set to *authorization_code* for this request","type":"text"},{"key":"client_id","value":"325bd0e28b82b1f","description":"Oauth Client ID  (create it in aMember CP -> Oauth Clients )","type":"text"},{"key":"client_secret","value":"429b412525a15d87a87b295ed095f99498849b4248c0c4400c2a93c486289ecf","description":"Oauth Client Secret (autogenerated value available once you create client)","type":"text"},{"key":"redirect_uri","value":"http://localhost/amember","description":"Original redirect URI that was send to authorization server in authorize request. \n","type":"text"},{"key":"code","value":"def502008efb62d6cb2057ddad16c03f03ab7d6760682accb8455f73a362199f5e1ca579ed9178aaee48efe7925d625431f21f73b610d418151dfc89b39bfc207098ef625b5d1f08fbffd42b5bd24543c467d3eb257c3f05880eaae1138387a9dfdaab1afb21eec950aa0fc819faa57a5652d8a8f8b19da855c12fecbc7d78fae270b6f9b7a15ba6e100c8f0f9cbe84af4340cffa768e8d8229395e48dcd293936bdb9d8e7d6ffccbeafcae807920733f5cd5d96d6516d6dd5e4b9e3e79c92baaa19df7297789a2fedafc678d07658c918e01be1edf79d49443a780465b77681bc0e711ed40f5bc0450fa7d86385e7623f5fd9e7b051356967aa457ec6d451bfaf8cbcd8695cb7945734e0f59b18ad17bf4ba4bc1c961f74be1ccb5afa4a8d47366bb5b4e8debbf7a392ffce1da39a355c8748769cf9c110c7d6d4b8f6706a9a5e4ba6d9a46d41baad3ca7cd08a53c53fb00b643c712d917b483dd0e4c76e17ed62674d4acfeb27e7163a8827a6808362bf17aac0c46bc9505201cc039","description":"Authorization code received from authorization server","type":"text"}]},"url":{"raw":"http://example/amember/oauth/token","protocol":"http","host":["example"],"path":["amember","oauth","token"],"query":[{"key":"grant_type","value":"authorization_code","description":"Should be set to *authorization_code* for this request","type":"text","disabled":true},{"key":"client_id","value":"325bd0e28b82b1f","description":"Oauth Client ID  (create it in aMember CP -> Oauth Clients )","type":"text","disabled":true},{"key":"client_secret","value":"429b412525a15d87a87b295ed095f99498849b4248c0c4400c2a93c486289ecf","description":"Oauth Client Secret (autogenerated value available once you create client)","type":"text","disabled":true},{"key":"redirect_uri","value":"http://localhost/amember","description":"Original redirect URI that was send to authorization server in authorize request. \n","type":"text","disabled":true},{"key":"code","value":"","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 15 Nov 2018 00:51:10 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Cache-Control","value":"no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"1661"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=UTF-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"scope\": \"me.fullprofile\",\n    \"token_type\": \"Bearer\",\n    \"expires_in\": 12959999,\n    \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6Ijg2NjJiMTFmZGVlODMyYjgwOGRjMjgyZjExYTZjYmNmZWZiZDE4Nzk4OWIyMGViY2M1NjM2YjdhOTcxNjkzNGUzM2U4N2FjMTdlYmJjZTM4In0.eyJhdWQiOiIzMjViZDBlMjhiODJiMWYiLCJqdGkiOiI4NjYyYjExZmRlZTgzMmI4MDhkYzI4MmYxMWE2Y2JjZmVmYmQxODc5ODliMjBlYmNjNTYzNmI3YTk3MTY5MzRlMzNlODdhYzE3ZWJiY2UzOCIsImlhdCI6MTU0MjI0MzA3MSwibmJmIjoxNTQyMjQzMDcxLCJleHAiOjE1NTUyMDMwNzAsInN1YiI6IjM3MjMiLCJzY29wZXMiOlsibWUuZnVsbHByb2ZpbGUiXX0.ERutyU-8Xuz0fycZQ96CcarIzFmvAiqss-sODQyKJWOMg4b3lpmN0aeZG17O7l9VXRUHrgIIuuWwFRpes3tcY7GlCz1azfqGSIcydj2g9B-bCfW5ipiGnF2JsymgwtuJ9sFu3gTQObEcr5GKDSJ9kT7Qi5I2wjLDTU3whc6oGpbVz_jdbutM_KRyu5R67UTA5Gx2jeS-0HYOHIx60v-6SGgsd3RO8tFoYcHbFrDbhZhRPPEuzDnx6_uonGf8eYlxEPYWbuffyeg_Vxly-qgOSRF5Y8ZecOpSxVPD4VNscd27K2FjmDVXewUGuFmERBjmnpOC6JVm28HIZi3oFsiu-g\",\n    \"refresh_token\": \"def50200e9c89e7509300f7fff90f9fef3f1c4d6060b43df6cec765b35e263d9a8bcc7f01ca5f76bd1ab77f7b069f723d0a4301d1186710e71ba8a576f545b5d750bbbcf6502f306bb584f3462b6a5a099ce8574a8513df5cf01c9c11f821243ab21d39185b515065f2efe646caee462ea14432a4d96b944bd1759d4eee2daaba48251b52ab78aecd45b734b74e1f38690640cc00f53548b7434e967b93dd8c1fb7e8fd6ba793c927e57d608237ce8db3fba6ebd1af73f636395b0d6dd276199c5f0e2a632777188d5d9b2ba4522f19f593033ee256df4c9f5b0bd269200330c1ed6982d292f72ee3a82f88ab87142e0b520a7dbc560f58dfff871c6a47deeeffa34d228c97f04d9d4575aff925dad1fc5735d290c19f98b9f3cde0fa75e51988e86fe14081fd6c50fa69c5d9f71d6f46ff76c9fd5a16d538869a8eb50d03a3e77bff93113bee1480097b27849925ffb1edb237c5e075fd04fb829a99a61e00f74498e4ba2029ef7eb3ab9277fca519be033780c5a2836ea29475440799c3cd3f68bd439d02a\"\n}"}],"_postman_id":"a2b0ec91-8181-4114-aa3d-6ed97b6812a9"}],"id":"a0332b86-3de8-4c9d-bce7-9d4551462eb1","description":"<p>The authorization_code  grant type is used by private  and public clients to exchange an authorization code for an access token.</p>\n<p>Process is two steps: \n    1. Client redirects user to authorization endpoint, where user have to accept/deny application access. \n    If access was authorized, user is being sent back to redirect_uri \n    Authorization code parameter will be passed in query string:  <a href=\"http://example.com?code=AUTHORIZATION_CODE\">http://example.com?code=AUTHORIZATION_CODE</a>\n    2. Client exchange that code to access_token</p>\n","event":[{"listen":"prerequest","script":{"id":"4c9d4151-f166-4e81-a7cc-61c1a3168266","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7673ac5e-ee36-4be6-b3be-907c28c292eb","type":"text/javascript","exec":[""]}}],"_postman_id":"a0332b86-3de8-4c9d-bce7-9d4551462eb1"}],"id":"129a3c7d-c102-48a5-9044-9a021164183b","_postman_id":"129a3c7d-c102-48a5-9044-9a021164183b","description":""},{"name":"API2 Endpoints","item":[{"name":"User Endpoints","item":[{"name":"/amember/api2/agreement","id":"0cc4f43e-b63a-4a5f-bc3c-1e9e681df52b","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/agreement","description":"<p>Retrieve list of current agreement documents(Privacy Policy, Terms &amp; Conditions, etc...)</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code-client_credentials\">password, authorization_code, client_credentials</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>agreement</strong>  Get list of current agreement documents</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","agreement"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"23af75fc-0c25-49ba-bf00-0684b9de5877","name":"/amember/api2/agreement","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/agreement"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Nov 2018 12:00:31 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"31681"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"agreement-aff-default\": {\n            \"agreement_revision_id\": 10,\n            \"type\": \"agreement-aff-default\",\n            \"title\": \"Affiliate Agreement\",\n            \"url\": \"http://example.com/example/of/agreement/url\",\n            \"body\": \"<pre>\\r\\nWe pay a lot of commissions</pre>\",\n            \"dattm\": \"2018-05-29 14:51:59\",\n            \"is_current\": \"1\",\n            \"comment\": \"\"\n        },\n        \"agreement-signup-default\": {\n            \"agreement_revision_id\": 19,\n            \"type\": \"agreement-signup-default\",\n            \"title\": \"Terms & Conditions\",\n            \"url\": \"\",\n            \"body\": \"Agreement body\",\n            \"dattm\": \"2018-05-29 15:04:49\",\n            \"is_current\": \"1\",\n            \"comment\": \"Latest version use it\"\n        }\n    }\n}"}],"_postman_id":"0cc4f43e-b63a-4a5f-bc3c-1e9e681df52b"},{"name":"/amember/api2/user/consent","id":"a0290d83-a13e-4067-bc5c-bb0eb7bc5caf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/user/consent","description":"<p>Get  user consent. Return list of all user consent records for current documents. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.consent</strong>, <strong>user.consent.get</strong>  Get user consent records</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","consent"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"44753b96-0067-469e-ba14-549d0e85c205","name":"/amember/api2/user/consent","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/consent"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 09:41:37 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"333"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"terms-of-use\": {\n            \"consent_id\": 1774,\n            \"revision_id\": \"1\",\n            \"user_id\": \"883051\",\n            \"type\": \"terms-of-use\",\n            \"dattm\": \"2018-11-20 13:39:28\",\n            \"remote_addr\": \"127.0.0.1\",\n            \"source\": \"Received from Oauth App: XXXXXXXXXXXXXXXXXXXXXXX\",\n            \"title\": \"Terms Of Use\",\n            \"cancel_dattm\": null,\n            \"cancel_remote_addr\": null,\n            \"cancel_source\": null\n        }\n    }\n}"}],"_postman_id":"a0290d83-a13e-4067-bc5c-bb0eb7bc5caf"},{"name":"/amember/api2/user/consent","id":"e44e43ae-eab0-4a56-a6cc-18ca4532283d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"type","value":"terms-of-use","description":"<p>Document type. See \"agreement\" endpoint</p>\n","type":"text"}]},"url":"http://example.com/amember/api2/user/consent","description":"<p>Record user consent </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.consent</strong>, <strong>user.consent.post</strong>  Record user consent</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","consent"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"7d2be487-7c58-4aea-951f-e09be5a5a4bd","name":"Recrd user consent","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"type","value":"terms-of-use","description":"Document type. See \"agreement\" endpoint","type":"text"}]},"url":"http://example.com/amember/api2/user/consent"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 09:39:28 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"316"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"consent_id\": 1774,\n        \"revision_id\": \"1\",\n        \"user_id\": \"883051\",\n        \"type\": \"terms-of-use\",\n        \"dattm\": \"2018-11-20 13:39:28\",\n        \"remote_addr\": \"127.0.0.1\",\n        \"source\": \"Received from Oauth App: XXXXXXXXXXXXXXXXXXXX\",\n        \"title\": \"Terms Of Use\",\n        \"cancel_dattm\": null,\n        \"cancel_remote_addr\": null,\n        \"cancel_source\": null\n    }\n}"}],"_postman_id":"e44e43ae-eab0-4a56-a6cc-18ca4532283d"},{"name":"/amember/api2/user/consent","id":"9a75e24c-4c4b-4778-ae48-350363210e62","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"type","value":"terms-of-use","description":"<p>user Consent to be cancelled</p>\n","type":"text"}]},"url":"http://example.com/amember/api2/user/consent","description":"<p>Cancel user consent</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.consent</strong>, <strong>user.consent.delete</strong>  Cancel  user consent</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","consent"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"681cacb4-2e10-4a0d-97bd-bcb9afcf715d","name":"Cancel of user consent","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"type","value":"terms-of-use","description":"user Consent to be cancelled","type":"text"}]},"url":"http://example.com/amember/api2/user/consent"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 10:06:58 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"413"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"terms-of-use\": {\n            \"consent_id\": 1774,\n            \"revision_id\": \"1\",\n            \"user_id\": \"883051\",\n            \"type\": \"terms-of-use\",\n            \"dattm\": \"2018-11-20 13:39:28\",\n            \"remote_addr\": \"127.0.0.1\",\n            \"source\": \"Received from Oauth App: XXXXXXXXXXXXXXXXXXXXX\",\n            \"title\": \"Terms Of Use\",\n            \"cancel_dattm\": \"2018-11-20 14:06:58\",\n            \"cancel_remote_addr\": \"127.0.0.1\",\n            \"cancel_source\": \"Cancelled from Oauth App: XXXXXXXXXXXXXXXXXXXXXX\"\n        }\n    }\n}"}],"_postman_id":"9a75e24c-4c4b-4778-ae48-350363210e62"},{"name":"/amember/api2/user/personal-data","id":"d0548ee2-caf6-450d-8616-58c55769ccb8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"password","value":"test123","description":"<p>User's password. Must be sent in order to validate request</p>\n","type":"text"}]},"url":"http://example.com/amember/api2/user/personal-data","description":"<p>Get User's personal data.</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.personal-data</strong>, <strong>user.personal-data.get</strong>  Get User Personal Data</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","personal-data"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"cb6c1f48-70e7-49a4-b140-3cde7684aea1","name":"/amember/api2/user/personal-data","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"password","value":"test123","description":"User's password. Must be sent in order to validate request","type":"text"}]},"url":"http://example.com/amember/api2/user/personal-data"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 11:55:15 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"1655"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"title\": \"Username\",\n            \"name\": \"login\",\n            \"value\": \"alexander\"\n        },\n        {\n            \"title\": \"E-mail Address\",\n            \"name\": \"email\",\n            \"value\": \"alexander@central-office.net\"\n        },\n        {\n            \"title\": \"First Name\",\n            \"name\": \"name_f\",\n            \"value\": \"alex\"\n        },\n        {\n            \"title\": \"Last Name\",\n            \"name\": \"name_l\",\n            \"value\": \"ivanoff\"\n        },\n        {\n            \"title\": \"Address Line 1\",\n            \"name\": \"street\",\n            \"value\": \"Some\"\n        },\n        {\n            \"title\": \"Address Line 2\",\n            \"name\": \"street2\",\n            \"value\": \"\"\n        },\n        {\n            \"title\": \"State\",\n            \"name\": \"state\",\n            \"value\": \"BC\"\n        },\n        {\n            \"title\": \"City\",\n            \"name\": \"city\",\n            \"value\": \"Some\"\n        },\n        {\n            \"title\": \"Zip\",\n            \"name\": \"zip\",\n            \"value\": \"123\"\n        },\n        {\n            \"title\": \"Country\",\n            \"name\": \"country\",\n            \"value\": \"CA\"\n        },\n        {\n            \"title\": \"Phone\",\n            \"name\": \"phone\",\n            \"value\": \"\"\n        },\n        {\n            \"title\": \"Signup IP Address\",\n            \"name\": \"remote_addr\",\n            \"value\": \"192.168.1.6\"\n        },\n        {\n            \"title\": \"Date Added\",\n            \"name\": \"added\",\n            \"value\": \"2018-09-12 17:04:49\"\n        },\n        {\n            \"title\": \"Last Login Date\",\n            \"name\": \"last_login\",\n            \"value\": \"2018-11-02 17:53:42\"\n        },\n        {\n            \"title\": \"User Agent\",\n            \"name\": \"user_agent\",\n            \"value\": \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36\"\n        },\n        {\n            \"title\": \"Last Login IP Address\",\n            \"name\": \"last_ip\",\n            \"value\": \"127.0.0.1\"\n        },\n        {\n            \"title\": \"Last Login User Agent\",\n            \"name\": \"last_user_agent\",\n            \"value\": \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.20 Safari/537.36\"\n        },\n        {\n            \"title\": \"date\",\n            \"name\": \"dat\",\n            \"value\": \"2\"\n        },\n        {\n            \"title\": \"IP Adddress\",\n            \"name\": \"data.ip_address\",\n            \"value\": \"192.168.1.3\"\n        },\n        {\n            \"title\": \"IP Address2\",\n            \"name\": \"data.ip_address2\",\n            \"value\": \"192.168.1.4\"\n        }\n    ]\n}"}],"_postman_id":"d0548ee2-caf6-450d-8616-58c55769ccb8"},{"name":"/amember/api2/user/personal-data","id":"a52b7ec6-1c1a-4949-93ac-1d30c244992a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"password","value":"test","description":"<p>User's password to validate request</p>\n","type":"text"}]},"url":"http://example.com/amember/api2/user/personal-data","description":"<p>Delete  User's Personal Data. \n<em>Please note:</em> User's account will be anonymized. User's access token and auth codes will be revoked. \nIf there was an errors in data anonymization process these errors will be returned. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.personal-data</strong>, <strong>user.personal-data.delete</strong>  Delete  User Personal Data</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","personal-data"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"72dd14b4-9502-4f54-a543-1ab3b0524794","name":"Personal data Delete errors. Request was added to queue, admin was notified.","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"password","value":"test123","type":"text"}]},"url":"http://example.com/amember/api2/user/personal-data"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 12:19:52 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"95"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"errors\": [\n            \"Unable to cancel invoice #1738786: status was not success\"\n        ]\n    }\n}"},{"id":"c348f341-b173-47db-aafc-ba2e7d8dabcd","name":"Successful delete request","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"password","value":"test","description":"User's password to validate request","type":"text"}]},"url":"http://example.com/amember/api2/user/personal-data"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 12:23:02 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"25"},{"key":"Keep-Alive","value":"timeout=5, max=99"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": []\n}"}],"_postman_id":"a52b7ec6-1c1a-4949-93ac-1d30c244992a"},{"name":"/amember/api2/user/profile","id":"52985138-6ca3-4184-9f30-a49acd879b33","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/user/profile","description":"<p>Get user Profile information. \nOnly fields included in oauth-profile form that you have set in aMember CP -&gt; Forms Editor -&gt; Edit Form will be returned</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.profile</strong>, <strong>user.profile.get</strong>  Get User Profile information</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","profile"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"41e725aa-0ff0-4856-95c5-d5031838f3a9","name":"Get Profile","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 Nov 2018 09:49:44 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"98"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"name_f\": \"alex\",\n        \"name_l\": \"ivanoff\",\n        \"email\": \"alexander@central-office.net\"\n    }\n}"}],"_postman_id":"52985138-6ca3-4184-9f30-a49acd879b33"},{"name":"/amember/api2/user/profile","id":"7f0d4da1-bbf7-4a6c-8cbc-a773959f897f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"alexander@cgi-central.net","description":"<p>Email address</p>\n","type":"text"},{"key":"name_f","value":"Test","description":"<p>First name</p>\n","type":"text"},{"key":"name_l","value":"Test","description":"<p>Last name</p>\n","type":"text"},{"key":"pass","value":"testtest","description":"<p>Password</p>\n","type":"text"},{"key":"login","value":"sanja","type":"text","disabled":true}]},"url":"http://example.com/amember/api2/user/profile","description":"<p>Update profile information  Incoming request will be validated according to oauth-profile form settings. \nIf email confirmation is required, validation email will be sent to user's email address. \nuser's account will be marked as not confirmed. ( <em>user.email_confirmed = false</em> )</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.profile</strong>, <strong>user.profile.put</strong>  Update  User Profile information</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","profile"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"7d21f6fa-c659-4d84-8f5c-a1eeeb878f32","name":"Verify Email example","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"alexander+testvalidation@central-office.net","description":"Email address","type":"text"},{"key":"name_f","value":"Test","description":"First name","type":"text"},{"key":"name_l","value":"Test","description":"Last name","type":"text"},{"key":"pass","value":"testtest","description":"Password","type":"text"},{"key":"login","value":"sanja","type":"text","disabled":true}]},"url":"http://example.com/amember/api2/user/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 Nov 2018 12:36:41 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"amember_nr=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=.central-office.net; HttpOnly"},{"key":"Content-Length","value":"368"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"verify-email\",\n    \"data\": {\n        \"_save_\": \"profile\",\n        \"name_f\": \"Test\",\n        \"name_l\": \"Test\",\n        \"email\": \"alexander+testvalidation@central-office.net\",\n        \"pass\": \"testtest\"\n    },\n    \"message\": \"Email verification is required\"\n}"},{"id":"ae11482d-860d-432f-9cec-6414cae5aa1f","name":"Validation failed example","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"alexander@cgi-central.net","description":"Email address","type":"text"},{"key":"name_f","value":"Test","description":"First name","type":"text"},{"key":"name_l","value":"Test","description":"Last name","type":"text"},{"key":"pass","value":"testtest","description":"Password","type":"text"},{"key":"login","value":"sanja","type":"text","disabled":true}]},"url":"http://example.com/amember/api2/user/profile"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 Nov 2018 12:37:44 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"amember_nr=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=.central-office.net; HttpOnly"},{"key":"Content-Length","value":"435"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/problem+json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"error\": \"validation-error\",\n    \"message\": \"An error happened when we try to validate your request. Please check hints for more details\",\n    \"hint\": {\n        \"email\": \"An account with the same email already exists.<br />Please <a href=\\\"/amember/login?amember_redirect_url=%2Famember%2Fapi2%2Fuser%2Fprofile\\\">login</a> to your existing account.<br />If you have not completed payment, you will be able to complete it after login\"\n    }\n}"},{"id":"ca0354e8-376a-49b0-bdb7-b710485314d1","name":"Successfull profile update","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"alexander@central-office.net","description":"Email address","type":"text"},{"key":"name_f","value":"Test","description":"First name","type":"text"},{"key":"name_l","value":"Test","description":"Last name","type":"text"},{"key":"pass","value":"testtest","description":"Password","type":"text"},{"key":"login","value":"sanja","type":"text","disabled":true}]},"url":"http://example.com/amember/api2/user/profile"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 Nov 2018 12:34:04 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"amember_nr=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=.central-office.net; HttpOnly"},{"key":"Content-Length","value":"281"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"name_f\": \"Test\",\n        \"name_l\": \"Test\",\n        \"email\": \"alexander@central-office.net\",\n        \"pass\": \"testtest\"\n    }\n}"}],"_postman_id":"7f0d4da1-bbf7-4a6c-8cbc-a773959f897f"},{"name":"/amember/api2/user/access","id":"08c26e36-412b-4832-81a2-968d208b8b40","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/user/access","description":"<p>Get all user's access records</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.access</strong>, <strong>user.profile.get</strong> Get user's access records</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","access"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"ad88a46e-03bd-45e9-8332-9e37ac261010","name":"/amember/api2/user/access","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/access"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 21 Nov 2018 13:38:18 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"3696"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"access_id\": 4944610,\n            \"invoice_id\": \"1738775\",\n            \"invoice_public_id\": \"5UN50\",\n            \"invoice_payment_id\": null,\n            \"invoice_item_id\": \"3287742\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"205\",\n            \"transaction_id\": \"127.0.0.1-1537279383\",\n            \"begin_date\": \"2018-09-18\",\n            \"expire_date\": \"2018-10-18\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944612,\n            \"invoice_id\": null,\n            \"invoice_public_id\": null,\n            \"invoice_payment_id\": null,\n            \"invoice_item_id\": null,\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": null,\n            \"begin_date\": \"2018-09-26\",\n            \"expire_date\": \"2018-10-26\",\n            \"qty\": \"1\",\n            \"comment\": \"\"\n        },\n        {\n            \"access_id\": 4944613,\n            \"invoice_id\": \"1738777\",\n            \"invoice_public_id\": \"E5FF8\",\n            \"invoice_payment_id\": \"3261827\",\n            \"invoice_item_id\": \"3287744\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": \"charge_test_0F78F9EE748J72CD2998\",\n            \"begin_date\": \"2018-09-27\",\n            \"expire_date\": \"2018-10-27\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944616,\n            \"invoice_id\": \"1738786\",\n            \"invoice_public_id\": \"EN8EX\",\n            \"invoice_payment_id\": \"3261830\",\n            \"invoice_item_id\": \"3287753\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"236\",\n            \"transaction_id\": \"ch_1DGRc1E6tbCC21r0qamZZf5W\",\n            \"begin_date\": \"2018-10-01\",\n            \"expire_date\": \"2018-11-01\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944617,\n            \"invoice_id\": \"1738789\",\n            \"invoice_public_id\": \"RKCW1\",\n            \"invoice_payment_id\": \"3261831\",\n            \"invoice_item_id\": \"3287756\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": \"D87-5660\",\n            \"begin_date\": \"2018-10-04\",\n            \"expire_date\": \"2018-10-11\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944624,\n            \"invoice_id\": \"1738777\",\n            \"invoice_public_id\": \"E5FF8\",\n            \"invoice_payment_id\": null,\n            \"invoice_item_id\": \"3287744\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": \"-m-15391764452392\",\n            \"begin_date\": \"2018-10-27\",\n            \"expire_date\": \"2018-11-27\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944625,\n            \"invoice_id\": \"1738802\",\n            \"invoice_public_id\": \"759XV\",\n            \"invoice_payment_id\": \"3261837\",\n            \"invoice_item_id\": \"3287769\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": \"13-m-15396090382566\",\n            \"begin_date\": \"2018-10-15\",\n            \"expire_date\": \"2018-11-15\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944644,\n            \"invoice_id\": \"1738827\",\n            \"invoice_public_id\": \"A4YKF\",\n            \"invoice_payment_id\": \"3261858\",\n            \"invoice_item_id\": \"3287793\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"204\",\n            \"transaction_id\": \"D90-2393\",\n            \"begin_date\": \"2018-10-28\",\n            \"expire_date\": \"2018-10-28\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944645,\n            \"invoice_id\": \"1738842\",\n            \"invoice_public_id\": \"EHFM4\",\n            \"invoice_payment_id\": null,\n            \"invoice_item_id\": \"3287807\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"205\",\n            \"transaction_id\": \"127.0.0.1-1542372177\",\n            \"begin_date\": \"2018-11-16\",\n            \"expire_date\": \"2018-12-16\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944646,\n            \"invoice_id\": \"1738843\",\n            \"invoice_public_id\": \"HNYQG\",\n            \"invoice_payment_id\": null,\n            \"invoice_item_id\": \"3287808\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"205\",\n            \"transaction_id\": \"127.0.0.1-1542372395\",\n            \"begin_date\": \"2018-12-16\",\n            \"expire_date\": \"2019-01-15\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944647,\n            \"invoice_id\": \"1738844\",\n            \"invoice_public_id\": \"LM0BY\",\n            \"invoice_payment_id\": null,\n            \"invoice_item_id\": \"3287809\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"205\",\n            \"transaction_id\": \"127.0.0.1-1542373042\",\n            \"begin_date\": \"2019-01-15\",\n            \"expire_date\": \"2019-02-14\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944648,\n            \"invoice_id\": \"1738845\",\n            \"invoice_public_id\": \"7CMJ5\",\n            \"invoice_payment_id\": \"3261859\",\n            \"invoice_item_id\": \"3287810\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": \"123-m-15427191829086\",\n            \"begin_date\": \"2018-11-20\",\n            \"expire_date\": \"2018-12-20\",\n            \"qty\": \"1\",\n            \"comment\": null\n        },\n        {\n            \"access_id\": 4944649,\n            \"invoice_id\": \"1738846\",\n            \"invoice_public_id\": \"C9MEM\",\n            \"invoice_payment_id\": \"3261860\",\n            \"invoice_item_id\": \"3287811\",\n            \"user_id\": \"883051\",\n            \"product_id\": \"203\",\n            \"transaction_id\": \"123-m-15427192017861\",\n            \"begin_date\": \"2018-11-20\",\n            \"expire_date\": \"2018-12-20\",\n            \"qty\": \"1\",\n            \"comment\": null\n        }\n    ]\n}"}],"_postman_id":"08c26e36-412b-4832-81a2-968d208b8b40"},{"name":"/amember/api2/user/confirm-email","id":"32915d9d-7947-4d12-a6b2-6f8b7790d775","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"url":"http://example.com/amember/api2/user/confirm-email","description":"<p>Resend confirmation message to user's email address. By default, if you enable email confirmation in aMember CP -&gt; Edit Forms  for oauth-register form's email brick, message will be sent automatically when you register user's account. \nThat action allow to re-send message and  re-generate verification code. New code will be sent to user's email address. \nIf users' email address was confirmed already, message will not be sent but API will return sucecss response. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.confirm-email</strong>, <strong>user.confirm-email.get</strong>  Send confirmation message.</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","confirm-email"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"0a0a25b2-a83d-45f8-9820-33c82d9089fe","name":"/amember/api2/user/confirm-email","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"User's password. Must be sent in order to validate request","key":"password","type":"text","value":"test123"}]},"url":"http://example.com/amember/api2/user/confirm-email"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 26 Feb 2019 10:04:41 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"67"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [],\n    \"message\": \"Confirmation message was sent\"\n}"}],"_postman_id":"32915d9d-7947-4d12-a6b2-6f8b7790d775"},{"name":"/amember/api2/user/confirm-email","id":"e652e69d-0f7a-4584-a690-51315f0d546f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"<p>Confirmatio ncode received by email</p>\n","key":"code","type":"text","value":"612580"}]},"url":"http://example.com/amember/api2/user/confirm-email","description":"<p>Confirm user's email address. \nIn confirmation email message, user get confirmation code that could be used to confirm email address via API. \nThis endpoint accept confirmation  code and mark user's email address as confirmed if code is correct. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.confirm-email</strong>, <strong>user.confirm-email.post</strong>  Confirm user's email address</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","confirm-email"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"688a8e0e-1398-4285-9483-d0bc4e010d04","name":"/amember/api2/user/confirm-email","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"description":"Confirmatio ncode received by email","key":"code","type":"text","value":"612580"}]},"url":"http://example.com/amember/api2/user/confirm-email"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 26 Feb 2019 10:38:15 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"65"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [],\n    \"message\": \"Email address was confirmed\"\n}"}],"_postman_id":"e652e69d-0f7a-4584-a690-51315f0d546f"}],"id":"c6bf29e2-42f6-4f89-9e85-9a45261d450d","description":"<p>Endpoints related to user record</p>\n","_postman_id":"c6bf29e2-42f6-4f89-9e85-9a45261d450d"},{"name":"Manage User's invoices","item":[{"name":"/amember/api2/user/invoice","id":"45cf17fc-0edf-499f-a074-48cbcd8a62b2","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/user/invoice","description":"<p>Retrieve all user's invoices or single invoice and associated access, payment, refund records. </p>\n<p>If invoice has <strong>pending</strong> satus, received invoice object will have <strong>paymentLink</strong> propertly, that is url of payment page for this invoice.</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.invoice.get</strong>  Get list of invoice objects or single invoice object</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","invoice"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"7dc9ef3d-887f-4637-8b55-bba9e15a7ee4","name":"Example of Completed Invoice","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/invoice/1738777"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 15 Nov 2018 13:06:31 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"3588"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"invoice_id\": 1738777,\n            \"user_id\": \"883051\",\n            \"paysys_id\": \"checkout-com\",\n            \"currency\": \"EUR\",\n            \"first_subtotal\": \"1.00\",\n            \"first_discount\": \"0.00\",\n            \"first_tax\": \"0.00\",\n            \"first_shipping\": \"0.00\",\n            \"first_total\": \"1.00\",\n            \"first_period\": \"1m\",\n            \"rebill_times\": \"1\",\n            \"second_subtotal\": \"1.00\",\n            \"second_discount\": \"0.00\",\n            \"second_tax\": \"0.00\",\n            \"second_shipping\": \"0.00\",\n            \"second_total\": \"1.00\",\n            \"second_period\": \"1m\",\n            \"tax_rate\": null,\n            \"tax_type\": null,\n            \"tax_title\": null,\n            \"status\": \"2\",\n            \"coupon_id\": null,\n            \"coupon_code\": null,\n            \"is_confirmed\": \"1\",\n            \"public_id\": \"E5FF8\",\n            \"invoice_key\": \"2ItNMr9rtK2HykaO\",\n            \"tm_added\": \"2018-09-27 14:17:13\",\n            \"tm_started\": \"2018-09-27 14:28:22\",\n            \"tm_cancelled\": null,\n            \"rebill_date\": \"2019-07-27\",\n            \"due_date\": null,\n            \"comment\": null,\n            \"base_currency_multi\": \"1.000000\",\n            \"aff_id\": null,\n            \"campaign_id\": null,\n            \"saved_form_id\": \"1\",\n            \"keyword_id\": null,\n            \"discount_first\": \"0.00\",\n            \"discount_second\": \"0.00\",\n            \"terms\": null,\n            \"paypal_account\": null,\n            \"remote_addr\": \"127.0.0.1\",\n            \"items\": [\n                {\n                    \"invoice_item_id\": 3287744,\n                    \"invoice_id\": \"1738777\",\n                    \"invoice_public_id\": \"E5FF8\",\n                    \"item_id\": \"203\",\n                    \"item_type\": \"product\",\n                    \"item_title\": \"Main product\",\n                    \"item_description\": \"test message\\r\\ntest message\",\n                    \"qty\": \"1\",\n                    \"first_price\": \"1.00\",\n                    \"first_discount\": \"0.00\",\n                    \"first_tax\": \"0.00\",\n                    \"first_total\": \"1.00\",\n                    \"first_shipping\": \"0.00\",\n                    \"first_period\": \"1m\",\n                    \"rebill_times\": \"1\",\n                    \"second_price\": \"1.00\",\n                    \"second_discount\": \"0.00\",\n                    \"second_tax\": \"0.00\",\n                    \"second_total\": \"1.00\",\n                    \"second_shipping\": \"0.00\",\n                    \"second_period\": \"1m\",\n                    \"currency\": \"EUR\",\n                    \"tax_group\": null,\n                    \"is_countable\": \"0\",\n                    \"variable_qty\": \"0\",\n                    \"is_tangible\": null,\n                    \"billing_plan_id\": \"203\",\n                    \"billing_plan_data\": \"a:16:{s:16:\\\"1shoppingcart_id\\\";s:0:\\\"\\\";s:11:\\\"avangate_id\\\";s:0:\\\"\\\";s:18:\\\"ccbill_flexform_id\\\";s:0:\\\"\\\";s:14:\\\"ccbill_form_id\\\";s:0:\\\"\\\";s:17:\\\"ccbill_product_id\\\";s:0:\\\"\\\";s:20:\\\"ccbill_subaccount_id\\\";s:0:\\\"\\\";s:20:\\\"clickbank_product_id\\\";s:0:\\\"\\\";s:17:\\\"clickbank_skin_id\\\";s:0:\\\"\\\";s:15:\\\"clickfunnels_id\\\";s:0:\\\"\\\";s:16:\\\"epoch_product_id\\\";s:0:\\\"\\\";s:17:\\\"epoch_site_subcat\\\";s:0:\\\"\\\";s:21:\\\"fastspring_product_id\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_name\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_path\\\";s:10:\\\"te********\\\";s:9:\\\"paypal_id\\\";s:0:\\\"\\\";s:17:\\\"recurly_plan_code\\\";s:0:\\\"\\\";}\",\n                    \"option1\": null,\n                    \"option2\": null,\n                    \"option3\": null,\n                    \"options\": \"{\\\"Additional options\\\":{\\\"value\\\":[],\\\"optionLabel\\\":\\\"Additional options\\\",\\\"valueLabel\\\":[],\\\"first_price\\\":null,\\\"second_price\\\":null}}\",\n                    \"tax_rate\": null\n                }\n            ],\n            \"payments\": [\n                {\n                    \"invoice_payment_id\": 3261827,\n                    \"invoice_id\": \"1738777\",\n                    \"invoice_public_id\": \"E5FF8\",\n                    \"user_id\": \"883051\",\n                    \"paysys_id\": \"checkout-com\",\n                    \"receipt_id\": \"charge_test_0F78F9EE748J72CD2998\",\n                    \"transaction_id\": \"charge_test_0F78F9EE748J72CD2998\",\n                    \"dattm\": \"2018-09-27 14:28:22\",\n                    \"currency\": \"EUR\",\n                    \"amount\": \"1.00\",\n                    \"discount\": \"0.00\",\n                    \"tax\": \"0.00\",\n                    \"shipping\": \"0.00\",\n                    \"refund_dattm\": null,\n                    \"base_currency_multi\": \"1.000000\",\n                    \"display_invoice_id\": \"INV-2018-39\",\n                    \"refund_amount\": null,\n                    \"invoice_sequential_id\": null,\n                    \"tax_rate\": null,\n                    \"tax_country\": null,\n                    \"tax_state\": null,\n                    \"tax_zip\": null,\n                    \"tax_city\": null,\n                    \"tax_street\": null,\n                    \"tax_street2\": null\n                }\n            ],\n            \"refunds\": [],\n            \"access\": [\n                {\n                    \"access_id\": 4944613,\n                    \"invoice_id\": \"1738777\",\n                    \"invoice_public_id\": \"E5FF8\",\n                    \"invoice_payment_id\": \"3261827\",\n                    \"invoice_item_id\": \"3287744\",\n                    \"user_id\": \"883051\",\n                    \"product_id\": \"203\",\n                    \"transaction_id\": \"charge_test_0F78F9EE748J72CD2998\",\n                    \"begin_date\": \"2018-09-27\",\n                    \"expire_date\": \"2018-10-27\",\n                    \"qty\": \"1\",\n                    \"comment\": null\n                },\n                {\n                    \"access_id\": 4944624,\n                    \"invoice_id\": \"1738777\",\n                    \"invoice_public_id\": \"E5FF8\",\n                    \"invoice_payment_id\": null,\n                    \"invoice_item_id\": \"3287744\",\n                    \"user_id\": \"883051\",\n                    \"product_id\": \"203\",\n                    \"transaction_id\": \"-m-15391764452392\",\n                    \"begin_date\": \"2018-10-27\",\n                    \"expire_date\": \"2018-11-27\",\n                    \"qty\": \"1\",\n                    \"comment\": null\n                }\n            ]\n        }\n    ]\n}"},{"id":"87150b38-d88b-4698-af75-6b8ddb420ac5","name":"Example of Pending Invoice","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/invoice/1738772"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 15 Nov 2018 13:34:25 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"2459"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"invoice_id\": 1738772,\n            \"user_id\": \"883051\",\n            \"paysys_id\": \"bendigo-bank\",\n            \"currency\": \"EUR\",\n            \"first_subtotal\": \"1.00\",\n            \"first_discount\": \"0.00\",\n            \"first_tax\": \"0.00\",\n            \"first_shipping\": \"0.00\",\n            \"first_total\": \"1.00\",\n            \"first_period\": \"1m\",\n            \"rebill_times\": \"1\",\n            \"second_subtotal\": \"1.00\",\n            \"second_discount\": \"0.00\",\n            \"second_tax\": \"0.00\",\n            \"second_shipping\": \"0.00\",\n            \"second_total\": \"1.00\",\n            \"second_period\": \"1m\",\n            \"tax_rate\": null,\n            \"tax_type\": null,\n            \"tax_title\": null,\n            \"status\": \"0\",\n            \"coupon_id\": null,\n            \"coupon_code\": null,\n            \"is_confirmed\": \"1\",\n            \"public_id\": \"7LAU4\",\n            \"invoice_key\": \"CyQSCGXOYUwKXiKA\",\n            \"tm_added\": \"2018-09-12 17:04:49\",\n            \"tm_started\": null,\n            \"tm_cancelled\": null,\n            \"rebill_date\": null,\n            \"due_date\": \"2018-11-22\",\n            \"comment\": null,\n            \"base_currency_multi\": \"1.000000\",\n            \"aff_id\": null,\n            \"campaign_id\": null,\n            \"saved_form_id\": \"1\",\n            \"keyword_id\": null,\n            \"discount_first\": \"0.00\",\n            \"discount_second\": \"0.00\",\n            \"terms\": null,\n            \"paypal_account\": null,\n            \"remote_addr\": \"192.168.1.6\",\n            \"items\": [\n                {\n                    \"invoice_item_id\": 3287739,\n                    \"invoice_id\": \"1738772\",\n                    \"invoice_public_id\": \"7LAU4\",\n                    \"item_id\": \"203\",\n                    \"item_type\": \"product\",\n                    \"item_title\": \"Main product\",\n                    \"item_description\": \"\",\n                    \"qty\": \"1\",\n                    \"first_price\": \"1.00\",\n                    \"first_discount\": \"0.00\",\n                    \"first_tax\": \"0.00\",\n                    \"first_total\": \"1.00\",\n                    \"first_shipping\": \"0.00\",\n                    \"first_period\": \"1m\",\n                    \"rebill_times\": \"1\",\n                    \"second_price\": \"1.00\",\n                    \"second_discount\": \"0.00\",\n                    \"second_tax\": \"0.00\",\n                    \"second_total\": \"1.00\",\n                    \"second_shipping\": \"0.00\",\n                    \"second_period\": \"1m\",\n                    \"currency\": \"EUR\",\n                    \"tax_group\": null,\n                    \"is_countable\": \"0\",\n                    \"variable_qty\": \"0\",\n                    \"is_tangible\": null,\n                    \"billing_plan_id\": \"203\",\n                    \"billing_plan_data\": \"a:16:{s:16:\\\"1shoppingcart_id\\\";s:0:\\\"\\\";s:11:\\\"avangate_id\\\";s:0:\\\"\\\";s:18:\\\"ccbill_flexform_id\\\";s:0:\\\"\\\";s:14:\\\"ccbill_form_id\\\";s:0:\\\"\\\";s:17:\\\"ccbill_product_id\\\";s:0:\\\"\\\";s:20:\\\"ccbill_subaccount_id\\\";s:0:\\\"\\\";s:20:\\\"clickbank_product_id\\\";s:0:\\\"\\\";s:17:\\\"clickbank_skin_id\\\";s:0:\\\"\\\";s:15:\\\"clickfunnels_id\\\";s:0:\\\"\\\";s:16:\\\"epoch_product_id\\\";s:0:\\\"\\\";s:17:\\\"epoch_site_subcat\\\";s:0:\\\"\\\";s:21:\\\"fastspring_product_id\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_name\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_path\\\";s:10:\\\"te********\\\";s:9:\\\"paypal_id\\\";s:0:\\\"\\\";s:17:\\\"recurly_plan_code\\\";s:0:\\\"\\\";}\",\n                    \"option1\": null,\n                    \"option2\": null,\n                    \"option3\": null,\n                    \"options\": \"{\\\"Additional options\\\":{\\\"value\\\":[],\\\"optionLabel\\\":\\\"Additional options\\\",\\\"valueLabel\\\":[],\\\"first_price\\\":null,\\\"second_price\\\":null}}\",\n                    \"tax_rate\": null\n                }\n            ],\n            \"payments\": [],\n            \"refunds\": [],\n            \"access\": [],\n            \"paymentLink\": \"https://test85.central-office.net/amember/pay/7LAU4-c0a6cc92885723d5\"\n        }\n    ]\n}"}],"_postman_id":"45cf17fc-0edf-499f-a074-48cbcd8a62b2"},{"name":"/amember/api2/user/invoice","id":"c27144a2-504e-437f-93d5-5390457d3574","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"products[0][product_id]","value":"5","description":"<p>ID of product in amember Cntrol Panel </p>\n","type":"text"},{"key":"products[0][billing_plan_id]","value":"5","description":"<p><em>(optional)</em> ID of Billing Plan  You can get such ID from /amember/api2/available-products request. In ommited, default billing plan will be used</p>\n","type":"text"},{"key":"products[0][qty]","value":"1","description":"<p><em>(optional)</em> Product quantity.  If product doesn't allow to change quantity, it will be set to 1</p>\n","type":"text"},{"key":"paysys_id","value":"cc-demo","description":"<p>Paysystem ID used for invoice. You can get it from /amember/api2/paysystems call</p>\n","type":"text"},{"key":"coupon","value":"UR2W4U2S","description":"<p>Couponj code specified by customer</p>\n","type":"text"}]},"url":"http://example.com/amember/api2/user/invoice","description":"<p>Create Invoice record. </p>\n<p>This call will execute all hooks related to invoice(so pending invoice notificatons will be sent). </p>\n<p>If you add only free  products to invoice, it will be set as completed. \nEndpoint accept form data post or json object as input, please see examples for details.</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.invoice.post</strong>  Create new invoice</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","invoice"],"host":["example","com"],"query":[{"disabled":true,"description":{"content":"<p>ID of product in amember Cntrol Panel </p>\n","type":"text/plain"},"key":"products[0][product_id]","value":"5"},{"disabled":true,"description":{"content":"<p><em>(optional)</em> ID of Billing Plan  You can get such ID from /amember/api2/available-products request. In ommited, default billing plan will be used</p>\n","type":"text/plain"},"key":"products[0][billing_plan_id]","value":"5"},{"disabled":true,"description":{"content":"<p><em>(optional)</em> Product quantity.  If product doesn't allow to change quantity, it will be set to 1</p>\n","type":"text/plain"},"key":"products[0][qty]","value":"1"},{"disabled":true,"description":{"content":"<p>Paysystem ID You can get it from /amember/api2/paysystems call</p>\n","type":"text/plain"},"key":"paysys_id","value":"cc-demo"},{"disabled":true,"description":{"content":"<p><em>(optional)</em> Coupon code</p>\n","type":"text/plain"},"key":"coupon","value":"UR2W4U2S"}],"variable":[]}},"response":[{"id":"1806f04c-4e38-46b8-a8fe-d93c5bded174","name":"Example of pending invocie with with payment link","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"products[0][product_id]","value":"5","description":"ID of product in amember Cntrol Panel ","type":"text"},{"key":"products[0][billing_plan_id]","value":"5","description":"*(optional)* ID of Billing Plan  You can get such ID from /amember/api2/available-products request. In ommited, default billing plan will be used\n","type":"text"},{"key":"products[0][qty]","value":"1","description":"*(optional)* Product quantity.  If product doesn't allow to change quantity, it will be set to 1\n","type":"text"},{"key":"paysys_id","value":"cc-demo","description":"Paysystem ID used for invoice. You can get it from /amember/api2/paysystems call","type":"text"},{"key":"coupon","value":"UR2W4U2S","description":"Couponj code specified by customer","type":"text"}]},"url":{"raw":"http://example.com/amember/api2/user/invoice","protocol":"http","host":["example","com"],"path":["amember","api2","user","invoice"],"query":[{"key":"products[0][product_id]","value":"5","description":"ID of product in amember Cntrol Panel ","disabled":true},{"key":"products[0][billing_plan_id]","value":"5","description":"*(optional)* ID of Billing Plan  You can get such ID from /amember/api2/available-products request. In ommited, default billing plan will be used","disabled":true},{"key":"products[0][qty]","value":"1","description":"*(optional)* Product quantity.  If product doesn't allow to change quantity, it will be set to 1\n","disabled":true},{"key":"paysys_id","value":"cc-demo","description":"Paysystem ID You can get it from /amember/api2/paysystems call","disabled":true},{"key":"coupon","value":"UR2W4U2S","description":"*(optional)* Coupon code","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 17 Nov 2018 09:13:53 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"2090"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"invoice_id\": 1218,\n        \"user_id\": \"3723\",\n        \"paysys_id\": \"cc-demo\",\n        \"currency\": \"USD\",\n        \"first_subtotal\": \"183.00\",\n        \"first_discount\": \"18.30\",\n        \"first_tax\": \"0.00\",\n        \"first_shipping\": \"0.00\",\n        \"first_total\": \"164.70\",\n        \"first_period\": \"1y\",\n        \"rebill_times\": \"99999\",\n        \"second_subtotal\": \"183.00\",\n        \"second_discount\": \"0.00\",\n        \"second_tax\": \"0.00\",\n        \"second_shipping\": \"0.00\",\n        \"second_total\": \"183.00\",\n        \"second_period\": \"1y\",\n        \"tax_rate\": null,\n        \"tax_type\": null,\n        \"tax_title\": null,\n        \"status\": \"0\",\n        \"coupon_id\": \"2\",\n        \"is_confirmed\": \"1\",\n        \"is_cancelled\": null,\n        \"public_id\": \"T8RZX\",\n        \"invoice_key\": \"HwrvbBWujYVoGhWK\",\n        \"tm_added\": \"2018-11-17 13:13:53\",\n        \"tm_started\": null,\n        \"tm_cancelled\": null,\n        \"rebill_date\": null,\n        \"comment\": null,\n        \"base_currency_multi\": \"1.000000\",\n        \"coupon_code\": \"UR2W4U2S\",\n        \"due_date\": null,\n        \"aff_id\": null,\n        \"discount_first\": \"0.00\",\n        \"discount_second\": \"0.00\",\n        \"terms\": null,\n        \"saved_form_id\": null,\n        \"keyword_id\": null,\n        \"remote_addr\": \"::1\",\n        \"paymentLink\": \"http://localhost/amember/payment/cc-demo/cc?id=T8RZX-a9f586d24905d08c\",\n        \"items\": [\n            {\n                \"invoice_item_id\": 1332,\n                \"invoice_id\": \"1218\",\n                \"item_id\": \"5\",\n                \"item_type\": \"product\",\n                \"item_title\": \"Training rename test\",\n                \"item_description\": \"Short description of this subscription\",\n                \"qty\": \"1\",\n                \"first_price\": \"183.00\",\n                \"first_discount\": \"18.30\",\n                \"first_tax\": \"0.00\",\n                \"first_total\": \"164.70\",\n                \"first_shipping\": \"0.00\",\n                \"first_period\": \"1y\",\n                \"rebill_times\": \"99999\",\n                \"second_price\": \"183.00\",\n                \"second_discount\": \"0.00\",\n                \"second_tax\": \"0.00\",\n                \"second_total\": \"183.00\",\n                \"second_shipping\": \"0.00\",\n                \"second_period\": \"1y\",\n                \"currency\": \"USD\",\n                \"no_tax\": null,\n                \"trial_group\": null,\n                \"renewal_group\": null,\n                \"is_countable\": \"0\",\n                \"is_tangible\": null,\n                \"billing_plan_id\": \"5\",\n                \"billing_plan_data\": \"a:4:{s:9:\\\"paypal_id\\\";s:0:\\\"\\\";s:16:\\\"safecart_product\\\";s:0:\\\"\\\";s:12:\\\"safecart_sku\\\";s:0:\\\"\\\";s:16:\\\"wsopro_item_name\\\";s:0:\\\"\\\";}\",\n                \"option1\": null,\n                \"option2\": null,\n                \"option3\": null,\n                \"variable_qty\": \"0\",\n                \"tax_group\": null,\n                \"invoice_public_id\": \"T8RZX\",\n                \"options\": \"[]\",\n                \"tax_rate\": null\n            }\n        ],\n        \"payments\": [],\n        \"refunds\": [],\n        \"access\": []\n    }\n}"},{"id":"52746019-ee16-4f54-9552-f1b40d9ee87f","name":"Example of invoice with one free product","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"products","value":"8","description":"ID of product in amember Cntrol Panel ","type":"text"},{"key":"products[0][billing_plan_id]","value":"8","description":"*(optional)* ID of Billing Plan  You can get such ID from /amember/api2/available-products request. In ommited, default billing plan will be used\n","type":"text","disabled":true},{"key":"products[0][qty]","value":"1","description":"*(optional)* Product quantity.  If product doesn't allow to change quantity, it will be set to 1\n","type":"text","disabled":true},{"key":"paysys_id","value":"cc-demo","description":"Paysystem ID used for invoice. You can get it from /amember/api2/paysystems call","type":"text","disabled":true},{"key":"coupon","value":"UR2W4U2S","description":"Couponj code specified by customer","type":"text","disabled":true}]},"url":{"raw":"http://example.com/amember/api2/user/invoice","protocol":"http","host":["example","com"],"path":["amember","api2","user","invoice"],"query":[{"key":"products[0][product_id]","value":"5","description":"ID of product in amember Cntrol Panel ","disabled":true},{"key":"products[0][billing_plan_id]","value":"5","description":"*(optional)* ID of Billing Plan  You can get such ID from /amember/api2/available-products request. In ommited, default billing plan will be used","disabled":true},{"key":"products[0][qty]","value":"1","description":"*(optional)* Product quantity.  If product doesn't allow to change quantity, it will be set to 1\n","disabled":true},{"key":"paysys_id","value":"cc-demo","description":"Paysystem ID You can get it from /amember/api2/paysystems call","disabled":true},{"key":"coupon","value":"UR2W4U2S","description":"*(optional)* Coupon code","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 17 Nov 2018 09:15:58 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"1976"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"invoice_id\": 1219,\n        \"user_id\": \"3723\",\n        \"paysys_id\": \"free\",\n        \"currency\": \"USD\",\n        \"first_subtotal\": \"0.00\",\n        \"first_discount\": \"0.00\",\n        \"first_tax\": \"0.00\",\n        \"first_shipping\": \"0.00\",\n        \"first_total\": \"0.00\",\n        \"first_period\": \"30d\",\n        \"rebill_times\": \"0\",\n        \"second_subtotal\": \"0.00\",\n        \"second_discount\": \"0.00\",\n        \"second_tax\": \"0.00\",\n        \"second_shipping\": \"0.00\",\n        \"second_total\": \"0.00\",\n        \"second_period\": null,\n        \"tax_rate\": null,\n        \"tax_type\": null,\n        \"tax_title\": null,\n        \"status\": 1,\n        \"coupon_id\": null,\n        \"is_confirmed\": \"1\",\n        \"is_cancelled\": null,\n        \"public_id\": \"SJUG6\",\n        \"invoice_key\": \"sMDdGu9VqeBFBdbf\",\n        \"tm_added\": \"2018-11-17 13:15:59\",\n        \"tm_started\": \"2018-11-17 13:15:59\",\n        \"tm_cancelled\": null,\n        \"rebill_date\": null,\n        \"comment\": null,\n        \"base_currency_multi\": \"1.000000\",\n        \"coupon_code\": null,\n        \"due_date\": null,\n        \"aff_id\": null,\n        \"discount_first\": \"0.00\",\n        \"discount_second\": \"0.00\",\n        \"terms\": null,\n        \"saved_form_id\": null,\n        \"keyword_id\": null,\n        \"remote_addr\": \"::1\",\n        \"items\": [\n            {\n                \"invoice_item_id\": 1333,\n                \"invoice_id\": \"1219\",\n                \"item_id\": \"8\",\n                \"item_type\": \"product\",\n                \"item_title\": \"Testik\",\n                \"item_description\": \"\",\n                \"qty\": \"1\",\n                \"first_price\": \"0.00\",\n                \"first_discount\": \"0.00\",\n                \"first_tax\": \"0.00\",\n                \"first_total\": \"0.00\",\n                \"first_shipping\": \"0.00\",\n                \"first_period\": \"30d\",\n                \"rebill_times\": \"0\",\n                \"second_price\": \"0.00\",\n                \"second_discount\": \"0.00\",\n                \"second_tax\": \"0.00\",\n                \"second_total\": \"0.00\",\n                \"second_shipping\": \"0.00\",\n                \"second_period\": null,\n                \"currency\": \"USD\",\n                \"no_tax\": null,\n                \"trial_group\": null,\n                \"renewal_group\": null,\n                \"is_countable\": \"0\",\n                \"is_tangible\": null,\n                \"billing_plan_id\": \"8\",\n                \"billing_plan_data\": \"a:2:{s:16:\\\"safecart_product\\\";s:0:\\\"\\\";s:12:\\\"safecart_sku\\\";s:0:\\\"\\\";}\",\n                \"option1\": null,\n                \"option2\": null,\n                \"option3\": null,\n                \"variable_qty\": \"0\",\n                \"tax_group\": null,\n                \"invoice_public_id\": \"SJUG6\",\n                \"options\": \"[]\",\n                \"tax_rate\": null\n            }\n        ],\n        \"payments\": [],\n        \"refunds\": [],\n        \"access\": [\n            {\n                \"access_id\": 3517,\n                \"invoice_id\": \"1219\",\n                \"invoice_payment_id\": null,\n                \"user_id\": \"3723\",\n                \"product_id\": \"8\",\n                \"transaction_id\": \"::1-1542446159\",\n                \"begin_date\": \"2018-11-17\",\n                \"expire_date\": \"2018-12-17\",\n                \"qty\": \"1\",\n                \"invoice_item_id\": \"1333\",\n                \"comment\": null,\n                \"invoice_public_id\": \"SJUG6\"\n            }\n        ]\n    }\n}"}],"_postman_id":"c27144a2-504e-437f-93d5-5390457d3574"},{"name":"/amember/api2/user/invoice/[invoice_id]","id":"b73f6793-e69f-4cf1-8ea2-1f93463ac974","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"products[0]","value":"204","type":"text","description":"<p>Products to include in invoice. Please note that products will be replaced. So you need to include all products again. </p>\n"},{"key":"paysys_id","value":"stripe","type":"text","description":"<p>Update paysystem</p>\n"},{"key":"coupon","value":"UR2W4U2S","type":"text","description":"<p>Update coupon</p>\n"}]},"url":"http://example.com/amember/api2/user/invoice/[invoice_id]","description":"<p>Update invoice record.</p>\n<p>You can update pending invoice record and change products in invoice, coupon code and paysystem. Attempt to update completed invoice will generate an error.  </p>\n<p>If you add only free  products to invoice, it will be set as completed. \nEndpoint accept form data post or json object as input, please see examples for details.</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.invoice.put</strong>  Update invoice record</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","invoice","[invoice_id]"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"76e1bbbd-373c-400a-b4ef-7a15757ae89e","name":"/amember/api2/user/invoice/1738914","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"products[0]","value":"204","type":"text"},{"key":"products[0][billing_plan_id]","value":"5","type":"text","disabled":true},{"key":"products[0][qty]","value":"1","type":"text","disabled":true},{"key":"paysys_id","value":"stripe","type":"text"},{"key":"coupon","value":"UR2W4U2S","type":"text","disabled":true}]},"url":"http://example.com/amember/api2/user/invoice/1738914"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 26 Dec 2018 16:00:18 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"2255"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"invoice_id\": 1738914,\n        \"user_id\": \"883051\",\n        \"paysys_id\": \"stripe\",\n        \"currency\": \"USD\",\n        \"first_subtotal\": \"8.00\",\n        \"first_discount\": \"0.00\",\n        \"first_tax\": \"0.00\",\n        \"first_shipping\": \"0.00\",\n        \"first_total\": \"8.00\",\n        \"first_period\": \"10d\",\n        \"rebill_times\": \"0\",\n        \"second_subtotal\": \"0.00\",\n        \"second_discount\": \"0.00\",\n        \"second_tax\": \"0.00\",\n        \"second_shipping\": \"0.00\",\n        \"second_total\": \"0.00\",\n        \"second_period\": null,\n        \"tax_rate\": null,\n        \"tax_type\": null,\n        \"tax_title\": null,\n        \"status\": \"0\",\n        \"coupon_id\": null,\n        \"coupon_code\": null,\n        \"is_confirmed\": \"1\",\n        \"public_id\": \"Z8417\",\n        \"invoice_key\": \"am7yW6iBqwFPzZJm\",\n        \"tm_added\": \"2018-12-26 19:56:11\",\n        \"tm_started\": null,\n        \"tm_cancelled\": null,\n        \"rebill_date\": null,\n        \"due_date\": null,\n        \"comment\": null,\n        \"base_currency_multi\": \"1.000000\",\n        \"aff_id\": null,\n        \"campaign_id\": null,\n        \"saved_form_id\": null,\n        \"keyword_id\": null,\n        \"discount_first\": \"0.00\",\n        \"discount_second\": \"0.00\",\n        \"terms\": null,\n        \"paypal_account\": null,\n        \"remote_addr\": \"127.0.0.1\",\n        \"paymentLink\": \"https://test85.central-office.net/amember/payment/stripe/cc?id=Z8417-9dd353d696438abb\",\n        \"items\": [\n            {\n                \"invoice_item_id\": 3287880,\n                \"invoice_id\": \"1738914\",\n                \"invoice_public_id\": \"Z8417\",\n                \"item_id\": \"204\",\n                \"item_type\": \"product\",\n                \"item_title\": \"Scheduled product 1\",\n                \"item_description\": \"\",\n                \"qty\": \"1\",\n                \"first_price\": \"8.00\",\n                \"first_discount\": \"0.00\",\n                \"first_tax\": \"0.00\",\n                \"first_total\": \"8.00\",\n                \"first_shipping\": \"0.00\",\n                \"first_period\": \"10d\",\n                \"rebill_times\": \"0\",\n                \"second_price\": \"0.00\",\n                \"second_discount\": \"0.00\",\n                \"second_tax\": \"0.00\",\n                \"second_total\": \"0.00\",\n                \"second_shipping\": \"0.00\",\n                \"second_period\": null,\n                \"currency\": \"USD\",\n                \"tax_group\": null,\n                \"is_countable\": \"1\",\n                \"variable_qty\": \"1\",\n                \"is_tangible\": null,\n                \"billing_plan_id\": \"204\",\n                \"billing_plan_data\": \"a:14:{s:16:\\\"1shoppingcart_id\\\";s:0:\\\"\\\";s:18:\\\"ccbill_flexform_id\\\";s:0:\\\"\\\";s:14:\\\"ccbill_form_id\\\";s:0:\\\"\\\";s:17:\\\"ccbill_product_id\\\";s:0:\\\"\\\";s:20:\\\"ccbill_subaccount_id\\\";s:0:\\\"\\\";s:20:\\\"clickbank_product_id\\\";s:0:\\\"\\\";s:17:\\\"clickbank_skin_id\\\";s:0:\\\"\\\";s:15:\\\"clickfunnels_id\\\";s:0:\\\"\\\";s:16:\\\"epoch_product_id\\\";s:0:\\\"\\\";s:17:\\\"epoch_site_subcat\\\";s:0:\\\"\\\";s:21:\\\"fastspring_product_id\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_name\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_path\\\";s:0:\\\"\\\";s:9:\\\"paypal_id\\\";s:0:\\\"\\\";}\",\n                \"option1\": null,\n                \"option2\": null,\n                \"option3\": null,\n                \"options\": \"[]\",\n                \"tax_rate\": null\n            }\n        ],\n        \"payments\": [],\n        \"refunds\": [],\n        \"access\": []\n    }\n}"}],"_postman_id":"b73f6793-e69f-4cf1-8ea2-1f93463ac974"},{"name":"/amember/api2/user/invoice/[invoice_id]/charge","id":"f1c3ab92-7805-40a9-83db-67697f5a8bf5","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"token","value":"123","type":"text"}]},"url":"http://example.com/amember/api2/user/invoice/[invoice_id]/charge","description":"<p>Setup charge on user's invoice using payment token obtained externaly. </p>\n<p>Real payment will be processed. All aMember's hooks will be executed, so user will receive all necessary emails and will be added to all linked thrid-party scripts. </p>\n<p>That is possible to run rebills through that hook too. \nCall charge endpoint without token, aMember will setup charge using  token stored in invoice record. Please note that charge can't be executed  before actual rebill_date.</p>\n<p>Information about charge is available in <strong>data.chargeResult</strong> object. Please see examples.</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.invoice.charge</strong>  Charge invoice using payment token received externally</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","invoice","[invoice_id]","charge"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"10d0e6bc-eebe-4e97-b0cf-6ac7de66e0ba","name":"Example of successful charge","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"token","value":"123","type":"text"}]},"url":"http://example.com/amember/api2/user/invoice/1220/charge"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 18 Nov 2018 20:35:50 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"2926"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"invoice_id\": 1220,\n        \"user_id\": \"3723\",\n        \"paysys_id\": \"cc-demo\",\n        \"currency\": \"USD\",\n        \"first_subtotal\": \"183.00\",\n        \"first_discount\": \"0.00\",\n        \"first_tax\": \"0.00\",\n        \"first_shipping\": \"0.00\",\n        \"first_total\": \"183.00\",\n        \"first_period\": \"1y\",\n        \"rebill_times\": \"99999\",\n        \"second_subtotal\": \"183.00\",\n        \"second_discount\": \"0.00\",\n        \"second_tax\": \"0.00\",\n        \"second_shipping\": \"0.00\",\n        \"second_total\": \"183.00\",\n        \"second_period\": \"1y\",\n        \"tax_rate\": null,\n        \"tax_type\": null,\n        \"tax_title\": null,\n        \"status\": \"2\",\n        \"coupon_id\": null,\n        \"is_confirmed\": \"1\",\n        \"is_cancelled\": null,\n        \"public_id\": \"7XV5G\",\n        \"invoice_key\": \"59ohvPVs6qllb9yl\",\n        \"tm_added\": \"2018-11-19 00:35:28\",\n        \"tm_started\": \"2018-11-19 00:35:51\",\n        \"tm_cancelled\": null,\n        \"rebill_date\": \"2019-11-19\",\n        \"comment\": null,\n        \"base_currency_multi\": \"1.000000\",\n        \"coupon_code\": null,\n        \"due_date\": null,\n        \"aff_id\": null,\n        \"discount_first\": \"0.00\",\n        \"discount_second\": \"0.00\",\n        \"terms\": null,\n        \"saved_form_id\": null,\n        \"keyword_id\": null,\n        \"remote_addr\": \"::1\",\n        \"chargeResult\": {\n            \"status\": \"OK\",\n            \"error\": []\n        },\n        \"items\": [\n            {\n                \"invoice_item_id\": 1334,\n                \"invoice_id\": \"1220\",\n                \"item_id\": \"5\",\n                \"item_type\": \"product\",\n                \"item_title\": \"Training rename test\",\n                \"item_description\": \"Short description of this subscription\",\n                \"qty\": \"1\",\n                \"first_price\": \"183.00\",\n                \"first_discount\": \"0.00\",\n                \"first_tax\": \"0.00\",\n                \"first_total\": \"183.00\",\n                \"first_shipping\": \"0.00\",\n                \"first_period\": \"1y\",\n                \"rebill_times\": \"99999\",\n                \"second_price\": \"183.00\",\n                \"second_discount\": \"0.00\",\n                \"second_tax\": \"0.00\",\n                \"second_total\": \"183.00\",\n                \"second_shipping\": \"0.00\",\n                \"second_period\": \"1y\",\n                \"currency\": \"USD\",\n                \"no_tax\": null,\n                \"trial_group\": null,\n                \"renewal_group\": null,\n                \"is_countable\": \"0\",\n                \"is_tangible\": null,\n                \"billing_plan_id\": \"5\",\n                \"billing_plan_data\": \"a:4:{s:9:\\\"paypal_id\\\";s:0:\\\"\\\";s:16:\\\"safecart_product\\\";s:0:\\\"\\\";s:12:\\\"safecart_sku\\\";s:0:\\\"\\\";s:16:\\\"wsopro_item_name\\\";s:0:\\\"\\\";}\",\n                \"option1\": null,\n                \"option2\": null,\n                \"option3\": null,\n                \"variable_qty\": \"0\",\n                \"tax_group\": null,\n                \"invoice_public_id\": \"7XV5G\",\n                \"options\": \"[]\",\n                \"tax_rate\": null\n            }\n        ],\n        \"payments\": [\n            {\n                \"invoice_payment_id\": 1222,\n                \"invoice_id\": \"1220\",\n                \"user_id\": \"3723\",\n                \"paysys_id\": \"cc-demo\",\n                \"receipt_id\": \"D51-2683\",\n                \"transaction_id\": \"D51-2683\",\n                \"dattm\": \"2018-11-19 00:35:51\",\n                \"currency\": \"USD\",\n                \"amount\": \"183.00\",\n                \"discount\": \"0.00\",\n                \"tax\": \"0.00\",\n                \"shipping\": \"0.00\",\n                \"refund_dattm\": null,\n                \"base_currency_multi\": \"1.000000\",\n                \"invoice_public_id\": \"7XV5G\",\n                \"display_invoice_id\": \"7XV5G/1\",\n                \"refund_amount\": null\n            }\n        ],\n        \"refunds\": [],\n        \"access\": [\n            {\n                \"access_id\": 3524,\n                \"invoice_id\": \"1220\",\n                \"invoice_payment_id\": \"1222\",\n                \"user_id\": \"3723\",\n                \"product_id\": \"5\",\n                \"transaction_id\": \"D51-2683\",\n                \"begin_date\": \"2018-11-19\",\n                \"expire_date\": \"2019-11-19\",\n                \"qty\": \"1\",\n                \"invoice_item_id\": \"1334\",\n                \"comment\": null,\n                \"invoice_public_id\": \"7XV5G\"\n            }\n        ]\n    }\n}"},{"id":"6b76942e-4c32-45d1-986a-04221a7162c8","name":"Example of internal error or bad request","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"token","value":"123","type":"text"}]},"url":"http://example.com/amember/api2/user/invoice/1220/charge"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 18 Nov 2018 20:48:43 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"111"},{"key":"Connection","value":"close"},{"key":"Content-Type","value":"application/problem+json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"error\": \"bad-request\",\n    \"message\": \"Attempt to charge invoice before rebill date. (2020-11-19)\"\n}"},{"id":"b7f51e3f-a942-43e0-af01-a1dd28537b91","name":"Eample of declined charge","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"token","value":"123","type":"text"}]},"url":"http://example.com/amember/api2/user/invoice/1220/charge"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 18 Nov 2018 20:39:47 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"3599"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"invoice_id\": 1220,\n        \"user_id\": \"3723\",\n        \"paysys_id\": \"cc-demo\",\n        \"currency\": \"USD\",\n        \"first_subtotal\": \"183.00\",\n        \"first_discount\": \"0.00\",\n        \"first_tax\": \"0.00\",\n        \"first_shipping\": \"0.00\",\n        \"first_total\": \"183.00\",\n        \"first_period\": \"1y\",\n        \"rebill_times\": \"99999\",\n        \"second_subtotal\": \"183.00\",\n        \"second_discount\": \"0.00\",\n        \"second_tax\": \"0.00\",\n        \"second_shipping\": \"0.00\",\n        \"second_total\": \"183.00\",\n        \"second_period\": \"1y\",\n        \"tax_rate\": null,\n        \"tax_type\": null,\n        \"tax_title\": null,\n        \"status\": \"2\",\n        \"coupon_id\": null,\n        \"is_confirmed\": \"1\",\n        \"is_cancelled\": null,\n        \"public_id\": \"7XV5G\",\n        \"invoice_key\": \"59ohvPVs6qllb9yl\",\n        \"tm_added\": \"2018-11-19 00:35:28\",\n        \"tm_started\": \"2018-11-19 00:35:51\",\n        \"tm_cancelled\": null,\n        \"rebill_date\": \"2020-11-19\",\n        \"comment\": null,\n        \"base_currency_multi\": \"1.000000\",\n        \"coupon_code\": null,\n        \"due_date\": null,\n        \"aff_id\": null,\n        \"discount_first\": \"0.00\",\n        \"discount_second\": \"0.00\",\n        \"terms\": null,\n        \"saved_form_id\": null,\n        \"keyword_id\": null,\n        \"remote_addr\": \"::1\",\n        \"chargeResult\": {\n            \"status\": \"error\",\n            \"error\": [\n                \"Transaction declined.\"\n            ]\n        },\n        \"items\": [\n            {\n                \"invoice_item_id\": 1334,\n                \"invoice_id\": \"1220\",\n                \"item_id\": \"5\",\n                \"item_type\": \"product\",\n                \"item_title\": \"Training rename test\",\n                \"item_description\": \"Short description of this subscription\",\n                \"qty\": \"1\",\n                \"first_price\": \"183.00\",\n                \"first_discount\": \"0.00\",\n                \"first_tax\": \"0.00\",\n                \"first_total\": \"183.00\",\n                \"first_shipping\": \"0.00\",\n                \"first_period\": \"1y\",\n                \"rebill_times\": \"99999\",\n                \"second_price\": \"183.00\",\n                \"second_discount\": \"0.00\",\n                \"second_tax\": \"0.00\",\n                \"second_total\": \"183.00\",\n                \"second_shipping\": \"0.00\",\n                \"second_period\": \"1y\",\n                \"currency\": \"USD\",\n                \"no_tax\": null,\n                \"trial_group\": null,\n                \"renewal_group\": null,\n                \"is_countable\": \"0\",\n                \"is_tangible\": null,\n                \"billing_plan_id\": \"5\",\n                \"billing_plan_data\": \"a:4:{s:9:\\\"paypal_id\\\";s:0:\\\"\\\";s:16:\\\"safecart_product\\\";s:0:\\\"\\\";s:12:\\\"safecart_sku\\\";s:0:\\\"\\\";s:16:\\\"wsopro_item_name\\\";s:0:\\\"\\\";}\",\n                \"option1\": null,\n                \"option2\": null,\n                \"option3\": null,\n                \"variable_qty\": \"0\",\n                \"tax_group\": null,\n                \"invoice_public_id\": \"7XV5G\",\n                \"options\": \"[]\",\n                \"tax_rate\": null\n            }\n        ],\n        \"payments\": [\n            {\n                \"invoice_payment_id\": 1222,\n                \"invoice_id\": \"1220\",\n                \"user_id\": \"3723\",\n                \"paysys_id\": \"cc-demo\",\n                \"receipt_id\": \"D51-2683\",\n                \"transaction_id\": \"D51-2683\",\n                \"dattm\": \"2018-11-19 00:35:51\",\n                \"currency\": \"USD\",\n                \"amount\": \"183.00\",\n                \"discount\": \"0.00\",\n                \"tax\": \"0.00\",\n                \"shipping\": \"0.00\",\n                \"refund_dattm\": null,\n                \"base_currency_multi\": \"1.000000\",\n                \"invoice_public_id\": \"7XV5G\",\n                \"display_invoice_id\": \"7XV5G/1\",\n                \"refund_amount\": null\n            },\n            {\n                \"invoice_payment_id\": 1223,\n                \"invoice_id\": \"1220\",\n                \"user_id\": \"3723\",\n                \"paysys_id\": \"cc-demo\",\n                \"receipt_id\": \"D92-2634\",\n                \"transaction_id\": \"D92-2634\",\n                \"dattm\": \"2018-11-19 00:38:12\",\n                \"currency\": \"USD\",\n                \"amount\": \"183.00\",\n                \"discount\": \"0.00\",\n                \"tax\": \"0.00\",\n                \"shipping\": \"0.00\",\n                \"refund_dattm\": null,\n                \"base_currency_multi\": \"1.000000\",\n                \"invoice_public_id\": \"7XV5G\",\n                \"display_invoice_id\": \"7XV5G/2\",\n                \"refund_amount\": null\n            }\n        ],\n        \"refunds\": [],\n        \"access\": [\n            {\n                \"access_id\": 3524,\n                \"invoice_id\": \"1220\",\n                \"invoice_payment_id\": \"1222\",\n                \"user_id\": \"3723\",\n                \"product_id\": \"5\",\n                \"transaction_id\": \"D51-2683\",\n                \"begin_date\": \"2018-11-19\",\n                \"expire_date\": \"2019-11-19\",\n                \"qty\": \"1\",\n                \"invoice_item_id\": \"1334\",\n                \"comment\": null,\n                \"invoice_public_id\": \"7XV5G\"\n            },\n            {\n                \"access_id\": 3525,\n                \"invoice_id\": \"1220\",\n                \"invoice_payment_id\": \"1223\",\n                \"user_id\": \"3723\",\n                \"product_id\": \"5\",\n                \"transaction_id\": \"D92-2634\",\n                \"begin_date\": \"2019-11-19\",\n                \"expire_date\": \"2020-11-19\",\n                \"qty\": \"1\",\n                \"invoice_item_id\": \"1334\",\n                \"comment\": null,\n                \"invoice_public_id\": \"7XV5G\"\n            }\n        ]\n    }\n}"}],"_postman_id":"f1c3ab92-7805-40a9-83db-67697f5a8bf5"},{"name":"/amember/api2/user/invoice/[invoice_id]","id":"66247e22-e94b-4c4c-8bd5-c7f5a725ddd6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://example.com/amember/api2/user/invoice/1738846","description":"<p>Cancel recurring invoice. \naMember will try to submit cancellation request to payment system and cancel invoice. \nIf request was seccessful, invoice will be cancelled and client will receive OK responce. \nIf user should be redirected to payment system for cancellation status=&gt;<strong>redirect</strong> response will be received. </p>\n","urlObject":{"protocol":"http","path":["amember","api2","user","invoice","1738846"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"c2052d70-99fe-4025-82b7-dca3a140e98d","name":"Successful Cancellation","originalRequest":{"method":"DELETE","header":[],"url":"http://example.com/amember/api2/user/invoice/1738845"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 13:08:23 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"3122"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"invoice_id\": 1738845,\n        \"user_id\": \"883051\",\n        \"paysys_id\": \"cc-demo\",\n        \"currency\": \"EUR\",\n        \"first_subtotal\": \"2.00\",\n        \"first_discount\": \"0.00\",\n        \"first_tax\": \"0.00\",\n        \"first_shipping\": \"0.00\",\n        \"first_total\": \"2.00\",\n        \"first_period\": \"1m\",\n        \"rebill_times\": \"99999\",\n        \"second_subtotal\": \"2.00\",\n        \"second_discount\": \"0.00\",\n        \"second_tax\": \"0.00\",\n        \"second_shipping\": \"0.00\",\n        \"second_total\": \"2.00\",\n        \"second_period\": \"1m\",\n        \"tax_rate\": null,\n        \"tax_type\": null,\n        \"tax_title\": null,\n        \"status\": \"3\",\n        \"coupon_id\": null,\n        \"coupon_code\": null,\n        \"is_confirmed\": \"1\",\n        \"public_id\": \"7CMJ5\",\n        \"invoice_key\": \"FF7yyA0vNZe2T928\",\n        \"tm_added\": \"2018-11-20 17:06:00\",\n        \"tm_started\": \"2018-11-20 17:06:00\",\n        \"tm_cancelled\": \"2018-11-20 17:08:23\",\n        \"rebill_date\": null,\n        \"due_date\": null,\n        \"comment\": \"\",\n        \"base_currency_multi\": \"1.000000\",\n        \"aff_id\": null,\n        \"campaign_id\": null,\n        \"saved_form_id\": null,\n        \"keyword_id\": null,\n        \"discount_first\": \"0.00\",\n        \"discount_second\": \"0.00\",\n        \"terms\": null,\n        \"paypal_account\": null,\n        \"remote_addr\": \"127.0.0.1\",\n        \"items\": [\n            {\n                \"invoice_item_id\": 3287810,\n                \"invoice_id\": \"1738845\",\n                \"invoice_public_id\": \"7CMJ5\",\n                \"item_id\": \"203\",\n                \"item_type\": \"product\",\n                \"item_title\": \"Main product\",\n                \"item_description\": \"test message\\r\\ntest message\",\n                \"qty\": \"1\",\n                \"first_price\": \"2.00\",\n                \"first_discount\": \"0.00\",\n                \"first_tax\": \"0.00\",\n                \"first_total\": \"2.00\",\n                \"first_shipping\": \"0.00\",\n                \"first_period\": \"1m\",\n                \"rebill_times\": \"99999\",\n                \"second_price\": \"2.00\",\n                \"second_discount\": \"0.00\",\n                \"second_tax\": \"0.00\",\n                \"second_total\": \"2.00\",\n                \"second_shipping\": \"0.00\",\n                \"second_period\": \"1m\",\n                \"currency\": \"EUR\",\n                \"tax_group\": null,\n                \"is_countable\": \"0\",\n                \"variable_qty\": \"0\",\n                \"is_tangible\": null,\n                \"billing_plan_id\": \"203\",\n                \"billing_plan_data\": \"a:16:{s:16:\\\"1shoppingcart_id\\\";s:0:\\\"\\\";s:11:\\\"avangate_id\\\";s:0:\\\"\\\";s:18:\\\"ccbill_flexform_id\\\";s:0:\\\"\\\";s:14:\\\"ccbill_form_id\\\";s:0:\\\"\\\";s:17:\\\"ccbill_product_id\\\";s:0:\\\"\\\";s:20:\\\"ccbill_subaccount_id\\\";s:0:\\\"\\\";s:20:\\\"clickbank_product_id\\\";s:0:\\\"\\\";s:17:\\\"clickbank_skin_id\\\";s:0:\\\"\\\";s:15:\\\"clickfunnels_id\\\";s:0:\\\"\\\";s:16:\\\"epoch_product_id\\\";s:0:\\\"\\\";s:17:\\\"epoch_site_subcat\\\";s:0:\\\"\\\";s:21:\\\"fastspring_product_id\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_name\\\";s:0:\\\"\\\";s:23:\\\"fastspring_product_path\\\";s:10:\\\"te********\\\";s:9:\\\"paypal_id\\\";s:0:\\\"\\\";s:17:\\\"recurly_plan_code\\\";s:0:\\\"\\\";}\",\n                \"option1\": null,\n                \"option2\": null,\n                \"option3\": null,\n                \"options\": \"[]\",\n                \"tax_rate\": null\n            }\n        ],\n        \"payments\": [\n            {\n                \"invoice_payment_id\": 3261859,\n                \"invoice_id\": \"1738845\",\n                \"invoice_public_id\": \"7CMJ5\",\n                \"user_id\": \"883051\",\n                \"paysys_id\": \"cc-demo\",\n                \"receipt_id\": \"123\",\n                \"transaction_id\": \"123-m-15427191825876\",\n                \"dattm\": \"2018-11-20 17:06:00\",\n                \"currency\": \"EUR\",\n                \"amount\": \"2.00\",\n                \"discount\": \"0.00\",\n                \"tax\": \"0.00\",\n                \"shipping\": \"0.00\",\n                \"refund_dattm\": null,\n                \"base_currency_multi\": \"1.000000\",\n                \"display_invoice_id\": \"INV-2018-71\",\n                \"refund_amount\": null,\n                \"invoice_sequential_id\": null,\n                \"tax_rate\": null,\n                \"tax_country\": null,\n                \"tax_state\": null,\n                \"tax_zip\": null,\n                \"tax_city\": null,\n                \"tax_street\": null,\n                \"tax_street2\": null\n            }\n        ],\n        \"refunds\": [],\n        \"access\": [\n            {\n                \"access_id\": 4944648,\n                \"invoice_id\": \"1738845\",\n                \"invoice_public_id\": \"7CMJ5\",\n                \"invoice_payment_id\": \"3261859\",\n                \"invoice_item_id\": \"3287810\",\n                \"user_id\": \"883051\",\n                \"product_id\": \"203\",\n                \"transaction_id\": \"123-m-15427191829086\",\n                \"begin_date\": \"2018-11-20\",\n                \"expire_date\": \"2018-12-20\",\n                \"qty\": \"1\",\n                \"comment\": null\n            }\n        ]\n    }\n}"},{"id":"f3a7af39-1e13-4136-aade-36f2c86b3b5b","name":"Cancellation error","originalRequest":{"method":"DELETE","header":[],"url":"http://example.com/amember/api2/user/invoice/1738846"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 20 Nov 2018 13:09:53 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"193"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/problem+json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"error\": \"validation-error\",\n    \"message\": \"Unable to cancel invoice #1738846: Transaction was not cancelled. Got error from paypal: Authentication/Authorization Failed\",\n    \"hint\": []\n}"}],"_postman_id":"66247e22-e94b-4c4c-8bd5-c7f5a725ddd6"}],"id":"7c9a6e7d-b5a7-48e1-a6f1-44faaf1f0d64","_postman_id":"7c9a6e7d-b5a7-48e1-a6f1-44faaf1f0d64","description":""},{"name":"Manage User's Newsletter Subscriptions","item":[{"name":"/amember/api2/user/newsletter/lists","id":"30ce372b-9d67-4003-b692-312349d75b5a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/user/newsletter/lists","description":"<p>Retrieve all newsletter lists that are available for user. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.newsletter.lists</strong>  Get lists available for subscribe</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","newsletter","lists"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"4161b74b-bbed-4ef9-addc-9172c1364598","name":"GET /amember/api2/user/newsletter/lists","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/newsletter/lists"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 11 Jan 2019 13:42:11 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"135"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"list_id\": 9,\n            \"title\": \"Simple List\",\n            \"description\": \"\"\n        },\n        {\n            \"list_id\": 10,\n            \"title\": \"Marketing Email\",\n            \"description\": \"\"\n        }\n    ]\n}\n"}],"_postman_id":"30ce372b-9d67-4003-b692-312349d75b5a"},{"name":"/amember/api2/user/newsletter/subscirption","id":"62ee2140-a33a-4636-aa21-8804c30451e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/user/newsletter/subscription","description":"<p>Retrieve subscribed newsletter lists for user. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.newsletter.subscription</strong>  Get subscribed lists</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","newsletter","subscription"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"f0eeb0ad-3544-4276-b773-282e55d458fb","name":"/amember/api2/user/newsletter/subscirption","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/user/newsletter/subscription"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 11 Jan 2019 14:09:43 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"28"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        \"9\"\n    ]\n}"}],"_postman_id":"62ee2140-a33a-4636-aa21-8804c30451e1"},{"name":"/amember/api2/user/newsletter/subscirption","id":"bf557b4f-4744-4aec-af51-75c45b48abd6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"list_id[]","value":"9","type":"text"},{"key":"list_id[]","value":"10","type":"text"}]},"url":"http://example.com/amember/api2/user/newsletter/subscription","description":"<p>Subscribe user to list</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.newsletter.subscription</strong>,<strong>user.newsletter.subscription.post</strong>   subscribe user to list</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","newsletter","subscription"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"442dd7c7-c4b4-4881-8c1a-dc81eba853a0","name":"/amember/api2/user/newsletter/subscirption","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"list_id[]","value":"9","type":"text"},{"key":"list_id[]","value":"10","type":"text"}]},"url":"http://example.com/amember/api2/user/newsletter/subscription"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 11 Jan 2019 14:26:55 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"33"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        \"9\",\n        \"10\"\n    ]\n}"}],"_postman_id":"bf557b4f-4744-4aec-af51-75c45b48abd6"},{"name":"/amember/api2/user/newsletter/subscirption","id":"65a906f2-c731-4d59-955e-0516d5eae90f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"list_id[]","type":"text","value":"9"},{"key":"list_id[]","type":"text","value":"10"}]},"url":"http://example.com/amember/api2/user/newsletter/subscription","description":"<p>Unsubscriber user from  list</p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types:</h2>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>user.newsletter.subscription</strong>, <strong>user.newsletter.subscription.delete</strong>   unsubscribe user to list</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","user","newsletter","subscription"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"826266b0-f897-466c-9bda-105437c66fd1","name":"/amember/api2/user/newsletter/subscirption","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"list_id[]","type":"text","value":"9"},{"key":"list_id[]","type":"text","value":"10"}]},"url":"http://example.com/amember/api2/user/newsletter/subscription"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 11 Jan 2019 14:32:55 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"25"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": []\n}"}],"_postman_id":"65a906f2-c731-4d59-955e-0516d5eae90f"}],"id":"ae6c1aa7-232e-4d29-9dca-9f34d8872ace","description":"<p>If you have newsletter module enabled in amember these endpoints provides and ability to manage user's newsletter subscirptions. </p>\n","event":[{"listen":"prerequest","script":{"id":"cc830ffe-a55c-4f29-8ae0-872fcc7eff41","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"42f898bf-ff13-4fb6-988c-a9412f323506","type":"text/javascript","exec":[""]}}],"_postman_id":"ae6c1aa7-232e-4d29-9dca-9f34d8872ace"},{"name":"/amember/oauth/register-device","id":"d74bb5ae-7743-4ca9-a65b-f8d8ac185470","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"description","value":"Chrome Browser","description":"<p>Device name or title that will be displayed for user/admin  interface where list of registered devices will be displayed. </p>\n","type":"text"},{"key":"client_id","value":"838f5bc4302cf62a15c1f232f902423f","description":"<p>Oauth Client that requested device registration</p>\n","type":"text"}]},"url":"http://example.com/amember/oauth/register-device","description":"<p>Register device on the server. \nIf Device registration is enabled in module settings, device shoulpd be registered first. Token will not be issued if amember_device_id request is not included in token request. </p>\n","urlObject":{"protocol":"http","path":["amember","oauth","register-device"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"bd6ba5b1-4cfd-4fe1-8835-4625b741af60","name":"/amember/oauth/register-device","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/x-www-form-urlencoded","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"description","value":"Chrome Browser","description":"Device name or title that will be displayed for user/admin  interface where list of registered devices will be displayed. \n","type":"text"},{"key":"client_id","value":"838f5bc4302cf62a15c1f232f902423f","description":"Oauth Client that requested device registration","type":"text"}]},"url":"http://example.com/amember/oauth/register-device"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 20 Dec 2018 12:30:13 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"111"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"amember_device_id\": \"27778a9d770c2f378a6013da715d41ca9af7dc5c9f17548e05aa8315bd10f977\"\n    }\n}"}],"_postman_id":"d74bb5ae-7743-4ca9-a65b-f8d8ac185470"},{"name":"/amember/oauth/scope","id":"e2f2eef0-be73-4cdf-8089-ec087c596625","request":{"method":"GET","header":[],"url":"http://localhost/amember/oauth/scope","description":"<p>Retrieve list of all scope objects</p>\n","urlObject":{"protocol":"http","path":["amember","oauth","scope"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1097587e-7ffb-4964-904b-6106ff5d9ee1","name":"/amember/oauth/scope","originalRequest":{"method":"GET","header":[],"url":"http://localhost/amember/oauth/scope"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 15 Nov 2018 09:38:29 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"me.profile\": {\n            \"id\": \"me.profile\",\n            \"description\": \"Basic User profile information(login, name, email)\",\n            \"grantTypes\": [\n                \"password\",\n                \"authorization_code\"\n            ]\n        },\n        \"me.fullprofile\": {\n            \"id\": \"me.fullprofile\",\n            \"description\": \"Full profile information, with address info\",\n            \"grantTypes\": [\n                \"password\",\n                \"authorization_code\"\n            ]\n        },\n        \"me.subscriptions\": {\n            \"id\": \"me.subscriptions\",\n            \"description\": \"Information about active subscirptions and access expiration dates\",\n            \"grantTypes\": [\n                \"password\",\n                \"authorization_code\"\n            ]\n        },\n        \"me.resources\": {\n            \"id\": \"me.resources\",\n            \"description\": \"Information about resources available to user on site(protected folders, files, videos)\",\n            \"grantTypes\": [\n                \"password\",\n                \"authorization_code\"\n            ]\n        },\n        \"paysystems\": {\n            \"id\": \"paysystems\",\n            \"description\": \"Retrieve list of enabled payment systems\",\n            \"grantTypes\": [\n                \"client_credentials\"\n            ]\n        },\n        \"available-products\": {\n            \"id\": \"available-products\",\n            \"description\": \"Get products available for purchase\",\n            \"grantTypes\": [\n                \"authorization_code\",\n                \"password\",\n                \"client_credentials\"\n            ]\n        },\n        \"register\": {\n            \"id\": \"register\",\n            \"description\": \"Create user account\",\n            \"grantTypes\": [\n                \"client_credentials\"\n            ]\n        },\n        \"register.post\": {\n            \"id\": \"register.post\",\n            \"description\": \"Create user account Method: post\",\n            \"grantTypes\": [\n                \"client_credentials\"\n            ]\n        },\n        \"user.access\": {\n            \"id\": \"user.access\",\n            \"description\": \"Get information about access records\",\n            \"grantTypes\": [\n                \"password\",\n                \"authorization_code\"\n            ]\n        }\n    }\n}"}],"_postman_id":"e2f2eef0-be73-4cdf-8089-ec087c596625"},{"name":"/amember/api2/me","id":"9d0d96a2-3bc7-4a58-9798-b015938a42dc","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[{"key":"AMEMBER-DEVICE-ID","value":"b401c60ff09abc66c0e96763699a24a9ba7d29bd44f4b465e6d59c9d8dc2e192","description":"<p>Required if device registration was enabled  in config. </p>\n","type":"text"}],"url":"http://example.com/amember/api2/me","description":"<p>Get profile information of user </p>\n<h4 id=\"allowed-grant-types\">Allowed Grant Types:</h4>\n<h4 id=\"password-authorization_code\">password, authorization_code</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>me.profile</strong>   Basic User profile information(login, name, email)</li>\n<li><strong>me.fullprofile</strong>   Full profile information, with address info</li>\n<li><strong>me.subscriptions</strong>   Information about active subscirptions and access expiration dates</li>\n<li><strong>me.resources</strong>   Information about resources available to user on site(protected folders, files, videos)</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","me"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"60fb2fd2-dfc1-44e6-9c35-9e36a1e15c1d","name":"/api2/me","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/me"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 15 Nov 2018 09:47:29 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"301"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"id\": 883051,\n        \"login\": \"alexander\",\n        \"name_f\": \"alex\",\n        \"name_l\": \"ivanoff\",\n        \"email\": \"alexander@central-office.net\",\n        \"groups\": [],\n        \"subscriptions\": {\n            \"203\": \"2018-11-27\",\n            \"236\": \"2018-11-01\"\n        },\n        \"categories\": {\n            \"2\": \"2018-11-27\",\n            \"6\": \"2018-11-01\",\n            \"16\": \"2018-11-27\",\n            \"17\": \"2018-11-27\",\n            \"18\": \"2018-11-27\"\n        }\n    }\n}"}],"_postman_id":"9d0d96a2-3bc7-4a58-9798-b015938a42dc"},{"name":"/amember/api2/register","id":"ed88b635-923e-4c29-8789-da0cddf0607c","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name_f","value":"Alexander","description":"<p>User's First Name</p>\n","type":"text"},{"key":"name_l","value":"Ivanov","description":"<p>User's Last Name</p>\n","type":"text"},{"key":"login","value":"alexander_oauth","description":"<p>Login specified by user</p>\n","type":"text"},{"key":"email","value":"alexander+oauth@cgi-central.net","description":"<p>User's Email Address. </p>\n","type":"text"},{"key":"pass","value":"test123","description":"<p>User's password</p>\n","type":"text"},{"key":"street","value":"Some street","description":"<p>User's address</p>\n","type":"text"},{"key":"city","value":"Some city","description":"<p>User's city</p>\n","type":"text"},{"key":"country","value":"US","description":"<p>Two letter ISO country code</p>\n","type":"text"},{"key":"state","value":"CA","description":"<p>State code</p>\n","type":"text"},{"key":"zip","value":"1231213","description":"<p>Postal (Zip) code</p>\n","type":"text"}]},"url":"http://example.com/amember/api2/register","description":"<p>Register User's account. \nIn order to use that endpoint, in aMember CP -&gt; Forms Editor you have to create form with type oauth-register. \naMember will use that form to validate incoming request. All fields that you  mark as required will be required in incoming request. </p>\n<p><strong>Please note</strong>,  new user account will be created with \"unsubscribed\" status, so you need to verify user's email address after registration. To  send verification email, you can enable email verification in Email brick configuration inside oauth-register form, the same way as you are doing this for regular signup forms.   There are two way how user can confirm email address: </p>\n<ul>\n<li>There is a confirmation link in email message received by user. </li>\n<li>There is six-digits code in confirmation message. That code can be used in confirm-email api request. <a href=\"https://documenter.getpostman.com/view/5824812/RzZDicNb#e652e69d-0f7a-4584-a690-51315f0d546f\">POST /api2/user/confirm-email</a></li>\n</ul>\n<p>In order to use other endpoints after registration you have to obtain new access token using password or authorization_code grant types. \nIf oauth client that was used for registration has \"password\" grant enabled, after registration, amember will issue new access token with grant type set to password with all scopes allowed for client. Check examples.</p>\n<h4 id=\"allowed-grant-types\">Allowed Grant Types:</h4>\n<h4 id=\"client_credentials-amember_device\">client_credentials, amember_device</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>register</strong>   Allow to register user's account</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","register"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"07cb2405-4b41-40aa-928e-33b5c4049b8c","name":"Successful request. Account created.","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name_f","value":"Alexander","description":"User's First Name","type":"text"},{"key":"name_l","value":"Ivanov","description":"User's Last Name","type":"text"},{"key":"login","value":"alexander_oauth","description":"Login specified by user","type":"text"},{"key":"email","value":"alexander+oauth@cgi-central.net","description":"User's Email Address. ","type":"text"},{"key":"pass","value":"test123","description":"User's password","type":"text"},{"key":"street","value":"Some street","description":"User's address","type":"text"},{"key":"city","value":"Some city","description":"User's city\n","type":"text"},{"key":"country","value":"US","description":"Two letter ISO country code","type":"text"},{"key":"state","value":"CA","description":"State code","type":"text"},{"key":"zip","value":"1231213","description":"Postal (Zip) code","type":"text"}]},"url":"http://example.com/amember/api2/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 17 Nov 2018 11:06:11 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"951"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"user_id\": 3726,\n        \"login\": \"alexander_oauth\",\n        \"pass\": \"test123\",\n        \"email\": \"alexander+oauth@cgi-central.net\",\n        \"name_f\": \"Alexander\",\n        \"name_l\": \"Ivanov\",\n        \"street\": \"Some street\",\n        \"city\": \"Some city\",\n        \"state\": \"CA\",\n        \"zip\": \"1231213\",\n        \"country\": \"US\",\n        \"phone\": null,\n        \"added\": \"2018-11-17 15:06:11\",\n        \"remote_addr\": \"::1\",\n        \"status\": \"0\",\n        \"unsubscribed\": \"0\",\n        \"email_verified\": \"0\",\n        \"lang\": \"en\",\n        \"i_agree\": \"0\",\n        \"is_approved\": \"1\",\n        \"is_locked\": \"0\",\n        \"reseller_id\": null,\n        \"comment\": null,\n        \"aff_id\": null,\n        \"is_affiliate\": \"0\",\n        \"aff_payout_type\": null,\n        \"group_code\": null,\n        \"tax_id\": null,\n        \"street2\": null,\n        \"plain_password\": null,\n        \"firm_title\": null,\n        \"firm_description\": null,\n        \"firm_address\": null,\n        \"user_agent\": \"PostmanRuntime/7.3.0\",\n        \"last_login\": null,\n        \"last_ip\": null,\n        \"last_user_agent\": null,\n        \"last_session\": null,\n        \"aff_added\": null,\n        \"aff_custom_redirect\": \"0\",\n        \"pass_dattm\": \"2018-11-17 15:06:11\",\n        \"saved_form_id\": \"8\",\n        \"disable_lock_until\": null,\n        \"remember_key\": null,\n        \"require_consent\": null,\n        \"subusers_parent_id\": \"0\"\n    }\n}"},{"id":"27e9957d-2fe8-4d3f-86e0-6fb4d7e5e61f","name":"Unsuccessful response. Validation failed.","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"name_f","value":"Alexander","description":"User's First Name","type":"text"},{"key":"name_l","value":"Ivanov","description":"User's Last Name","type":"text"},{"key":"login","value":"alexander_oauth","description":"Login specified by user","type":"text"},{"key":"email","value":"alexander+oauth@cgi-central.net","description":"User's Email Address. ","type":"text"},{"key":"pass","value":"test123","description":"User's password","type":"text"},{"key":"street","value":"Some street","description":"User's address","type":"text"},{"key":"city","value":"Some city","description":"User's city\n","type":"text"},{"key":"country","value":"US","description":"Two letter ISO country code","type":"text"},{"key":"state","value":"CA","description":"State code","type":"text"},{"key":"zip","value":"1231213","description":"Postal (Zip) code","type":"text"}]},"url":"http://example.com/amember/api2/register"},"status":"Unprocessable Entity","code":422,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sat, 17 Nov 2018 11:07:41 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"513"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/problem+json"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"error\": \"validation-error\",\n    \"message\": \"An error happened when we try to validate your request. Please check hints for more details\",\n    \"hint\": {\n        \"email\": \"An account with the same email already exists.<br />Please <a href=\\\"/amember/login?amember_redirect_url=%2Famember%2Fapi2%2Fregister\\\">login</a> to your existing account.<br />If you have not completed payment, you will be able to complete it after login\",\n        \"login\": \"Username alexander_oauth is already taken. Please choose another username\"\n    }\n}"},{"id":"78ecd6dd-2a4d-452e-8b73-4c6304a4ff17","name":"Register and issue access token","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"description":"User's First Name","key":"name_f","type":"text","value":"Alexander"},{"description":"User's Last Name","key":"name_l","type":"text","value":"Ivanov"},{"description":"Login specified by user","key":"login","type":"text","value":"alexander_oauth7"},{"description":"User's Email Address. ","key":"email","type":"text","value":"alexander+oauth7@cgi-central.net"},{"description":"User's password","key":"pass","type":"text","value":"test123"},{"description":"User's address","key":"street","type":"text","value":"Some street"},{"description":"User's city\n","key":"city","type":"text","value":"Some city"},{"description":"Two letter ISO country code","key":"country","type":"text","value":"US"},{"description":"State code","key":"state","type":"text","value":"CA"},{"description":"Postal (Zip) code","key":"zip","type":"text","value":"1231213"}]},"url":"http://example.com/amember/api2/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 21 Jan 2019 14:16:57 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"2551"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": {\n        \"user_id\": 883084,\n        \"login\": \"alexander_oauth7\",\n        \"pass\": \"test123\",\n        \"email\": \"alexander+oauth7@cgi-central.net\",\n        \"name_f\": \"Alexander\",\n        \"name_l\": \"Ivanov\",\n        \"street\": \"Some street\",\n        \"street2\": null,\n        \"city\": \"Some city\",\n        \"state\": \"CA\",\n        \"zip\": \"1231213\",\n        \"country\": \"US\",\n        \"phone\": null,\n        \"added\": \"2019-01-21 18:16:57\",\n        \"remote_addr\": \"127.0.0.1\",\n        \"status\": \"0\",\n        \"unsubscribed\": \"0\",\n        \"lang\": \"id\",\n        \"i_agree\": \"0\",\n        \"is_approved\": \"1\",\n        \"is_locked\": \"0\",\n        \"reseller_id\": null,\n        \"comment\": null,\n        \"tax_id\": null,\n        \"last_login\": null,\n        \"last_ip\": null,\n        \"last_session\": null,\n        \"aff_id\": null,\n        \"aff_added\": null,\n        \"is_affiliate\": \"0\",\n        \"aff_payout_type\": null,\n        \"aff_custom_redirect\": \"0\",\n        \"directory_exclude\": null,\n        \"subusers_parent_id\": \"0\",\n        \"avatar\": null,\n        \"user_agent\": \"PostmanRuntime/7.4.0\",\n        \"last_user_agent\": null,\n        \"disable_lock_until\": null,\n        \"pass_dattm\": \"2019-01-21 18:16:57\",\n        \"saved_form_id\": \"15\",\n        \"remember_key\": null,\n        \"last_file_upload\": null,\n        \"force_password_change\": null,\n        \"upload\": null,\n        \"auto_assigned_users_count\": \"0\",\n        \"dat\": null,\n        \"cpf_cnpj\": null,\n        \"signup_source\": null,\n        \"directory_exclude_ids\": null,\n        \"workplace_owner_id\": null,\n        \"workplace_id\": null,\n        \"vpn_password\": null,\n        \"workers_count\": null,\n        \"require_consent\": null,\n        \"baf_parent_id\": \"0\"\n    },\n    \"access-token\": {\n        \"token_type\": \"Bearer\",\n        \"expires_in\": 3600,\n        \"access_token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImI3MDg0Yjk1NGI3MmFlYjNiMzM2ZTExNWNjMDAxZjMzNjIxODYxNTRiODRkYjg4NDE1ZjdhYjRiYTlmZjg5ODFjYTA4NTQ4MmRlY2IyYTQ4In0.eyJhdWQiOiI4MzhmNWJjNDMwMmNmNjJhMTVjMWYyMzJmOTAyNDIzZiIsImp0aSI6ImI3MDg0Yjk1NGI3MmFlYjNiMzM2ZTExNWNjMDAxZjMzNjIxODYxNTRiODRkYjg4NDE1ZjdhYjRiYTlmZjg5ODFjYTA4NTQ4MmRlY2IyYTQ4IiwiaWF0IjoxNTQ4MDgwMjE3LCJuYmYiOjE1NDgwODAyMTcsImV4cCI6MTU0ODA4MzgxNywic3ViIjoiODgzMDg0Iiwic2NvcGVzIjpbIm1lLnByb2ZpbGUiLCJtZS5zdWJzY3JpcHRpb25zIiwibWUucmVzb3VyY2VzIiwidXNlci5hY2Nlc3MiLCJhdmFpbGFibGUtcHJvZHVjdHMiLCJ1c2VyLmludm9pY2UiLCJhZ3JlZW1lbnQiLCJ1c2VyLmNvbnNlbnQiLCJ1c2VyLnBlcnNvbmFsLWRhdGEiLCJ1c2VyLnByb2ZpbGUiLCJ1c2VyLmludm9pY2UuY2hhcmdlIiwidXNlci5uZXdzbGV0dGVyLmxpc3RzIiwidXNlci5uZXdzbGV0dGVyLnN1YnNjcmlwdGlvbiJdfQ.KFbICHzGbbmJBTQaGry38TnWmhVTbcqeeCYDx1cWIKg4d0MCSIvyEsrNxfmy79G-XpGKXRdZuBVGzndQZKP8IcB7j1Awz5bna2Y6zOVWWGYUgaDkwRdIOUbRss0CL92lbMhhgGSnPBgM4Ted-ygcPH5Y1YzoJzZi23kImNmUcrOYNk7Kz7_Y6eyraduQL1mOhsyyLT03me9hF_0pP-eN3LTs84Tj-I6s-nB_hgxu7gdjZR964k64wuNUrCWwq4crfO2XK8wYd11JUnCjqkTG5vvygG_FRHYAO54emMu3GZoT3_FG_nfhpI_URt4e9s_WxBGBu3eo1gVVI5BHcFbtvw\",\n        \"scopes\": \"me.profile me.subscriptions me.resources user.access available-products user.invoice agreement user.consent user.personal-data user.profile user.invoice.charge user.newsletter.lists user.newsletter.subscription\"\n    }\n}"}],"_postman_id":"ed88b635-923e-4c29-8789-da0cddf0607c"},{"name":"/amember/api2/available-products","id":"e586cfba-6a0a-41e8-8069-1cd103f2aae7","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/available-products?categories=CATEGORY_ID","description":"<p>Retrieve list of available for purchase products. \nList is filtered according to Product Allow/Dissallow requirements, if request is processed on user's behalf</p>\n<h4 id=\"allowed-grant-types\">Allowed Grant Types:</h4>\n<h4 id=\"password-authorization_code-client_credentials-amember_device\">password, authorization_code, client_credentials, amember_device</h4>\n<p>Supported Scopes</p>\n<ul>\n<li><strong>available-products</strong>   Get products available for purchase</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","available-products"],"host":["example","com"],"query":[{"description":{"content":"<p>(optional) Filter product list by categories</p>\n","type":"text/plain"},"key":"categories","value":"CATEGORY_ID"},{"disabled":true,"description":{"content":"<p>(optional) Filter product list by categories</p>\n","type":"text/plain"},"key":"categories[]","value":"3"}],"variable":[]}},"response":[{"id":"f37fe3a6-8b6e-406d-8a68-63140892a475","name":"/amember/api2/available-products","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://example.com/amember/api2/available-products?categories[]=3","protocol":"http","host":["example","com"],"path":["amember","api2","available-products"],"query":[{"key":"categories[]","value":"3","description":"(optional) Filter product list by categories"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Thu, 15 Nov 2018 11:52:07 GMT"},{"key":"Server","value":"Apache/2.4.29 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"769"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"product_id\": 222,\n            \"title\": \"Wheight loss programm\",\n            \"description\": \"Short description of this subscription\",\n            \"categories\": [\n                \"3\"\n            ],\n            \"billing_plans\": {\n                \"222\": \"default - $35.00 untuk 9 bulan\"\n            }\n        },\n        {\n            \"product_id\": 223,\n            \"title\": \"Bronze Membership\",\n            \"description\": \"Short description of this subscription\",\n            \"categories\": [\n                \"2\",\n                \"3\"\n            ],\n            \"billing_plans\": {\n                \"223\": \"default - $129.00 untuk 5 bulan\"\n            }\n        },\n        {\n            \"product_id\": 230,\n            \"title\": \"Education Course (Middle)\",\n            \"description\": \"Short description of this subscription\",\n            \"categories\": [\n                \"3\"\n            ],\n            \"billing_plans\": {\n                \"230\": \"default - $103.00 untuk 7 bulan\"\n            }\n        },\n        {\n            \"product_id\": 235,\n            \"title\": \"Training Programm\",\n            \"description\": \"Short description of this subscription\",\n            \"categories\": [\n                \"2\",\n                \"3\",\n                \"17\",\n                \"18\"\n            ],\n            \"billing_plans\": {\n                \"235\": \"default - $112.00 untuk 6 bulan\"\n            }\n        }\n    ]\n}"}],"_postman_id":"e586cfba-6a0a-41e8-8069-1cd103f2aae7"},{"name":"/amember/api2/paysystems","id":"5b44ab1d-01dd-4a89-b1ba-aba0d1f1eeb8","request":{"auth":{"type":"oauth2","oauth2":{"basicConfig":[{"key":"accessToken","value":"<access-token>"}],"advancedConfig":[{"key":"tokenType","value":"<token-type>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://example.com/amember/api2/paysystems","description":"<p>Get list of all enabled payment systems. </p>\n<h2 id=\"allowed-grant-types\">Allowed Grant Types</h2>\n<p><strong>password, authorization_code, client_credentials, amember_device</strong>\nSupported scopes</p>\n<ul>\n<li><strong>paysystems</strong> - Get list of available payment systems.</li>\n</ul>\n","urlObject":{"protocol":"http","path":["amember","api2","paysystems"],"host":["example","com"],"query":[],"variable":[]}},"response":[{"id":"16e5977e-3e0f-468a-bd12-aa30c2a8cae4","name":"Retrieve List of enabled payment systems","originalRequest":{"method":"GET","header":[],"url":"http://example.com/amember/api2/paysystems"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Sun, 18 Nov 2018 19:46:31 GMT"},{"key":"Server","value":"Apache/2.4.18 (Ubuntu)"},{"key":"Expires","value":"Thu, 19 Nov 1981 08:52:00 GMT"},{"key":"Cache-Control","value":"no-store, no-cache, must-revalidate"},{"key":"Pragma","value":"no-cache"},{"key":"Content-Length","value":"901"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json;charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"OK\",\n    \"data\": [\n        {\n            \"paysys_id\": \"cc-demo\",\n            \"title\": \"CC Demo\",\n            \"description\": \"use test credit card# for successful transaction\",\n            \"public\": true,\n            \"recurring\": true,\n            \"tokenPayments\": true\n        },\n        {\n            \"paysys_id\": \"ccbill\",\n            \"title\": \"ccBill\",\n            \"description\": \"Pay by credit card/debit card\",\n            \"public\": true,\n            \"recurring\": true,\n            \"tokenPayments\": false\n        },\n        {\n            \"paysys_id\": \"clickbank\",\n            \"title\": \"ClickBank\",\n            \"description\": \"pay using credit card or PayPal\",\n            \"public\": true,\n            \"recurring\": true,\n            \"tokenPayments\": false\n        },\n        {\n            \"paysys_id\": \"ppay\",\n            \"title\": \"pPay Inc\",\n            \"description\": \"Credit Card Payment\",\n            \"public\": true,\n            \"recurring\": true,\n            \"tokenPayments\": false\n        },\n        {\n            \"paysys_id\": \"voguepay\",\n            \"title\": \"VoguePay\",\n            \"description\": \"A simple and secure way to send and receive payments globally\",\n            \"public\": true,\n            \"recurring\": false,\n            \"tokenPayments\": false\n        },\n        {\n            \"paysys_id\": \"free\",\n            \"title\": \"Free Signup\",\n            \"description\": \"Totally free\",\n            \"public\": true,\n            \"recurring\": false,\n            \"tokenPayments\": false\n        }\n    ]\n}"}],"_postman_id":"5b44ab1d-01dd-4a89-b1ba-aba0d1f1eeb8"}],"id":"d1341b6a-d3f7-4cfe-b90c-f72e992e0146","description":"<h2 id=\"authorization\">Authorization</h2>\n<p>Client should send  Authorization header with access token in each request: </p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer ACCESS_TOKEN\n</code></pre><h2 id=\"response-to-api-requests\">Response to API Requests</h2>\n<h4 id=\"http-response-codes\">HTTP Response Codes</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>2xx  means successful response code.\n4xx  user error\n5xx  system error\n</code></pre><p>Response Content type is <strong>application/json</strong></p>\n<h4 id=\"successful--response-object\">Successful  response object</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    status  : 'OK',\n    data    : {\n        # Requested object or list of objects\n    }\n}\n</code></pre><h4 id=\"error-response-object\">Error response object</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    status  :   'error',\n    error   :   'short error code',\n    message :   'Error description',\n    hint    :   'Additional information if applicable'\n    \n}\n</code></pre>","event":[{"listen":"prerequest","script":{"id":"626ccdeb-9ed7-48e1-9c0e-08d96e98f72d","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7508d52b-82d3-4de9-95b9-e7d1c3ea5ae0","type":"text/javascript","exec":[""]}}],"_postman_id":"d1341b6a-d3f7-4cfe-b90c-f72e992e0146"}],"event":[{"listen":"prerequest","script":{"id":"729a974f-d755-48c7-a19b-6ee785d3b3ae","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"eaf40496-811d-4abd-bb93-af4f105e4928","type":"text/javascript","exec":[""]}}],"variable":[{"key":"Password Access Token","value":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImY5NDhmNDI2YzMzZDY3MmUzMGUxYTc3YzRmOGRmNGFlNWFhNDQzMTkwMDhlODAxNWUxYmQyZDkzOTFlYjljZTRlMGY4NjRlNWY2ZmFiNWQ2In0.eyJhdWQiOiI4MzhmNWJjNDMwMmNmNjJhMTVjMWYyMzJmOTAyNDIzZiIsImp0aSI6ImY5NDhmNDI2YzMzZDY3MmUzMGUxYTc3YzRmOGRmNGFlNWFhNDQzMTkwMDhlODAxNWUxYmQyZDkzOTFlYjljZTRlMGY4NjRlNWY2ZmFiNWQ2IiwiaWF0IjoxNTQyMjc1MDU1LCJuYmYiOjE1NDIyNzUwNTUsImV4cCI6MTU0MzEzOTA1NSwic3ViIjoiODgzMDUxIiwic2NvcGVzIjpbIm1lLnByb2ZpbGUiLCJ1c2VyLmFjY2VzcyIsIm1lLnN1YnNjcmlwdGlvbnMiXX0.ZhgkfVsyUB5sRNZ6RrMGgugF8Bjapd8K41i_xY9N9pSxiKsYF7-nLcdGsGZca2v3Gg4XK20J4zXqr1DPanNvL3TdVAxSX1CGDe5mYd2GlSrhY0RFlhT3R1ddiId54kj8K9OWGrqd9fq_ZO1PPdkZYyxxzAC7S5i_0cuW5uS7U_LPAGNWBPUbpkk9aTXh9ClUTjEayPSApwe7WzNf4IkXjC0UXraKny1Zfhi-fJZMAfb59YFyLSkqK8QHVReHL_BarxHqUN6NEiPQr7POnmYlYpzJsFViNfTTZ8YrwX78KIPDsXRhGa4VFqgni1x6f4LXg7_vHyZswLmHSVi-EW-9_g"}]}