Location Contents

Attributes

  • id uuid

    ID of this item.

  • isCounted boolean

    Whether all materials in this location breakdown have an accurate count.

  • quantity float

    Amount of items at this location breakdown.

  • locationId uuid

    ID of the location this belongs to.

  • materialId uuid

    ID of the material in this location area.

  • nextCountDate datetime

    When this location area will be counted next.

  • countDate datetime

    When this location area was last counted.

  • countingCycle integer

    Number of days between counting.

  • creationDate datetime

    When this location area was created.

  • type integer

    Type of location.

    Possible values:

    1 = Permanent
    2 = Temporary

Endpoints

List Location Contents

get /api/location_contents

Get the location contents from the PPG database and return a JSON response.

Arguments

  • binId uuid

    ID of the bin where the material is stored.

  • countDate dateTime

    Date and time the material was counted.

  • creationDate dateTime

    Date and time the material was created.

  • currentQuantity decimal

    Current quantity of one type of material in the location.

  • locationId uuid

    ID of the location where the material is stored.

  • materialId uuid

    ID of the material stored in this location.

  • type integer

    Type of location.

    Possible values:

    1 = Permanent
    2 = Temporary

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 1000.

    Default value: 250

  • offset integer

    When "true", will only return a count of the amount of items in the query.

    Default value: false

  • orderBy string

    Order the response by the selected field. Multiple values can be passed, separated by a comma.

  • countOnly boolean

    When "true", will only return a count of the amount of items in the query.

    Default value: false

Request with curl
curl "http://[Your IP] /api/location_contents" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "location contents": [{ "id": " uuid ", "isCounted": " true ", "quantity": " 15.0 ", "locationId": " uuid ", "materialId": " uuid ", "nextCountDate": " datetime ", "countDate": " datetime ", "countingCycle": " integer ", "creationDate": " datetime ", "type": " integer ", }] }] }

Show Location Content

get /api/location_contents/[id]

Arguments

Request with curl
curl "http://[Your IP] /api/location_contents/[id]" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "location content": { "id": uuid , "isCounted": true , "quantity": 15.0 , "locationId": uuid , "materialId": uuid , "nextCountDate": datetime , "countDate": datetime , "countingCycle": integer , "creationDate": datetime , "type": integer , } }