Manage line items
Learn how to add and manage line items for products and services via the API
Use Payabli’s line item functions to create and manage products or services for invoices and bills. This guide covers the key operations for managing line items through the API.
Considerations
Keep these considerations in mind when working with line items:
- Line items can be designated for invoices, bills, or both.
- Items are always associated with an organization or a paypoint.
- The
itemMode
parameter determines where items can be used (0=invoices, 1=bills, 2=both).
Create a line item
Send a POST request to /api/LineItem/{entryId}
to create a new line item in an entrypoint’s catalog. See the API reference for full documentation.
This example creates a consultation service line item in the paypoint with ID 47cae3d74
. The item is set for use with invoices only (itemMode: 0
).
Get line item details
Send a GET request to /api/LineItem/{lineItemId}
to retrieve information about a specific line item. See the API reference for full documentation.
This example retrieves details for the line item with ID 700
.
A successful request sends a 200 response with a JSON body that contains the line item details.
Get list of line items
Send a GET request to /api/Query/lineitems/{entry}
to retrieve all line items for an entrypoint. See the API reference for full documentation.
This example retrieves all line items for the paypoint with ID 47cae3d74
.
A successful request sends a 200 response with a JSON body that contains the list of line items.
Update a line item
Send a PUT request to /api/LineItem/{lineItemId}
to modify an existing line item’s details. See the API reference for full documentation.
This example updates the line item with ID 700
to be a materials deposit item with new pricing and measurement details.
A successful request sends a 200 response with a JSON body that contains the updated line item details. The response is the same as the create line item response.
Delete a line item
Send a DELETE request to /api/LineItem/{lineItemId}
to remove an existing line item. See the API reference for full documentation.
This example deletes the line item with ID 700
.
A successful request sends a 200 response with a JSON body that contains the deleted line item’s ID.