Skip to content

The service receives information about a new order, creates checks for all the printers of the specified location in the database, and initiates asynchronous tasks for generating PDF files for these checks.

Notifications You must be signed in to change notification settings

ch4zzy/checks-api

Repository files navigation

Checks API

action status action status

Here is the project with using only APIView

The service receives information about a new order, creates checks for all the printers of the specified location in the database, and initiates asynchronous tasks for generating PDF files for these checks. If the location does not have any printers, an error is returned. If checks for this order have already been created, an error is returned along with the order number.

Endpoints

GET /api/check/ - List of all  checks.
GET /api/check/<int:id>/ - Detail of current check.
GET /api/check/?point_id=<int:id>/ - List of checks for current point id.
PUT /api/check/<int:id>/update/ - check downloading and marking as printed.
POST /api/create/ - Check create.

Request example.

{
  "point_id": 1,
  "order": {
    "order_id": 2,
    "item": "Milk",
    "quantity": 2,
    "price": 10.99
  }
}

Testing

Tested using pytest and pytest-django.

About

The service receives information about a new order, creates checks for all the printers of the specified location in the database, and initiates asynchronous tasks for generating PDF files for these checks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published