nesh170 / asap-inventory-system

This is a concept inventory system for ECE458. It is built by ASAPsolutions
1 stars 0 forks source link

Disburse #87

Closed nesh170 closed 7 years ago

nesh170 commented 7 years ago

POST /api/disburse/ HTTP/1.1 Host: localhost:8000 Content-Type: application/json Authorization: Bearer

{
      "quantity": 3000,
      "item_id": 1,
      "receiver_id": 2,
      "comment": "comment"
    }

GET /api/disburse/ HTTP/1.1 Host: localhost:8000 Content-Type: application/json Authorization: Bearer

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 1,
      "disburser": {
        "id": 1,
        "username": "admin"
      },
      "item": {
        "id": 1,
        "name": "Item_1",
        "quantity": 27
      },
      "quantity": 5,
      "comment": null,
      "timestamp": "2017-02-11T04:23:21.556656Z",
      "receiver": {
        "id": 2,
        "username": "Patrick"
      },
      "item_id": 1,
      "receiver_id": 2
    },
    {
      "id": 2,
      "disburser": {
        "id": 1,
        "username": "admin"
      },
      "item": {
        "id": 1,
        "name": "Item_1",
        "quantity": 27
      },
      "quantity": 30,
      "comment": null,
      "timestamp": "2017-02-11T05:05:24.491444Z",
      "receiver": {
        "id": 1,
        "username": "admin"
      },
      "item_id": 1,
      "receiver_id": 1
    }
  ]
}

GET /api/user/large HTTP/1.1 Host: localhost:8000 Content-Type: application/json Authorization: Bearer

Search supported with /api/user/large/?search=

{
  "count": 2,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 2,
      "username": "Patrick"
    },
    {
      "id": 1,
      "username": "admin"
    }
  ]
}
nesh170 commented 7 years ago

https://github.com/nesh170/asap-inventory-system/issues/81