Update a contractor
PUT
/api/v1/contractors/{contractor_id}
Updates the specified contractor by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
This request accepts mostly the same arguments as the contractor creation call.
Body
-
address object
-
company_name string | null
The contractor's business name.
-
custom_metadata object
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.
-
first_name string
The contractor's first name.
-
id string
-
last_name string
The contractor's last name.
-
middle_name string | null
The contractor's middle name.
-
phone string
The contractor's phone number.
PUT /api/v1/contractors/{contractor_id}
curl \
-X PUT https://api.1099policy.com/api/v1/contractors/{contractor_id} \
-H "Content-Type: application/json" \
-d '{"address":{"line1":"1 Kearny St","locality":"San Francisco","postalcode":94104,"region":"CA"},"company_name":"Acme Co.","custom_metadata":{"campaign":"Red Bull"},"email":"parker@gmail.com","first_name":"Joe","last_name":"Parker","phone":"415-474-9088","tax_identification":"12-3456789"}'
Request example
{
"address": {
"line1": "1 Kearny St",
"locality": "San Francisco",
"postalcode": 94104,
"region": "CA"
},
"company_name": "Acme Co.",
"custom_metadata": {
"campaign": "Red Bull"
},
"email": "parker@gmail.com",
"first_name": "Joe",
"last_name": "Parker",
"phone": "415-474-9088",
"tax_identification": "12-3456789"
}
Response examples (200)
{
"address": {
"country": "null",
"line1": "92 Geary St",
"line2": "null",
"locality": "San Francisco",
"postalcode": 94114,
"region": "CA"
},
"company_name": "Acme Co.",
"created": 1646818364,
"custom_metadata": {
"campaign": "Red Bull"
},
"email": "parker@gmail.com",
"first_name": "Joe",
"id": "cn_Ehb3bYa",
"last_name": "Parker",
"middle_name": "null",
"phone": "415-474-9088",
"withhold_premium": false
}