davitacols / irechargeApp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iRecharge Backend API Documentation

Overview

The iRecharge Backend API is built with FastAPI and provides endpoints for managing articles, providers, and prices.

Table of Contents

  1. Getting Started
  2. Endpoints
  3. Documentation
  4. Examples
  5. Acknowledgments
  6. License

Getting Started

Prerequisites

Installing Dependencies

pip install fastapi uvicorn


### Installing Dependencies

```bash
uvicorn main:app --reload

## Endpoints

- **Create Article**: `POST /articles/`
- **Read Article**: `GET /articles/{article_no}`
- **Create Provider**: `POST /providers/`
- **Create Price**: `POST /prices/`
- **Read Prices**: `GET /prices/`

## Documentation

- Interactive API documentation: [http://127.0.0.1:8000/docs](http://127.0.0.1:8000/docs)
- ReDoc documentation: [http://127.0.0.1:8000/redoc](http://127.0.0.1:8000/redoc)

## Examples

### Create Article

```bash
curl -X POST "http://127.0.0.1:8000/articles/" -H "Content-Type: application/json" -d '{"article_no": 101, "currency": "US Dollar", "description": "Example Article"}'


**Read Article**

```bash
curl "http://127.0.0.1:8000/articles/101"


**Crate Provider**

```bash
curl -X POST "http://127.0.0.1:8000/providers/" -H "Content-Type: application/json" -d '{"provider_no": 1, "name": "Example Provider"}'

About


Languages

Language:Python 100.0%