- Resource Central
- Batches
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
-
name
string
LIMIT:
50
The name of the batch.
-
id
uuid
The unique ID of the batch.
-
deadline
datetime
The date the batch is due.
-
priority
integer
Batch priority level.
Possible values:
1 = Low
2 = Medium
3 = High
4 = Hot (if included)Default value: 2 (Medium)
-
type
integer
The type of batch.
Possible values:
0 = None
1 = Manual Dynamic Batching
2 = Automatic Dynamic Batching
3 = Continuous BatchingDefault value: 1
Endpoints
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
The type of batch.
Possible values:
0 = None
1 = Manual Dynamic Batching
2 = Automatic Dynamic Batching
3 = Continuous Batching -
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.
Default value:
1000 -
page
integer
Page numbering is zero-based and uses the value of the "limit" argument. (For example, if limit=20, then page=0 will display the hits from 1 to 20.)
-
orderBy
string, array
Order the response by the selected field. Multiple values can be passed, separated by a comma.
{ "batches": [ { "creationDate": "2025-01-01T00:00:00.000000", "deadline": "2024-02-01T00:00:00", "id": "E9B9ED9A-D0ED-43B6-AEF4-E31CE0B9E0FB", "name": "Example Batch 1", "priority": 1, "type": 1 }, { "creationDate": "2025-01-02T00:00:00.000000", "deadline": "2024-02-02T00:00:00", "id": "1FFC0770-4A92-4063-A094-4FEB78CA2DD0", "name": "Example Batch 2", "priority": 2, "type": 2 } ] }
Create a batch and get a response.
Body Parameters
-
name
string
LIMIT:
50
REQUIRED
The name of the batch.
-
deadline
datetime
The date the batch is due. Accepted formats include YYYY-MM-DD and YYYY-MM-DDT00:00:00.
-
priority
integer
Batch priority level.
Possible values:
1 = Low
2 = Medium
3 = High
4 = Hot (if included)Default value:
2 (Medium) -
type
integer
The type of batch. Only valid value to pass is 2, otherwise default type 1 is applied.
Possible values:
0 = None
1 = Manual Dynamic Batching
2 = Automatic Dynamic Batching
3 = Continuous BatchingDefault value:
1
-d '{ "name": "Example Batch", "deadline": "2024-02-01", "priority": "3" }'
{ "batch": { "creationDate": "2025-01-01T00:00:00.000000", "deadline": "2024-02-01T00:00:00", "id": "1FFC0770-4A92-4063-A094-4FEB78CA2DD0", "name": "Example Batch", "priority": 3, "type": 1 } }
Get a single batch from the PPG database and return a JSON response.
{ "batch": { "creationDate": "2025-01-01T15:00:00.000000", "deadline": "2024-02-01T00:00:00", "id": "1FFC0770-4A92-4063-A094-4FEB78CA2DD0", "name": "Example Batch", "priority": 2, "type": 1 } }
Body Parameters
-d '{ "priority": "1" }'
{ "batch": { "creationDate": "2025-01-01T00:00:00.000000", "deadline": "2024-02-01T00:00:00", "id": "1FFC0770-4A92-4063-A094-4FEB78CA2DD0", "name": "Example Batch", "priority": 1, "type": 1 } }
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.