O4 Paychecks has a JSON API that may be used to pull data from an O4 cloud server directly into other applications. The API is setup like many other O4 APIs with two primary end points:
- PaycheckListing- service to pull a listing of available Paychecks in summary
- PaycheckTS- service to pull an entire paycheck entry
Requirements:
- Users must have O4. To learn more about moving forward with O4, email OASIS Sales at sales@oasissalessoftware.com or call 501-843-6750.
- Users must create bearer tokens in O4 to authorize the call in their external API software.
PaycheckListing API
For example, the following call:
http://localhost:8080/OASIS/API?ajax=PaycheckListing&Run%20Date=ThisMonth:ThisMonth&Listing=RunDate,Credits,Take
might return:
{
"Listing": [
{
"Take": "11564.09",
"Credits": "74422.00",
"RunDate": "2022-01-28 07.45.44"
}
]
}
Constructing a URL (for an http get) requires the following:
- ajax=PaycheckListing
- One or more search criteria. The following are currently defined:
- Invoice Number- return paychecks where the given invoice is associated with
- Invoice Date- return paychecks with invoices with the given invoice date
- Run Date- return paychecks run during the given timeframe
- A "Listing=" entry with a comma separated list of the following data elements to show:
- Credits- total paycheck credits
- Take- total take
- RunDate- date of paycheck run
- CommissionTimeframe- timeframe for commissioned orders
- ResellTimeframe- timeframe for resell orders
- AdjustmentsTimeframe- timeframe for adjustments
- DBID- DBID to use with the PaycheckTS API
- PaycheckID- PaycheckID to use with the PaycheckTS API
- CreateDate- date paycheck was created
- CreateUserID- user creating the paycheck
- UpdateDate- date of last update
- UpdateUserID- user last updating the paycheck
PaycheckTS API
For example, the following call:
http://localhost:8080/OASIS/API?ajax=PaycheckTS&DBID=DATA_EXTRACT&PaycheckID=4
might return:
{
"PaycheckTS": [
{
"Documents": [
{
"AccountID": "BHOWARD",
"Invoices": [
{
"MiscCost": "",
"MarginCredit": "",
"OveragePercent": "$40.00",
"OverageCredit": "$0.00",
"CommissionTake": "$9.60",
"ReceivedNow": "$48.00",
"MaterialSell": "$960.00",…
Constructing a URL (for an http get) requires the following:
- ajax=PacheckTS
- The DBID and PayckeckID of the paycheck to return
The general structure of the JSON is:
{
"PaycheckTS": [
{
"Documents": [
{
"AccountID": "BHOWARD",
"Invoices": [
{}
The account ID maps to a sales account in OASIS.
Invoice objects contain:
- InvoiceNumber- the invoice number.
- InvoiceDBID, InvoiceID- values to pull the invoice from the InvoiceTS API.
- MaterialSell- sell price of the material on the order (less freight, tax, misc charges, etc.). This is before the order split.
- MarginCredit- value of resell margin. This is total credit for the invoice before order split.
- OverageCredit- value of the overage. This is the total for the agency before the order split.
- CommissionCredit- value of the commission. This is the total for the agency before the order split.
- MarginPercent- user/sales account setup for amount of resell margin the salesperson takes.
- OveragePercent- user/sales account setup for amount of overage the salesperson takes.
- CommissionPercent- user/sales account setup for amount of commission the salesperson takes.
- ReceiveNow-total amount received on the invoice this period. This is before the order split.
- Received- total amount received so far on the invoice. This is before the order split.
- Receivable- total amount remaining to receive on the invoice. This is before the order split.
- MarginTake- amount of resell margin to pay salesperson.
- OverageTake- amount of overage to pay salesperson.
- CommissionTake- amount commission to pay salesperson.
Comments
0 comments
Please sign in to leave a comment.