Giter Club home page Giter Club logo

epetitii-backend's Introduction

e-Petiții

Backend API Documentation

Welcome to the E Petitii Backend API documentation. This guide outlines the various endpoints and their functionalities within the e-Petiții system, a platform designed for managing and interacting with various types of petitions directed on the implication of the diaspora in country's decisional processes.

API Endpoints

Categories List

  • Endpoint: /api/categories
  • Method: GET

Description: Fetches a list of petition categories.

Response: JSON array of categories with "id", "name", and "i18n" for internationalization.

Regions List

  • Endpoint: /api/regions

  • Method: GET

Description: Retrieves a list of regions.

Response: JSON array of regions, each with an "id" and "name".

Receivers List

  • Endpoint: /api/receivers
  • Method: GET

Description: Provides a list of potential receivers for petitions.

Response: JSON array of receivers with "id", "name", and "i18n".

Petitions List

  • Endpoint: /api/petitions
  • Method: GET

Description: Retrieves a list of petitions, with optional filtering.

Parameters: categories, status, region, search, sort

Response: JSON array of petition details.

Single Petition by ID

  • Endpoint: /api/petitions/{petition_id}
  • Method: GET

Description: Gets details of a single petition by its ID.

Response: Detailed JSON object of the petition.

Create Petition

Endpoint: /api/petitions/create

  • Method: POST

Description: Allows for the creation of a new petition.

Payload: JSON with petition details like "initiator_idnp", "name", etc.

Response: JSON with "petition_id".

Sign Petition

  • Endpoint: /api/petitions/{petition_id}/sign
  • Method: POST

Description: Enables users to sign a specific petition. Payload: JSON with "user_idnp". Response: JSON with a confirmation message.

Email Notifications Subscription

  • Endpoint: /api/emails/subscribe
  • Method: POST

Description: Subscribes

epetitii-backend's People

Contributors

felycianovac avatar ghenntoggy1 avatar qopas avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.