{"info":{"_postman_id":"e9bbf107-caaa-458a-a48c-70572856f319","name":"Expenses-API_Gloria","description":"<html><head></head><body><p>The <strong>Expenses API</strong> is a <strong>RESTful API</strong> that allows users to <strong>track personal expenses</strong> efficiently. It provides <strong>user authentication</strong> (registration &amp; login) and enables users to <strong>add, view, and delete expenses</strong>.EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"43019439","collectionId":"e9bbf107-caaa-458a-a48c-70572856f319","publishedId":"2sAYkDLKfw","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-17T09:39:33.000Z"},"item":[{"name":"All Expenses","id":"0f51f4bf-869f-45b1-b015-28de5dd6d99f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://expenses-api-0e6d.onrender.com/expenses","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of expenses from the specified URL. The request does not require any request body parameters.</p>\n<h3 id=\"response\">Response</h3>\n<p>The response will have a status code of 200 and a content type of application/json. The body of the response will contain an array of expense objects, each with the following properties:</p>\n<ul>\n<li><p><code>user</code> (string): The user associated with the expense.</p>\n</li>\n<li><p><code>item</code> (string): The item or description of the expense.</p>\n</li>\n<li><p><code>amount</code> (number): The amount of the expense.</p>\n</li>\n<li><p><code>category</code> (string): The category of the expense.</p>\n</li>\n<li><p><code>payment</code> (string): The payment method used for the expense.</p>\n</li>\n<li><p><code>status</code> (string): The status of the expense.</p>\n</li>\n<li><p><code>createdAt</code> (string): The timestamp when the expense was created.</p>\n</li>\n<li><p><code>updatedAt</code> (string): The timestamp when the expense was last updated.</p>\n</li>\n<li><p><code>id</code> (string): The unique identifier of the expense.</p>\n</li>\n</ul>\n","urlObject":{"path":["expenses"],"host":["https://expenses-api-0e6d.onrender.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0f51f4bf-869f-45b1-b015-28de5dd6d99f"},{"name":"Get Expenses by Id","id":"7ed852d8-54df-4c6e-a46d-ed91c078baba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://expenses-api-0e6d.onrender.com/expenses/67d6f8cad99b07e4860486d6","description":"<h1 id=\"get-expense-details\">Get Expense Details</h1>\n<p>This endpoint retrieves the details of a specific expense.</p>\n<h2 id=\"request\">Request</h2>\n<h3 id=\"request-url\">Request URL</h3>\n<ul>\n<li><code>GET</code> https://expenses-api-0e6d.onrender.com/expenses/67d6f8cad99b07e4860486d6</li>\n</ul>\n<h2 id=\"response\">Response</h2>\n<p>The response will be a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"user\": {\n            \"type\": \"string\"\n        },\n        \"item\": {\n            \"type\": \"string\"\n        },\n        \"amount\": {\n            \"type\": \"number\"\n        },\n        \"category\": {\n            \"type\": \"string\"\n        },\n        \"payment\": {\n            \"type\": \"string\"\n        },\n        \"status\": {\n            \"type\": \"string\"\n        },\n        \"createdAt\": {\n            \"type\": \"string\"\n        },\n        \"updatedAt\": {\n            \"type\": \"string\"\n        },\n        \"id\": {\n            \"type\": \"string\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"path":["expenses","67d6f8cad99b07e4860486d6"],"host":["https://expenses-api-0e6d.onrender.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7ed852d8-54df-4c6e-a46d-ed91c078baba"},{"name":"Add an Expense","id":"db667499-7c98-4a21-977a-50c672c26864","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{vault:authorization-secret}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"item\": \"Book\",\r\n  \"amount\": 1200,\r\n  \"category\": \"Stationary\",\r\n  \"payment\": \"Credit Card\",\r\n  \"status\": \"Completed\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://expenses-api-0e6d.onrender.com/expenses","description":"<h3 id=\"create-expense\">Create Expense</h3>\n<p>This endpoint allows the user to create a new expense.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p>item (string): The name of the item purchased.</p>\n</li>\n<li><p>amount (number): The cost of the item.</p>\n</li>\n<li><p>category (string): The category to which the item belongs.</p>\n</li>\n<li><p>payment (string): The mode of payment used.</p>\n</li>\n<li><p>status (string): The status of the expense.</p>\n</li>\n</ul>\n<h4 id=\"response-201---created\">Response (201 - Created)</h4>\n<p>The response will be in JSON format with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"user\": { \"type\": \"string\" },\n        \"item\": { \"type\": \"string\" },\n        \"amount\": { \"type\": \"number\" },\n        \"category\": { \"type\": \"string\" },\n        \"payment\": { \"type\": \"string\" },\n        \"status\": { \"type\": \"string\" },\n        \"createdAt\": { \"type\": \"string\" },\n        \"updatedAt\": { \"type\": \"string\" },\n        \"id\": { \"type\": \"string\" }\n    }\n}\n\n</code></pre>\n<p>This endpoint allows you to add a new expense.</p>\n","urlObject":{"path":["expenses"],"host":["https://expenses-api-0e6d.onrender.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"db667499-7c98-4a21-977a-50c672c26864"},{"name":"Register User","id":"d70616e7-8318-4051-a424-99df5efcfc0a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"afua doe\",\r\n  \"email\": \"afua@example.com\",\r\n  \"password\": \"Afua1234!\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"https://expenses-api-0e6d.onrender.com/auth/register","description":"<h1 id=\"register-user\">Register User</h1>\n<p>This endpoint is used to register a new user.</p>\n<h2 id=\"request-body\">Request Body</h2>\n<ul>\n<li><p><code>username</code> (string): The username of the new user.</p>\n</li>\n<li><p><code>email</code> (string): The email address of the new user.</p>\n</li>\n<li><p><code>password</code> (string): The password for the new user.</p>\n</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"username\": \"afua doe\",\n    \"email\": \"afua@example.com\",\n    \"password\": \"Afua1234!\"\n}\n\n</code></pre>\n<h2 id=\"response\">Response</h2>\n<ul>\n<li><code>message</code> (string): A message indicating the status of the registration process.</li>\n</ul>\n<p>Example:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"message\": \"User resgistered succesfully\"\n}\n\n</code></pre>\n","urlObject":{"path":["auth","register"],"host":["https://expenses-api-0e6d.onrender.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"d70616e7-8318-4051-a424-99df5efcfc0a"},{"name":"User Login","id":"16ad81e6-6f47-4a4c-ad67-e4fb05c4277f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{vault:authorization-secret}}"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n \"email\": \"afua@example.com\",\r\n  \"password\": \"Afua1234!\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://expenses-api-0e6d.onrender.com/auth/login","urlObject":{"path":["auth","login"],"host":["https://expenses-api-0e6d.onrender.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"16ad81e6-6f47-4a4c-ad67-e4fb05c4277f"},{"name":"Delete by Id","id":"28af3166-22bb-4f11-bc6b-7a44db921c58","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"https://expenses-api-0e6d.onrender.com/expenses/67d7401b25ea66d86a09645f","description":"<p>This endpoint allows the deletion of a specific expense identified by its unique ID.</p>\n<h3 id=\"request-body\">Request Body</h3>\n<p>This request does not require a request body.</p>\n<h3 id=\"response\">Response</h3>\n<ul>\n<li><p>Status: 200</p>\n</li>\n<li><p>Content-Type: application/json</p>\n</li>\n<li><p>{ \"message\": \"\"}<br />  Upon successful deletion, the response will contain a message confirming the action.</p>\n</li>\n</ul>\n","urlObject":{"path":["expenses","67d7401b25ea66d86a09645f"],"host":["https://expenses-api-0e6d.onrender.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"28af3166-22bb-4f11-bc6b-7a44db921c58"}],"variable":[{"key":"LiveUrl","value":"https://expenses-api-0e6d.onrender.com","type":"default"}]}