Create an invoice

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://docs.1099policy.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"1099Policy MCP server": {
  "url": "https://docs.1099policy.com/mcp"
}
Close
POST /api/v1/invoices

This endpoint creates an invoice that reflects the insurance premium owed by the contractor for the specified pay period.

application/json

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.

  • purchase_order_number string

    The purchase order number for this invoice. Optional.

    By default an invoice inherits the purchase_order_number set on the job's custom_metadata. Send this field to override that default for this invoice — an explicit value always wins over the job default. Send an empty string ("") to create the invoice with no purchase order number, or omit the field to inherit the job's default.

    If a later gross_pay change re-prices this invoice, the replacement invoice keeps this purchase order number; it is not re-inherited from the job.

Responses

  • 201 application/json

    Returns the invoice object if the post succeeded.

    Hide response attributes Show response attributes object
    • contractor string

      ID of the contractor.

    • created integer(int64)

      Time at which the object was created. Measured in seconds since the Unix epoch.

    • gross_pay integer

      The gross pay that the contractor earned in the last pay period.

      A positive integer representing the gross pay (e.g., 15000 cents to charge $150.00). The minimum amount is 100 cents US. The maximum amount is 100000000 cents US ($1,000,000).

      Minimum value is 100, maximum value is 100000000.

    • id string

      Unique identifier for the object.

    • job string

      ID of the job that the contractor was paid to do.

    • paycycle_enddate integer(int64)

      Pay period end date. Measured in seconds since the Unix epoch.

    • paycycle_startdate integer(int64)

      Pay period start date. Measured in seconds since the Unix epoch.

    • premium_due integer

      Premium due for pay cycle. Calculated as a percentage of gross pay for the period.

      A positive integer representing the premium due (e.g., 150 cents to charge $1.50). The minimum amount is 100 cents US.

    • purchase_order_number string

      The purchase order number for this invoice. Used for dashboard display and agency-pay billing.

      By default an invoice inherits this from the purchase_order_number set on the job's custom_metadata when it is created. It can be overridden per invoice on create or update by sending purchase_order_number (an explicit value wins over the job default), or cleared by sending an empty string (""). Omitting the field on update leaves the current value unchanged.

      When a wage change re-prices an invoice, the replacement invoice keeps this value rather than re-inheriting it from the job.

      Precedence: explicit value on the invoice, then the value carried forward when an invoice is re-priced, then the job's custom_metadata default.

POST /api/v1/invoices
curl \
 --request POST 'https://api.1099policy.com/api/v1/invoices' \
 --header "Content-Type: application/json" \
 --data '{"contractor":"string","gross_pay":42,"job":"string","paycycle_enddate":42,"paycycle_startdate":42,"purchase_order_number":"string"}'
Request examples
{
  "contractor": "string",
  "gross_pay": 42,
  "job": "string",
  "paycycle_enddate": 42,
  "paycycle_startdate": 42,
  "purchase_order_number": "string"
}
Response examples (201)
{
  "contractor": "cn_Ehb3bYa",
  "created": 1646818364,
  "gross_pay": 250000,
  "id": "string",
  "job": "jb_jsb9KEcTpc",
  "paycycle_enddate": 1678334737,
  "paycycle_startdate": 1646818364,
  "premium_due": 4325,
  "purchase_order_number": "12345678"
}