Create an invoice
POST
/api/v1/invoices
This endpoint creates an invoice that reflects the insurance premium owed by the contractor for the specified pay period.
Body
-
contractor string Required
ID of the contractor
-
gross_pay integer Required
The gross pay that the contractor earned in the last pay period.
-
job string Required
ID of the job that the contractor was paid to do.
-
paycycle_enddate integer Required
Pay period end date.
-
paycycle_startdate integer Required
Pay period start date.
POST /api/v1/invoices
curl \
-X POST https://api.1099policy.com/api/v1/invoices \
-H "Content-Type: application/json" \
-d '{"contractor":"cn_Ehb3bYa","gross_pay":250000,"job":"jb_jsb9KEcTpc","paycycle_enddate":1678334737,"paycycle_startdate":1646818364}'
Request example
{
"contractor": "cn_Ehb3bYa",
"gross_pay": 250000,
"job": "jb_jsb9KEcTpc",
"paycycle_enddate": 1678334737,
"paycycle_startdate": 1646818364
}
Response examples (201)
{
"contractor": "cn_Ehb3bYa",
"created": 1646818364,
"gross_pay": 250000,
"id": "in_4RviYgc2Wt",
"job": "jb_jsb9KEcTpc",
"paycycle_enddate": 1678334737,
"paycycle_startdate": 1646818364,
"premium_due": 4325
}