Podkrepi.bg Development
DocsWebsiteGitHub
latest
latest
  • Introduction
  • Dev Guidelines
    • Branching strategy
    • Pull requests guidelines
    • Starting a task
    • Definition of done
    • Recognising Contributions
  • Architecture
  • Backend
  • Frontend
    • Guidelines
      • React Guidelines
      • Translations (i18n)
      • Forms
    • Environments
      • .env
      • Local Development
      • Production
  • Infrastructure
    • Deployment to Kubernetes
  • REST API
    • Authentication
    • Endpoints
      • Healthcheck
      • Contact Request
      • Support Request
      • Campaigns
  • GRAPHQL
    • Schema
Powered by GitBook
On this page
  • Create contact request
  • Fetch contact requests
  • Fetch specific contact request
  • Delete contact request

Was this helpful?

Export as PDF
  1. REST API
  2. Endpoints

Contact Request

Create contact request

POST https://api.podkrepi.localhost/api/v1/contact

Request Body

Name
Type
Description

email

string

phone

string

company

string

message

string

firstName

string

lastName

string

{
  "id": "112cb853-b0b9-482e-a944-cf4fca5566b7",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "company": "Camplight",
  "phone": "+359888888888",
  "message": "I wanna help",
  "createdAt": "2021-03-19T00:36:50.076597738Z",
  "updatedAt": "2021-03-19T00:36:50.076597738Z",
  "deletedAt": null
}
{
  "statusCode": 400,
  "error": "email: non zero value required;firstName: non zero value required;lastName: non zero value required;message: non zero value required;phone: non zero value required",
  "validation": [
    {
      "field": "firstName",
      "message": "firstName: non zero value required",
      "validator": "required",
      "customMessage": false
    },
    {
      "field": "lastName",
      "message": "lastName: non zero value required",
      "validator": "required",
      "customMessage": false
    },
    {
      "field": "email",
      "message": "email: non zero value required",
      "validator": "required",
      "customMessage": false
    },
    {
      "field": "phone",
      "message": "phone: non zero value required",
      "validator": "required",
      "customMessage": false
    },
    {
      "field": "message",
      "message": "message: non zero value required",
      "validator": "required",
      "customMessage": false
    }
  ]
}

Fetch contact requests

GET https://api.podkrepi.localhost/api/v1/contact

This endpoint allows you to get free cakes.

Headers

Name
Type
Description

Authentication

string

Authentication token to track down who is emptying our stocks.

[
  {
    "id": "0d6ff16e-ae4c-48e4-868c-05095d923053",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "company": "Camplight",
    "phone": "",
    "message": "I wanna help",
    "createdAt": "2021-03-19T00:11:21.031966Z",
    "updatedAt": "2021-03-19T00:11:21.031966Z",
    "deletedAt": null
  },
  {
    "id": "76e6e2f7-b3f2-4df4-9185-cc44185e7c86",
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "company": "ACME",
    "phone": "+359888888888",
    "message": "I wanna help",
    "createdAt": "2021-03-19T00:20:31.355736Z",
    "updatedAt": "2021-03-19T00:20:31.355736Z",
    "deletedAt": null
  }
]

Fetch specific contact request

GET https://api.podkrepi.localhost/api/v1/contact/:id

Path Parameters

Name
Type
Description

ID

string

Headers

Name
Type
Description

Authentication

string

{
  "id": "112cb853-b0b9-482e-a944-cf4fca5566b7",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "company": "Camplight",
  "phone": "+359888888888",
  "message": "I wanna help",
  "createdAt": "2021-03-19T00:36:50.076597738Z",
  "updatedAt": "2021-03-19T00:36:50.076597738Z",
  "deletedAt": null
}
{
  "error": "No contact found",
  "status": 404
}

Delete contact request

DELETE https://api.podkrepi.localhost/api/v1/contact/:id

Path Parameters

Name
Type
Description

id

string

Headers

Name
Type
Description

Authentication

string

{
  "status": 200
}
{
  "status": 404
}

PreviousHealthcheckNextSupport Request

Last updated 4 years ago

Was this helpful?