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 /api/batches
get

Get a list of batches from the PPG database. View the guide on adding filters to List API calls.

Body Parameters

  • name string LIMIT: 50

    The name of the batch.

  • type integer

  • countOnly boolean

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

    Default value:

    false

  • 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.

  • orderBy string, array

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

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

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://[subdomain.itempath.com or 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 /api/batches/[id]
get

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

Request with curl
curl "http://[subdomain.itempath.com or IP]/api/batches/[id]" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]" -d '{ }'
Example Response
{ "batches": [{ "id": " uuid ", "name": " string ", "priority": " integer ", "type": " integer ", }] }] }
Update Batch /api/batches/[id]
put

Body Parameters

Request with curl
curl "http://[subdomain.itempath.com or 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 /api/batches/[id]/delete
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.

Body Parameters

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