The single-transaction endpoints provide a single method for submitting all of the necessary data to create an invoice in one call. To accomplish this, the endpoint accepts a special type of payload that allows the user to set both the invoice header and all of the child tables in a single JSON payload.
The single-transaction type of method has the following behaviors:
- Atomicity: Invoice additions are prevented (rolled back) if any of the child tables fail in their ability to meet integrity checks or encounter an unexpected error.
- Speed: Reducing the number of calls to the API results in using a single authentication check rather than several, as well as it makes use of a shared database connection to ensure the fastest possible database performance is achieved.
The independent-transaction endpoints allow for the creation or modification of an invoice in small isolated transactions. For example, one endpoint could be used to create an invoice header, and another endpoint could be used to add each item or miscellaneous charge. This style of interacting with an invoice is best suited for situations when individual parts of an existing invoice need to be modified.
The single-transaction type of method has the following behaviours:
- Flexibility: This type of endpoint allows for the individual addition or modification of any of the individual invoice components. This is useful for situations where the invoice exists and additional information such as comments needs to be added.
- Reduced Speed: Each invoice components' web method validates the session, establishes a database connection, and initializes any objects; all of which takes time.
The following objects and matching endpoints are available.
|Invoice||Invoice header table||
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.