Batches

A Batch (also called a Lot) is a group of work order lines that are associated with each other, either for easy picking or for historical records.

Attributes

  • id uuid

    The unique ID of the batch.

  • name string LIMIT: 50

    The name of the batch.

  • priority integer

    Batch priority level.

    Possible values:

    1 = Low
    2 = Medium
    3 = High
    4 = Hot (if included)

    Default value: 2 (Medium)

  • type integer

Endpoints

List Batches

get /api/batches

Get the batches from the PPG database and return a JSON response.

Arguments

  • name string LIMIT: 50

    The name of the batch.

  • priority integer

    Batch priority level.

    Possible values:

    1 = Low
    2 = Medium
    3 = High
    4 = Hot (if included)

  • limit integer

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

    Default value: 250

  • page integer

    Page-numbering is based on the value of the "limit" argument. If limit=20, then page=0 will display the hits from 1 to 20. (Page numbers are zero-based.) Using page without a limit returns all items.

  • 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/batches" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "batches": [{ "id": " uuid ", "name": " string ", "priority": " integer ", "type": " integer ", }] }] }

Create Batch

post /api/batches

Create a batch and get a response.

Body Parameters

  • name string LIMIT: 50
    REQUIRED

    The name of the batch.

  • type integer

  • priority integer

    Batch priority level.

    Possible values:

    1 = Low
    2 = Medium
    3 = High
    4 = Hot (if included)

    Default value: 2 (Medium)

Request with curl
curl "http://[Your IP] /api/batches" \ -X post \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]" \ -d '{ "name": "string", }'
Example Response
{ "batch": { "id": " uuid ", "name": " string ", "priority": " integer ", "type": " integer ", } }

Show Batch

get /api/batches/[id]

Get a single batch from the PPG database and return a JSON response.

Request with curl
curl "http://[Your IP] /api/batches/[id]" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "batches": [{ "id": " uuid ", "name": " string ", "priority": " integer ", "type": " integer ", }] }] }

Update Batch

put /api/batches/[id]

Arguments

Request with curl
curl "http://[Your IP] /api/batches/[id]" \ -X put \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "batch": { "id": " uuid ", "name": " string ", "priority": " integer ", "type": " integer ", } }

Delete Batch

delete /api/batches/[id]/delete

Delete a specific batch from the PPG database and return a JSON response.

You cannot delete a batch unless there are no work order lines assigned to it, so you may either need to reassign the work order lines separately, or deallocate the order lines they belong to.

Arguments

Request with curl
curl "http://[Your IP] /api/batches/[id]/delete" \ -X delete \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "deleted": "true" }