List all contractors

GET /api/v1/contractors

Returns a list of your contractors. The contractors are returned sorted by creation date, with the most recent contractors appearing first.

Query parameters

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

    Minimum value is 1, maximum value is 100. Default value is 10.

  • A cursor for use in pagination. starting_after is an contractor ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with cn_fOo123, your subsequent call can include starting_after=cn_fOo123 in order to fetch the next page of the list.

  • A cursor for use in pagination. ending_before is an contractor ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with cn_bAr123, your subsequent call can include ending_before=cn_bAr123 in order to fetch the previous page of the list.

  • email string

    A case-sensitive filter on the list based on the contractor's email attribute. The value must be a string.

Responses

  • 200 application/json

    Returns an array of contractor objects. If no more contractors are available, the resulting array will be empty.

    Hide response attributes Show response attributes object
    • address object
      Hide address attributes Show address attributes object
      • country string | null

        2-letter country code.

      • line1 string

        Address line 1 (Street address/PO Box).

      • line2 string | null

        Address line 2 (Apartment/Suite/Unit/Building).

      • locality string

        City/District/Suburb/Town/Village.

      • ZIP or postal code.

      • region string

        2-letter state code.

    • company_name string | null

      The contractor's business name.

    • created integer(int64)

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

    • Set of key-value pairs that you can attach to the contractor object. Used for storing additional information in a structured format. Individual keys can be unset by posting an empty value to them. Pass an empty value, e.g. {}, to custom_metadata to unset all keys.

    • email string

      The contractor's email address.

    • The contractor's first name.

    • id string
    • The contractor's last name.

    • middle_name string | null

      The contractor's middle name.

    • phone string

      The contractor's phone number.

    • This indicates whether the contractor is paying premium directly with their credit card (i.e., false) or if the contractor has given the platform that's integrating with 1099Policy permission to withhold the premium payment from their wages and pay the premium on the contractor's behalf (i.e., true). Defaults to false.

      Default value is false.

GET /api/v1/contractors
curl \
 -X GET https://api.1099policy.com/api/v1/contractors
Response examples (200)
[
  {
    "id": "cn_Zbe1qTc",
    "email": "[email protected]",
    "phone": "916-579-1243",
    "address": {
      "line1": "150 Wythe Ave",
      "region": "NY",
      "locality": "Brooklyn",
      "postalcode": 11249
    },
    "created": 1646818364,
    "last_name": "Moss",
    "first_name": "Fredrick",
    "company_name": "Mass Repair",
    "custom_metadata": {
      "campaign": "Volvo"
    },
    "withhold_premium": false
  },
  {
    "id": "cn_Ehb3bYa",
    "email": "[email protected]",
    "phone": "415-474-9088",
    "address": {
      "line1": "1 Kearny St",
      "region": "CA",
      "locality": "San Francisco",
      "postalcode": 94104
    },
    "created": 1646818384,
    "last_name": "Parker",
    "first_name": "Joe",
    "company_name": "Acme Co.",
    "custom_metadata": {
      "campaign": "Red Bull"
    },
    "withhold_premium": false
  }
]