PATCH /rest/v1.0/vendors/sync
Creates or updates a batch of Company Vendors. See Using Sync Actions for additional information.
Country and State codes
The country_code
and state_code
parameter values must conform to the ISO-3166 Alpha-2 specification.
See Working with Country Codes for additional information.
Documentation
The purpose of this API is to allow one or more vendors to be created or updated.
The caller provides an array of hashes, each hash containing the attributes for a single vendor. The attribute names in each hash match those used by the Create and Update Company Vendors APIs. Attributes for a maximum of 1000 vendors may be passed with each call.
The API will always return an HTTP status of 200.
The response body will contain two attributes entities and errors. The attributes for each successfully created or updated vendor will appear in the entities list. The attributes for each vendor will match those returned by the Show Company Vendor API. For each vendor which could not be created or updated, the attributes supplied by the caller will be present in the errors list, along with an additional errors attribute which will provide reasons for the failure.
For each vendor the caller supplies data for, the Sync API uses two different types of unique identifier to determine whether a new vendor is to be created, or an existing vendor is to be updated. The unique identifiers are supplied as the ID and origin_id attributes.
If neither unique identifier is provided, Procore will attempt to create a new vendor. For example the request below will create two new Vendors.
{
"company_id": 352361,
"updates": [
{ "name": "New Vendor 1" },
{ "name": "New Vendor 2" }
]
}
The response to this request lists all attributes for the vendors which have been created.
The ID attribute is the Procore unique identifier for a particular vendor. If the caller already knows the Procore unique identifier for a particular vendor (either through the List Company Vendors API or through the Create Company Vendor API) this value can be passed to indicate which vendor is to be updated. Note that if the caller passes an ID value which Procore does not recognise, Procore will report an error.
The caller does not need to be aware of the unique identifiers assigned by Procore
for each vendor in order to create or update them. Instead the caller can provide
their own unique identifier for the vendor in the origin_id
attribute.
If Procore cannot find a vendor with the supplied origin_id
it will create
a new one. If Procore can find a vendor with the supplied origin_id
it will update it.
Note that alongside the origin_id attribute, Procore also provides an origin_data
attribute. Procore does not interpret the contents of this attribute.
The caller can use this to store and retrieve their own contextual
information about this vendor.
Servers
- https://api.procore.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Procore-Company-Id |
Integer | Yes |
Unique company identifier associated with the Procore User Account. |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
run_configurable_validations |
Boolean | No |
If true, validations are run for the corresponding Configurable Field Set. Default value: false |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
updates[] |
Array | Yes | |
updates[].mobile_phone |
String | No |
Mobile phone |
updates[].union_member |
Boolean | No |
Union member status |
updates[].origin_data |
String | No |
Origin Data |
updates[].city |
String | No |
City |
updates[].origin_code |
String | No |
Origin Code |
updates[].bidding |
Object | No |
Bidding statuses |
updates[].bidding.minority_business_enterprise |
Boolean | No |
Default value: false |
updates[].bidding.african_american_business |
Boolean | No |
Default value: false |
updates[].bidding.sdvo_business |
Boolean | No |
Default value: false |
updates[].bidding.hispanic_business |
Boolean | No |
Default value: false |
updates[].bidding.disadvantaged_business |
Boolean | No |
Default value: false |
updates[].bidding.womens_business |
Boolean | No |
Default value: false |
updates[].bidding.historically_underutilized_business |
Boolean | No |
Default value: false |
updates[].bidding.small_business |
Boolean | No |
Default value: false |
updates[].bidding.native_american_business |
Boolean | No |
Default value: false |
updates[].bidding.affirmative_action |
Boolean | No |
Default value: false |
updates[].bidding.certified_business_enterprise |
Boolean | No |
Default value: false |
updates[].bidding.asian_american_business |
Boolean | No |
Default value: false |
updates[].bidding.eight_a_business |
Boolean | No |
Default value: false |
updates[].id |
Integer | No |
ID |
updates[].authorized_bidder |
Boolean | No |
Authorized bidder status |
updates[].license_number |
String | No |
License number |
updates[].standard_cost_code_ids[] |
Array | No | |
updates[].zip |
String | No |
Zip code |
updates[].origin_id |
String | No |
Origin ID |
updates[].bidding_distribution_ids[] |
Array | No | |
updates[].business_phone |
String | No |
Business phone |
updates[].labor_union |
String | No |
Labor union |
updates[].vendor_group_id |
Integer | No |
Vendor Group ID |
updates[].parent_id |
Integer | No |
Parent Vendor ID. Cannot be the same as ID. Only two levels of hierarchy are supported (parent/child). |
updates[].email_address |
String | No |
Email address |
updates[].abbreviated_name |
String | No |
Abbreviated name |
updates[].non_union_prevailing_wage |
Boolean | No |
Non union prevailing wage status |
updates[].fax_number |
String | No |
Fax number |
updates[].is_active |
Boolean | No |
Active status |
updates[].prequalified |
Boolean | No |
Prequalified status Default value: false |
updates[].website |
String | No |
Website url |
updates[].primary_contact_id |
Integer | No |
Primary Contact ID |
updates[].country_code |
String | No |
Country code (ISO-3166 Alpha-2 format) |
updates[].trade_name |
String | No |
Vendor's Trade Name, also known as Doing Business As (DBA). |
updates[].name |
String | No |
Name |
updates[].notes |
String | No |
Notes (notes/keywords/tags) |
updates[].state_code |
String | No |
State code (ISO-3166 Alpha-2 format) |
updates[].trade_ids[] |
Array | No | |
updates[].address |
String | No |
Address |
company_id |
Integer | Yes |
Company ID |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.