Skip to content

Endpoints

Agustín Núñez edited this page Mar 24, 2019 · 29 revisions

Login POST /api/v1/login

What you send:

{
  "username": "sample",
  "password": "sample-password"
}

What you'll receive:

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Create offer POST /api/v1/offer/

{
  "title": TEXT("test title"),
  "description": TEXT("test description"),
  "price_offered": FLOAT(1500.99),
  "currency": CHOICE('0'->EUROS, '1'->DOLLARS, '2'->POUNDS),
  "limit_time": DATETIME(7 attributes are being sent, https://docs.python.org/3/library/datetime.html, Attributes: year, month, day, hour, minute, second, microsecond), (2019,10,30,10,40,0,0)
}

Hello World GET /api/v1/helloworld

Headers:

{
  "Authentication": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

What you'll receive:

{
  "saludo": "Hola, <<Username>>"
}

Clone this wiki locally