Skip to content

rodolfolubeck/api-envio-de-emails

Repository files navigation

#E-mail trigger service

Organizational work model

Usage

All responses will have the form

{
  "data": "Mixed type holding the content of the response",
  "message": "Description of what happened"
}

Subsequent response definitions will only detail the exprected value of the data field

List of all sent e-mails

Definition GET /sent

Response

  • 200 OK on success
[
  {
    "identifier": "1",
    "name": "Rodolfo Lubeck",
    "email": "[email protected]",
    "sentDate": "27/05/2020"
  },
  {
    "identifier": "2",
    "name": "Rodolfo Lubeck",
    "email": "[email protected]",
    "sentDate": "27/05/2020"
  }

]

Send a new e-mail

Definition POST /send

Arguments

  • "identifier":int a unique identifier of database sequence
  • "name":string name of the user who will receive the contact
  • "email":string contact e-mail of the user who will receive the contact
  • "sendDate:date date the email was sent

Response

  • 201 Created on success
{
 "identifier": "2",
 "name": "Rodolfo Freitas",
 "email": "[email protected]",
 "sendDate": "27/05/2020"
}

Lookup e-mail details

GET /sent/int:<identifier>

Response

  • 404 Not Found if the e-mail does not exist
  • 200 OK on success
{
  "identifier": "2",
  "name": "Rodolfo Freitas",
  "email": "[email protected]",
  "sendDate": "27/05/2020"
} 

About

Python API Rest using Flask and Flask Restful

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published