Procore.Api.CoreCompanyDirectoryCompanyVendors (procore_sdk v0.3.0)

API calls for all endpoints tagged CoreCompanyDirectoryCompanyVendors.

Summary

Functions

List company vendors Return a list of all Vendors associated with a Company.

Update Company Vendor Business Register Update an existing Business Register associated with a specified Vendor. The Register must already exist. Changing the identifier of a verified Business Register will set the following attributes to null: verification_status, verified_at

Create Company Vendor Business Register Create a new Business Register associated with a specified Vendor.

Show company vendor Show detail on a specified Company Vendor.

Update company vendor Update a specified Company Vendor. #### 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.

Create company vendor Create a new Vendor associated with a specified Company. #### 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.

Sync company vendors 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. json { "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.

Functions

Link to this function

rest_v10_vendors_get(connection, procore_company_id, company_id, opts \\ [])

List company vendors Return a list of all Vendors associated with a Company.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • company_id (integer()): Unique identifier for the company.
  • opts (keyword): Optional parameters
    • :view (String.t): Specifies which view of the resource to return (which attributes should be present in the response). The default view is extended.
    • :page (integer()): Page
    • :per_page (integer()): Elements per page
    • :"filters[origin_id]" (String.t): Origin ID. Returns item(s) with the specified Origin ID.
    • :"filters[search]" (String.t): Return vendors where the search string matches the vendor name, keywords, origin_code, or ABN/EIN number
    • :"filters[created_at]" (DateTime.t): Return items within a specific created at ISO8601 datetime range
    • :"filters[updated_at]" (String.t): Return items within a specific updated at ISO8601 datetime range
    • :"filters[standard_cost_code_id][]" ([integer()]): Returns vendors associated with the specified standard cost code id(s)
    • :"filters[trade_id][]" ([integer()]): Returns vendors associated with the specified trade id(s)
    • :"filters[id][]" ([integer()]): Returns vendors with the specified id(s)
    • :"filters[parent_id][]" ([integer()]): Returns vendors with the specified parent id(s)
    • :sort (String.t): Return items with the specified sort

Returns

  • {:ok, [%RestV10VendorsGet200ResponseInner{}, ...]} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v10_vendors_id_business_register_patch(connection, procore_company_id, id, company_id, business_register_body, opts \\ [])

Update Company Vendor Business Register Update an existing Business Register associated with a specified Vendor. The Register must already exist. Changing the identifier of a verified Business Register will set the following attributes to null: verification_status, verified_at

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • id (integer()): ID of the Company Vendor
  • company_id (integer()): ID of the Company
  • business_register_body (BusinessRegisterBody):
  • opts (keyword): Optional parameters

Returns

  • {:ok, Procore.Model.NormalViewBusinessRegister.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v10_vendors_id_business_register_post(connection, procore_company_id, id, company_id, business_register_body, opts \\ [])

Create Company Vendor Business Register Create a new Business Register associated with a specified Vendor.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • id (integer()): ID of the Company Vendor
  • company_id (integer()): Unique identifier for the company.
  • business_register_body (BusinessRegisterBody):
  • opts (keyword): Optional parameters

Returns

  • {:ok, Procore.Model.NormalViewBusinessRegister.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v10_vendors_id_get(connection, procore_company_id, id, company_id, opts \\ [])

Show company vendor Show detail on a specified Company Vendor.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • id (integer()): ID of the vendor
  • company_id (integer()): Unique identifier for the company.
  • opts (keyword): Optional parameters
    • :view (String.t): Specifies which view of the resource to return (which attributes should be present in the response). The default view is extended.
    • :page (integer()): Page
    • :per_page (integer()): Elements per page

Returns

  • {:ok, Procore.Model.RestV10VendorsIdGet200Response.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v10_vendors_id_patch(connection, procore_company_id, id, company_vendor_body, opts \\ [])

Update company vendor Update a specified Company Vendor. #### 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.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • id (integer()): ID of the vendor
  • company_vendor_body (CompanyVendorBody):
  • opts (keyword): Optional parameters
    • :view (String.t): Specifies which view of the resource to return (which attributes should be present in the response). The default view is extended.
    • :run_configurable_validations (boolean()): If true, validations are run for the corresponding Configurable Field Set.

Returns

  • {:ok, Procore.Model.RestV10VendorsGet200ResponseInner.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v10_vendors_post(connection, procore_company_id, company_vendor_body, opts \\ [])

Create company vendor Create a new Vendor associated with a specified Company. #### 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.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • company_vendor_body (CompanyVendorBody):
  • opts (keyword): Optional parameters
    • :view (String.t): Specifies which view of the resource to return (which attributes should be present in the response). The default view is extended.
    • :run_configurable_validations (boolean()): If true, validations are run for the corresponding Configurable Field Set.

Returns

  • {:ok, Procore.Model.RestV10VendorsGet200ResponseInner.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v10_vendors_sync_patch(connection, procore_company_id, company_vendor_sync_body, opts \\ [])

Sync company vendors 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. json { "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.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • company_vendor_sync_body (CompanyVendorSyncBody):
  • opts (keyword): Optional parameters
    • :run_configurable_validations (boolean()): If true, validations are run for the corresponding Configurable Field Set.

Returns

  • {:ok, Procore.Model.RestV10VendorsSyncPatch200Response.t} on success
  • {:error, Tesla.Env.t} on failure