List All Purchases
Retrieve all purchases in the system.Response
Returns an array of purchase objects. See Create Purchase for the full purchase object schema.Get Purchase by ID
Retrieve a specific purchase by its ID.Path Parameters
The unique identifier of the purchase
Response
Returns a single purchase object or 404 if not found.Search by Date Range
Search purchases within a specific date range.Query Parameters
Start date in ISO 8601 format (e.g., “2024-01-01T00:00:00”)
End date in ISO 8601 format (e.g., “2024-01-31T23:59:59”)
Response
Returns an array of purchases within the specified date range.Search by Series
Find all purchases with a specific series code.Query Parameters
The 3-letter series code (e.g., “XYZ”)
Response
Returns an array of purchases matching the series.Search by Number
Find all purchases with a specific number.Query Parameters
The 6-digit purchase number (e.g., “000123”)
Response
Returns an array of purchases matching the number.Search by Series and Number
Find a specific purchase by its unique series and number combination.Query Parameters
The 3-letter series code
The 6-digit purchase number
Response
Returns a single purchase object or 404 if not found. Since series and number are unique constraints, this returns at most one result.Update Purchase
Update an existing purchase. Totals are automatically recalculated.Path Parameters
The unique identifier of the purchase to update
Request Body
Provide the complete purchase object with updated fields. See Create Purchase for the full schema.Response
Returns the updated purchase object with recalculated totals.Delete Purchase
Delete a purchase and all associated detail items.Path Parameters
The unique identifier of the purchase to delete