{
  "openapi": "3.0.0",
  "info": {
    "description": "\n\n## Developer Training And Support\n***API Reference - REST***\n\nAvetta provides access to select business objects through a set of RESTful APIs. In this portal you will find a list of the available endpoints with the latest information. For more information about a particular endpoint, click on it in the left pane to view a description of the endpoint and any query parameters. Also the mock testing feature will show a sample response payload.\n## FAQ\n\n<details><summary><b>What is the purpose of the APIs?</b></summary>\n\nAPIS are meant for real time access to data that will match the data that is available in the Connect Portal. This is meant for workflows and to drive business decisions in real time or close to real time. APIS are not intended to be used for large archived data pulls or history unless the API provides it. For more information on accessing archived data contact apisupport@avetta.com.\n</br></br></details>\n\n<details><summary><b>What is the intended use or business purpose of each API end-point?</b></summary>\n\n- **Suppliers:** Use when you need to access supplier details and compliance by site. Has limited ability to filter by date use Connections instead if you need more specific data filters such as daily changes to Compliance or Connections.\n- **Audits:** Use when you only need audit data. Deprecated use Forms instead.\n- **Insurance:** Use when you only need specific insurance data. Deprecated use Forms instead.\n- **Forms:** Use for accessing all Forms, Questions, Answers.\n- **Flags:** Use for a list of Flags. Deprecated. Use Get Supplier Flags instead\n- **Files:** Use to pull a pdf file representing a form. Files must be setup properly in the hierarchy for this to work.\n- **Connections:** Use for accessing supplier-site connections with all relevant information (compliance, supplier details, connections) and has robust date range filtering.\n- **Supplier Details:** Use for accessing Supplier details and has robust date range filtering.\n- **Hierarchy:** Use for accessing the Client Hierarchy in Connect. Use this in conjunction with the Supplier Registration endpoint.\n- **SupplierRegistration:** Use to submit new Suppliers to the Connect platform.\n- **Contractors:** Given a supplierId, retrieve all the connections existing with the client sites and all relevant information pertaining to sub Contractors, prime Contractors, and Direct Contractors for each supplier-site connection.\nCorporate Hierarchy: Use for accessing the Client Hierarchy in Connect.\n- **Push Variance:** Not intended to be used standalone – needs to be used with new flags\nendpoint. Client should be pulling in flag level compliance and then use this endpoint to force the\ncolor to green without having to access the Avetta Connect UI.\n- **Get Supplier Flags:** Used to pull flags from all levels (site, criteria, siteVariance and\ncriteriaVariance)\n- **Form Activities:** Gets all activities/comments made on a specific form from newest to oldest\n- **Form Status:** Gets the applicable statuses to apply for a specific form. The list of statuses\nwould be the applicable status to set based on the current status of the form.\n- **Supplier Accounts:** Use this endpoint to see the linked data to other platforms using the\nExternal Id. An External Id is an identifier that usually belongs to another platform and it is being\nstored in our DB to link it with its Avetta Account.\n- **Get Connections with Compliance:** Retrieves the overall compliance status between a supplier\nand a client\n- **Client Update Supplier:** Allows you to add/update the external IDs for suppliers. External IDs\nare the ids used in the clients internal systems for suppliers.\n- **Connected Supplier Profile:** Retrieves all unique suppliers at corporate, hub or site level.\n- **Hierarchy:** The API retrieves the whole hierarchy for a client.\n- **Get External IDs:** Allows you to pull all external IDs for suppliers with the ability to filter by\nsupplier, externalIdType and externalId.\n- **Delete External IDs:** Allows you to delete External IDs by supplierID or clientID.\n- **Get ESG Scores:** Retrieves ESG scores, ESG levels, ESG tier and ESG relative forms for the\nspecified client and supplier.\n- **Create Variance Flag:** Allows users to add a “basic variance” with the status “Approved” to\ncreate a new variance flag.\n- **Files:** The files end point provides the FILE PATH for documents so Clients can download the\ndocument using that path\n- **Count endpoints:** These allow to count the number of records where this count endpoint is\navailable (forms, suppliers, connections, etc...)\n</br></br></details>\n<p></p>\n\n<details><summary><b>What endpoint should I request to get information about Flag Variances?</b></summary>\n\nTo get information about Flag Variances, you should request the following endpoint:\n- `https://api.avetta.com/api/v2/suppliers`\n- `https://api.avetta.com/api/v1/connections`\n- `https://api.avetta.com/connect/v1/connections`\n</br></br></details>\n<p></p>\n\n<details><summary><b>What are the general rules for usage and management of the APIs?</b></summary>\n  <ul>\n      <li>Avetta supports the latest <b>three versions</b> of the APIs.</li>\n      <li>Avetta will not make changes that cause the API interface to stop returning results if the correct request is made.</li>\n      <li>Avetta may add new optional parameters but will <b>not remove any request parameters</b> from existing APIs.</li>\n      <li>Avetta may add new elements to the response but will <b>not remove any elements</b> from existing API responses.</li>\n      <li>API keys that are not used for <b>90 days</b> will be disabled.</li>\n      <li>Avetta reserves the right to <b>disable any API keys or prevent access</b> to APIs if there is a security or technical risk, such as excessive load on the system.</li>\n      <li>Avetta reserves the right to remove or replace functionality with a new version. Notification will be sent to anyone using the API to make them aware of the change.</li>\n      <li>For internal implementation changes that do not impact the API interface, Avetta will <b>not notify</b> API clients.</li>\n  </ul>\n</br></br></details>\n<p></p>\n\n<details><summary><b>What are the rate limiting rules for the APIs?</b></summary>\n  <ul>\n    <li>A maximum of <b>20 API calls per minute per IP address</b> is allowed for the following APIs when <b>no id or supplierId</b> is provided in the query parameters:\n        <ul>\n            <li>v1/suppliers</li>\n            <li>v2/suppliers</li>\n            <li>v1/insurance</li>\n            <li>v2/insurance</li>\n            <li>v1/forms</li>\n            <li>v1/audits</li>\n            <li>v2/audits</li>\n        </ul>\n    </li>\n    <li>For all other cases, a maximum of <b>60 API calls per minute per IP address</b> (equivalent to 1 API call per second) is allowed.</li>\n    <li>If the rate limit is exceeded, a <b>1015 HTTP status code</b> will be returned, and the client must wait for one hour before making any further API calls.</li>\n  </ul>\n</br></br></details>\n<p></p>\n\n<details><summary><b>What is the API limit for and what is the limit or maximum number of records that can be requested?</b></summary>\n  <ul>\n    <li>The API limit or maximum number of records that can be returned per individual API call is 500 by default. If more than 500 records are needed, multiple API calls must be made with different start and limit parameters. For example, if there are 10,000 records, the \"count\" version of the endpoint should be called first to get the total number of records available. Then, 20 calls with limit=500 should be made (updating both the start and limit parameters as needed) to iterate through all the results.</li>\n    <li>The default limit and maximum is 500 for all endpoints <b>EXCEPT</b> the forms endpoint, for which the default and maximum limit is 100.</li>\n  </ul>\n</br></br></details>\n<p></p>\n\n<details><summary><b>How should the Supplier Registration endpoint be used?</b></summary>\n\nThe Supplier Registration endpoint is meant to serve as the receiver for Supplier Registration Requests. Here are the steps to follow:\n- Step 1 (optional): Client accesses the hierarchy endpoint to identify the list of sites for their Account\n- Step 2 (required) Client submits data via Post with the required fields in the proper format to the registration API\n- Step 3 (required) Avetta verify that the Supplier was processed and all the data fields were imported\nFor the Supplier registration endpoint what does status 200/400/500 indicate?\nStatus Code 200 – OK means the Registration submission was successful.\nError Code 400 or 500 means there is an error and you should check all the data and ensure all the required fields are included.\n\nFor the Registration endpoint how can I test in Postman?\nSend the POST request using the Body tab – Raw option and post the full JSON use the example included in the documentation.\n\nFor the Registration endpoint do I need to include all fields in the response?\nNo, only the required fields\n\nFor the Registration endpoint what date should I use?\nAny valid date in the future, recommend 2 weeks from submission date\n\nWhat is the date format for language, County Code? 2 digit lower case for language, 3 digit for Country Code\n\nAre there any other recommended settings?\nExplicitly stated UTF8 encoding and add a content type header.\n\nAPI Endpoints to use for Supplier Registration API testing:\n`http://api.avetta.com/connect/v1/registrations` and `https://api.avetta.com/v1/corporate-hierarchy/sites/`\n\n**Example test file:**\n```\nname: TEST\nprimaryContact:\n  firstName: Bob\n  lastName: Test\n  email: Bob.Test@test.com\n  phone: 949.555.5555\n  language: en\nbillingAddress:\n  addressLine: 20 Test St.\n  city: Acton\n  state: MA\n  postalCode: '01720'\n  country: US\nreasonForRequest: API Test\nrequestDeadline: '2021-11-16T00:00:00.00Z'\nrequestedByClientId: 93279\nrequestorFullName: Joe  Test\nrequestorEmail: test@mydomain.com\n```\n</br></br></details>\n\n\n<details><summary><b>How accurate is the information being pulled?</b></summary>\n\nThe information pulled is live production data and is the most accurate, up to date information available.\n</br></br></details>\n\n<details><summary><b>In what level of Hierarchy are API Keys created/supported?</b></summary>\n\nAPI Keys are only supported at the Corporate node\n</br></br></details>\n\n<details><summary><b>What is the proper way of including the API key in the requests?</b></summary>\n\nApi keys should be included as a header on every API request.\n\nThe header name should be:\n\n```Authorization```.\n\nThe header value should follow the format:\n\n```apikey XXXXXXXXXXXXXXXXXXXXXXXX```\n\nThe following is an example request that can be imported into Postman\n```curl --location --request GET '<URL>' \\\n--header 'Authorization:apikey <API_KEY>'\n```\n\nThe above response applies to all API keys generated from 01-2023 onwards.\n</br></br></details>\n\n<details><summary><b>I expect many more records to be returned in my API calls, why am I only receiving a subset of data from calls to any endpoint?</b></summary>\n\n Our API endpoints default to a `modifiedAfter` date if the parameter is not being used. The date being used varies by endpoint so its possible that if you are expecting more data to be returned, you need to add the `modifiedAfter` parameter and use a date further back in the past than the default so that more records are returned. Please see each endpoints query parameter definitions for more details on the `modifiedAfter` parameter defaults by endpoint.\n</br></br></details>\n\n<details><summary><b>How to use API testing module?</b></summary>\n\n1. Go to the <a href=\"https://docs.connect.avetta.com\" target=\"_blank\">developer portal</a>, and select the endpoint you wish to test from the left navigation menu.\n\n2. Click **try** to open the test section.\n\n3. Click the lock icon to enter your API key.\n\n    a. To use the live server, you will need your organization’s API key. To use the mock server, you can use “apikey 1234\".\n\n4. Enter all required parameters and desired query parameters.\n\n5. Select the server type you wish to use from the dropdown.\n\n6. Click **Execute**.\n</br></br></details>\n\n# Common Use Cases\n\nAPI access is available to Avetta Clients and Partners. Contact your account representative for more information on how to obtain access to the Avetta API feature.\n\n<details><summary><b>I want to pull a full list of my Supplier’s Accounts</b></summary>\n\nUse the Get Supplier Accounts endpoint, with the ability to query with the following parameters: accountStatus, externalID, modifiedAfter, etc.. \n\n**Ex:** `https://api.avetta.com/connect/v1/supplier-accounts?&accountStatus=pending&modifiedAfter=2022-02-02`\n</br></br></details>\n\n<details><summary><b>I want to pull a list of my Supplier Connections</b></summary>\n\nUse the Get Connections endpoint to retrieve the overall flag status between a supplier and a client. This endpoint allows you to query by clientID, supplierID, status, flagColor, etc.. \n\n**Ex:** `https://api.avetta.com/client-api/v1/connections?clientId=CLIENTID&supplierId=SUPPLIERID`\n</br></br></details>\n\n<details><summary><b>I want to pull a list of Suppliers with Connections and with Compliance</b></summary>\n\nUse the Get Suppliers endpoint to pull a list of suppliers with connections and compliance.\n\n**Ex:** `https://api.avetta.com/client-api/v2/suppliers`\n</br></br></details>\n\n<details><summary><b>I want to pull a list of the sites within my Account’s hierarchy</b></summary>\n\nPull the Corporate Hierarchy Sites endpoint to retrieve a list of your site names & site id’s Store these site names and site id’s in your CRM database if you want to use site id to filter other endpoints\n</br></br></details>\n\n<details><summary><b>I want to pull a list of Flags for each Supplier</b></summary>\n\nUse the Get Connections endpoint or Get Connections endpoint to pull a list of suppliers and corresponding Avetta ID or External ID Use the Get Flags endpoint to retrieve a list of all flag statuses per supplier\n\na. Optional query parameter externalId will filter the output to a specific supplier\n\nb. Optional query parameter supplierId will filter the output to a specific supplier\n</br></br></details>\n\n<details><summary><b>I want to pull a list of Connections with Variance</b></summary>\n\nUse the Get Connections endpoint to retrieve a complete list of suppliers and variance statuses\n\na. Referenced the isForced data point to track variances applied to suppliers\n\nb. FlagDetails will provide additional details regarding the variance issued\n</br></br></details>\n\n<details><summary><b>I want to pull a list of Forms, Questions, Answers</b></summary>\n\nUse the Get Connections endpoint or Get Connections endpoint to pull a list of suppliers and corresponding Avetta ID or External ID Use the Get Form Data endpoint to return a complete list of forms for your suppliers\n\na. The output includes Form Name, Questions included in each form, and the supplier’s Answer to each question\n\nb. Use the query parameter categoryId to filter to a specific form for all your suppliers\n</br></br></details>\n\n<details><summary><b>I want to pull my supplier’s documents in PDF format</b></summary>\n\na. Start by using the Forms endpoint to retrieve a list of your supplier’s form data. You may filter these results down by using the available parameters (supplierId, categoryId, etc.)\n\nb. Find the “href” field in the applicable Form array you want the document for\n\nc. Call the URL provided in the “href” field. Be sure to pass your API Key as a parameter\n\nd. PDF document will be returned successfully\n</br></br></details>\n\n<details><summary><b>I want to create a variance flag via API</b></summary>\n\nUse the Create Variance API to add a “basic variance” through API with the status “Approved” and on a\nsite or criteria flag. This will not update the existing variance if a variance already exists on the site and\ncriteria flag. Only one variance can be created against a RED/GREY/AMBER and can only be\nAMBER/RED/GREEN.\n\n1. Use the Get Supplier flags endpoint to get supplier, site, and flag id for which you want to add the\nvariance for.\n\n2. Use the Create Variance endpoint with these parameters along with the color, enddate, comments and supporting file.\n</br></br></details>\n\n<details><summary><b>I want a financial risk score</b></summary>\n\nAvetta will provide the categoryID and analytics report of existing financial risk scores. Client\nwill call the forms endpoint, pass the categoryID, parse for the correct questions (local risk\nscore), all with the modified after parameter passed.\n</br></br></details>\n\n<details><summary><b>I want to pull in insurance expiration dates</b></summary>\n\nAvetta will provide the categoryID and analytics report of existing expiration dates. Client will call the\nforms endpoint, pass the categoryID, parse for the correct questions (provided by Avetta), all with the\nmodified after parameter passed.\n</br></br></details>\n\n<details><summary><b>I want to download the COIs of my contractors</b></summary>\n\nAvetta will provide the categoryID. Client will call the forms endpoint, pass the categoryID, parse for\nthe correct question. The answer to the question will be a file path. (note: multiple files can be\nuploaded and will be separated by ~^~). The client will need to grab the supplier ID, client ID, and the\nfile path from the response and use it to call the files endpoint.\n</br></br></details>\n\n<details><summary><b>I want ESG score per supplier</b></summary>\n\nUse the Get ESG scores endpoint by passing the client ID and supplier ID to list the ESG scores.\n</br></br></details><br>         \n\n***Block POs or Flag PO's for non-compliant suppliers***\n\nTrack supplier compliance and build into your purchasing process to ensure POs are not being issued to non-compliant suppliers, or there is some level of additional review for non-compliant suppliers\n\n\n<details><summary><b>Map all suppliers from the Avetta system to the client System</b></summary>\n\n- The actual mapping will be done in advance of the integration. This workflow is the API call that will make that connection in the client's system. Not required if external IDs on are the site level\n- Get External IDs: **https://docs.connect.avetta.com/#tag/Account/operation/getExternalIds**\n- start = ?: for pagination\n- supplierId = ?: use this parameter if the workflow is reversed, and they have the supplier and compliance but do not know the external ID.\n</details><p>\n\n<details><summary><b>Pull and store all suppliers' compliance statuses in client system</b></summary>\n\n- Pull a complete list of our suppliers in Avetta and their current compliance status. <b>This is a one time pull.</b>\n- Connections: **https://docs.connect.avetta.com/#tag/Connection-Endpoint/paths/~1v1~1connections/get**\n- modifiedAfter = 2020-01-01. This will ensure you get all suppliers and their compliance statuses\n</details><p>\n\n<details><summary><b>Monitor supplier compliance status changes with nightly batch jobs</b></summary>\n\n- Using a delta to receive any changes in supplier compliance statuses since the last scheduled run.\n- Connections: **https://docs.connect.avetta.com/#tag/Connection-Endpoint/paths/~1v1~1connections/get**\n- flagModifiedAfter = yesterday: The result will be suppliers that have had a flag status change in the last day. \n</details><p>\n\n<details><summary><b>Monitor supplies that disconnect in nightly batch job.</b></summary>\n\n- Catch when a supplier disconnects from your network and mark that in client system. This will prevent a false positive for a PO. The system will need to look at the \"status\" value.\n- Connections: **https://docs.connect.avetta.com/#tag/Connection-Endpoint/paths/~1v1~1connections/get**\n- modifiedAfter = yesterday: The result will be suppliers that have had a connection status change in the last day.  \n</details><p>\n\n<details><summary><b>Monitor suppliers that deactivate their account in nightly batch job.</b></summary>\n\n- Catch when a supplier deactivates their entire Avetta account and mark that in client system. This will prevent a false positive for a PO. There is a max history of 30 days for this API.\n- Connected Supplier Profile: **https://docs.connect.avetta.com/#tag/Account/operation/getSupplierProfile**\n- accountStatus = deactivated\n- modifiedAfter = yesterday\n</details><br>\n\n***Gather Supplier Details***\n\nIf you would like to store or track additional supplier details beyond their overall compliance status. Build business intelligence dashboards to track leading and lagging indicators.\n\n<details><summary><b>Pull in supplier Insurance statuses in nightly batch job</b></summary>\n\n- Client will need to identify the exact insurance values they want to pull. TPM will then provide a questionID(s). Historical values can be provided via analytics for an initial data load.\n- Forms v2: **https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierFormsAndAnswers**\n- questionId = ?\n- modifiedAfter = yesterday\n</details><p>    \n\n<details><summary><b>Gather specific form details in nightly batch job</b></summary>\n\n- Client will need to identify the exact form values they want to pull. TPM will then provide a questionID(s). Historical values can be provided via analytics for an initial data load.\n- Forms v2: **https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierFormsAndAnswers**\n- questionId = ?\n- modifiedAfter = yesterday\n</details><p>    \n\n<details><summary><b>View individual requirement flag statuses in nightly batch job.</b></summary>\n\n- Client will need to identify the exact flag statuses they want. The TPM will then provide the calculationId. Historical flag values can be provided via analytics for an initial data load\n- Get Supplier Flags: **https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierFlags**\n- clientId = corporateId\n- calculationId = ?\n- modifiedAfter = yesterday\n</details><p>\n\n\n<details><summary><b>Get Financial Risk Data</b></summary>\n\n- TPM will provide exact form ID during implementation. Historical flag values can be provided via analytics for an initial data load.\n- Forms v2: **https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierFormsAndAnswers**\n- formId = ?\n- modifiedAfter = yesterday\n</details><p>\n\n<details><summary><b>Get ESG Data</b></summary>\n\n- This endpoint works differently in a sense that it will not be updated in nightly batch jobs. All scores for the supplier base will need to be pulled at a time. The cadence of pulls can be nightly, weekly, etc.\n- Get Supplier ESG Scores: **https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierEsgScores**\n- clientId = can be corporate to see all suppliers, or a site Id to see just a subset\n- start = ?: will need this for pagination since you will be getting a large amount of data back\n</details><br>\n\n***Automate Supplier Onboarding Process***\n\nAutomate additional business processes to automatically send newly onboarded suppliers to Avetta to have them register and begin submitting compliance data. This automated with the Blocking POs use case can ensure end to end automation through the supplier life cycle\n\n<details><summary><b>Register Supplier</b></summary>\n\n- Suppliers will need to determine a trigger in their current ERP workflow. The trigger will be a yes/no for if the supplier falls into the Avetta network scope. If yes, the ERP will also need to have a mapping of the ERP sites to the Avetta sites. \n- Register Supplier: **https://docs.connect.avetta.com/#tag/Account/operation/register-supplier**\n- Name, Contact Information, and Country\n- reasonForRequest = an autopopulated value. Can be \"Sent via API\" or another predefined message that explains why this supplier was triggered.\n- requestDeadline = is there a date this supplier HAS to be onboarded by.\n- requestedByClientId = hardcoded avetta ID of the corporate node\n- requestedBySite = the Avetta site ID that a supplier is connecting to\n- requestorFullName = Representative on client side that owns supplier network.\n- requestorEmail = email of client representative\n- tags = optional values. Will need to pass the Avetta ID for specific tags.\n- external ID fields: ID of the supplier record in client ERP. This will automate site mapping and should be considered required.\n</details><br>\n\n#  Release Notes\n\n| **Date** | **Release Notes**  |\n| ------------- |-------------|\n| October 15, 2025   | <ul><li> New APIs created  <br>  <ul><li><a href=\"https://docs.connect.avetta.com/#tag/Worksite-Safety\">Worksite Safety APIs</a><ul><li>We have created a new suite of endpoints designed to retrieve information from and write information into our Worksite Safety feature.</li><li>Retrieve Project/Work Request data from the Worksite Safety module.</li><li>Create new Projects/Work Requests in the Worksite Safety module.</li></ul></li></ul></li></ul> |    \n| August 07, 2025   | <ul><li> New API  <br>  <ul><li><a href=\"https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierScorecards\">Get Supplier Scorecard</a><ul><li>Retrieves a list of Overall Scores from Scorecard feature for connected Suppliers for a Client.</li></ul></li></ul></li></ul> |\n| July 23, 2025     | <ul><li> Request Parameter Changed <br> <ul><li><a href=\"https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierFormsAndAnswers\">Forms V2</a><ul><li>`questionId` parameter has been deprecated. <li>Users should use the new parameter `questionIds` instead. </li> <li>The new parameter can filter by multiple questions. To use it, pass multiple questionIds parameters in the query string, like: ?questionIds=1&questionIds=2&questionIds=3.</li> <li>This parameter accepts repeated keys rather than a comma-separated list.</li></li></ul></li></ul></li></ul> |\n| July 01, 2025     | <ul><li> Request Parameter Changed <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/register-supplier\">Register Supplier</a><ul><li>`ccEmail` field added to request. Included email addresses will be copied on the initial automated notification that is sent to the suppliers they are requesting to register with Avetta.</li></ul></li></ul></li></ul> |\n| April 17, 2025     | <ul><li> Endpoint updated <br> <ul><li><a href=\"https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierEsgScores\">Get Suppliers ESG scores</a><ul><li>Endpoint will now return Environment, Social, and Governance subcategories as part of the overall ESG score.</li></ul></li></ul></li></ul> |\n| February 06, 2025  | <ul><li> Form Endpoint v1 has been deprecated and replaced by Form Endpoint v2 <br> <ul><li><a href=\"https://docs.connect.avetta.com/#tag/Compliance/operation/getSupplierFormsAndAnswers\"> Forms V2</a><ul><li>Forms are now paginated, answers are no longer paginated </li><li>Form Score has been removed</li><li>File Names are now decoded consistently</li><li>Performance of the endpoint has been improved</li></ul></li></ul></li></ul> |\n| October 03, 2024  | <ul><li> Country field size increased <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/register-supplier\">Register Supplier</a><ul><li>Expand the `billingAddress.country` field max size from 2 to 3 characters. </li></ul></li></ul></li></ul> |\n| September 17, 2024  | <ul><li> Phone field description updated<br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/register-supplier\">Register Supplier</a><ul><li>Updated the description for the `primaryContact.phone` field. </li></ul></li></ul></li></ul> |\n| April 18, 2024      | <ul><li> New API  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Compliance/operation/createVariance\">Push Variance</a><ul><li>Push new variance to a flag</li></ul></li></ul></li></ul> |\n| March 22, 2024      | <ul><li> New API  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Compliance/operation/getSupplierFlags\">Get Supplier Flags</a><ul><li>Retrieve supplier flags according to the parameters</li></ul></li></ul></li></ul> |\n| February 08, 2024      | <ul><li> Optional Query Parameter  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/getExternalIds\">Get External Ids</a><ul><li>Added new External ID query parameter</li></ul></li></ul></li></ul> |\n| November 16, 2023      | <ul><li> New API  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/getConnectedSupplierProfile\">Get Connected Supplier Profile</a><ul><li>Retrieve suppliers unique to client hierarchy</li></ul></li></ul></li></ul> |\n| August 31, 2023      | <ul><li> New API  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/getExternalIds\">Get External Ids</a><ul><li>Retrieve external Id(s) for a client.</li></ul></li></ul></li></ul> | \n| August 31, 2023      | <ul><li> New API  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/deleteExternalIds\">Delete External Ids</a><ul><li>Deletes external Id(s) for a client/supplier.</li></ul></li></ul></li></ul> |    \n| August 24, 2023      | <ul><li> New API  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/getFullHierarchy\">Get Hierarchy</a><ul><li>Retrieves a list of hierarchy for a Client</li></ul></li></ul></li></ul> |\n| August 13, 2023      | <ul><li> Duplicate Supplier Registration logic added  <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/register-supplier\">Register Supplier</a><ul><li>New error message to prevent duplicate supplier registrations</li></ul></li></ul></li></ul> |\n| July 23, 2023   | <ul><li> Query Parameter Change <br> <ul><li><a href=\"https://docs.api.avetta.com/#tag/Supplier-Endpoint/paths/~1v2~1suppliers~1%7BsupplierId%7D/get\">Get Supplier v2</a><ul><li>modifiedAfter query parameter will return list of all suppliers records that are modified after specified date and time</li></ul></li></ul></li></ul> |    \n| July 13, 2023      | <ul><li> Request Parameter Change <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/register-supplier\">Register Supplier</a><ul><li>'requestedBySiteIds' is now a required field</li></ul></li></ul></li></ul> <br> <ul><li> Response Code Change <br> <ul><li><a href=\"https://avetta.github.io/swaggerdocs-portal/#tag/Account/operation/register-supplier\">Register Supplier</a><ul><li>Added error code: 400 for missing required field</li></ul></li></ul></li></ul> |\n",
    "title": "Client API Service",
    "version": "SONIC-4011"
  },
  "tags": [
    {
      "name": "Compliance",
      "x-displayName": "Compliance"
    },
    {
      "name": "Account",
      "x-displayName": "Account"
    },
    {
      "name": "Worksite-Safety",
      "x-displayName": "Worksite Safety",
      "description": "Worksite safety management operations including work requests and project management"
    },
    {
      "name": "Deprecated Endpoints",
      "description": "Endpoints that are deprecated and will be removed in future versions.",
      "x-displayName": "Deprecated Endpoints"
    },
    {
      "name": "Error Handling",
      "description": "Our errors are listed below in the following format -> Code Error Number [Actual Message]: Description of the error.\n\nCode 1 [Validation Failed]: An invalid API key was provided.\n\nCode 2 [Invalid Parameters]: The start and/or limit parameters entered are not within acceptable limits.\n\nCode 3 [Unknown Record]: The entered start parameter is beyond the total number of records available.\n\nCode 4 [Unmapped]: Client Id that is entered is not mapped on the custom DB tables.\n\nCode 5 [Server Error]: The system has encountered an unexpected error while processing the request.\n\nCode 6 [ConID Error]: The requested Supplier Id is unknown under the current API key.\n\nCode 7 [Null Data]: No audit or flag data available.\n\nCode 8 [Invalid Format]: Provided date and time does not conform to the `yyyy-MM-dd HH:mm:ss` or `yyyy-MM-dd` formats\n\nCode 9 [Unknown file type]: Internal Server Error",
      "x-displayName": "Error Handling"
    }
  ],
  "paths": {
    "/api/v1/suppliers/count": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves the number of suppliers returned from the `Get Suppliers` endpoint.",
        "parameters": [
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter, returns total count of records with the specified `status`",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disconnected",
                "inactive",
                "pending",
                "rejected"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                },
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "total_records": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "total_records"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                }
              },
              "example-1": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 0
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 3,
                      "message": "Bad Request"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Suppliers Count v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v1/suppliers/{supplierId}": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves a list of multiple supplier data. By default, only suppliers that have active connections to clients will be returned in this endpoint.\n* The `flags` array contains the supplier’s flag for a particular `client_id`. \n* The `client_id` field is the identifier of a specific site within your account hierarchy. \n* The `system_flag` field shows the overall flag color for a particular supplier/contractor for that `client_id`.\n* The `system_flag_details` array contains the detail of your individual flaggable data and its current flag color. This provides specific detailed reasons for the current overall flag color, `system_flag` for in regards to that specific `client_id`.\n* The **updated_date** field(which the `modifiedAfter` applies to) helps you quickly identify the latest updates to your suppliers. It reflects not only changes you or the supplier make but also internal system adjustments, such as updates to evaluations or categories. This means a supplier you haven't recently interacted with might still appear as \"recently updated\" due to these behind-the-scenes activities. It's designed to ensure you always have the most current information at your fingertips, aiding in maintaining compliance within your supply chain.\n> When `supplierId` path parameter is provided, a single supplier object related to the provided Supplier Id is returned. The `start`, `limit`, and `modifiedAfter` parameters will be ignored.",
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based).",
            "example": 1,
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500.",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "type": "number"
            }
          },
          {
            "description": "Optional parameter. The modifiedAfter parameter will filter out any records with updated_date values older than the value of the parameter supplied.\n**Please note**: updated_date does NOT keep track of the last time one of the fields in the payload has changed. In fact, it keeps track of the last change anywhere in the entire supplier model (an internal model, of which only certain fields are exposed in this endpoint). Changes that can result in updating this updated_date value include changes made by the supplier, changes made by the client (e.g. applying or removing tags), and also some changes made by the system. Example: modifiedAfter=2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter to indicate the connection status of the supplier.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disconnected",
                "inactive",
                "pending",
                "rejected"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "id": 89010,
                        "name": "Bob's Plumbing Services",
                        "dba_name": "Bob's Plumbing Services, LLC",
                        "company_url": "www.bobsplumbing.com",
                        "description": "Providing plumbing services",
                        "primary_contact": {
                          "email": "bob.smith@fakeemail.com",
                          "fax": "555 555 4567",
                          "first_name": "Bob",
                          "id": "123",
                          "last_name": "Smith",
                          "phone": "555 555 1234"
                        },
                        "address": {
                          "address_line1": "123 Main St",
                          "address_line2": "Suite 100",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "billing_address": {
                          "address_line1": "123 Main St",
                          "address_line2": "Suite 100",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "account_status": "Active",
                        "updated_date": "2022-04-25 01:39:54",
                        "external_id": [
                          {
                            "client_id": 123,
                            "type": "Vendor",
                            "value": "123"
                          }
                        ],
                        "supplier_tags": [
                          {
                            "client_id": "123",
                            "tags": [
                              {
                                "id": "223",
                                "name": "Sample Tag"
                              }
                            ]
                          }
                        ],
                        "flags": [
                          {
                            "client_id": 123,
                            "client_name": "Oil Rig",
                            "forced_expiration": "2018-06-30 00:00:00",
                            "is_forced": "True",
                            "system_flag": "Amber",
                            "system_flag_details": [
                              {
                                "flag": "Amber",
                                "forcedExpiration": "2018-06-30 00:00:00",
                                "idForced": true,
                                "reasons": [
                                  "General Liability is missing"
                                ]
                              },
                              {
                                "flag": "Green",
                                "forcedExpiration": "",
                                "idForced": true,
                                "reasons": [
                                  ""
                                ]
                              }
                            ]
                          }
                        ],
                        "trades": [
                          "Elevator, lift, escalator repair and maintenance services",
                          "Escalator installation",
                          "Elevator installation"
                        ],
                        "service_types": [
                          "On-Site"
                        ]
                      }
                    ]
                  }
                },
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "account_status": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "address": {
                        "properties": {
                          "address_line1": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "address_line2": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "city": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country_subdivision": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "postal_code": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "address_line2",
                          "city",
                          "country",
                          "country_subdivision",
                          "postal_code"
                        ],
                        "type": "object"
                      },
                      "billing_address": {
                        "properties": {
                          "address_line1": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "address_line2": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "city": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country_subdivision": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "postal_code": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "city",
                          "country",
                          "country_subdivision",
                          "postal_code"
                        ],
                        "type": "object"
                      },
                      "company_url": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "dba_name": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "description": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "external_id": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "number"
                            },
                            "type": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "value": {
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "client_id",
                            "type",
                            "value"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "flags": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "number"
                            },
                            "client_name": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "forced_expiration": {
                              "minLength": 0,
                              "type": "string"
                            },
                            "is_forced": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "system_flag": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "system_flag_details": {
                              "items": {
                                "properties": {
                                  "flag": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "forcedExpiration": {
                                    "minLength": 0,
                                    "nullable": true,
                                    "type": "string"
                                  },
                                  "idForced": {
                                    "type": "boolean"
                                  },
                                  "reasons": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "minItems": 1,
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "required": [
                                  "flag",
                                  "forcedExpiration",
                                  "idForced"
                                ],
                                "type": "object"
                              },
                              "minItems": 0,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "client_id",
                            "client_name",
                            "forced_expiration",
                            "is_forced",
                            "system_flag"
                          ],
                          "type": "object"
                        },
                        "minItems": 1,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "id": {
                        "type": "number"
                      },
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "primary_contact": {
                        "properties": {
                          "email": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "fax": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "first_name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "last_name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "phone": {
                            "minLength": 0,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "first_name",
                          "last_name",
                          "email",
                          "phone",
                          "fax"
                        ],
                        "type": "object"
                      },
                      "service_types": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "supplier_tags": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "string"
                            },
                            "tags": {
                              "items": {
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "client_id"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "trades": {
                        "items": {
                          "type": "string"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "updated_date": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "dba_name",
                      "company_url",
                      "description",
                      "primary_contact",
                      "address",
                      "billing_address",
                      "account_status",
                      "updated_date",
                      "external_id",
                      "supplier_tags",
                      "flags",
                      "trades",
                      "service_types"
                    ],
                    "type": "object"
                  },
                  "minItems": 0,
                  "type": "array",
                  "uniqueItems": true
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {},
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Suppliers v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v2/suppliers/count": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves the number of suppliers returned from the `Get Suppliers` endpoint.",
        "parameters": [
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter, returns total count of records with the specified `status`",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disconnected",
                "inactive",
                "pending",
                "rejected"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                },
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "total_records": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "total_records"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                }
              },
              "example-1": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 0
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 3,
                      "message": "Bad Request"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Suppliers Count v2",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v2/suppliers": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves a list of multiple supplier data. By default, only suppliers that have active connections to clients will be returned in this endpoint.\n\n* The `flags` array contains the supplier’s flag for a particular `client_id`. \n* The `client_id` field is the identifier of a specific site within your account hierarchy. \n* The `system_flag` field shows the overall flag color for a particular supplier/contractor for that `client_id`.\n* The `system_flag_details` array contains the detail of your individual flaggable data and its current flag color. This provides specific detailed reasons for the current overall flag color, `system_flag` for in regards to that specific `client_id`.\n* The **updated_date** field(which the `modifiedAfter` applies to) helps you quickly identify the latest updates to your suppliers. It reflects not only changes you or the supplier make but also internal system adjustments, such as updates to evaluations or categories. This means a supplier you haven't recently interacted with might still appear as \"recently updated\" due to these behind-the-scenes activities. It's designed to ensure you always have the most current information at your fingertips, aiding in maintaining compliance within your supply chain.",
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based).",
            "example": 1,
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500.",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "type": "number"
            }
          },
          {
            "description": "Optional parameter. The modifiedAfter parameter will filter out any records with updated_date values older than the value of the parameter supplied.\n**Please note**: updated_date does NOT keep track of the last time one of the fields in the payload has changed. In fact, it keeps track of the last change anywhere in the entire supplier model (an internal model, of which only certain fields are exposed in this endpoint). Changes that can result in updating this updated_date value include changes made by the supplier, changes made by the client (e.g. applying or removing tags), and also some changes made by the system. Example: modifiedAfter=2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter to indicate the connection status of the supplier.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disconnected",
                "inactive",
                "pending",
                "rejected"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "account_status": "Active",
                        "address": {
                          "address_line1": "123 Main St",
                          "address_line2": "Suite 100",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "billing_address": {
                          "address_line1": "123 Main St",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "company_url": "www.bobsplumbing.com",
                        "dba_name": "Bob's Plumbing Services, LLC",
                        "description": "Providing plumbing services",
                        "external_id": [
                          {
                            "client_id": 123,
                            "type": "Other",
                            "value": "234489"
                          }
                        ],
                        "flags": [
                          {
                            "client_id": 123,
                            "client_name": "Oil Rig",
                            "forced_expiration": "2018-06-30 00:00:00",
                            "is_forced": "True",
                            "system_flag": "Amber",
                            "system_flag_details": [
                              {
                                "flag": "Amber",
                                "forced_expiration": "2018-06-30 00:00:00",
                                "is_forced": "True",
                                "reasons": [
                                  {
                                    "85": "High TRIR, Missing Documentation"
                                  },
                                  {
                                    "42": "General Liability is missing"
                                  }
                                ]
                              },
                              {
                                "flag": "Green",
                                "forced_expiration": "",
                                "is_forced": "False",
                                "reasons": [
                                  ""
                                ]
                              }
                            ]
                          }
                        ],
                        "id": 89010,
                        "name": "Bob's Plumbing Services",
                        "primary_contact": {
                          "email": "bob.smith@fakeemail.com",
                          "fax": "555 555 4567",
                          "first_name": "Bob",
                          "id": "123",
                          "last_name": "Smith",
                          "phone": "555 555 1234"
                        },
                        "service_types": [
                          "On-site",
                          "Off-site"
                        ],
                        "supplier_tags": [
                          {
                            "client_id": "123",
                            "tags": [
                              {
                                "id": 223,
                                "name": "Sample Tag"
                              }
                            ]
                          }
                        ],
                        "trades": [
                          {
                            "frequency": "most",
                            "service_offerings": [
                              {
                                "82": "Welding"
                              },
                              {
                                "193": "Manufacturing"
                              }
                            ]
                          }
                        ],
                        "updated_date": "2016-07-23 05:10:57"
                      }
                    ]
                  }
                },
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "account_status": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "address": {
                        "properties": {
                          "address_line1": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "address_line2": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "city": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country_subdivision": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "postal_code": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "address_line2",
                          "city",
                          "country",
                          "country_subdivision",
                          "postal_code"
                        ],
                        "type": "object"
                      },
                      "billing_address": {
                        "properties": {
                          "address_line1": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "city": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country_subdivision": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "postal_code": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "city",
                          "country",
                          "country_subdivision",
                          "postal_code"
                        ],
                        "type": "object"
                      },
                      "company_url": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "dba_name": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "description": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "external_id": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "number"
                            },
                            "type": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "value": {
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "client_id",
                            "type",
                            "value"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "flags": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "number"
                            },
                            "client_name": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "forced_expiration": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "is_forced": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "system_flag": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "system_flag_details": {
                              "items": {
                                "properties": {
                                  "flag": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "forced_expiration": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "is_forced": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "reasons": {
                                    "items": {
                                      "properties": {
                                        "85": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "85"
                                      ],
                                      "type": "object"
                                    },
                                    "minItems": 1,
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "required": [
                                  "flag",
                                  "forced_expiration",
                                  "is_forced"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "client_id",
                            "client_name",
                            "forced_expiration",
                            "is_forced",
                            "system_flag"
                          ],
                          "type": "object"
                        },
                        "minItems": 1,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "id": {
                        "type": "number"
                      },
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "primary_contact": {
                        "properties": {
                          "email": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "fax": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "first_name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "last_name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "phone": {
                            "minLength": 0,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "first_name",
                          "last_name",
                          "email",
                          "phone",
                          "fax"
                        ],
                        "type": "object"
                      },
                      "service_types": {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "supplier_tags": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "string"
                            },
                            "tags": {
                              "items": {
                                "properties": {
                                  "id": {
                                    "type": "number"
                                  },
                                  "name": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "client_id"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "trades": {
                        "items": {
                          "properties": {
                            "frequency": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "service_offerings": {
                              "items": {
                                "properties": {
                                  "82": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "82"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "frequency"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "updated_date": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "dba_name",
                      "company_url",
                      "description",
                      "primary_contact",
                      "address",
                      "billing_address",
                      "account_status",
                      "updated_date",
                      "external_id",
                      "supplier_tags",
                      "flags",
                      "trades",
                      "service_types"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "account_status": "Active",
                        "address": {
                          "address_line1": "123 Main St",
                          "address_line2": "Suite 100",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "billing_address": {
                          "address_line1": "123 Main St",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "company_url": "www.bobsplumbing.com",
                        "dba_name": "Bob's Plumbing Services, LLC",
                        "description": "Providing plumbing services",
                        "external_id": [
                          {
                            "client_id": 123,
                            "type": "Other",
                            "value": "234489"
                          }
                        ],
                        "flags": [
                          {
                            "client_id": 123,
                            "client_name": "Oil Rig",
                            "forced_expiration": "2018-06-30 00:00:00",
                            "is_forced": "True",
                            "system_flag": "Amber",
                            "system_flag_details": [
                              {
                                "flag": "Amber",
                                "forced_expiration": "2018-06-30 00:00:00",
                                "is_forced": "True",
                                "reasons": [
                                  {
                                    "85": "High TRIR, Missing Documentation"
                                  },
                                  {
                                    "42": "General Liability is missing"
                                  }
                                ]
                              },
                              {
                                "flag": "Green",
                                "forced_expiration": "",
                                "is_forced": "False",
                                "reasons": [
                                  ""
                                ]
                              }
                            ]
                          }
                        ],
                        "id": 89010,
                        "name": "Bob's Plumbing Services",
                        "primary_contact": {
                          "email": "bob.smith@fakeemail.com",
                          "fax": "555 555 4567",
                          "first_name": "Bob",
                          "id": 123,
                          "last_name": "Smith",
                          "phone": "555 555 1234"
                        },
                        "service_types": [
                          "On-site",
                          "Off-site"
                        ],
                        "supplier_tags": [
                          {
                            "client_id": 123,
                            "tags": [
                              {
                                "id": 223,
                                "name": "Sample Tag"
                              }
                            ]
                          }
                        ],
                        "trades": [
                          {
                            "frequency": "most",
                            "service_offerings": [
                              {
                                "82": "Welding"
                              },
                              {
                                "193": "Manufacturing"
                              }
                            ]
                          }
                        ],
                        "updated_date": "2016-07-23 05:10:57"
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {},
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Suppliers v2",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "description": "Unique identifier for a specific supplier",
          "in": "path",
          "name": "supplierId",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v2/suppliers/{supplierId}": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves the matching supplier's data. By default, only a supplier with an active connection to clients will be returned in this endpoint.\n\n* The `flags` array contains the supplier’s flag for a particular `client_id`. \n* The `client_id` field is the identifier of a specific site within your account hierarchy. \n* The `system_flag` field shows the overall flag color for a particular supplier/contractor for that `client_id`.\n* The `system_flag_details` array contains the detail of your individual flaggable data and its current flag color. This provides specific detailed reasons for the current overall flag color, `system_flag` for in regards to that specific `client_id`.\n* The **updated_date** field (which the `modifiedAfter` applies to) helps you quickly identify the latest updates to your suppliers. It reflects not only changes you or the supplier make but also internal system adjustments, such as updates to evaluations or categories. This means a supplier you haven't recently interacted with might still appear as \"recently updated\" due to these behind-the-scenes activities. It's designed to ensure you always have the most current information at your fingertips, aiding in maintaining compliance within your supply chain.",
        "parameters": [
          {
            "description": "Optional parameter. The modifiedAfter parameter will filter out any records with updated_date values older than the value of the parameter supplied.\n**Please note**: updated_date does NOT keep track of the last time one of the fields in the payload has changed. In fact, it keeps track of the last change anywhere in the entire supplier model (an internal model, of which only certain fields are exposed in this endpoint). Changes that can result in updating this updated_date value include changes made by the supplier, changes made by the client (e.g. applying or removing tags), and also some changes made by the system. Example: modifiedAfter=2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter to indicate the connection status of the supplier.",
            "in": "query",
            "name": "status",
            "schema": {
              "enum": [
                "active",
                "disconnected",
                "inactive",
                "pending",
                "rejected"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "account_status": "Active",
                        "address": {
                          "address_line1": "123 Main St",
                          "address_line2": "Suite 100",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "billing_address": {
                          "address_line1": "123 Main St",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "company_url": "www.bobsplumbing.com",
                        "dba_name": "Bob's Plumbing Services, LLC",
                        "description": "Providing plumbing services",
                        "external_id": [
                          {
                            "client_id": 123,
                            "type": "Other",
                            "value": "234489"
                          }
                        ],
                        "flags": [
                          {
                            "client_id": 123,
                            "client_name": "Oil Rig",
                            "forced_expiration": "2018-06-30 00:00:00",
                            "is_forced": "True",
                            "system_flag": "Amber",
                            "system_flag_details": [
                              {
                                "flag": "Amber",
                                "forced_expiration": "2018-06-30 00:00:00",
                                "is_forced": "True",
                                "reasons": [
                                  {
                                    "85": "High TRIR, Missing Documentation"
                                  },
                                  {
                                    "42": "General Liability is missing"
                                  }
                                ]
                              },
                              {
                                "flag": "Green",
                                "forced_expiration": "",
                                "is_forced": "False",
                                "reasons": [
                                  ""
                                ]
                              }
                            ]
                          }
                        ],
                        "id": 89010,
                        "name": "Bob's Plumbing Services",
                        "primary_contact": {
                          "email": "bob.smith@fakeemail.com",
                          "fax": "555 555 4567",
                          "first_name": "Bob",
                          "id": "123",
                          "last_name": "Smith",
                          "phone": "555 555 1234"
                        },
                        "service_types": [
                          "On-site",
                          "Off-site"
                        ],
                        "supplier_tags": [
                          {
                            "client_id": "123",
                            "tags": [
                              {
                                "id": 223,
                                "name": "Sample Tag"
                              }
                            ]
                          }
                        ],
                        "trades": [
                          {
                            "frequency": "most",
                            "service_offerings": [
                              {
                                "82": "Welding"
                              },
                              {
                                "193": "Manufacturing"
                              }
                            ]
                          }
                        ],
                        "updated_date": "2016-07-23 05:10:57"
                      }
                    ]
                  }
                },
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "account_status": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "address": {
                        "properties": {
                          "address_line1": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "address_line2": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "city": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country_subdivision": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "postal_code": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "address_line2",
                          "city",
                          "country",
                          "country_subdivision",
                          "postal_code"
                        ],
                        "type": "object"
                      },
                      "billing_address": {
                        "properties": {
                          "address_line1": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "city": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "country_subdivision": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "postal_code": {
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "address_line1",
                          "city",
                          "country",
                          "country_subdivision",
                          "postal_code"
                        ],
                        "type": "object"
                      },
                      "company_url": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "dba_name": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "description": {
                        "minLength": 0,
                        "type": "string"
                      },
                      "external_id": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "number"
                            },
                            "type": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "value": {
                              "minLength": 1,
                              "type": "string"
                            }
                          },
                          "required": [
                            "client_id",
                            "type",
                            "value"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "flags": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "number"
                            },
                            "client_name": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "forced_expiration": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "is_forced": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "system_flag": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "system_flag_details": {
                              "items": {
                                "properties": {
                                  "flag": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "forced_expiration": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "is_forced": {
                                    "minLength": 1,
                                    "type": "string"
                                  },
                                  "reasons": {
                                    "items": {
                                      "properties": {
                                        "85": {
                                          "minLength": 1,
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "85"
                                      ],
                                      "type": "object"
                                    },
                                    "minItems": 1,
                                    "type": "array",
                                    "uniqueItems": true
                                  }
                                },
                                "required": [
                                  "flag",
                                  "forced_expiration",
                                  "is_forced"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "client_id",
                            "client_name",
                            "forced_expiration",
                            "is_forced",
                            "system_flag"
                          ],
                          "type": "object"
                        },
                        "minItems": 1,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "id": {
                        "type": "number"
                      },
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "primary_contact": {
                        "properties": {
                          "email": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "fax": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "first_name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "last_name": {
                            "minLength": 1,
                            "type": "string"
                          },
                          "phone": {
                            "minLength": 0,
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "first_name",
                          "last_name",
                          "email",
                          "phone",
                          "fax"
                        ],
                        "type": "object"
                      },
                      "service_types": {
                        "items": {
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "supplier_tags": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "string"
                            },
                            "tags": {
                              "items": {
                                "properties": {
                                  "id": {
                                    "type": "number"
                                  },
                                  "name": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "name"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "client_id"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "trades": {
                        "items": {
                          "properties": {
                            "frequency": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "service_offerings": {
                              "items": {
                                "properties": {
                                  "82": {
                                    "minLength": 1,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "82"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array",
                              "uniqueItems": true
                            }
                          },
                          "required": [
                            "frequency"
                          ],
                          "type": "object"
                        },
                        "minItems": 0,
                        "type": "array",
                        "uniqueItems": true
                      },
                      "updated_date": {
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "dba_name",
                      "company_url",
                      "description",
                      "primary_contact",
                      "address",
                      "billing_address",
                      "account_status",
                      "updated_date",
                      "external_id",
                      "supplier_tags",
                      "flags",
                      "trades",
                      "service_types"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "account_status": "Active",
                        "address": {
                          "address_line1": "123 Main St",
                          "address_line2": "Suite 100",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "billing_address": {
                          "address_line1": "123 Main St",
                          "city": "Irvine",
                          "country": "United States",
                          "country_subdivision": "California",
                          "postal_code": "92614"
                        },
                        "company_url": "www.bobsplumbing.com",
                        "dba_name": "Bob's Plumbing Services, LLC",
                        "description": "Providing plumbing services",
                        "external_id": [
                          {
                            "client_id": 123,
                            "type": "Other",
                            "value": "234489"
                          }
                        ],
                        "flags": [
                          {
                            "client_id": 123,
                            "client_name": "Oil Rig",
                            "forced_expiration": "2018-06-30 00:00:00",
                            "is_forced": "True",
                            "system_flag": "Amber",
                            "system_flag_details": [
                              {
                                "flag": "Amber",
                                "forced_expiration": "2018-06-30 00:00:00",
                                "is_forced": "True",
                                "reasons": [
                                  {
                                    "85": "High TRIR, Missing Documentation"
                                  },
                                  {
                                    "42": "General Liability is missing"
                                  }
                                ]
                              },
                              {
                                "flag": "Green",
                                "forced_expiration": "",
                                "is_forced": "False",
                                "reasons": [
                                  ""
                                ]
                              }
                            ]
                          }
                        ],
                        "id": 89010,
                        "name": "Bob's Plumbing Services",
                        "primary_contact": {
                          "email": "bob.smith@fakeemail.com",
                          "fax": "555 555 4567",
                          "first_name": "Bob",
                          "id": 123,
                          "last_name": "Smith",
                          "phone": "555 555 1234"
                        },
                        "service_types": [
                          "On-site",
                          "Off-site"
                        ],
                        "supplier_tags": [
                          {
                            "client_id": 123,
                            "tags": [
                              {
                                "id": 223,
                                "name": "Sample Tag"
                              }
                            ]
                          }
                        ],
                        "trades": [
                          {
                            "frequency": "most",
                            "service_offerings": [
                              {
                                "82": "Welding"
                              },
                              {
                                "193": "Manufacturing"
                              }
                            ]
                          }
                        ],
                        "updated_date": "2016-07-23 05:10:57"
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {},
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Supplier v2",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "description": "Unique identifier for a specific Supplier",
          "in": "path",
          "name": "supplierId",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v1/flags": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Returns a list of flags based on the provided apikey and query parameters. If a `clientId` or `supplierId` is provided, only the flag data pertaining to that client or supplier will be returned. Only active suppliers that have approved connections to clients will be returned in this endpoint.\n\nThis endpoint does not retrieve the overall flag status between a supplier and a client, which will be returned in the \"Connections\" endpoint.\n\nNote: We only return `criteria` level flags; We do not return criteriaVariance, site, or siteVariance level flags.",
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "in": "query",
            "name": "start",
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 500,
              "maximum": 500,
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. If no date is specified, the endpoint will return only records from the previous month.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a supplier",
            "in": "query",
            "name": "supplierId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a client account",
            "in": "query",
            "name": "clientId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter. ID of an interested flag",
            "in": "query",
            "name": "flagId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter. Color of the interested flags. Example: `Green`, `Amber`, `Gray`, `Red`",
            "in": "query",
            "name": "flagColor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "supplierId": 89010,
                        "supplierName": "Bob's Plumbing Services",
                        "clientId": 123,
                        "clientName": "Oil Rig",
                        "flagId": 234445,
                        "flagType": "Form",
                        "flagName": "General Liability must be approved",
                        "flagColor": "Green",
                        "isForced": "No",
                        "flagDetails": {
                          "forcedBy": "",
                          "formId": 288372,
                          "formName": "General Liability",
                          "questionId": 2223,
                          "varianceExpirationDate": "",
                          "varianceReason": ""
                        },
                        "flagUpdatedDate": "2020-01-31 22:41:40",
                        "externalId": [
                          {
                            "client_id": 123,
                            "type": "Vendor",
                            "value": "132001"
                          }
                        ]
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "clientId": {
                        "type": "integer"
                      },
                      "clientName": {
                        "type": "string"
                      },
                      "externalId": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "integer"
                            },
                            "type": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "flagColor": {
                        "type": "string"
                      },
                      "flagDetails": {
                        "properties": {
                          "forcedBy": {
                            "type": "string"
                          },
                          "formId": {
                            "type": "integer"
                          },
                          "formName": {
                            "type": "string"
                          },
                          "questionId": {
                            "type": "integer"
                          },
                          "varianceExpirationDate": {
                            "type": "string"
                          },
                          "varianceReason": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "flagId": {
                        "type": "integer"
                      },
                      "flagName": {
                        "type": "string"
                      },
                      "flagType": {
                        "type": "string"
                      },
                      "flagUpdatedDate": {
                        "type": "string"
                      },
                      "isForced": {
                        "type": "string"
                      },
                      "supplierId": {
                        "type": "integer"
                      },
                      "supplierName": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get Flags v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v1/flags/count": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves the number of flags returned from the Get Flags endpoint.",
        "parameters": [
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. If no date is specified, the endpoint will return only records from the past month.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a supplier",
            "in": "query",
            "name": "supplierId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a client account",
            "in": "query",
            "name": "clientId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter. ID of an interested flag",
            "in": "query",
            "name": "flagId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter. Color of the interested flags. Example: `Green`, `Amber`, `Gray`, `Red`",
            "in": "query",
            "name": "flagColor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "total_records": 145
                    }
                  }
                },
                "schema": {
                  "description": "",
                  "properties": {
                    "total_records": {
                      "type": "number"
                    }
                  },
                  "type": "object",
                  "x-examples": {
                    "example-1": [
                      {
                        "total_records": 145
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get Flag Count v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v1/files/{supplierId}/{fileNameId}": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Return the binary file. \n\nThe response header “Content-Type” informs the file type, for example: the header value “application/vnd.openxmlformats-officedocument.wordprocessingml.document” will indicate the file is a doc/docx file. Or “application/pdf” will indicate the file is a pdf.\n\nWhen saving the file, add the appropriate file extension based on the “Content-Type” value.\n\nThe URL for this endpoint is returned by the `href` field from the `Form Data` endpoint. That `href` field will require the authorization header to be included for a valid file call to be made.",
        "parameters": [
          {
            "description": "The Id of the supplier",
            "example": 44282,
            "in": "path",
            "name": "supplierId",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "The Id of the file",
            "example": "2020-04-04T04:40:00.066Z~~~SomeFile.pdf",
            "in": "path",
            "name": "fileNameId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                },
                "example": "This is a placeholder for a pdf binary file. \nActual file contents cannot be displayed in API documentation."
              }
            }
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "application/pdf": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "401": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "application/pdf": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Unauthorized",
            "headers": {}
          },
          "403": {
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "properties": {
                    "": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "application/pdf": {
                "schema": {
                  "properties": {
                    "": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Forbidden"
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "application/pdf": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get File v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "description": "The Avetta Account Id for the interested supplier",
          "in": "path",
          "name": "supplierId",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "description": "The name of the file. <br>Example: `2022-05-03T01:30:09.461Z~~~Get_Started_With_Smallpdf.pdf`",
          "in": "path",
          "name": "fileNameId",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/api/v1/connections": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves a list of Connections based on the provided apikey and query parameters. \n\nThis endpoint retrieves  the connections for all site accounts whose status is `active` or `pending`. \nOnly when passing `supplierId` and `clientId` do the connections for all site accounts whose status is `active`, `pending` and `deactivated` get returned.\n\nThis endpoint retrieves information pertaining to `site` flags. \nIf a variance has been applied to a specific connection site, `isForced` would be true, and the flagDetails object in the response would contain the relevant information about the variance. In the case where `isForced` is false, flagDetails would be empty.\n\n\n  `flagModifiedAfter` will account only for `site` flag changes in the last 30 days. If a client passes the `flagModifiedAfter` param, they are restricted  to only the `start`, `limit`, and `clientId` parameters.\n\n\n**Note:** The `flagModifiedAfter` is capped to 30 days. Any date larger than this will default it to 30 days.",
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "in": "query",
            "name": "start",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 500,
              "maximum": 500,
              "minimum": 1,
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a supplier",
            "in": "query",
            "name": "supplierId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a client account",
            "in": "query",
            "name": "clientId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a supplier given its external reference id",
            "in": "query",
            "name": "externalId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to filter the connections which were updated after the specified date and time [yyyy-MM-dd hh:mm:ss]. If no value is specified, it will return records from the past 3 months.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to filter the Connections based on updatedDate of the \"site\" flags after the specified date and time [yyyy-MM-dd hh:mm:ss].  The available range is up to 30 days. If you send anything beyond this range, it will be ignored and set to 30 days ago.",
            "in": "query",
            "name": "flagModifiedAfter",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Returns records with the specified `status`",
            "in": "query",
            "name": "status",
            "schema": {
              "default": "All statuses (active, inactive, disconnected, pending, rejected)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "supplierId": 89010,
                        "supplierName": "Bob's Plumbing Services",
                        "clientId": 123,
                        "clientName": "Oil Rig",
                        "status": "Active",
                        "flagColor": "Red",
                        "isForced": "No",
                        "flagDetails": {
                          "expirationDate": "",
                          "forcedBy": "",
                          "reason": "",
                          "updatedDate": ""
                        },
                        "createdDate": "2020-01-31 22:41:40",
                        "updatedDate": "2020-01-31 22:41:40",
                        "externalId": [
                          {
                            "client_id": 123,
                            "type": "Vendor",
                            "value": "132001"
                          }
                        ]
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "clientId": {
                        "type": "integer"
                      },
                      "clientName": {
                        "type": "string"
                      },
                      "createdDate": {
                        "type": "string"
                      },
                      "externalId": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "integer"
                            },
                            "type": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "flagColor": {
                        "type": "string"
                      },
                      "flagDetails": {
                        "properties": {
                          "expirationDate": {
                            "type": "string"
                          },
                          "forcedBy": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "updatedDate": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "isForced": {
                        "type": "string"
                      },
                      "status": {
                        "type": "string"
                      },
                      "supplierId": {
                        "type": "integer"
                      },
                      "supplierName": {
                        "type": "string"
                      },
                      "updatedDate": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          }
        },
        "summary": "Get Connections v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v1/connections/count": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "description": "Retrieves the number of connections returned from the `Get Connections` endpoint.\n\n`flagModifiedAfter` will account only for `site` flag changes in the last 30 days. If a client passes the `flagModifiedAfter` param, they are restricted  to only the `start`, `limit`, and `clientId` parameters.\n\n**Note:** The `flagModifiedAfter` is capped to 30 days. Any date larger than this will default it to 30 days.",
        "parameters": [
          {
            "description": "Optional value to filter the connection by supplier field",
            "in": "query",
            "name": "supplierId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to filter the connection by client field",
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to filter the connections which were updated after the specified date and time [yyyy-MM-dd hh:mm:ss]. If no date is specified, then it will count records from the past 3 months.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to filter the Connections based on updatedDate of the \"site\" flags after the specified date and time [yyyy-MM-dd hh:mm:ss].  The available range is up to 30 days. If you send anything beyond this range, it will be ignored and set to 30 days ago.",
            "in": "query",
            "name": "flagModifiedAfter",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to indicate the connection status of the supplier",
            "in": "query",
            "name": "status",
            "schema": {
              "default": "All statuses (active, inactive, disconnected, pending, rejected)",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                },
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "total_records": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "total_records"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                }
              },
              "example-1": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 0
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 3,
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Connection Count v1",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": []
    },
    "/connect/v1/connections": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "parameters": [],
      "get": {
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "in": "query",
            "name": "start",
            "schema": {
              "type": "number",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 500,
              "default": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "supplierId": {
                        "type": "number"
                      },
                      "siteId": {
                        "type": "number"
                      },
                      "connectionStatus": {
                        "enum": [
                          "active",
                          "inactive",
                          "rejected",
                          "pending"
                        ],
                        "type": "string"
                      },
                      "connectionStatusUpdatedDate": {
                        "example": "2020-08-05T15:31:44.716Z[Etc/UTC]",
                        "type": "string"
                      },
                      "compliance": {
                        "properties": {
                          "complianceStatus": {
                            "enum": [
                              "Green",
                              "Gray",
                              "Amber",
                              "Red"
                            ],
                            "type": "string"
                          },
                          "naturalComplianceStatus": {
                            "enum": [
                              "Green",
                              "Gray",
                              "Amber",
                              "Red"
                            ],
                            "type": "string"
                          },
                          "varianceIsActive": {
                            "type": "boolean"
                          },
                          "varianceGrantedByFirstName": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "varianceGrantedByLastName": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "varianceExpiresDate": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "varianceComment": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "varianceCreatedDate": {
                            "minLength": 0,
                            "type": "string"
                          },
                          "varianceUpdatedDate": {
                            "minLength": 0,
                            "type": "string"
                          }
                        },
                        "required": [
                          "varianceIsActive"
                        ],
                        "type": "object"
                      },
                      "createdDate": {
                        "example": "2020-08-05T15:31:44.715Z[Etc/UTC]",
                        "type": "string"
                      },
                      "updatedDate": {
                        "example": "2020-11-06T03:56:13.986Z[Etc/UTC]",
                        "type": "string"
                      }
                    },
                    "required": [
                      "supplierId",
                      "siteId"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "compliance": {
                          "complianceStatus": "Green",
                          "naturalComplianceStatus": "Green",
                          "varianceComment": "",
                          "varianceCreatedDate": "",
                          "varianceExpiresDate": "",
                          "varianceGrantedByFirstName": "",
                          "varianceGrantedByLastName": "",
                          "varianceIsActive": false,
                          "varianceUpdatedDate": ""
                        },
                        "connectionStatus": "active",
                        "connectionStatusUpdatedDate": "2010-06-05T22:56:32.462Z[Etc/UTC]",
                        "createdDate": "2010-06-05T22:56:32.462Z[Etc/UTC]",
                        "siteId": 223,
                        "supplierId": 123,
                        "updatedDate": "2010-11-06T05:31:22.551Z[Etc/UTC]"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "example": {
                    "code": "1",
                    "displayMessage": "Missing Auth",
                    "message": "Missing Auth",
                    "service": "Gateway"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "example": {
                    "code": "3",
                    "message": "Broad Error message"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Compliance"
        ],
        "description": "Retrieves a list of connections based on the provided apikey. This endpoint retrieves the overall compliance status between a supplier and a client.",
        "operationId": "get-connections-with-compliance",
        "summary": "Get Connections with Compliance",
        "x-internal": false,
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/compliance-management-gateway/v1/clients/{clientId}/suppliers/scorecards": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "operationId": "getSupplierScorecards",
        "summary": "Get Supplier TotalScore",
        "tags": [
          "Compliance"
        ],
        "description": "This API retrieves supplier total scores and site details for a specified client.\n\n`Parameters:`\n\n- `clientId` (path parameter) — required. Can be the billing ID of a corporate, hub, or site.\n- `supplierId` (query parameter) — optional.  \n  If provided, returns only active total scores for the specified supplier and its associated site details.  \n  If not provided, returns all total scores for active suppliers and sites connected to the client.\n\n- `start` and `limit` (query parameters) — optional. The maximum number of records returned, cannot exceed 500.\n\n**RESPONSE:**\n\nReturns a list of suppliers and their associated scorecards (site-level total scores) for the given client.\n",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "example": "138414"
            },
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "schema": {
              "type": "integer",
              "example": "250488390"
            },
            "name": "supplierId",
            "in": "query",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "example": "1"
            },
            "name": "start",
            "in": "query",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "example": "100"
            },
            "name": "limit",
            "in": "query",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Supplier scorecards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalCount": {
                      "type": "integer",
                      "example": 1
                    },
                    "suppliers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "supplierId": {
                            "type": "string",
                            "example": "250488390"
                          },
                          "supplierName": {
                            "type": "string",
                            "example": "Elite Cleaning Co., Inc., d/b/a Elite Building Services"
                          },
                          "scorecards": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "siteId": {
                                  "type": "string",
                                  "example": "250097468"
                                },
                                "siteName": {
                                  "type": "string",
                                  "example": "C&W Services (CWS) US - General Supplier Prequalification"
                                },
                                "totalScore": {
                                  "type": "integer",
                                  "example": 80
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "WithScorecards": {
                    "summary": "Supplier with scorecards",
                    "value": {
                      "totalCount": 1,
                      "suppliers": [
                        {
                          "supplierId": 250488390,
                          "supplierName": "Elite Cleaning Co., Inc., d/b/a Elite Building Services",
                          "scorecards": [
                            {
                              "siteId": "250097468",
                              "siteName": "C&W Services (CWS) US - General Supplier Prequalification",
                              "totalScore": 80
                            }
                          ]
                        }
                      ]
                    }
                  },
                  "EmptyScorecards": {
                    "summary": "Supplier with no scorecards",
                    "value": {
                      "totalCount": 1,
                      "suppliers": [
                        {
                          "supplierId": 123456789,
                          "supplierName": "CleanMax Services Ltd.",
                          "scorecards": []
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized access"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unexpected error occurred."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/compliance-management-gateway/v1/clients/{clientId}/performance-reviews": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "operationId": "getPerformanceReviews",
        "summary": "Get Performance Review Scores",
        "tags": [
          "Compliance"
        ],
        "description": "This endpoint returns Performance Review scores for individual performance reviews. It includes details on Performance Review Scores, Global Scores, and Site Scores.\n\n`Parameters:`\n\n- `clientId` (path parameter) — required. Can be the billing ID of a corporate, hub, or site.\n- `supplierId` (query parameter) — optional.\n  If provided, returns only Performance Review scores for the specified supplier and its associated site details.\n  If not provided, returns all Performance Review scores for active suppliers and sites connected to the client.\n\n- `start` and `limit` (query parameters) — optional. The maximum number of records returned, cannot exceed 500.\n- `includeSupplierReviewForms` (query parameter) — optional. Default value is false.\n  If provided and value is true, returns global ratings and Performance Review scores.\n  If not provided, returns only global ratings.\n\n**RESPONSE:**\nReturns a list of Performance Review scores for the given client.\n",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "example": "250061277"
            },
            "name": "clientId",
            "in": "path",
            "required": true
          },
          {
            "schema": {
              "type": "integer"
            },
            "example": "250106349",
            "name": "supplierId",
            "in": "query",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "example": "1",
            "name": "start",
            "in": "query",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "example": "100",
            "name": "limit",
            "in": "query",
            "required": false
          },
          {
            "schema": {
              "type": "boolean"
            },
            "example": true,
            "name": "includeSupplierReviewForms",
            "in": "query",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Performance review scores retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalCount": {
                      "type": "integer",
                      "example": 1
                    },
                    "clientId": {
                      "type": "string",
                      "example": "250061277"
                    },
                    "clientName": {
                      "type": "string",
                      "example": "Rio Tinto Iron Ore"
                    },
                    "supplierPerformanceReviews": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "supplierId": {
                            "type": "string",
                            "example": "250106349"
                          },
                          "supplierName": {
                            "type": "string",
                            "example": "PoP Test Account"
                          },
                          "globalRating": {
                            "type": "number",
                            "format": "double",
                            "example": 3.87
                          },
                          "siteRatings": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "properties": {
                              "siteName": {
                                "type": "string",
                                "example": "RTIO - Iron Ore"
                              },
                              "siteId": {
                                "type": "string",
                                "example": "250124812"
                              },
                              "siteRating": {
                                "type": "number",
                                "format": "double",
                                "example": 3.87
                              },
                              "reviewSupplierForms": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "example": "LF test 2"
                                    },
                                    "status": {
                                      "type": "string",
                                      "example": "Completed/Incomplete"
                                    },
                                    "updatedDate": {
                                      "type": "string",
                                      "format": "date-time",
                                      "example": "2025-02-25T00:00:00.000Z"
                                    },
                                    "totalScore": {
                                      "type": "number",
                                      "format": "double",
                                      "example": 3.52
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "WithPerformanceReviewScores": {
                    "summary": "Client with full performance review scores",
                    "value": {
                      "totalCount": 1,
                      "clientId": "250061277",
                      "clientName": "Rio Tinto Iron Ore",
                      "supplierPerformanceReviews": [
                        {
                          "supplierId": "250106349",
                          "supplierName": "PoP Test Account",
                          "globalRating": 3.87,
                          "siteRatings": [
                            {
                              "siteName": "RTIO - Iron Ore",
                              "siteId": "250124812",
                              "siteRating": 3.87,
                              "reviewSupplierForms": [
                                {
                                  "name": "LF test 2 ",
                                  "status": "Completed/Incomplete",
                                  "updatedDate": "2025-02-25T00:00:00.000Z",
                                  "totalScore": 3.52
                                },
                                {
                                  "name": "LF test 3 ",
                                  "updatedDate": "2025-02-27T00:00:00.000Z",
                                  "status": "Completed/Incomplete",
                                  "totalScore": 2.9
                                },
                                {
                                  "name": "LF test 4",
                                  "updatedDate": "2025-02-27T00:00:00.000Z",
                                  "status": "Completed/Incomplete",
                                  "totalScore": 5
                                },
                                {
                                  "name": "Week 2 FP shut",
                                  "updatedDate": "2025-03-06T00:00:00.000Z",
                                  "status": "Completed/Incomplete",
                                  "totalScore": 4.05
                                },
                                {
                                  "name": "LF test ",
                                  "updatedDate": "2025-02-24T00:00:00.000Z",
                                  "status": "Completed/Incomplete"
                                },
                                {
                                  "name": "LF OPM test",
                                  "updatedDate": "2025-02-27T00:00:00.000Z",
                                  "status": "Completed/Incomplete"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthorized access"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unexpected error occurred."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/compliance-management-gateway/v1/clients/{clientId}/suppliers/{supplierId}/esg-metrics": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "operationId": "getEsgScores",
        "summary": "Get Esg Scores",
        "responses": {
          "200": {
            "description": "Returns the ESG scores of the methodologies, 4 ESG levels definition, ESG tier name, the display form ids and names of supplier forms.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "supplierEsgScore": {
                      "type": "object",
                      "properties": {
                        "supplierId": {
                          "type": "integer",
                          "example": 250107043
                        },
                        "supplierName": {
                          "type": "string",
                          "example": "Motiontech Services Inc"
                        },
                        "esgScores": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "esgIndex": {
                                "type": "string",
                                "example": "Self-Evaluation"
                              },
                              "score": {
                                "type": "integer",
                                "example": 4
                              },
                              "theme": {
                                "type": "string",
                                "example": "ESG Index"
                              }
                            }
                          }
                        },
                        "esgLevels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "level": {
                                "type": "string",
                                "example": "Early"
                              },
                              "minimumScore": {
                                "type": "integer",
                                "example": 0
                              },
                              "maximumScore": {
                                "type": "integer",
                                "example": 25
                              }
                            }
                          }
                        },
                        "scoreTier": {
                          "type": "string",
                          "example": "Documentation Verified"
                        },
                        "forms": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "example": "44043605"
                              },
                              "name": {
                                "type": "string",
                                "example": "ESG & Sustainability - Assessment"
                              }
                            }
                          }
                        },
                        "createdDate": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-02-22T09:28:05.281Z"
                        },
                        "updatedDate": {
                          "type": "string",
                          "format": "date-time",
                          "example": "2024-02-22T09:28:05.281Z"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "supplierEsgScore": {
                        "supplierId": 250107043,
                        "supplierName": "Motiontech Services Inc",
                        "esgScores": [
                          {
                            "esgIndex": "Self-Evaluation",
                            "score": 4,
                            "theme": "ESG Index"
                          },
                          {
                            "esgIndex": "Self-Evaluation",
                            "score": 1,
                            "theme": "Environment"
                          },
                          {
                            "esgIndex": "Self-Evaluation",
                            "score": 6,
                            "theme": "Social"
                          },
                          {
                            "esgIndex": "Self-Evaluation",
                            "score": 3,
                            "theme": "Governance"
                          }
                        ],
                        "esgLevels": [
                          {
                            "level": "Early",
                            "minimumScore": 0,
                            "maximumScore": 25
                          },
                          {
                            "level": "Learner",
                            "minimumScore": 26,
                            "maximumScore": 49
                          },
                          {
                            "level": "Leader",
                            "minimumScore": 50,
                            "maximumScore": 84
                          },
                          {
                            "level": "Innovator",
                            "minimumScore": 85,
                            "maximumScore": 100
                          }
                        ],
                        "scoreTier": "Documentation Verified",
                        "forms": [
                          {
                            "id": "44043605",
                            "name": "ESG & Sustainability - Assessment"
                          }
                        ],
                        "createdDate": "2024-02-22T09:28:05.281Z",
                        "updatedDate": "2024-02-22T09:28:05.281Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Unexpected error occurred."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Unexpected error occurred."
                    }
                  }
                }
              }
            }
          }
        },
        "description": "The API retrives ESG scores, ESG levels, ESG tier and ESG relative forms for the specified client and supplier.\n\nThe clientId can be the billingId of corporate, hub or site. The supplierId is the supplier billing id.\n",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "clientId",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "supplierId",
          "in": "path",
          "required": true
        }
      ]
    },
    "/compliance-management-gateway/v1/clients/{clientId}/esg-metrics": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "operationId": "getSupplierEsgScores",
        "summary": "Get Suppliers Esg Scores",
        "responses": {
          "200": {
            "description": "Returns the ESG scores of the methodologies, 4 ESG levels definition, ESG tier name, the display form ids and names of supplier forms.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalCount": {
                      "type": "integer",
                      "example": 7076
                    },
                    "esgLevels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "level": {
                            "type": "string",
                            "example": "Early"
                          },
                          "minimumScore": {
                            "type": "integer",
                            "example": 0
                          },
                          "maximumScore": {
                            "type": "integer",
                            "example": 25
                          }
                        }
                      }
                    },
                    "supplierEsgScores": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "supplierId": {
                            "type": "integer",
                            "example": 250481382
                          },
                          "supplierName": {
                            "type": "string",
                            "example": "JRC Civils Pty Ltd"
                          },
                          "esgScores": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "esgIndex": {
                                  "type": "string",
                                  "example": "Self-Evaluation"
                                },
                                "score": {
                                  "type": "integer",
                                  "example": 4
                                },
                                "theme": {
                                  "type": "string",
                                  "example": "ESG Index"
                                }
                              }
                            }
                          },
                          "scoreTier": {
                            "type": "string",
                            "example": "Documentation Verified"
                          },
                          "forms": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "example": "41348352"
                                },
                                "name": {
                                  "type": "string",
                                  "example": "ESG & Sustainability - Assessment"
                                }
                              }
                            }
                          },
                          "createdDate": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2024-10-03T06:07:09.74Z"
                          },
                          "updatedDate": {
                            "type": "string",
                            "format": "date-time",
                            "example": "2025-01-10T08:43:17.246Z"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "totalCount": 7076,
                      "esgLevels": [
                        {
                          "level": "Early",
                          "minimumScore": 0,
                          "maximumScore": 25
                        },
                        {
                          "level": "Learner",
                          "minimumScore": 26,
                          "maximumScore": 49
                        },
                        {
                          "level": "Leader",
                          "minimumScore": 50,
                          "maximumScore": 84
                        },
                        {
                          "level": "Innovator",
                          "minimumScore": 85,
                          "maximumScore": 100
                        }
                      ],
                      "supplierEsgScores": [
                        {
                          "supplierId": 250481382,
                          "supplierName": "JRC Civils Pty Ltd"
                        },
                        {
                          "supplierId": 250446823,
                          "supplierName": "SCR LTD",
                          "esgScores": [
                            {
                              "esgIndex": "Self-Evaluation",
                              "score": 4,
                              "theme": "ESG Index"
                            },
                            {
                              "esgIndex": "Self-Evaluation",
                              "score": 0,
                              "theme": "Environment"
                            },
                            {
                              "esgIndex": "Self-Evaluation",
                              "score": 6,
                              "theme": "Social"
                            },
                            {
                              "esgIndex": "Self-Evaluation",
                              "score": 3,
                              "theme": "Governance"
                            }
                          ],
                          "scoreTier": "Documentation Verified",
                          "forms": [
                            {
                              "id": "41348352",
                              "name": "ESG & Sustainability - Assessment"
                            }
                          ],
                          "createdDate": "2024-10-03T06:07:09.74Z",
                          "updatedDate": "2025-01-10T08:43:17.246Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Unexpected error occurred."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Unexpected error occurred."
                    }
                  }
                }
              }
            }
          }
        },
        "description": "The API retrives ESG scores, ESG levels, ESG tier and ESG relative forms for the specified client and supplier.\n\nThe clientId can be the billingId of corporate, hub or site.\n\nThe query parameter supplierId is optional. If it is specified, then return only the ESG scores for this supplier. If it is not specified, then return all the ESG scores for the connected and active suppliers under connected to this client.\n",
        "tags": [
          "Compliance"
        ],
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "clientId",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "supplierId",
          "in": "query",
          "required": false
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "start",
          "in": "query",
          "required": false
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "limit",
          "in": "query",
          "required": false
        }
      ]
    },
    "/compliance-management-gateway/v1/clients/{clientId}/supplierflags": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "summary": "Get Supplier Flags",
        "description": "This endpoint allows clients to retrieves flags data (clientId path parameter denotes corporate, hub, or site). \nThe `modifiedAfter` parameter can extend up to 1 year from the current date if `supplierId` is provided; otherwise, it cannot exceed 7 days from the current date. The `limit` parameter cannot exceed 500 records.\n\n**Fields**: `forcedBy`, `varianceStartDate`, `varianceEndDate` in response body will return data only if the flag is a `siteVariance` or `criteriaVariance`  and empty if it is a `criteria` or `site`\n\n**Fields**: `calculationId`, `calculationDescription` in response body will return data if the flag is a `siteVariance`, `criteriaVariance`, or `criteria` and empty if it is a `site` or `siteVariance`\n\n**Flags description**: \n`site` – overall site status\n`siteVariance` – forced overall site status\n`criteria` - the specific line item requirements status (ex: insurance, TRIR, etc)\n`criteriaVariance` - forced line item status\n",
        "operationId": "getSupplierFlags",
        "tags": [
          "Compliance"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "supplierId",
            "in": "query",
            "description": "Optional filter to return flags only applied at a given supplier",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "flagType",
            "in": "query",
            "description": "Optional filter for flagType.",
            "schema": {
              "type": "string",
              "default": "criteria, criteriaVariance, site, and siteVariance"
            }
          },
          {
            "name": "flagColor",
            "in": "query",
            "description": "Optional filter for flagColor.",
            "schema": {
              "type": "string",
              "default": "Green, Gray, Amber, and Red"
            }
          },
          {
            "name": "calculationId",
            "in": "query",
            "description": "Optional filter for a calculationId.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "flagId",
            "in": "query",
            "description": "Optional filter for a flagId.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "description": "Optional filter on the flags updatedDate. When the `supplierId` is provided, the available range is the last 12 months. When the `supplierId` is not provided, the available range is capped at the last 7 days.",
            "schema": {
              "type": "string",
              "default": "7 days"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Optional filter. The record to start with for pagination (0-based)",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Optional filter. Total number of records to be returned.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A list of supplier flags matching the query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.GetSupplierFlagsResponse"
                },
                "examples": {
                  "SampleResponse": {
                    "value": {
                      "totalCount": 1,
                      "flags": [
                        {
                          "supplierId": "111111111",
                          "supplierName": "Some Comapany, LLC",
                          "supplierStatus": "active",
                          "siteId": "111111",
                          "siteName": "Some Supplier",
                          "calculationId": "11111",
                          "calculationDescription": "Avetta - Risk Assessment",
                          "flagId": "1212121212",
                          "flagType": "criteria",
                          "color": "Green",
                          "isForced": false,
                          "forcedBy": "",
                          "varianceStartDate": "",
                          "varianceEndDate": "",
                          "createdDate": "2023-02-18T04:48:33.604Z",
                          "updatedDate": "2024-03-14T20:54:51.692Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "service": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "displayMessage": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "InvalidLimitParameter": {
                    "value": {
                      "code": "1",
                      "service": "Gateway",
                      "message": {
                        "error": "Invalid limit parameter. Limit should not exceed 500",
                        "context": {
                          "requestId": "1c2c5987-ad72-439d-8bfc-efbd78e6d1f5",
                          "t": {
                            "internal": true
                          }
                        }
                      },
                      "displayMessage": {
                        "error": "Invalid limit parameter. Limit should not exceed 500",
                        "context": {
                          "requestId": "1c2c5987-ad72-439d-8bfc-efbd78e6d1f5",
                          "t": {
                            "internal": true
                          }
                        }
                      }
                    }
                  },
                  "ApiKeyNotFound": {
                    "value": {
                      "code": "1",
                      "service": "Gateway",
                      "message": "Api Key Not Found",
                      "displayMessage": "Api Key Not Found"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Unexpected error occurred."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Unexpected error occurred."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/compliance-management-gateway/v1/sites/{siteMongoId}/supplier-flags": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ]
    },
    "/compliance-management-gateway/v1/clients/{clientMongoId}/form-tasks": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ]
    },
    "/compliance-management-gateway/v1/clients/{clientMongoId}/variance-tasks": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ]
    },
    "/compliance-management-gateway/v1/clients/{clientId}/variance": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "post": {
        "summary": "Create Variance Flag",
        "description": "The API allows users to add “basic variance” through API with the status “Approved” to create a new variance flag.\n\nThe client can only create a variance on a Site or Criteria flag, will not allow to create a variance on SiteVariance or CriteriaVariance flag, will NOT update the existing variance if the variance already exists on the Site and Criteria flag.\n\nThe client can only create one and only one variance against a RED/GREY/AMBER/GREEN supplier flag, the new flag's color must be different from the Site or Criteria flag’s, and the `flagColor` must be one of these 3 values: Amber, Green, Red.\n",
        "operationId": "createVariance",
        "tags": [
          "Compliance"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client, it can be either corporate, hub or site",
            "schema": {
              "type": "number"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "siteId": {
                    "type": "number",
                    "description": "The site billing id."
                  },
                  "supplierId": {
                    "type": "number",
                    "description": "The supplier billing id."
                  },
                  "flagId": {
                    "type": "number",
                    "description": "The original flag display id."
                  },
                  "flagColor": {
                    "type": "string",
                    "description": "The new flag's color, must be either Green, Amber or Red, and must be different from the original flag color."
                  },
                  "varianceEndDate": {
                    "type": "string",
                    "description": "The End date of the new variance, in format yyyy-MM-dd, and must be a future date."
                  },
                  "comment": {
                    "type": "string",
                    "description": "The optional comment for the new variance."
                  },
                  "files": {
                    "type": "array",
                    "description": "The optional file(s) attached to the new variance, the total size of the file(s) must be less than 10 MB.",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    }
                  }
                },
                "required": [
                  "siteId",
                  "supplierId",
                  "flagId",
                  "flagColor",
                  "varianceEndDate"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The display id of new variance flag.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.CreateVarianceResponse"
                },
                "examples": {
                  "SampleResponse": {
                    "value": {
                      "flagId": "4376761826"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "example": "Error creating variance blue is invalid, Invalid flagColor: blue. Allowed values are: Green, Amber, Red"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Unexpected error occurred."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Unexpected error occurred."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/compliance-management-gateway/v1/sites/{siteMongoId}/suppliers": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ]
    },
    "/compliance-management-gateway/v1/sites/{siteMongoId}/metrics": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ]
    },
    "/compliance-management-gateway/v1/sites/{siteMongoId}/suppliers/{supplierMongoId}/supplier-forms-grouped-by-workflow-status": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ]
    },
    "/compliance-management-gateway/v2/forms": {
      "servers": [
        {
          "description": "PROD",
          "url": "https://api.avetta.com"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/ComplianceManagement/SONIC-3955"
        }
      ],
      "get": {
        "summary": "Get Forms v2",
        "description": "Retrieves a set of Form data based on the provided request/pagination parameters.\n\n\n\n  The href field in the schema below will only return for Form data where the question requires a file upload as an answer. In the case of a file answer, the answer value will present the decoded name of the file along with its extension, for readability. However for download purposes, the url used in href should be used.\n\n\n\nOnly active suppliers that have approved connections to clients will be returned in this endpoint.\n\n\nBy default, only Active Forms created within the last 12 months are returned.\n",
        "operationId": "getSupplierFormsAndAnswers",
        "tags": [
          "Compliance"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "query",
            "description": "Optional filter for a client account, such as a site or a hub.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "supplierId",
            "in": "query",
            "description": "Optional filter for a supplier.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "formId",
            "in": "query",
            "description": "Optional filter by a specific form.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "formTypeId",
            "in": "query",
            "description": "Optional filter for a formType",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "categoryId",
            "in": "query",
            "description": "Optional filter for a category",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "questionId",
            "in": "query",
            "description": "Optional filter for a single question. Use this to filter forms that are associated with one specific question. This parameter should be used when filtering by only one question. This parameter is deprecated and will be removed in the future, please use `questionIds` instead",
            "deprecated": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "questionIds",
            "in": "query",
            "description": "Optional filter for multiple questions. To filter forms by more than one question, pass multiple questionIds parameters in the query string, like: ?questionIds=1&questionIds=2&questionIds=3.This parameter accepts repeated keys rather than a comma-separated list.",
            "schema": {
              "type": "array",
              "items": {
                "type": "number"
              }
            }
          },
          {
            "name": "modifiedAfter",
            "in": "query",
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the supplierId is provided, the available range is the last 12 months. When the supplierId is not provided, the available range is capped at 1 month ago. If no date is specified, the endpoint returns only records from the past month.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "description": "Optional filter for a form year",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "archivedOnly",
            "in": "query",
            "description": "Optional value to return only archived records",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "activeOnly",
            "in": "query",
            "description": "Optional value to return only active records",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "The starting index for pagination. Defaults to 0.",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of results to return. Defaults to 100, with a maximum value of 100.",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The supplier forms and their respective answers for the specified filters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_controllers.v2.messages.GetSupplierFormsAndAnswersResponse"
                },
                "examples": {
                  "SampleResponse": {
                    "value": {
                      "supplierFormsAndAnswers": [
                        {
                          "supplierId": 100000001,
                          "supplierName": "Generic Supplier Inc.",
                          "formTypeId": 30000,
                          "formId": 50000001,
                          "formName": "Annual Compliance Form",
                          "formStatus": "Pending",
                          "formUpdatedDate": "2025-01-15T12:34:56.789Z",
                          "formYear": "2025",
                          "formPeriod": "2024",
                          "clientSites": [
                            {
                              "clientId": "200001",
                              "clientName": "Global Retail Partner"
                            }
                          ],
                          "isActive": true,
                          "questions": [
                            {
                              "questionId": 4001,
                              "question": "Does your company comply with the latest safety regulations?",
                              "questionTitle": "",
                              "categoryId": 6001,
                              "categoryName": "Safety Compliance",
                              "answerDataType": "text",
                              "answerDataPointType": "question",
                              "answer": {
                                "values": [
                                  {
                                    "value": "Yes",
                                    "href": "https://api.avetta.com/file/v1/files/100000001/2025-01-15T12:00:00.000Z~~*aHR0cDovL2V4YW1wbGUuY29tL2RvY3VtZW50LnBkZg==?questionId=4001"
                                  }
                                ],
                                "answerUpdatedDate": "2025-01-15T12:30:00.000Z",
                                "answerComment": "Supporting document attached for compliance verification."
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "5afb16652500005a17786xyz not found."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Could not authenticate request."
                    },
                    "code": {
                      "type": "string",
                      "example": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/connect/v1/corporate-hierarchy/sites": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [],
      "get": {
        "parameters": [
          {
            "description": "Billing Id of parent node in the hierarchy",
            "in": "query",
            "name": "parentId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "The record to start with for pagination (0-based)",
            "in": "query",
            "name": "start",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Filter by site name. Glob patterns can be used ( example: Acme* )",
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "id": {
                        "type": "number"
                      },
                      "name": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "parentId": {
                        "type": "number"
                      },
                      "rootId": {
                        "type": "number"
                      },
                      "level": {
                        "minLength": 1,
                        "type": "string"
                      },
                      "children": {
                        "items": {
                          "properties": {}
                        },
                        "type": "array"
                      }
                    },
                    "example": [
                      {
                        "id": 123,
                        "name": "Company 1",
                        "parentId": 321,
                        "rootId": 234,
                        "level": "site",
                        "children": []
                      },
                      {
                        "id": 124,
                        "name": "Company 2",
                        "parentId": 321,
                        "rootId": 234,
                        "level": "site",
                        "children": []
                      },
                      {
                        "id": 125,
                        "name": "Company 3",
                        "parentId": 321,
                        "rootId": 234,
                        "level": "site",
                        "children": []
                      }
                    ],
                    "required": [
                      "id",
                      "name",
                      "parentId",
                      "rootId",
                      "level",
                      "children"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "example": {
                    "code": "1",
                    "service": "Gateway",
                    "message": "Missing Auth",
                    "displayMessage": "Missing Auth"
                  },
                  "required": [
                    "code",
                    "service",
                    "message",
                    "displayMessage"
                  ],
                  "type": "object",
                  "x-examples": {
                    "example-1": {
                      "code": "1",
                      "service": "Gateway",
                      "message": "Missing Auth",
                      "displayMessage": "Missing Auth"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "example": {
                    "code": "3",
                    "message": "Broad Error message"
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "x-examples": {
                    "example-1": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Account"
        ],
        "description": "Get all the sites which are contained in a given active connection within the corporate hierarchy.\n\nThe Hierarchy consists of a collection of nodes that link every site to a hub and at the top of the Hierarchy is the root node that serves as the Corporate Account Billing Id.\n\nEach supplier links to one or more Site nodes via a Connection.\n\nIf the API is called with only the required parameters (api key) then all sites for this client corporate account should be returned. The corporate account is determined by a lookup to identify the client linked to the apikey.\n\nThe following restrictions apply:\n\nThe client should be a corporate, which is the root node of the hierarchy.\n\n`parentId` is a filter to show only the nodes with that selected Parent Id\n\nParent here means the direct parent of a site, it can be a hub or a corporate.\n\nThe reason to use the Parent Id filter is to identify a list of sites that have the same parent.\n\nName is a filter on the site name to show only the sites with that selected name.\n\nSites will only be returned only if they are linked to an active (approved)  a connection.\n\nParameters:\n\nBest practice is to set the limit to 500 the total number of records to return\n\n",
        "operationId": "",
        "summary": "Get Corporate Hierarchy Sites",
        "x-internal": false,
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/connect/v1/supplier-accounts": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [],
      "get": {
        "parameters": [
          {
            "description": "Optional filter, the status of the account should take one of the next values:",
            "in": "query",
            "name": "accountStatus",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "deactivated",
                "pending"
              ]
            }
          },
          {
            "description": "Or start of page, optional filter, it is the record to start with for pagination (1-based, not 0-based)",
            "in": "query",
            "name": "start",
            "schema": {
              "type": "number",
              "default": 1
            }
          },
          {
            "description": "Optional filter, the limit of accounts is the total number of records to return with default limit of 500 and maximum of 500",
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 500,
              "default": 500
            }
          },
          {
            "description": "Optional, the account External Id filter searches a specific Avetta account that is linked to the given Id",
            "in": "query",
            "name": "externalId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter, this represents any time of external system name. There are 18 different values right now for this value:",
            "in": "query",
            "name": "externalIdType",
            "schema": {
              "type": "string",
              "enum": [
                "DAB",
                "BRAVO",
                "EHS",
                "Salesforce",
                "Badging",
                "JDE",
                "Buyer",
                "ERP",
                "AX",
                "LMS",
                "ORACLE",
                "CRM",
                "SAP",
                "COUPA",
                "SAP ARIBA",
                "XPRO",
                "Vendor",
                "Other"
              ]
            }
          },
          {
            "description": "As optional, the modified after will filter out any records for any field listed (Name, Address, etc) with updated date values older than the value of the parameter provided.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "id": {
                        "example": "41234e7e504943e2c2ea0abc",
                        "format": "string",
                        "minLength": 1,
                        "type": "string"
                      },
                      "name": {
                        "example": "Private, Inc.",
                        "minLength": 1,
                        "type": "string"
                      },
                      "dbaNames": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "description": {
                        "example": "\"We manufacture, install and modernize all classes of electric overhead traveling cranes, monorail hoists, rail-mounted gantries, woodyard and portal cranes and associated material handling equipment. Our network of manufacturing centers of excellence, regional crane builders and service centers reach throughout North America.\"",
                        "type": "string"
                      },
                      "accountStatus": {
                        "enum": [
                          "active",
                          "deactivated",
                          "pending"
                        ],
                        "example": "active",
                        "minLength": 1,
                        "type": "string"
                      },
                      "accountStatusUpdatedDate": {
                        "example": "2018-11-25T18:02:28.299Z",
                        "format": "date-time",
                        "minLength": 1,
                        "type": "string"
                      },
                      "website": {
                        "example": "http://www.my-page.com",
                        "format": "uri",
                        "type": "string"
                      },
                      "primaryContact": {
                        "properties": {
                          "userId": {
                            "example": 2771,
                            "type": "integer"
                          },
                          "firstName": {
                            "example": "Shaun",
                            "type": "string"
                          },
                          "lastName": {
                            "example": "McMahon",
                            "type": "string"
                          },
                          "email": {
                            "example": "tester@avetta.com",
                            "format": "email",
                            "type": "string"
                          },
                          "phone": {
                            "example": "9999999999",
                            "type": "string"
                          },
                          "fax": {
                            "type": "string"
                          },
                          "language": {
                            "example": "en",
                            "maxLength": 2,
                            "minLength": 2,
                            "type": "string"
                          }
                        },
                        "required": [
                          "userId",
                          "firstName",
                          "lastName",
                          "email",
                          "language"
                        ],
                        "type": "object"
                      },
                      "billingAddress": {
                        "properties": {
                          "addressLine": {
                            "example": "123 East Main St",
                            "type": "string"
                          },
                          "city": {
                            "example": "Beverly Hills",
                            "type": "string"
                          },
                          "state": {
                            "example": "California",
                            "type": "string"
                          },
                          "postalCode": {
                            "example": "90210",
                            "maxLength": 10,
                            "minLength": 5,
                            "type": "string"
                          },
                          "country": {
                            "example": "United States",
                            "type": "string"
                          }
                        },
                        "required": [
                          "country"
                        ],
                        "type": "object"
                      },
                      "createdDate": {
                        "example": "2004-11-30T00:00:00Z",
                        "format": "date-time",
                        "type": "string"
                      },
                      "updatedDate": {
                        "example": "2020-12-18T00:47:57.619Z",
                        "format": "date-time",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "accountStatus",
                      "accountStatusUpdatedDate",
                      "primaryContact",
                      "billingAddress",
                      "createdDate",
                      "updatedDate"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "id": "41234e7e504943e2c2ea0abc",
                        "name": "Private",
                        "dbaNames": [],
                        "description": "",
                        "accountStatus": "pending",
                        "accountStatusUpdatedDate": "2018-11-25T18:02:10.046Z",
                        "billingAddress": {
                          "addressLine": "10071 Cowan",
                          "city": "Irvine",
                          "country": "United States",
                          "postalCode": "92001",
                          "state": "California"
                        },
                        "createdDate": "2009-02-02T11:33:50Z",
                        "updatedDate": "2009-02-02T11:33:50Z"
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "service",
                    "message",
                    "displayMessage"
                  ],
                  "type": "object",
                  "example": {
                    "code": "1",
                    "service": "Gateway",
                    "message": "Missing Auth",
                    "displayMessage": "Missing Auth"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "example": {
                    "code": "3",
                    "message": "Broad Error message"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Account"
        ],
        "description": "Provides details about a supplier account or a list of supplier accounts depending on the applied filter.\n\nA Supplier account can include its `name`, `status`, `address`, `id`. Use this endpoint to see the linked data to other platforms using the External Id.\n\nAn External Id is a identifier that usually belongs to another platform and it is being stored in our DB to link it with its Avetta Account.\n",
        "operationId": "get-supplier-account",
        "summary": "Get Supplier Accounts",
        "x-internal": false,
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/connect/v1/registrations": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [],
      "post": {
        "parameters": [
          {
            "description": "Authorization header",
            "in": "header",
            "name": "Authorization",
            "required": true,
            "schema": {
              "type": "string",
              "default": "apikey <API_KEY>"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "",
                "properties": {
                  "name": {
                    "description": "The supplier’s company name.",
                    "example": "Bob's Plumbing Services",
                    "maxLength": 120,
                    "minLength": 1,
                    "type": "string"
                  },
                  "primaryContact": {
                    "properties": {
                      "firstName": {
                        "description": "The first name of the supplier’s primary contact.",
                        "example": "Bob",
                        "maxLength": 40,
                        "minLength": 1,
                        "type": "string"
                      },
                      "lastName": {
                        "description": "The last name of the supplier’s primary contact.",
                        "example": "Smith",
                        "maxLength": 80,
                        "minLength": 1,
                        "type": "string"
                      },
                      "email": {
                        "description": "The email of the supplier’s primary contact.\n> Email address must have a valid format.",
                        "example": "bob.smith@bobsplumbing.com",
                        "format": "email",
                        "minLength": 3,
                        "type": "string"
                      },
                      "phone": {
                        "description": "The phone number of the supplier’s primary contact.\n1. For suppliers based in the United States or Canada (US/CA), the phone number may be provided without the country code in one of the following formats:\n  * A 10-digit number (e.g., 1234567890)\n  * A hyphenated format (e.g., XXX-XXX-XXXX)\n\n2. For phone numbers outside the United States and Canada (US/CA), please include the \"+\" symbol followed by the appropriate country code. The number should be formatted in one of the following ways:\n  * Without hyphens: +[Country Code] [Area Code] [Local Number] (e.g., +61 412 345 678)\n  * With hyphens: +[Country Code]-[Area Code]-[Local Number] (e.g., +61-412-345-678) <br /><br />\n  Examples of valid international formats:\n    * Australia: +61-412-345-678 or +61 412 345 678\n    * United Kingdom: +44-20-7946-0958 or +44 20 7946 0958\n    * Brazil: +55-11-91234-5678 or +55 11 91234 5678\n> Please ensure the area code is correct and valid for the respective country.",
                        "example": "999-999-9999",
                        "maxLength": 17,
                        "minLength": 10,
                        "type": "string"
                      },
                      "language": {
                        "description": "These languages are specified within a recognition request using language code parameters as noted on this page. Most language code parameters conform to [ISO-639-1](https://en.wikipedia.org/wiki/ISO_639-1) identifiers, except where noted.\n>Language must be a valid/supported language.",
                        "example": "en",
                        "maxLength": 2,
                        "minLength": 2,
                        "type": "string"
                      }
                    },
                    "required": [
                      "lastName",
                      "language"
                    ],
                    "type": "object"
                  },
                  "billingAddress": {
                    "properties": {
                      "country": {
                        "description": "The country must be passed as either a two-character or a three-character,  ISO 3166 compatible country code.  <br /> For example, `US` for the United States  (2-letter code) or `USA` (3-letter code).\n> This field is case sensitive.",
                        "example": "US",
                        "maxLength": 3,
                        "minLength": 2,
                        "type": "string"
                      }
                    },
                    "required": [
                      "country"
                    ],
                    "type": "object"
                  },
                  "reasonForRequest": {
                    "description": "The reason for requesting registration of the supplier.",
                    "type": "string"
                  },
                  "requestDeadline": {
                    "description": "Used for inputting a date & time. Follows W3C format (ISO 8601). The best practice is to always include the time zone offset. Use the yyyy-MM-ddTHH:mm:ss.SSZ formats to specify dateTime fields.\n\n* yyyy is the four-digit year\n* MM is the two-digit month (01-12)\n* dd is the two-digit day (01-31)\n* 'T' is a separator indicating that time-of-day follows\n* HH is the two-digit hour (00-23)\n* mm is the two-digit minute (00-59)\n* ss is the two-digit seconds (00-59)\n* SSS is the optional three-digit milliseconds (000-999)\n* +/-HH:mm is the Zulu (UTC) time zone offset\n* 'Z' is the reference UTC timezone\n\nSee [W3C XML Schema Part 2: DateTime Datatype](https://www.w3.org/TR/xmlschema-2/#dateTime).\n\n> Date must be in a valid format.",
                    "example": "2021-10-01T00:00:00.00Z",
                    "type": "string"
                  },
                  "requestedByClientId": {
                    "description": "The Corporate Id of the site(s) that is requesting the connection.",
                    "example": 480,
                    "type": "number"
                  },
                  "requestedBySiteIds": {
                    "description": "The site Id(s) that are requesting the connection. Example: `[481, 482]`.",
                    "items": {
                      "type": "integer"
                    },
                    "maxItems": 100,
                    "minItems": 0,
                    "type": "array",
                    "uniqueItems": true,
                    "example": [
                      481,
                      482
                    ]
                  },
                  "requestorFullName": {
                    "description": "The requestor full name.",
                    "type": "string"
                  },
                  "requestorEmail": {
                    "description": "The requestor email address.\n> Email address must have a valid format.",
                    "format": "email",
                    "minLength": 3,
                    "type": "string"
                  },
                  "tags": {
                    "items": {
                      "properties": {
                        "id": {
                          "description": "The numeric Id of the supplier tag applied to this supplier.",
                          "example": 908,
                          "type": "number"
                        },
                        "appliedAtAccount": {
                          "description": "The Account Id in the hierarchy where the tag is applied.",
                          "example": 480,
                          "type": "number"
                        }
                      },
                      "required": [
                        "id",
                        "appliedAtAccount"
                      ],
                      "type": "object"
                    },
                    "minItems": 0,
                    "type": "array",
                    "uniqueItems": true
                  },
                  "externalIds": {
                    "items": {
                      "properties": {
                        "vendorId": {
                          "description": "The client’s reference Id for a supplier from one of their internal systems.",
                          "example": "ABC711",
                          "minLength": 1,
                          "type": "string"
                        },
                        "type": {
                          "description": "The type of Vendor Id that a client can attach to a supplier.",
                          "enum": [
                            "DAB",
                            "BRAVO",
                            "EHS",
                            "Salesforce",
                            "Badging",
                            "JDE",
                            "Buyer",
                            "ERP",
                            "AX",
                            "LMS",
                            "ORACLE",
                            "CRM",
                            "SAP",
                            "COUPA",
                            "SAP ARIBA",
                            "XPRO",
                            "Vendor",
                            "Other"
                          ],
                          "example": "ORACLE",
                          "type": "string"
                        },
                        "appliedAtAccount": {
                          "description": "The Corporate Id of the client.",
                          "example": 480,
                          "type": "number"
                        }
                      },
                      "required": [
                        "vendorId",
                        "type",
                        "appliedAtAccount"
                      ],
                      "type": "object"
                    },
                    "minItems": 0,
                    "type": "array",
                    "uniqueItems": true
                  },
                  "ccEmail": {
                    "description": "Optional list of email addresses to be copied on the communication.\n> Each email address must have a valid format.",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "email",
                      "minLength": 3
                    },
                    "minItems": 0,
                    "maxItems": 10,
                    "uniqueItems": true,
                    "example": [
                      "example1@mail.com",
                      "example2@mail.com"
                    ],
                    "nullable": true
                  }
                },
                "required": [
                  "name",
                  "primaryContact",
                  "billingAddress",
                  "reasonForRequest",
                  "requestDeadline",
                  "requestedByClientId",
                  "requestedBySiteIds",
                  "requestorFullName",
                  "requestorEmail"
                ],
                "type": "object",
                "x-examples": {
                  "example-1": {
                    "tags": [
                      {
                        "id": 908,
                        "appliedAtAccount": 480
                      }
                    ],
                    "billingAddress": {
                      "country": "US"
                    },
                    "externalIds": [
                      {
                        "vendorId": "ABC711",
                        "type": "ORACLE",
                        "appliedAtAccount": 480
                      }
                    ],
                    "name": "test_tags_external_ids",
                    "primaryContact": {
                      "email": "bob.smith@bobsplumbing.com",
                      "firstName": "Bob",
                      "language": "en",
                      "lastName": "Smith",
                      "phone": "123467890"
                    },
                    "reasonForRequest": "We need more plumbers for industrial site maintenance.",
                    "requestDeadline": "2021-10-01T00:00:00.00Z",
                    "requestedByClientId": 250117111,
                    "requestorEmail": "bob.smith@corp.com",
                    "requestorFullName": "Bob Smith"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Gateway"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Api Key Not Found"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Api Key Not Found"
                    }
                  },
                  "required": [
                    "code",
                    "service",
                    "message",
                    "displayMessage"
                  ],
                  "type": "object",
                  "x-examples": {
                    "example-1": {
                      "code": "1",
                      "displayMessage": "Missing Auth",
                      "message": "Missing Auth",
                      "service": "Gateway"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "13"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Duplicate data request"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "x-examples": {
                    "example-1": {
                      "code": "13",
                      "message": "Duplicate data request"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "example": {
                    "code": "3",
                    "message": "Broad Error message"
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Account"
        ],
        "description": "Register supplier.",
        "operationId": "register-supplier",
        "summary": "Register Supplier",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/client-api/v1/clients/{clientId}/suppliers/{accountId}": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [
        {
          "description": "The numeric identifier for a corporate account.",
          "in": "path",
          "name": "clientId",
          "required": true,
          "schema": {
            "type": "number"
          }
        },
        {
          "description": "The numeric identifier for a supplier.",
          "in": "path",
          "name": "accountId",
          "required": true,
          "schema": {
            "type": "number"
          }
        }
      ],
      "put": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "",
                "properties": {
                  "externalIds": {
                    "items": {
                      "properties": {
                        "externalId": {
                          "description": "The value of the External Id to be added.",
                          "minLength": 1,
                          "type": "string",
                          "example": "SAP-1234"
                        },
                        "externalIdType": {
                          "description": "The type of External Id that a client can attach to a supplier.\n\n> This field is case sensitive.",
                          "enum": [
                            "SAP",
                            "ORACLE",
                            "Salesforce",
                            "CRM",
                            "LMS",
                            "ERP",
                            "EHS",
                            "Badging",
                            "Vendor",
                            "Other",
                            "Buyer",
                            "JDE",
                            "AX",
                            "DAB",
                            "BRAVO",
                            "COUPA",
                            "SAP ARIBA",
                            "XPRO"
                          ],
                          "example": "SAP",
                          "type": "string"
                        },
                        "clientId": {
                          "description": "The client Id (Billing Id) in the hierarchy where the External Id is applied.",
                          "example": 1234,
                          "type": "number"
                        }
                      },
                      "required": [
                        "externalId",
                        "externalIdType",
                        "clientId"
                      ],
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array",
                    "uniqueItems": true
                  }
                },
                "required": [
                  "externalIds"
                ],
                "type": "object",
                "x-examples": {
                  "example-1": {
                    "externalIds": {
                      "value": "SAP-1234",
                      "type": "SAP",
                      "appliedAtAccount": 12345
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "number"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "x-examples-1": {
                    "Invalid External Id Type": {
                      "code": 12,
                      "message": "sap externalIdType is invalid."
                    }
                  },
                  "x-examples-2": {
                    "Invalid Client Id": {
                      "code": "12",
                      "message": "999 clientId does not belong to your hierarchy."
                    }
                  },
                  "x-examples-3": {
                    "Invalid Body": {
                      "code": "12",
                      "message": "Malformed message body: Invalid JSON"
                    }
                  },
                  "x-examples-4": {
                    "Empty External Id": {
                      "code": "12",
                      "message": "requirement failed: ExternalId value cannot be empty"
                    }
                  },
                  "x-examples-5": {
                    "Duplicate External Id": {
                      "code": "12",
                      "message": "requirement failed: Duplicate external id in request"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "description": "",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object",
                  "x-examples": {
                    "example-1": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Account"
        ],
        "description": "Update supplier account with one or more new External Id's. \n\nNote: There is no limit to how many External Id's are added; however, `externalId` and `externalIdType` must be unique per client. Only external IDs for active suppliers are allowed.",
        "operationId": "put-v1-clients-clientId-suppliers-supplierId",
        "summary": "Client Update Supplier",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/account-management-gateway/v1/clients/{clientId}/suppliers/{supplierId}/profile": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "get": {
        "operationId": "getSupplierProfile",
        "summary": "Supplier Profile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "id": 89010,
                      "name": "Bob's Plumbing Services",
                      "dbaNames": [
                        "Bob's Plumbing Services, LLC"
                      ],
                      "description": "Providing plumbing services",
                      "accountStatus": "Active",
                      "website": "www.bobsplumbing.com",
                      "primaryContact": {
                        "id": 123,
                        "firstName": "Bob",
                        "lastName": "Smith",
                        "email": "bob.smith@fakeemail.com",
                        "phone": "555 555 1234",
                        "fax": "555 555 4567",
                        "language": "en"
                      },
                      "billingAddress": {
                        "addressLine1": "44 Woerdens Road",
                        "city": "Raymond Terrace",
                        "state": "New South Wales",
                        "postalCode": "2324",
                        "country": "Australia"
                      },
                      "createdDate": "2022-04-25 01:39:54",
                      "updatedDate": "2022-04-25 01:39:54",
                      "diversity": [
                        "basic"
                      ],
                      "externalId": [
                        {
                          "clientId": 123,
                          "type": "Vendor",
                          "value": "132001"
                        }
                      ],
                      "businessNumbers": [
                        {
                          "type": "ABN",
                          "value": "12345578922"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_SupplierProfile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Unable to evaluate supplier account for supplier id 8905dsds5."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  },
                  "example-2": {
                    "value": {}
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "supplierId",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "x-internal": false,
        "tags": [
          "Account"
        ],
        "description": "Retrieves the supplier profile information for a given `supplierId`.",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "number"
          },
          "name": "supplierId",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "number"
          },
          "name": "clientId",
          "in": "path",
          "required": true
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientObjectId}/suppliers/{supplierObjectId}/profile": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientId}/suppliers": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "get": {
        "operationId": "getConnectedSupplierProfile",
        "summary": "Connected Supplier Profile",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_SupplierProfiles"
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "totalCount": 1,
                      "suppliers": [
                        {
                          "id": 250377257,
                          "name": "Suppliers Inc.",
                          "dbaNames": [
                            "John Doe"
                          ],
                          "website": "suppliersinc.co",
                          "description": "A company specializing in heavy tractor transport/logistics.",
                          "contactInformation": [
                            {
                              "phoneNumber": "123-456-7890",
                              "faxNumber": "098-765-4321",
                              "isPrimary": true,
                              "type": "Office"
                            }
                          ],
                          "billingAddress": {
                            "addressLine1": "7 Road Avenue",
                            "city": "Metropolis",
                            "state": "Grand Line",
                            "postalCode": "112 200",
                            "country": "Country",
                            "poBox": "111111",
                            "suiteNumber": "12"
                          },
                          "numberOfEmployees": 200,
                          "accountStatus": "active",
                          "updatedDate": "2023-11-11T05:28:48.943Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Gateway"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "in": "path",
            "name": "clientId",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "x-internal": false,
        "tags": [
          "Account"
        ],
        "description": "Retrieves all unique suppliers at corporate, hub or site (depending on `clientId` path parameter). By default, all suppliers are retrieved regardless of account status.                                                                                       Note: This endpoint does not return records modified before 30 days.",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "supplierId",
          "in": "query",
          "required": false,
          "description": "Optional filter on the client hierarchy to show only matching supplier in their network."
        },
        {
          "schema": {
            "type": "string",
            "default": "active, pending, and deactivated"
          },
          "name": "accountStatus",
          "in": "query",
          "required": false,
          "description": "Optional filter on the client hierarchy to show only matching supplier status."
        },
        {
          "schema": {
            "type": "string",
            "default": "30 days"
          },
          "name": "modifiedAfter",
          "in": "query",
          "required": false,
          "description": "Optional filter for suppliers updatedDate. The available range is capped at the last 30 days."
        },
        {
          "schema": {
            "type": "integer",
            "default": "0"
          },
          "name": "start",
          "in": "query",
          "required": false,
          "description": "Optional filter. The record to start with for pagination (0-based)"
        },
        {
          "schema": {
            "type": "integer",
            "default": "500"
          },
          "name": "limit",
          "in": "query",
          "required": false,
          "description": "Optional filter. Total number of records to be returned."
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientId}/suppliers/{supplierId}/primeandsubcontractors": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "get": {
        "operationId": "getContractors",
        "summary": "Contractors (Sub/Prime)",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "x-examples": {
                    "example-1": [
                      {
                        "siteId": "",
                        "siteName": "",
                        "supplierId": "",
                        "supplierBillingId": "",
                        "supplierName": "",
                        "isDirect": false,
                        "primeContractors": [
                          {
                            "accountId": "",
                            "supplierName": "",
                            "supplierBillingId": ""
                          }
                        ],
                        "subcontractors": [
                          {
                            "accountId": "",
                            "supplierName": "",
                            "supplierBillingId": ""
                          }
                        ]
                      }
                    ]
                  },
                  "items": {
                    "type": "object",
                    "properties": {
                      "clientId": {
                        "type": "number",
                        "description": "This field describes a siteId for the client."
                      },
                      "clientName": {
                        "type": "string",
                        "description": "This field describes a siteName for the client."
                      },
                      "supplierId": {
                        "type": "number"
                      },
                      "supplierName": {
                        "type": "string"
                      },
                      "isDirect": {
                        "type": "boolean",
                        "description": "Represents a \"Direct\" relationship between the supplier and site."
                      },
                      "primeContractors": {
                        "type": "array",
                        "description": "The prime contractors for the given supplier.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "supplierName": {
                              "type": "string"
                            },
                            "supplierId": {
                              "type": "number"
                            }
                          }
                        }
                      },
                      "subContractors": {
                        "type": "array",
                        "description": "The sub-contractors for the given supplier.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "supplierName": {
                              "type": "string"
                            },
                            "supplierId": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    },
                    "required": [
                      "clientId",
                      "clientName",
                      "supplierId",
                      "supplierName",
                      "isDirect",
                      "primeContractors",
                      "subContractors"
                    ]
                  }
                },
                "examples": {
                  "example-1": {
                    "value": [
                      {
                        "clientId": 2337753,
                        "clientName": "SiteName",
                        "supplierId": 2095553,
                        "supplierName": "All for One, LLC",
                        "isDirect": true,
                        "primeContractors": [
                          {
                            "supplierName": "Empire Traditions, Inc.",
                            "supplierId": 2500122
                          }
                        ],
                        "subContractors": [
                          {
                            "supplierName": "2 BROS, LLC",
                            "supplierId": 250231
                          }
                        ]
                      }
                    ]
                  },
                  "example-2": {
                    "value": [
                      {
                        "clientId": 2337753,
                        "clientName": "SiteName",
                        "supplierId": 2095553,
                        "supplierName": "All for One, LLC",
                        "isDirect": true,
                        "primeContractors": [
                          {
                            "supplierName": "Empire Traditions, Inc.",
                            "supplierId": 2500122
                          }
                        ],
                        "subContractors": []
                      }
                    ]
                  },
                  "example-3": {
                    "value": [
                      {
                        "clientId": 2337753,
                        "clientName": "SiteName",
                        "supplierId": 2095553,
                        "supplierName": "All for One, LLC",
                        "isDirect": true,
                        "primeContractors": [],
                        "subContractors": [
                          {
                            "supplierName": "2 BROS, LLC",
                            "supplierId": 250231
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              },
              "multipart/form-data": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "x-internal": false,
        "tags": [
          "Account"
        ],
        "description": "This API retreives all subContractors and primeContractors for each supplier-site connection for the given `supplierId` passed in the query parameters.",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "number"
          },
          "name": "clientId",
          "in": "path",
          "required": true
        },
        {
          "schema": {
            "type": "number"
          },
          "name": "supplierId",
          "in": "path",
          "required": true
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientId}/hierarchy": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "get": {
        "operationId": "getFullHierarchy",
        "summary": "Hierarchy",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_FullHierarchyResponse"
                },
                "examples": {
                  "example-1": {
                    "value": [
                      {
                        "clientId": 123,
                        "clientName": "AI Global",
                        "hierarchyLevel": "corporate",
                        "children": [
                          {
                            "clientId": 123456,
                            "clientName": "ML United States",
                            "hierarchyLevel": "hub",
                            "children": [
                              {
                                "clientId": 12345678,
                                "clientName": "GPT4 Los Angeles",
                                "hierarchyLevel": "site",
                                "children": []
                              },
                              {
                                "clientId": 12345679,
                                "clientName": "GPT3.5 San Diego",
                                "hierarchyLevel": "site",
                                "children": []
                              }
                            ]
                          },
                          {
                            "clientId": 20677,
                            "clientName": "DS Canada",
                            "hierarchyLevel": "hub",
                            "children": [
                              {
                                "clientId": 2067739,
                                "clientName": "Bayesian Toronto",
                                "hierarchyLevel": "hub",
                                "children": [
                                  {
                                    "clientId": 206773941,
                                    "clientName": "regression Markham",
                                    "hierarchyLevel": "site",
                                    "children": []
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              },
              "multipart/form-data": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Gateway"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "x-internal": false,
        "tags": [
          "Account"
        ],
        "description": "The API retrieves the whole hierarchy for a client.\n\nThe Hierarchy consists of a collection of nodes that link every site to a hub and at the top of the Hierarchy is the root node that serves as the Corporate Account Billing Id.\n\nIf the API is called with only the required parameters (api key) then entire hierarchy for the client corporate account will be returned.\n\nThe endpoint returns only active sites. To view inactive sites an Admin can log into the Connect application and view the hierarchy.",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "number"
          },
          "name": "clientId",
          "in": "path",
          "required": true,
          "description": "Required filter for client account. Passing client Id in parameter will return hierarchy for that clientId in the hierarchy"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "clientName",
          "in": "query",
          "required": false,
          "description": "Optional filter on the site name to show only the sites with that selected name."
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientMongoId}/hierarchy/immediate-children": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "clientMongoId",
          "in": "path",
          "required": true,
          "description": "Required filter for client account. Passing client mongo Id in parameter will return the immediate children for that client in the hierarchy"
        },
        {
          "schema": {
            "type": "integer",
            "default": 0,
            "minimum": 0
          },
          "name": "start",
          "in": "query",
          "required": false,
          "description": "Optional filter. The record to start with for pagination (0-based)"
        },
        {
          "schema": {
            "type": "integer",
            "default": 10,
            "minimum": 1,
            "maximum": 50
          },
          "name": "limit",
          "in": "query",
          "required": false,
          "description": "Optional filter. Total number of records to be returned."
        }
      ]
    },
    "/account-management-gateway/v1/clients/sites/search": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "searchTerm",
          "in": "query",
          "required": true,
          "description": "The string query to search the client's sites. Response will contain sites whose names match or contain this search term."
        },
        {
          "schema": {
            "type": "string",
            "enum": [
              "relevance",
              "asc",
              "desc"
            ],
            "default": "relevance"
          },
          "name": "sortOrder",
          "in": "query",
          "required": false,
          "description": "Optional filter. The sort order for the results."
        },
        {
          "schema": {
            "type": "integer",
            "default": 0,
            "minimum": 0
          },
          "name": "start",
          "in": "query",
          "required": false,
          "description": "Optional filter. The record to start with for pagination (0-based)"
        },
        {
          "schema": {
            "type": "integer",
            "default": 10,
            "minimum": 1,
            "maximum": 50
          },
          "name": "limit",
          "in": "query",
          "required": false,
          "description": "Optional filter. Total number of records to be returned."
        }
      ]
    },
    "/account-management-gateway/v1/clients/suppliers/search": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientId}/suppliers/external-ids": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "get": {
        "operationId": "getExternalIds",
        "tags": [
          "Account"
        ],
        "summary": "Get External-Ids",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3955_GetExternalIdsResponse"
                },
                "examples": {
                  "example-1": {
                    "summary": "Example of GetExternalIdsResponse",
                    "description": "An example response containing external IDs.",
                    "value": {
                      "totalCount": 3,
                      "externalIds": [
                        {
                          "supplierId": "123",
                          "supplierName": "Hank's Hardware",
                          "clientId": "456",
                          "externalId": "789",
                          "externalIdType": "SAP",
                          "clientName": "Skyler's Supply Europe",
                          "hierarchyLevel": "hub",
                          "updatedDate": "2024-02-02T09:11:21.517Z",
                          "updatedByUserEmail": "tester@avetta.com"
                        },
                        {
                          "supplierId": "124",
                          "supplierName": "Walt's Warehouse",
                          "clientId": "457",
                          "externalId": "790",
                          "externalIdType": "Vendor",
                          "clientName": "Skyler's Supply UK",
                          "hierarchyLevel": "site",
                          "updatedDate": "2023-12-05T13:15:01.234Z",
                          "updatedByUserEmail": "tester@avetta.com"
                        },
                        {
                          "supplierId": "125",
                          "supplierName": "Jesse's Plumbing Services",
                          "clientId": "458",
                          "externalId": "123-Limited-456",
                          "externalIdType": "COUPA",
                          "clientName": "Skyler's Supply Global",
                          "hierarchyLevel": "corporate"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Gateway"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Note: This only pulls external IDs of active or pending suppliers and not deactivated.\n",
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      },
      "parameters": [
        {
          "schema": {
            "type": "number"
          },
          "name": "clientId",
          "in": "path",
          "required": true,
          "description": "Required filter for client account. Passing client Id in parameter will give all external Ids related to client Id"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "supplierId",
          "in": "query",
          "required": false,
          "description": "Optional filter to return externalIds only applied at a given supplier"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "externalIdType",
          "in": "query",
          "required": false,
          "description": "Optional filter. When passed in query parameter give list of suppliers for given External Id Type"
        },
        {
          "schema": {
            "type": "string"
          },
          "name": "externalId",
          "in": "query",
          "required": false,
          "description": "Optional filter. When passed in query parameter give list of suppliers for given External Id"
        },
        {
          "schema": {
            "type": "integer"
          },
          "name": "start",
          "in": "query",
          "required": false,
          "description": "Optional filter. The record to start with for pagination (0-based)"
        },
        {
          "schema": {
            "type": "integer"
          },
          "name": "limit",
          "in": "query",
          "required": false,
          "description": "Optional filter. Total number of records to be returned."
        },
        {
          "schema": {
            "type": "string",
            "default": "90 days"
          },
          "name": "modifiedAfter",
          "example": "2026-03-20",
          "in": "query",
          "required": false,
          "description": "Optional filter for suppliers data modified after this date. The available range is capped at the last 90 days."
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientMongoId}/profile": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "clientMongoId",
          "in": "path",
          "required": true,
          "description": "The unique identifier of the client."
        }
      ]
    },
    "/account-management-gateway/v1/lookup-types/job-categories": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ]
    },
    "/account-management-gateway/v1/users/{userMongoId}/profile": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [
        {
          "schema": {
            "type": "string"
          },
          "name": "userMongoId",
          "in": "path",
          "required": true,
          "description": "The unique identifier of the user."
        }
      ]
    },
    "/account-management-gateway/v1/accounts/{id}/account-types/{accountType}/id-conversion": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "parameters": [
        {
          "schema": {
            "type": "string",
            "enum": [
              "supplier",
              "client"
            ]
          },
          "name": "accountType",
          "in": "path",
          "required": true,
          "description": "The type of the request account, can be either supplier or client."
        },
        {
          "schema": {
            "type": "integer"
          },
          "name": "id",
          "in": "path",
          "required": true,
          "description": "The avetta id of the requested account."
        }
      ]
    },
    "/account-management-gateway/v1/clients/{clientId}/suppliers/{supplierId}/external-ids": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ],
      "delete": {
        "operationId": "deleteExternalIds",
        "summary": "Delete External Ids",
        "tags": [
          "Account"
        ],
        "description": "Deletes external ID(s) for a supplier at a specific client hierarchy level.\n\n**Usage Modes:**\n- **Delete all external IDs:** Omit both `externalId` and `externalIdType` to delete all external IDs associated with the supplier at the specified client level, regardless of type.\n- **Delete specific external IDs:** Provide one or more `externalId` values along with a single `externalIdType` to delete only those specific IDs of that type.\n\n**Important Considerations:**\n- External IDs can only be deleted if they belong to the specified `supplierId` at the given `clientId` hierarchy level.\n- When deleting specific external IDs, only one `externalIdType` can be specified per request. To delete IDs of different types, make separate API calls for each type.\n",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The client hierarchy level where the external IDs reside. Only external IDs that belong to the supplier at this specific hierarchy level can be deleted.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "supplierId",
            "in": "path",
            "required": true,
            "description": "The supplier whose external IDs will be deleted. The supplier must exist at the specified `clientId` hierarchy level.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "required": false,
            "description": "One or more external ID values to delete. When provided, `externalIdType` is required. To delete multiple IDs, repeat the parameter (e.g., `externalId=id1&externalId=id2&externalId=id3`).",
            "schema": {
              "type": "string"
            },
            "examples": {
              "single": {
                "summary": "A single external ID to be deleted",
                "value": "?externalId=id1&externalIdType=Vendor"
              },
              "multiple": {
                "summary": "Multiple external IDs of the same type to be deleted",
                "value": "?externalId=id1&externalId=id2&externalId=id3&externalIdType=Vendor"
              }
            }
          },
          {
            "name": "externalIdType",
            "in": "query",
            "required": false,
            "description": "The type of external ID to delete. Required when `externalId` is provided. When used without `externalId`, deletes all external IDs of this type for the supplier.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "examples": {
                  "Successfully deleted": {
                    "value": "Successfully deleted the external ids"
                  },
                  "No external Id is deleted": {
                    "value": "No external id is deleted."
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              },
              "multipart/form-data": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Gateway"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Failed to delete externalIds: please provide the 'externalIdType' when passing the 'externalId' value(s)."
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Failed to delete externalIds: please provide the 'externalIdType' when passing the 'externalId' value(s)."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "service": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Gateway"
                    },
                    "message": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    },
                    "displayMessage": {
                      "minLength": 1,
                      "type": "string",
                      "example": "Missing Auth"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "x-examples": {
                    "example-1": {
                      "error": "Error message."
                    }
                  }
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "error": "Error message."
                    }
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3955_ApiKeyAuth": []
          }
        ]
      }
    },
    "/account-management-gateway/v1/users/{user-mongo-id}/profile": {
      "servers": [
        {
          "url": "https://api.avetta.com",
          "description": "PROD"
        },
        {
          "description": "MOCK",
          "url": "https://virtserver.swaggerhub.com/Avet7/AccountManagementGateway/APSO-2681"
        }
      ]
    },
    "/v1/clients/{clientId}/projects": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getProjects",
        "summary": "Get Projects",
        "description": "Retrieves projects for the specified client. The `clientId` represents either corporate, hub, \nor site level in the hierarchy. <br>\n**Note**: For optimal performance, use the hierarchy level associated with the user account. If corporate `clientId` used, the user will have access to the entire project list associated to the client hierarchy.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          },
          {
            "name": "isActive",
            "in": "query",
            "description": "Filter by project activity status",
            "schema": {
              "type": "boolean"
            },
            "example": true
          },
          {
            "name": "projectId",
            "in": "query",
            "description": "Filter by unique project identifier",
            "schema": {
              "type": "string"
            },
            "example": "412507"
          },
          {
            "name": "start",
            "in": "query",
            "description": "The record to start with for pagination (0-based)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The total number of records to return, maximum of 500",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "example": 100
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved projects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetProjectsResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "totalCount": 151,
                      "projects": [
                        {
                          "projectId": "412507",
                          "projectName": "Test",
                          "isActive": true,
                          "projectTemplateId": "687fed2f44a5846c03f5be03",
                          "projectTemplateName": "GM Test Project - Client Close",
                          "createdDate": "2025-07-29T20:57:05.213Z",
                          "updatedDate": "2025-07-29T20:57:05.562Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      },
      "post": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "createProject",
        "summary": "Create Project",
        "description": "Creates a new project for the specified client. The clientId represents either corporate, hub, \nor site level in the hierarchy.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SONIC-3856_CreateProjectRequest"
              },
              "examples": {
                "CreateProjectExample": {
                  "value": {
                    "projectName": "Test Project",
                    "templateId": "68af3d0599450f37bbe9a2fc"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created project",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_CreateProjectResponse"
                },
                "examples": {
                  "SuccessfulCreation": {
                    "value": {
                      "project": "434710",
                      "url": "https://apso-app.avetta.com/avt-cli/processes/68bae9602342b50861bad961"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/project/templates": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getProjectTemplates",
        "summary": "Get Project Templates",
        "description": "Retrieves project templates for the specified client. The `clientId` represents either corporate, hub, \nor site level in the hierarchy.<br>\n**Note**: If corporate `clientId` used, the user will have access to the entire templates list associated to the client hierarchy.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          },
          {
            "name": "start",
            "in": "query",
            "description": "The record to start with for pagination (0-based)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The total number of records to return, maximum of 500",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "example": 100
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved project templates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetProjectTemplatesResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "totalCount": 1,
                      "templates": [
                        {
                          "templateId": "68af3d0599450f37bbe9a2fc",
                          "accountId": "250410663",
                          "templateName": "Caterpillar Project",
                          "createdDate": "2025-08-27T17:14:45.744Z",
                          "updatedDate": "2025-08-27T17:14:45.744Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/work-requests/{workRequestId}/assigned-users": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getWorkRequestAssignedUsers",
        "summary": "Get Work Request Assigned Users",
        "description": "Retrieves all assigned users for the specified work request. <br>\n**Note**: The client must ensure the `clientId` used matches the node in the hierarchy where the work request was created.\nOptionally filter by user type using the `userType` query parameter. If not provided, all assigned users are returned. <br>\n**Valid userType values**: `connectSupplier`, `workerManagementWorker`, `workforceManagementWorker`\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The client billingId linked to the work request",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            },
            "example": "427605"
          },
          {
            "name": "userType",
            "in": "query",
            "required": false,
            "description": "Filter assigned users by user provider type. If not provided, returns all assigned users.",
            "schema": {
              "type": "string",
              "enum": [
                "connectSupplier",
                "workerManagementWorker",
                "workforceManagementWorker"
              ]
            },
            "example": "connectSupplier"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved assigned users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetAssignedUsersResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "totalCount": 2,
                      "workRequestName": "Safety Inspection Q1",
                      "supplierName": "ABC Construction",
                      "supplierBillingId": "250028423",
                      "users": [
                        {
                          "userId": "12345",
                          "firstName": "John",
                          "lastName": "Doe",
                          "userType": "connectSupplier"
                        },
                        {
                          "userId": "12346",
                          "firstName": "Jane",
                          "lastName": "Smith",
                          "userType": "workerManagementWorker"
                        }
                      ]
                    }
                  },
                  "FilteredByUserType": {
                    "value": {
                      "totalCount": 1,
                      "workRequestName": "Safety Inspection Q1",
                      "supplierName": "ABC Construction",
                      "supplierBillingId": "250028423",
                      "users": [
                        {
                          "userId": "12345",
                          "firstName": "John",
                          "lastName": "Doe",
                          "userType": "connectSupplier"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid userType value",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                },
                "examples": {
                  "InvalidUserType": {
                    "value": {
                      "message": "Invalid userType",
                      "details": "userType must be one of: connectSupplier, workerManagementWorker, workforceManagementWorker"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Work request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                },
                "examples": {
                  "WorkRequestNotFound": {
                    "value": {
                      "message": "Work request not found",
                      "details": "No work request found with id: 427605"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      },
      "patch": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "updateWorkRequestAssignedUsers",
        "summary": "Update Work Request Assigned Users",
        "description": "Updates the assigned users for the specified work request. <br>\nThis endpoint allows adding and removing users from the work request assignment list. <br>\n**Note**: The client must ensure the `clientId` used matches the node in the hierarchy where the work request was created.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The client billingId linked to the work request",
            "schema": {
              "type": "string"
            },
            "example": "250125517"
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            },
            "example": "704662"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SONIC-3856_UpdateAssignedUsersRequest"
              },
              "examples": {
                "AddUsers": {
                  "value": {
                    "usersToBeAdded": [
                      "4802531"
                    ],
                    "usersToBeRemoved": []
                  }
                },
                "RemoveUsers": {
                  "value": {
                    "usersToBeAdded": [],
                    "usersToBeRemoved": [
                      "4802531"
                    ]
                  }
                },
                "AddAndRemoveUsers": {
                  "value": {
                    "usersToBeAdded": [
                      "4802531",
                      "4802532"
                    ],
                    "usersToBeRemoved": [
                      "4802500"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated assigned users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  },
                  "example": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                },
                "examples": {
                  "UserNotFound": {
                    "value": {
                      "message": "User 4802531 not found for workRequestId 704662",
                      "code": "PROCESSSERVICE.0",
                      "correlationId": "17f9b297-b912-406e-953c-42e98717b414"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/api/v1/clients/{clientId}/work-requests/{workRequestId}/supplier-users": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "summary": "Get supplier users for a work request",
        "description": "Returns all active connectSupplier users associated with the `workRequestId`.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "operationId": "getWorkRequestSupplierUsers",
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client associated to the work-request",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "description": "The starting index for pagination",
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "The maximum number of users to return",
            "schema": {
              "type": "integer",
              "default": 100,
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved supplier users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_SupplierUsersResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/projects/{projectId}/work-requests": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getWorkRequests",
        "summary": "Get WorkRequests",
        "description": "Retrieves all work-requests for the specified project. The clientId represents either corporate, hub, \nor site level in the hierarchy. <br>\n**Note**: The user must ensure the clientId used matches the node in the hierarchy in where the project was created, or it's parents.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client's project.",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          },
          {
            "name": "workRequestStatus",
            "in": "query",
            "description": "Filter by workRequestStatus activity status",
            "schema": {
              "type": "string"
            },
            "example": "In Progress"
          },
          {
            "name": "start",
            "in": "query",
            "description": "The record to start with for pagination (0-based)",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "example": 0
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The total number of records to return, maximum of 500",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            },
            "example": 100
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved work requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetWorkRequestsResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "totalCount": 1,
                      "workRequests": [
                        {
                          "projectId": "427603",
                          "projectName": "wmint",
                          "siteId": "250410673",
                          "supplierId": "250028423",
                          "workRequestId": "427605",
                          "workRequestName": "wmint",
                          "workRequestStatus": "In Progress",
                          "createdDate": "2025-08-26T15:52:03.741Z",
                          "updatedDate": "2025-08-26T16:17:21.694Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/work-requests/{workRequestId}/questions": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getWorkRequestQuestions",
        "summary": "Get Work Request Questions",
        "description": "Retrieves questions for a specific work request and its forms. The clientId represents either corporate, hub, \nor site level in the hierarchy, and workRequestId identifies the specific work request.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "315425021"
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            },
            "example": "177800"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved work request questions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetWorkRequestQuestionsResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "workRequestId": "177800",
                      "workRequestName": "wmint",
                      "workRequestCategories": [
                        {
                          "categoryId": "46896",
                          "categoryName": "Work Request Details",
                          "isEditable": true,
                          "questions": [
                            {
                              "questionId": "177802",
                              "question": "Work Request Details:",
                              "questionType": "longText",
                              "responseOptions": [],
                              "isRequired": true,
                              "isEditable": true
                            }
                          ]
                        }
                      ],
                      "forms": {
                        "formId": "177801",
                        "formName": "Risk Assessment",
                        "categories": [
                          {
                            "categoryId": "46897",
                            "categoryName": "Risk Assessment",
                            "isEditable": true,
                            "questions": [
                              {
                                "questionId": "177803",
                                "question": "Risk or Hazard:",
                                "questionType": "longText",
                                "responseOptions": [],
                                "isRequired": true,
                                "isEditable": true
                              }
                            ]
                          }
                        ],
                        "isEditable": true
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Work request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/work-requests/{workRequestId}/questions-answers": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getWorkRequestQuestionsAnswers",
        "summary": "Get Work Request Questions and Answers",
        "description": "Retrieves questions and their corresponding answers for a specific work request and its forms. \nThis endpoint returns the current state of all answers submitted for the work request and its forms.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "250125517"
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            },
            "example": "445755"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved work request questions and answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetWorkRequestQuestionsAnswersResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "workRequestId": "445755",
                      "workRequestName": "Test WR",
                      "workRequestCategories": [
                        {
                          "categoryId": "45500",
                          "categoryName": "Work Request Details",
                          "isRepeatable": false,
                          "questionsAndAnswers": {
                            "answers": [
                              {
                                "questionId": "168846",
                                "values": [
                                  "WSS demo"
                                ]
                              }
                            ]
                          }
                        }
                      ],
                      "forms": {
                        "formId": 445756,
                        "formName": "Risk Assessment",
                        "categories": [
                          {
                            "categoryId": "45501",
                            "categoryName": "Risk Assessment",
                            "isRepeatable": false,
                            "questionsAndAnswers": {
                              "answers": [
                                {
                                  "questionId": "168847",
                                  "values": [
                                    "Moderate Risk"
                                  ]
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Work request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      },
      "put": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "upsertWorkRequestAnswers",
        "summary": "Upsert Work Request Answers",
        "description": "Creates or updates answers for questions in a work request based on the path param for `workRequestId`. This endpoint allows you to submit answers for multiple categories and questions within a work request.<br>\n**Note**: <br>\nThe `workRequestId` must be visible to the `clientId` path param used. <br>\n**Workflow**: \n1. First call:<br>\n`GET /v1/clients/{clientId}/work-requests/{workRequestId}/questions` to retrieve available questions\n2. Use the returned `categoryId` and `questionId` values to structure your answers\n3. Submit answers using this endpoint with the same category and question identifiers\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "250125517"
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            },
            "example": "68add8236383c26ae7658898"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SONIC-3856_UpsertWorkRequestAnswersRequest"
              },
              "examples": {
                "UpsertAnswersExample": {
                  "value": {
                    "categories": [
                      {
                        "categoryId": "46896",
                        "questionAnswers": [
                          {
                            "questionId": "177802",
                            "answers": [
                              "This is for testing purposes"
                            ]
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated work request answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_UpsertWorkRequestAnswersResponse"
                },
                "examples": {
                  "SuccessfulUpdate": {
                    "value": {
                      "message": "Work Request(s) updated successfully",
                      "url": "https://apso-app.avetta.com/avt-cli/processes/68add8236383c26ae7658898"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Work request not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/work-request": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "post": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "createWorkRequest",
        "summary": "Create Work Request",
        "description": "Creates a new work request for the specified client. The clientId represents either corporate, hub, \nor site level in the hierarchy.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "613018b94400004d3294ed28"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SONIC-3856_CreateWorkRequestRequest"
              },
              "examples": {
                "CreateWorkRequestExample": {
                  "value": {
                    "projectId": "68891f1ba86cf933395a2396",
                    "supplierId": "5d91248c400000c4f3343ceb",
                    "siteIds": [
                      "65b7f2734f0000c30022f4ff"
                    ],
                    "work-request-name": "Test WR",
                    "user": "Ali Hamed"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully created work request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_CreateWorkRequestResponse"
                },
                "examples": {
                  "SuccessfulCreation": {
                    "value": {
                      "workRequest": "688a5808a86cf933395a239c",
                      "url": "https://app.avetta.com/avt-cli/processes/688a5808a86cf933395a239c"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/clients/{clientId}/work-requests/{workRequestId}/available-forms": {
      "servers": [
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3856"
        },
        {
          "description": "SwaggerHub API Auto Mocking",
          "url": "https://virtserver.swaggerhub.com/Avet7/worksite-safety/SONIC-3597"
        },
        {
          "url": "https://api.avetta.com/worksite-safety-management",
          "description": "PROD"
        },
        {
          "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
          "description": "MOCK"
        }
      ],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/worksite-safety-management",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/WorkSiteSafety/1.0.0",
            "description": "MOCK"
          }
        ],
        "operationId": "getAvailableForms",
        "summary": "Get Available Forms",
        "description": "Returns the list of form templates that can be created for the given work request.\n",
        "tags": [
          "Worksite-Safety"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the client (corporate, hub, or site level)",
            "schema": {
              "type": "string"
            },
            "example": "4283746"
          },
          {
            "name": "workRequestId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the work request",
            "schema": {
              "type": "string"
            },
            "example": "40000"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved available forms",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_GetAvailableFormsResponse"
                },
                "examples": {
                  "SuccessfulResponse": {
                    "value": {
                      "availableForms": [
                        {
                          "formName": "Risk Observation",
                          "formTemplateId": "68191fcb858bfe0c34c12206"
                        },
                        {
                          "formName": "Project Evaluation",
                          "formTemplateId": "68191fcb858bfe0c34c12208"
                        },
                        {
                          "formName": "General Work Permit",
                          "formTemplateId": "68191fcb858bfe0c34c12205"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                },
                "examples": {
                  "UserNotFound": {
                    "value": {
                      "message": "User 4802531 not found for workRequestId 704662",
                      "code": "PROCESSSERVICE.0",
                      "correlationId": "17f9b297-b912-406e-953c-42e98717b414"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - API key required or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_AuthenticationErrorResponse"
                },
                "examples": {
                  "AuthenticationFailure": {
                    "value": {
                      "message": "Could not authenticate request.",
                      "code": "AUTH.102"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SONIC-3856_ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "SONIC-3856_WorkSiteSafety_ApiKeyAuth": []
          }
        ]
      }
    },
    "/v1/forms/actions": {
      "servers": [],
      "post": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Access to the approval process of specific forms that are not yet in their final workflow status. In case of failure, the form remains unchanged.\nMax field lengths on String fields will be strictly enforced, and requests that exceed the maximum field length will result in a validation failure.\nAction field will be validated to only allow applicable status that can be applied on the form.",
        "parameters": [
          {
            "description": "The numeric id of the form to approve/reject. Should be in a numeric format.",
            "in": "query",
            "name": "formId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "example": {
                  "action": "approve",
                  "comments": "Good to go",
                  "lang": "En"
                },
                "properties": {
                  "action": {
                    "description": "The value should be one of the applicable actions (Refer to the previous endpoint)",
                    "type": "string"
                  },
                  "comments": {
                    "maxLength": 4000,
                    "type": "string"
                  },
                  "lang": {
                    "default": "en",
                    "description": "The language of the action specified. Optional",
                    "type": "string"
                  }
                },
                "required": [
                  "action",
                  "comments"
                ],
                "type": "object"
              }
            }
          },
          "description": "The type of approval for the form.",
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "1",
                      "message": "The form is in a worfklow state that is no longer actionable."
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "422": {
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "5",
                      "message": "Server Error"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Post Form Approval v1",
        "tags": [
          "Deprecated Endpoints"
        ]
      }
    },
    "/v1/forms/activities": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Gets all activities/comments made on a specific form from newest to oldest.",
        "parameters": [
          {
            "description": "The numeric id of the form. Should be in a numeric format.",
            "in": "query",
            "name": "formId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "formId": "1234",
                        "comments": "This form was rejected due to insurance limit...",
                        "createdDate": "2021-04-29T15:59:34Z",
                        "createdBy": "John Doe"
                      },
                      {
                        "formId": "1234",
                        "comments": "This form was rejected due to incomplete info",
                        "createdDate": "2021-01-20T10:51:31Z",
                        "createdBy": "Jane Doe"
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "comments": {
                        "type": "string"
                      },
                      "createdBy": {
                        "format": "firstname lastname",
                        "type": "string"
                      },
                      "createdDate": {
                        "format": "UTC DateTime",
                        "type": "string"
                      },
                      "formId": {
                        "format": "numeric",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "10",
                      "message": "formId is not in a valid numeric format."
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "429": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "11",
                      "message": "Can’t process the request right now. Please try again later."
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "5",
                      "message": "Server Error"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Get Form Activities v1",
        "tags": [
          "Deprecated Endpoints"
        ]
      }
    },
    "/v1/forms/count": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Returns the total number of records from the `Form` Endpoint. All query parameters from the `Form` endpoint are also applicable in this endpoint as those values will be used in determining the number of records given the provided parameters.\n\nBy default, only Active Forms created within the last 12 months are returned.",
        "parameters": [
          {
            "description": "Optional filter for a supplier",
            "in": "query",
            "name": "supplierId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a client account",
            "in": "query",
            "name": "clientId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a specific form",
            "in": "query",
            "name": "formId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a form year",
            "in": "query",
            "name": "year",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a category",
            "in": "query",
            "name": "categoryId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a question",
            "in": "query",
            "name": "questionId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the `supplierId` is provided, the available range is the last 12 months. When the `supplierId` is not provided, the available range is capped at 1 month ago. If no date is specified, the endpoint will only count records from the past month.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Optional value to return archived only records",
            "in": "query",
            "name": "archivedOnly",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Optional value to return active only records",
            "in": "query",
            "name": "activeOnly",
            "schema": {
              "default": "true",
              "type": "boolean"
            }
          },
          {
            "description": "Optional filter for a formType",
            "in": "query",
            "name": "formTypeId",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "total_records": {
                        "type": "integer"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array",
                  "x-examples": {
                    "example-1": [
                      {
                        "total_records": 3039225
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 10,
                      "message": "Invalid Param Value"
                    }
                  }
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Get Form Count v1",
        "tags": [
          "Deprecated Endpoints"
        ]
      }
    },
    "/v1/forms/statuses": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Gets the applicable statuses to apply for a specific form. The list of statuses would be the applicable status to set based on the current status of the form. If the form is in its final workflow status, then it will return an empty list.",
        "parameters": [
          {
            "description": "The numeric id of the form. Should be in a numeric format.",
            "in": "query",
            "name": "formId",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "The target language of the applicable statuses",
            "in": "query",
            "name": "lang",
            "required": false,
            "schema": {
              "default": "en",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "formId": "1234",
                      "language": "en",
                      "applicableActions": [
                        {
                          "id": "4f8c65605049436c832e250d",
                          "action": "approve"
                        },
                        {
                          "id": "4f8dd5605049436c832e250d",
                          "action": "reject"
                        }
                      ],
                      "message": ""
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "applicableActions": {
                      "items": {
                        "properties": {},
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "formId": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "x-examples": {
                    "example-1": {
                      "applicableActions": [],
                      "formId": "16837298",
                      "language": "en",
                      "message": "Form is currently in a workflow state that you can not act on."
                    }
                  }
                }
              }
            },
            "description": "OK"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {},
                  "type": "object"
                }
              },
              "example-1": {
                "examples": {
                  "response": {
                    "value": {}
                  }
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "10",
                      "message": "formId is not in a valid numeric format."
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request"
          },
          "500": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "5",
                      "message": "Server Error"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "format": "numeric",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Get Form Status v1",
        "tags": [
          "Deprecated Endpoints"
        ]
      }
    },
    "/v2/insurance": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Retrieves a set of `Insurance` data based on the provided apiKey and query parameters. If an `id` is provided, only the insurance data pertaining to that contractor will be returned. Only active contractors that have approved connections to clients will be returned in this endpoint.",
        "parameters": [
          {
            "description": "The numeric identifier for a contractor",
            "example": 44282,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "example": 1,
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records based on updates made to forms after the specified date and time [yyyy-MM-dd hh:mm:ss]",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value allowing the retrieval of forms expired within 90 days",
            "example": 2,
            "in": "query",
            "name": "daysExp",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "clients": [
                          {
                            "client_id": 8372,
                            "client_name": "Oil Rig",
                            "insurance_data": [
                              {
                                "audit_id": 7365,
                                "audit_status": "Approved",
                                "flags": [
                                  {
                                    "flag_id": 46305,
                                    "flag_name": "Liability must be submitted by the supplier and approved according to client requirements for compliance",
                                    "flag_type": "form",
                                    "flag_updated_date": "2020-06-01 12:55:08",
                                    "forced_flag": "",
                                    "forced_flag_expiration": "",
                                    "original_flag": "Green"
                                  }
                                ],
                                "insurance_type_detail": [
                                  {
                                    "category_id": 628,
                                    "category_name": "General Information",
                                    "values": [
                                      {
                                        "answer": "123 Luke St",
                                        "href": "/client-api/v1/files/2839?questionId=395",
                                        "question": "What is your Address?",
                                        "question_id": 395,
                                        "title": "Some Title",
                                        "updated_date": "2016-09-23 10:11:31"
                                      }
                                    ]
                                  }
                                ],
                                "insurance_type_id": 34,
                                "insurance_type_name": "General Policy",
                                "insurance_updated_date": "2019-11-01 01:01:01"
                              }
                            ]
                          }
                        ],
                        "contractor_id": 2938,
                        "contractor_name": "ABC Painting",
                        "external_id": [
                          {
                            "client_id": 123,
                            "type": "Other",
                            "value": "234489"
                          }
                        ]
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "clients": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "integer"
                            },
                            "client_name": {
                              "type": "string"
                            },
                            "insurance_data": {
                              "items": {
                                "properties": {
                                  "audit_id": {
                                    "type": "integer"
                                  },
                                  "audit_status": {
                                    "type": "string"
                                  },
                                  "flags": {
                                    "items": {
                                      "properties": {
                                        "flag_id": {
                                          "type": "integer"
                                        },
                                        "flag_name": {
                                          "type": "string"
                                        },
                                        "flag_type": {
                                          "type": "string"
                                        },
                                        "flag_updated_date": {
                                          "type": "string"
                                        },
                                        "forced_flag": {
                                          "type": "string"
                                        },
                                        "forced_flag_expiration": {
                                          "type": "string"
                                        },
                                        "original_flag": {
                                          "type": "string"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "insurance_type_detail": {
                                    "items": {
                                      "properties": {
                                        "category_id": {
                                          "type": "integer"
                                        },
                                        "category_name": {
                                          "type": "string"
                                        },
                                        "values": {
                                          "items": {
                                            "properties": {
                                              "answer": {
                                                "type": "string"
                                              },
                                              "href": {
                                                "type": "string"
                                              },
                                              "question": {
                                                "type": "string"
                                              },
                                              "question_id": {
                                                "type": "integer"
                                              },
                                              "title": {
                                                "type": "string"
                                              },
                                              "updated_date": {
                                                "type": "string"
                                              }
                                            },
                                            "type": "object"
                                          },
                                          "type": "array"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "insurance_type_id": {
                                    "type": "integer"
                                  },
                                  "insurance_type_name": {
                                    "type": "string"
                                  },
                                  "insurance_updated_date": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "contractor_id": {
                        "type": "integer"
                      },
                      "contractor_name": {
                        "type": "string"
                      },
                      "external_id": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "integer"
                            },
                            "type": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 3,
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Insurance v2",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      }
    },
    "/v2/insurance/count": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Retrieves the number of `Contractors` based on the provided apiKey and query parameters.",
        "parameters": [
          {
            "description": "The numeric identifier for a contractor",
            "example": 44282,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records based on updates made to forms after the specified date and time [yyyy-MM-dd hh:mm:ss]",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value allowing the retrieval of forms expired within 90 days",
            "example": 2,
            "in": "query",
            "name": "daysExp",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "Insurance count": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 0
                      }
                    ]
                  }
                }
              },
              "application/json; charset=utf-8": {
                "schema": {
                  "description": "",
                  "items": {
                    "properties": {
                      "total_records": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "total_records"
                    ],
                    "type": "object"
                  },
                  "minItems": 1,
                  "type": "array",
                  "uniqueItems": true,
                  "x-examples": {
                    "example-1": [
                      {
                        "total_records": 0
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 3,
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Insurance Count v2",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      },
      "parameters": []
    },
    "/v1/audits": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Retrieves a set of `Audit` data based on the client making the request and the pagination parameters. The `href` field will only return for `Audit` data that are file related. Only active suppliers that have approved connections to clients will be returned in this endpoint.\n\nBy default, only Active Forms created within the last 12 months are returned. \n\nIf historical Audits data is needed, please contact technical support for assistance.",
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "example": 1,
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "type": "number"
            }
          },
          {
            "description": "The Supplier Id to filter results by",
            "example": 117463,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the `id` is provided, the available range is the last 12 months. When the `id` is not provided, the available range is capped at 1 month ago. If no date is specified, then the endpoint will only return records from the past month.",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "answer": "ABC Painting",
                        "audit_period": "2018-01-01 - 2019-04-01",
                        "audit_score": 0,
                        "audit_type_id": 1,
                        "audit_type_name": "PQF",
                        "audit_year": "2018",
                        "category_id": 78,
                        "category_name": "Contractor Information",
                        "contractor_id": 78910,
                        "contractor_name": "ABC Painting",
                        "question": "What is the name of your company?",
                        "question_id": 23,
                        "title": "",
                        "updated_date": "2016-07-23 05:10:57"
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "answer": {
                        "type": "string"
                      },
                      "audit_period": {
                        "type": "string"
                      },
                      "audit_score": {
                        "type": "integer"
                      },
                      "audit_type_id": {
                        "type": "integer"
                      },
                      "audit_type_name": {
                        "type": "string"
                      },
                      "audit_year": {
                        "type": "string"
                      },
                      "category_id": {
                        "type": "integer"
                      },
                      "category_name": {
                        "type": "string"
                      },
                      "contractor_id": {
                        "type": "integer"
                      },
                      "contractor_name": {
                        "type": "string"
                      },
                      "question": {
                        "type": "string"
                      },
                      "question_id": {
                        "type": "integer"
                      },
                      "title": {
                        "type": "string"
                      },
                      "updated_date": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "contractor_id",
                      "contractor_name",
                      "audit_type_id",
                      "audit_type_name",
                      "audit_score",
                      "audit_year",
                      "audit_period",
                      "category_id",
                      "category_name",
                      "title",
                      "question_id",
                      "question",
                      "answer",
                      "updated_date"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Audits v1",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      }
    },
    "/v1/audits/count": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "",
        "parameters": [
          {
            "description": "Contractor Id to determine total records per contractor",
            "example": 118577,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the `id` is provided, the available range  is the last 12 months. When the `id` is not provided, the available range is capped at 1 month ago. If no date is specified, then the endpoint will only count records from the past month.",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 1845
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {},
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Audit Count v1",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      }
    },
    "/v2/audits": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Retrieves a set of `Audit` data based on the client making the request and the pagination parameters. The `href` field will only return for `Audit` data that are file related. Only active suppliers that have approved connections to clients will be returned in this endpoint.\n\nBy default, only Active Forms created within the last 12 months are returned. \n\nIf historical Audits data is needed, please contact technical support for assistance.",
        "parameters": [
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "example": 1,
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "type": "number"
            }
          },
          {
            "description": "The Supplier Id to filter results by",
            "example": 117463,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the `id` is provided, the available range is the last 12 months. When the `id` is not provided, the available range is capped at 1 month ago. If no date is specified, the endpoint will only return records from the past month.",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "audit_data": [
                          {
                            "audit_details": [
                              {
                                "audit_id": "16863151",
                                "audit_period": "2018-01-01 - 2019-04-01",
                                "audit_score": "0",
                                "audit_year": "2020",
                                "categories": [
                                  {
                                    "category_id": "78",
                                    "category_name": "Contractor Information",
                                    "questions": [
                                      {
                                        "answer": "ABC Painting",
                                        "question": "What is the name of your company?",
                                        "question_id": "23",
                                        "updated_date": "2020-11-17 22:35:55"
                                      }
                                    ],
                                    "title": ""
                                  }
                                ]
                              }
                            ],
                            "audit_name": "PQF",
                            "audit_type_id": "1"
                          }
                        ],
                        "contractor_id": 78910,
                        "contractor_name": "ABC Painting"
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "audit_data": {
                        "items": {
                          "properties": {
                            "audit_details": {
                              "items": {
                                "properties": {
                                  "audit_id": {
                                    "type": "string"
                                  },
                                  "audit_period": {
                                    "type": "string"
                                  },
                                  "audit_score": {
                                    "type": "string"
                                  },
                                  "audit_year": {
                                    "type": "string"
                                  },
                                  "categories": {
                                    "items": {
                                      "properties": {
                                        "category_id": {
                                          "type": "string"
                                        },
                                        "category_name": {
                                          "type": "string"
                                        },
                                        "questions": {
                                          "items": {
                                            "properties": {
                                              "answer": {
                                                "type": "string"
                                              },
                                              "question": {
                                                "type": "string"
                                              },
                                              "question_id": {
                                                "type": "string"
                                              },
                                              "updated_date": {
                                                "type": "string"
                                              }
                                            },
                                            "type": "object"
                                          },
                                          "type": "array"
                                        },
                                        "title": {
                                          "type": "string"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "type": "array"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "audit_name": {
                              "type": "string"
                            },
                            "audit_type_id": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "contractor_id": {
                        "type": "integer"
                      },
                      "contractor_name": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Audits v2",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      }
    },
    "/v2/audits/count": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "",
        "parameters": [
          {
            "description": "Contractor Id to determine total records per contractor",
            "example": 118577,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the `id` is provided, the available range is the last 12 months. When `id` is not provided, the available range is capped at 1 month ago. If no date is specified, the endpoint will only count records from the past month.",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "total_records": 123
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {},
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Audit Count v2",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      }
    },
    "/v1/insurance": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Retrieves a set of `Insurance` data based on the provided apiKey and pagination parameters. If an `id` is provided, only the insurance data pertaining to that supplier will be returned. Only active suppliers that have approved connections to clients will be returned in this endpoint.",
        "parameters": [
          {
            "description": "The numeric identifier for a supplier",
            "example": 44282,
            "in": "query",
            "name": "id",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "The record to start with for pagination (0-based, not 1-based)",
            "example": 1,
            "in": "query",
            "name": "start",
            "required": false,
            "schema": {
              "default": 0,
              "type": "number"
            }
          },
          {
            "description": "The total number of records to return, maximum of 500",
            "example": 500,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 500,
              "type": "number"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]",
            "example": "2016-07-23 05:10:57",
            "in": "query",
            "name": "modifiedAfter",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "contractor_id": 2938,
                        "contractor_name": "ABC Painting",
                        "external_id": [
                          {
                            "client_id": 111111,
                            "type": "string",
                            "value": "someValue"
                          }
                        ],
                        "clients": [
                          {
                            "client_id": 8372,
                            "client_name": "Oil Rig",
                            "insurance_data": [
                              {
                                "audit_id": 7365,
                                "audit_status": "Approved",
                                "insurance_type_detail": [
                                  {
                                    "category_id": 628,
                                    "category_name": "General Information",
                                    "values": [
                                      {
                                        "answer": "123 Luke St",
                                        "href": "/client-api/v1/files/2839?questionId=395",
                                        "question": "What is your Address?",
                                        "question_id": 395,
                                        "title": "Some Title",
                                        "updated_date": "2016-09-23 10:11:31"
                                      }
                                    ]
                                  }
                                ],
                                "insurance_type_id": 34,
                                "insurance_type_name": "General Policy"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "clients": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "integer"
                            },
                            "client_name": {
                              "type": "string"
                            },
                            "insurance_data": {
                              "items": {
                                "properties": {
                                  "audit_id": {
                                    "type": "integer"
                                  },
                                  "audit_status": {
                                    "type": "string"
                                  },
                                  "insurance_type_detail": {
                                    "items": {
                                      "properties": {
                                        "category_id": {
                                          "type": "integer"
                                        },
                                        "category_name": {
                                          "type": "string"
                                        },
                                        "values": {
                                          "items": {
                                            "properties": {
                                              "answer": {
                                                "type": "string"
                                              },
                                              "href": {
                                                "type": "string"
                                              },
                                              "question": {
                                                "type": "string"
                                              },
                                              "question_id": {
                                                "type": "integer"
                                              },
                                              "title": {
                                                "type": "string"
                                              },
                                              "updated_date": {
                                                "type": "string"
                                              }
                                            },
                                            "type": "object"
                                          },
                                          "type": "array"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "insurance_type_id": {
                                    "type": "integer"
                                  },
                                  "insurance_type_name": {
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "contractor_id": {
                        "type": "integer"
                      },
                      "contractor_name": {
                        "type": "string"
                      },
                      "external_id": {
                        "items": {
                          "properties": {
                            "client_id": {
                              "type": "integer"
                            },
                            "type": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK",
            "headers": {}
          },
          "201": {
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "properties": {},
                  "type": "object"
                }
              }
            },
            "description": "Created"
          },
          "400": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 3,
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          },
          "500": {
            "content": {
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": "3",
                      "message": "Broad Error message"
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error",
            "headers": {}
          }
        },
        "summary": "Get Insurance v1",
        "tags": [
          "Deprecated Endpoints"
        ],
        "x-private": true
      }
    },
    "/v1/forms": {
      "servers": [],
      "get": {
        "servers": [
          {
            "url": "https://api.avetta.com/api",
            "description": "PROD"
          },
          {
            "url": "https://virtserver.swaggerhub.com/Avet7/ApiserviceV1/APSO-2681",
            "description": "MOCK"
          }
        ],
        "deprecated": true,
        "description": "Retrieves a set of `Form` data based on the provided request/pagination parameters.\n\nThe `href` field in the schema below will only return for `Form` data where the question requires a file upload as an answer.  The `href` field may contain more than one file name, separated by “~^~\". In the case of a file answer, the `answer` field will present the decoded name of the file along with its extension, for readability. However for download purposes, the value used in `href` should be used.\n\nOnly active suppliers that have approved connections to clients will be returned in this endpoint.\n\nBy default, only Active Forms created within the last 12 months are returned. Also, this endpoint is rate limited to 20 calls per minute.\n\n\n",
        "parameters": [
          {
            "description": "Optional record to start with for pagination",
            "in": "query",
            "name": "start",
            "schema": {
              "default": 0,
              "minimum": 0,
              "type": "integer"
            }
          },
          {
            "description": "Optional total number of records to return, maximum of 100",
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 100,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Optional filter for a supplier",
            "in": "query",
            "name": "supplierId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a client account",
            "in": "query",
            "name": "clientId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a specific form",
            "in": "query",
            "name": "formId",
            "schema": {
              "type": "number"
            }
          },
          {
            "description": "Optional filter for a form year",
            "in": "query",
            "name": "year",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a category",
            "in": "query",
            "name": "categoryId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional filter for a question",
            "in": "query",
            "name": "questionId",
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Optional value to return records after the specified date and time [yyyy-MM-dd hh:mm:ss]. When the `supplierId` is provided, the available range is the last 12 months. When the `supplierId` is not provided, the available range is capped at 1 month ago. If no date is specified, the endpoint returns only records from the past month.",
            "in": "query",
            "name": "modifiedAfter",
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Optional value to return archived only records",
            "in": "query",
            "name": "archivedOnly",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Optional value to return active only records",
            "in": "query",
            "name": "activeOnly",
            "schema": {
              "default": "true",
              "type": "boolean"
            }
          },
          {
            "description": "Optional flag to transform question from HTML to plain text",
            "in": "query",
            "name": "noHtml",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Optional filter for a formType",
            "in": "query",
            "name": "formTypeId",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "response": {
                    "value": [
                      {
                        "supplierId": 11111,
                        "supplierName": "Supplier, Inc.",
                        "formId": 33333333,
                        "formName": "Workers' Compensation",
                        "formPeriod": "2022-05-01 - 2023-05-01",
                        "formScore": 0,
                        "formStatus": "Submitted",
                        "formTypeId": 22222,
                        "formUpdatedDate": "2022-04-30 03:39:07",
                        "formYear": "2022",
                        "clientSites": [
                          {
                            "clientId": 44444,
                            "clientName": "Client Name"
                          }
                        ],
                        "categoryId": 555,
                        "categoryName": "Policy Limits",
                        "questionId": 6666,
                        "questionTitle": "",
                        "question": "Question",
                        "answer": "1000000",
                        "answerUpdatedDate": "2022-04-30 03:39:07",
                        "answerComment": null,
                        "isActive": true,
                        "href": null
                      }
                    ]
                  }
                },
                "schema": {
                  "items": {
                    "properties": {
                      "answer": {
                        "type": "string"
                      },
                      "answerComment": {
                        "oneOf": [
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "answerUpdatedDate": {
                        "type": "string"
                      },
                      "categoryId": {
                        "type": "integer"
                      },
                      "categoryName": {
                        "type": "string"
                      },
                      "clientSites": {
                        "items": {
                          "properties": {
                            "clientId": {
                              "type": "integer"
                            },
                            "clientName": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "type": "array"
                      },
                      "formId": {
                        "type": "integer"
                      },
                      "formName": {
                        "type": "string"
                      },
                      "formPeriod": {
                        "type": "string"
                      },
                      "formScore": {
                        "type": "integer"
                      },
                      "formStatus": {
                        "type": "string"
                      },
                      "formTypeId": {
                        "type": "integer"
                      },
                      "formUpdatedDate": {
                        "type": "string"
                      },
                      "formYear": {
                        "type": "string"
                      },
                      "href": {
                        "oneOf": [
                          {
                            "type": "string"
                          }
                        ]
                      },
                      "isActive": {
                        "type": "boolean"
                      },
                      "question": {
                        "type": "string"
                      },
                      "questionId": {
                        "type": "integer"
                      },
                      "questionTitle": {
                        "type": "string"
                      },
                      "supplierId": {
                        "type": "integer"
                      },
                      "supplierName": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array",
                  "x-examples": {
                    "example-1": [
                      {
                        "answer": "1000000",
                        "answerComment": null,
                        "answerUpdatedDate": "2022-04-30 03:39:07",
                        "categoryId": 555,
                        "categoryName": "Policy Limits",
                        "clientSites": [
                          {
                            "clientId": 44444,
                            "clientName": "Client Name"
                          }
                        ],
                        "formId": 33333333,
                        "formName": "Workers' Compensation",
                        "formPeriod": "2022-05-01 - 2023-05-01",
                        "formScore": 0,
                        "formStatus": "Submitted",
                        "formTypeId": 22222,
                        "formUpdatedDate": "2022-04-30 03:39:07",
                        "formYear": "2022",
                        "href": null,
                        "isActive": true,
                        "question": "Question",
                        "questionId": 6666,
                        "questionTitle": "",
                        "supplierId": 11111,
                        "supplierName": "Supplier, Inc."
                      }
                    ]
                  }
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              },
              "application/json; charset=utf-8": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 10,
                      "message": "Invalid Param Value"
                    }
                  }
                }
              }
            },
            "description": "Bad Request",
            "headers": {}
          }
        },
        "summary": "Get Forms v1",
        "tags": [
          "Deprecated Endpoints"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "SONIC-4011_ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Prefix the value with \"apikey \""
      },
      "SONIC-3955_ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Prefix the value with \"apikey \""
      },
      "SONIC-3856_WorkSiteSafety_ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Prefix the value with \"apikey \". Note: API key must be configured with Worksite Safety scope."
      }
    },
    "schemas": {
      "SONIC-3955_controllers.v1.messages.GetVarianceTasksResponse": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of variance tasks."
          },
          "varianceTasks": {
            "type": "array",
            "description": "A list of variance tasks.",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.VarianceTask"
            }
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.VarianceTask": {
        "type": "object",
        "properties": {
          "workflowId": {
            "type": "string",
            "description": "Unique identifier for the workflow."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date and time when the task was created."
          },
          "createdByFirstName": {
            "type": "string",
            "nullable": true,
            "description": "First name of the person who created the task."
          },
          "createdByLastName": {
            "type": "string",
            "nullable": true,
            "description": "Last name of the person who created the task."
          },
          "originalFlagResult": {
            "type": "integer",
            "nullable": true,
            "description": "The initial flag result."
          },
          "recommendedFlagResult": {
            "type": "integer",
            "nullable": true,
            "description": "The recommended flag result."
          },
          "reviewers": {
            "type": "array",
            "nullable": true,
            "description": "A list of reviewers assigned to the task.",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.VarianceReviewer"
            }
          },
          "status": {
            "type": "string",
            "nullable": true,
            "description": "Current status of the task."
          },
          "varianceEndDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "End date for the variance period."
          },
          "sites": {
            "type": "array",
            "description": "A list of sites associated with the task.",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.IdNamePair"
            }
          },
          "notes": {
            "type": "array",
            "nullable": true,
            "description": "A list of notes attached to the task.",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.Note"
            }
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.VarianceReviewer": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "ID of the reviewer."
          },
          "vote": {
            "type": "string",
            "nullable": true,
            "description": "Reviewer's vote on the variance task."
          },
          "voteDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date and time when the reviewer's vote was recorded."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the reviewer."
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.Note": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "ID of the user who created the note."
          },
          "accountId": {
            "type": "string",
            "nullable": true,
            "description": "Account ID associated with the note."
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Date and time when the note was created."
          },
          "text": {
            "type": "string",
            "description": "Content of the note."
          },
          "visibleToSupplier": {
            "type": "boolean",
            "nullable": true,
            "description": "Indicates whether the note is visible to the supplier."
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.GetTasksResponse": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total count of form tasks."
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.FormsTasks"
            }
          }
        },
        "title": "controllers.v1.messages.GetTasksResponse",
        "x-examples": {
          "Example 1": {
            "forms": [
              {
                "name": "Form Task 1",
                "supplierFormName": "Supplier Form 1",
                "workflowStatus": "Start Review",
                "supplierName": "Supplier 1",
                "supplierId": "111111111",
                "sites": [
                  {
                    "id": "101",
                    "name": "Site 1"
                  },
                  {
                    "id": "102",
                    "name": "Site 2"
                  }
                ],
                "taskId": "someId",
                "workflowStatusId": "someId",
                "questionGroupId": "someId",
                "questionGroupVersionId": "someId",
                "validStartDate": "2023-02-18T04:48:33.604Z",
                "updatedDate": "2024-03-14T20:54:51.692Z"
              }
            ]
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.FormsTasks": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "supplierFormName": {
            "type": "string"
          },
          "workflowStatus": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "supplierId": {
            "type": "string"
          },
          "sites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.IdNamePair"
            }
          },
          "taskId": {
            "type": "string"
          },
          "workflowStatusId": {
            "type": "string"
          },
          "questionGroupId": {
            "type": "string"
          },
          "questionGroupVersionId": {
            "type": "string"
          },
          "validStartDate": {
            "type": "string"
          },
          "updatedDate": {
            "type": "string"
          }
        },
        "title": "controllers.v1.messages.FormsTasks"
      },
      "SONIC-3955_controllers.v1.messages.IdNamePair": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "title": "controllers.v1.messages.IdNamePair"
      },
      "SONIC-3955_controllers.v1.messages.EsgForm": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "x-examples": {
          "Example 1": {
            "id": "30650176",
            "name": "Global Sustainability Assessment"
          }
        },
        "title": "controllers.v1.messages.EsgForm"
      },
      "SONIC-3955_controllers.v1.messages.EsgLevel": {
        "type": "object",
        "properties": {
          "level": {
            "type": "string"
          },
          "minimumScore": {
            "type": "integer"
          },
          "maximumScore": {
            "type": "integer"
          }
        },
        "x-examples": {
          "Example 1": {
            "level": "early",
            "minimumScore": 0,
            "maximumScore": 25
          }
        },
        "title": "controllers.v1.messages.EsgLevel"
      },
      "SONIC-3955_controllers.v1.messages.EsgScore": {
        "type": "object",
        "x-examples": {
          "Example 1": {
            "esgIndex": "ESG Assessment",
            "score": 94
          }
        },
        "title": "controllers.v1.messages.EsgScore",
        "properties": {
          "esgIndex": {
            "type": "string",
            "description": "The ESG index"
          },
          "score": {
            "type": "integer"
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.GetEsgScoresResponse": {
        "type": "object",
        "x-examples": {
          "Example 1": {
            "supplierId": "449b7550504943dbe888e85c",
            "supplierName": "AECOM - Americas",
            "esgScores": [
              {
                "esgIndex": "ESG Assessment",
                "score": 94
              },
              {
                "esgIndex": "VRF/SASB",
                "score": 93
              },
              {
                "esgIndex": "GRI",
                "score": 94
              },
              {
                "esgIndex": "SDG",
                "score": 94
              }
            ],
            "esgLevels": [
              {
                "level": "early",
                "minimumScore": 0,
                "maximumScore": 25
              },
              {
                "level": "learner",
                "minimumScore": 26,
                "maximumScore": 49
              },
              {
                "level": "leader",
                "minimumScore": 50,
                "maximumScore": 84
              },
              {
                "level": "innovator",
                "minimumScore": 85,
                "maximumScore": 100
              }
            ],
            "scoreTier": "Self Evaluated",
            "forms": [
              {
                "id": "30650176",
                "name": "Global Sustainability Assessment"
              },
              {
                "id": "27559469",
                "name": "Sustainability and ESG Evaluation"
              }
            ],
            "createdDate": "2022-07-11T17:06:29.72Z",
            "updatedDate": "2022-11-07T20:35:09.143Z"
          }
        },
        "title": "controllers.v1.messages.GetEsgScoresResponse",
        "properties": {
          "supplierId": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "esgScores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EsgScore"
            }
          },
          "esgLevels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EsgLevel"
            }
          },
          "scoreTier": {
            "type": "string"
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EsgForm"
            }
          },
          "createdDate": {
            "type": "string"
          },
          "updatedDate": {
            "type": "string"
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.GetSiteSupplierFlagsResponse": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer"
          },
          "flags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.getSiteSupplierFlagsResponse.SupplierFlag"
            }
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.getSiteSupplierFlagsResponse.SupplierFlag": {
        "type": "object",
        "properties": {
          "supplierMongoId": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "flagDisplayId": {
            "type": "string"
          },
          "flagMongoId": {
            "type": "string"
          },
          "flagType": {
            "type": "string",
            "enum": [
              "criteria",
              "site",
              "criteriaVariance",
              "siteVariance"
            ]
          },
          "calculationDisplayId": {
            "type": "string"
          },
          "calculationMongoId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "originalColor": {
            "type": "string",
            "enum": [
              "Green",
              "Gray",
              "Amber",
              "Red"
            ]
          },
          "newColor": {
            "type": "string",
            "enum": [
              "Green",
              "Gray",
              "Amber",
              "Red"
            ],
            "nullable": true
          },
          "hasVariance": {
            "type": "boolean"
          },
          "createdDate": {
            "type": "string"
          },
          "updatedDate": {
            "type": "string"
          },
          "varianceEndDate": {
            "type": "string",
            "nullable": true
          },
          "varianceWorkflowId": {
            "type": "string",
            "nullable": true
          },
          "shortComment": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "files": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "fileId": {
                  "type": "string"
                },
                "fileName": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "sites": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "siteMongoId": {
                  "type": "string"
                },
                "siteName": {
                  "type": "string"
                },
                "siteBillingId": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.GetSupplierFlagsResponse": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer"
          },
          "flags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.SupplierFlag"
            }
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.SupplierFlag": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "string"
          },
          "supplierName": {
            "type": "string"
          },
          "supplierStatus": {
            "type": "string"
          },
          "siteId": {
            "type": "string"
          },
          "siteName": {
            "type": "string"
          },
          "calculationId": {
            "type": "string"
          },
          "calculationDescription": {
            "type": "string"
          },
          "flagId": {
            "type": "string"
          },
          "flagType": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "isForced": {
            "type": "boolean"
          },
          "forcedBy": {
            "type": "string"
          },
          "varianceStartDate": {
            "type": "string"
          },
          "varianceEndDate": {
            "type": "string"
          },
          "createdDate": {
            "type": "string"
          },
          "updatedDate": {
            "type": "string"
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.CreateVarianceResponse": {
        "type": "object",
        "properties": {
          "flagId": {
            "type": "string"
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.GetSupplierFormsByWorkflowStatusResponse": {
        "type": "object",
        "properties": {
          "waitingonsupplier": {
            "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.WaitingOnSupplier"
          },
          "waitingonavetta": {
            "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.WaitingOnAvetta"
          },
          "variances": {
            "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.Variances"
          },
          "completed": {
            "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.Completed"
          }
        },
        "title": "controllers.v1.messages.GetSupplierFormsByWorkflowStatusResponse",
        "x-examples": {
          "Example 1": {
            "waitingonsupplier": {
              "count": 0
            },
            "waitingonavetta": {
              "count": 0
            },
            "variances": {
              "count": 0
            },
            "completed": {
              "count": 1,
              "forms": [
                {
                  "formName": "Annual Update",
                  "formId": "448e465050494333dfeabfabc",
                  "displayId": "D004",
                  "formType": "docuGuard",
                  "formStatus": "Completed",
                  "validStartDate": "2024-01-01T00:00:00Z",
                  "validEndDate": "2024-12-31T23:59:59Z",
                  "expirationDate": "2025-01-01T00:00:00Z",
                  "validDateFormat": "YYYY",
                  "statusUpdatedDate": "2024-08-15T16:30:00Z"
                }
              ]
            }
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.WaitingOnSupplier": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 0
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EnrichedSupplierForm"
            },
            "nullable": true
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.WaitingOnAvetta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 0
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EnrichedSupplierForm"
            },
            "nullable": true
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.Variances": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 0
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EnrichedSupplierForm"
            },
            "nullable": true
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.Completed": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 1
          },
          "forms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v1.messages.EnrichedSupplierForm"
            },
            "nullable": true
          }
        }
      },
      "SONIC-3955_controllers.v1.messages.EnrichedSupplierForm": {
        "type": "object",
        "properties": {
          "formName": {
            "type": "string",
            "example": "Annual Update"
          },
          "formId": {
            "type": "string",
            "example": "65924bbd390000dd7f868caa"
          },
          "displayId": {
            "type": "string",
            "example": "1"
          },
          "formType": {
            "type": "string",
            "example": "docuGuard",
            "enum": [
              "auditGuard",
              "docuGuard",
              "insureGuard"
            ]
          },
          "formStatus": {
            "type": "string",
            "example": "Completed"
          },
          "validStartDate": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T00:00:00Z"
          },
          "validEndDate": {
            "type": "string",
            "format": "date-time",
            "example": "2024-12-31T23:59:59Z"
          },
          "expirationDate": {
            "type": "string",
            "format": "date-time",
            "example": "2025-01-01T00:00:00Z"
          },
          "validDateFormat": {
            "type": "string",
            "example": "YYYY"
          },
          "statusUpdatedDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2024-05-15T14:30:00Z"
          }
        }
      },
      "SONIC-3955_controllers.v2.messages.GetSupplierFormsAndAnswersResponse": {
        "type": "object",
        "properties": {
          "supplierFormsAndAnswers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v2.messages.SupplierFormsAndAnswers"
            },
            "nullable": true
          }
        }
      },
      "SONIC-3955_controllers.v2.messages.SupplierFormsAndAnswers": {
        "type": "object",
        "properties": {
          "supplierId": {
            "type": "integer",
            "example": 250001111
          },
          "supplierName": {
            "type": "string",
            "example": "Peter's Supplies"
          },
          "formTypeId": {
            "type": "integer",
            "example": 20000
          },
          "formId": {
            "type": "integer",
            "example": 43207500
          },
          "formName": {
            "type": "string",
            "example": "United States Annual Update"
          },
          "formStatus": {
            "type": "string",
            "example": "Rejected"
          },
          "formUpdatedDate": {
            "type": "string",
            "format": "date-time",
            "example": "2025-02-01T05:28:09.235Z"
          },
          "formYear": {
            "type": "string",
            "example": "2025"
          },
          "formPeriod": {
            "type": "string",
            "example": "2024"
          },
          "clientSites": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v2.messages.ClientSiteInfo"
            }
          },
          "isActive": {
            "type": "boolean",
            "example": true
          },
          "questions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v2.messages.SupplierFormQuestion"
            }
          }
        }
      },
      "SONIC-3955_controllers.v2.messages.ClientSiteInfo": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string",
            "example": "123456"
          },
          "clientName": {
            "type": "string",
            "example": "ABC Manufacturing Site"
          }
        }
      },
      "SONIC-3955_controllers.v2.messages.SupplierFormQuestion": {
        "type": "object",
        "properties": {
          "questionId": {
            "type": "integer",
            "example": 2033
          },
          "question": {
            "type": "string",
            "example": "Did your company Does your company comply with the latest safety regulations?"
          },
          "questionTitle": {
            "type": "string",
            "example": ""
          },
          "categoryId": {
            "type": "integer",
            "example": 1153
          },
          "categoryName": {
            "type": "string",
            "example": "Safety Compliance"
          },
          "answerDataType": {
            "type": "string",
            "example": "text"
          },
          "answerDataPointType": {
            "type": "string",
            "example": "question"
          },
          "answer": {
            "$ref": "#/components/schemas/SONIC-3955_controllers.v2.messages.SupplierFormAnswer"
          }
        }
      },
      "SONIC-3955_controllers.v2.messages.SupplierFormAnswer": {
        "type": "object",
        "properties": {
          "values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_controllers.v2.messages.FormAnswerValue"
            }
          },
          "answerUpdatedDate": {
            "type": "string",
            "format": "date-time",
            "example": "2025-02-01T05:26:56.085Z"
          },
          "answerComment": {
            "type": "string",
            "example": "Supporting document attached for compliance verification."
          }
        }
      },
      "SONIC-3955_controllers.v2.messages.FormAnswerValue": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "example": "Yes"
          },
          "href": {
            "type": "string",
            "example": "https://api.avetta.com/api/v1/files/250550011/2025-01-20T10:55:39.429Z~~*NoBiMH9jbHD2XYj1FHJoX3dvcmtlcnNfY29tcGVuc2U0aK9uLnBkZg==?questionId=2072"
          }
        }
      },
      "SONIC-3955_GetExternalIdsResponse": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "externalIds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "supplierId": {
                  "type": "string"
                },
                "supplierName": {
                  "type": "string"
                },
                "clientId": {
                  "type": "string"
                },
                "externalId": {
                  "type": "string"
                },
                "externalIdType": {
                  "type": "string",
                  "nullable": true
                },
                "clientName": {
                  "type": "string"
                },
                "hierarchyLevel": {
                  "type": "string",
                  "enum": [
                    "hub",
                    "site",
                    "corporate"
                  ]
                },
                "updatedDate": {
                  "type": "string",
                  "nullable": true
                },
                "updatedByUserEmail": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "supplierId",
                "supplierName",
                "clientId",
                "externalId",
                "clientName",
                "hierarchyLevel"
              ]
            }
          }
        },
        "required": [
          "totalCount",
          "externalIds"
        ]
      },
      "SONIC-3955_SupplierProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "dbaNames": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "accountStatus": {
            "type": "string",
            "enum": [
              "active",
              "pending",
              "deactivated"
            ]
          },
          "website": {
            "type": "string"
          },
          "primaryContact": {
            "properties": {
              "id": {
                "type": "number"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string",
                "nullable": true
              },
              "fax": {
                "type": "string",
                "nullable": true
              },
              "language": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "userId",
              "firstName",
              "lastName",
              "email",
              "language"
            ]
          },
          "billingAddress": {
            "properties": {
              "addressLine1": {
                "type": "string",
                "nullable": true
              },
              "city": {
                "type": "string",
                "nullable": true
              },
              "state": {
                "type": "string",
                "nullable": true
              },
              "postalCode": {
                "type": "string",
                "nullable": true
              },
              "country": {
                "type": "string"
              }
            },
            "required": [
              "country"
            ]
          },
          "location": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "addressLine1": {
                  "type": "string",
                  "nullable": true
                },
                "city": {
                  "type": "string",
                  "nullable": true
                },
                "state": {
                  "type": "string",
                  "nullable": true
                },
                "postalCode": {
                  "type": "string",
                  "nullable": true
                },
                "country": {
                  "type": "string"
                }
              }
            }
          },
          "serviceAreas": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "addressLine1": {
                  "type": "string",
                  "nullable": true
                },
                "city": {
                  "type": "string",
                  "nullable": true
                },
                "state": {
                  "type": "string",
                  "nullable": true
                },
                "postalCode": {
                  "type": "string",
                  "nullable": true
                },
                "country": {
                  "type": "string"
                }
              }
            }
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "updatedDate": {
            "type": "string",
            "format": "date-time"
          },
          "diversity": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "externalId": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "clientId": {
                  "type": "number",
                  "nullable": true
                },
                "type": {
                  "type": "string",
                  "nullable": true
                },
                "value": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          },
          "businessNumbers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "type",
                "value"
              ]
            }
          },
          "authorizations": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "authorizationCategory": {
                  "type": "string"
                },
                "authorizationType": {
                  "type": "string"
                },
                "issuingAuthority": {
                  "type": "string",
                  "nullable": true
                },
                "licenseNumber": {
                  "type": "string"
                },
                "expirationDate": {
                  "type": "string"
                },
                "files": {
                  "type": "array",
                  "nullable": true,
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "clientTags": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayId": {
                  "type": "string",
                  "nullable": true
                },
                "appliedDate": {
                  "type": "string",
                  "nullable": true
                },
                "appliedByUserId": {
                  "type": "string",
                  "nullable": true
                },
                "appliedByFirstName": {
                  "type": "string",
                  "nullable": true
                },
                "appliedByLastName": {
                  "type": "string",
                  "nullable": true
                },
                "name": {
                  "type": "string",
                  "nullable": true
                },
                "internal": {
                  "type": "string",
                  "nullable": true
                },
                "createdByClientId": {
                  "type": "string",
                  "nullable": true
                },
                "createdByClientName": {
                  "type": "string",
                  "nullable": true
                },
                "visibleToContractor": {
                  "type": "boolean",
                  "nullable": true
                }
              }
            }
          },
          "supplierSettings": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "string"
            }
          },
          "trades": {
            "type": "array",
            "nullable": true,
            "items": {
              "type": "object",
              "properties": {
                "tradeId": {
                  "type": "string"
                },
                "primary": {
                  "type": "boolean"
                },
                "selfPerformed": {
                  "type": "boolean"
                },
                "manufacture": {
                  "type": "boolean"
                },
                "activityPercent": {
                  "type": "string"
                },
                "displayText": {
                  "type": "string",
                  "nullable": true
                },
                "taxonomyName": {
                  "type": "string",
                  "nullable": true
                },
                "tradeCode": {
                  "type": "string",
                  "nullable": true
                }
              }
            }
          }
        },
        "required": [
          "id",
          "name",
          "dbaNames",
          "description",
          "accountStatus",
          "website",
          "primaryContact",
          "billingAddress",
          "createdDate",
          "updatedDate",
          "diversity",
          "externalId",
          "businessNumbers"
        ]
      },
      "SONIC-3955_GetJobCategoriesResponse": {
        "type": "object",
        "properties": {
          "jobCategories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_JobCategory"
            }
          }
        },
        "required": [
          "jobCategories"
        ]
      },
      "SONIC-3955_JobCategory": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayText": {
            "type": "string"
          },
          "jobRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3955_JobRole"
            }
          }
        },
        "required": [
          "id",
          "displayText",
          "jobRoles"
        ]
      },
      "SONIC-3955_JobRole": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayText": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "displayText"
        ]
      },
      "SONIC-3955_GetUserProfileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "displayId": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "department": {
            "type": "string"
          },
          "jobCategoryId": {
            "type": "string"
          },
          "jobRoleId": {
            "type": "string"
          },
          "dateFormat": {
            "type": "string"
          },
          "profileImageUrl": {
            "type": "string"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastLogin": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id"
        ]
      },
      "SONIC-3955_GetClientProfileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "billingId": {
            "type": "string"
          },
          "accountTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "admin",
                "client",
                "supplier"
              ]
            },
            "nullable": true
          },
          "hierarchyLevel": {
            "type": "string",
            "enum": [
              "hub",
              "site",
              "corporate"
            ],
            "nullable": true
          }
        },
        "required": [
          "id"
        ]
      },
      "SONIC-3955_SupplierProfiles": {
        "properties": {
          "totalCount": {
            "type": "integer"
          },
          "suppliers": {
            "type": "array",
            "items": {
              "properties": {
                "id": {
                  "type": "number"
                },
                "name": {
                  "type": "string"
                },
                "dbaNames": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "website": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "primaryContact": {
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "email": {
                      "type": "string"
                    },
                    "phoneNumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "faxNumber": {
                      "type": "string",
                      "nullable": true
                    },
                    "isPrimary": {
                      "type": "boolean"
                    },
                    "type": {
                      "type": "string"
                    }
                  }
                },
                "billingAddress": {
                  "properties": {
                    "addressLine1": {
                      "type": "string",
                      "nullable": true
                    },
                    "city": {
                      "type": "string",
                      "nullable": true
                    },
                    "state": {
                      "type": "string",
                      "nullable": true
                    },
                    "postalCode": {
                      "type": "string",
                      "nullable": true
                    },
                    "country": {
                      "type": "string",
                      "nullable": true
                    },
                    "poBox": {
                      "type": "string",
                      "nullable": true
                    },
                    "suiteNumber": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "numberOfEmployees": {
                  "type": "number"
                },
                "accountStatus": {
                  "type": "string",
                  "enum": [
                    "active",
                    "pending",
                    "deactivated"
                  ]
                },
                "updatedDate": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "name",
                "dbaNames",
                "description",
                "accountStatus",
                "website",
                "primaryContact",
                "billingAddress",
                "createdDate",
                "updatedDate",
                "diversity",
                "externalId",
                "businessNumbers"
              ]
            }
          }
        }
      },
      "SONIC-3955_FullHierarchyResponse": {
        "properties": {
          "clientId": {
            "type": "integer",
            "format": "int64"
          },
          "clientName": {
            "type": "string"
          },
          "hierarchyLevel": {
            "type": "string"
          },
          "children": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "clientId",
          "clientName",
          "hierarchyLevel",
          "children"
        ]
      },
      "SONIC-3955_GetClientHierarchyImmediateChildrenResponse": {
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "children": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "SONIC-3955_SearchClientSitesResponse": {
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "sites": {
            "type": "array",
            "items": {
              "properties": {
                "siteMongoId": {
                  "type": "string"
                },
                "siteBillingId": {
                  "type": "string"
                },
                "siteName": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "SONIC-3955_SearchClientSuppliersResponse": {
        "properties": {
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "suppliers": {
            "type": "array",
            "items": {
              "properties": {
                "supplierMongoId": {
                  "type": "string"
                },
                "supplierBillingId": {
                  "type": "string"
                },
                "supplierName": {
                  "type": "string"
                },
                "sites": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "siteMongoId": {
                        "type": "string"
                      },
                      "siteBillingId": {
                        "type": "string"
                      },
                      "siteName": {
                        "type": "string"
                      },
                      "supplierSiteFlagColor": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "siteMongoId",
                      "siteBillingId",
                      "siteName",
                      "supplierSiteFlagColor"
                    ]
                  }
                }
              },
              "required": [
                "supplierMongoId",
                "supplierDisplayId",
                "supplierName",
                "sites"
              ]
            }
          }
        }
      },
      "SONIC-3955_UpdateUserProfileResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "phoneNumber": {
            "type": "string"
          },
          "faxNumber": {
            "type": "string"
          },
          "jobCategoryId": {
            "type": "string"
          },
          "jobRoleId": {
            "type": "string"
          },
          "department": {
            "type": "string"
          },
          "dateFormat": {
            "type": "string"
          },
          "profileImageUrl": {
            "type": "string"
          }
        }
      },
      "SONIC-3856_UpdateAssignedUsersRequest": {
        "type": "object",
        "required": [
          "usersToBeAdded",
          "usersToBeRemoved"
        ],
        "properties": {
          "usersToBeAdded": {
            "type": "array",
            "description": "List of user IDs to be assigned to the work request",
            "items": {
              "type": "string"
            },
            "example": [
              "4802531"
            ]
          },
          "usersToBeRemoved": {
            "type": "array",
            "description": "List of user IDs to be removed from the work request",
            "items": {
              "type": "string"
            },
            "example": []
          }
        }
      },
      "SONIC-3856_GatewayErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "1"
          },
          "service": {
            "type": "string",
            "example": "Gateway"
          },
          "message": {
            "type": "string",
            "example": "Api Key Not Found"
          },
          "displayMessage": {
            "type": "string",
            "example": "Api Key Not Found"
          }
        }
      },
      "SONIC-3856_SupplierUsersResponse": {
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of supplier users available",
            "example": 1
          },
          "supplierName": {
            "type": "string",
            "description": "The name of the assigned supplier",
            "example": "demoClient^^^Worksite Safety WSS - UT01"
          },
          "supplierBillingId": {
            "type": "string",
            "description": "The billing ID of the assigned supplier",
            "example": "250410673"
          },
          "users": {
            "type": "array",
            "description": "List of supplier users",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_SupplierUser"
            }
          }
        },
        "required": [
          "totalCount",
          "supplierName",
          "supplierBillingId",
          "users"
        ]
      },
      "SONIC-3856_SupplierUser": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The unique identifier of the user",
            "example": "234087"
          },
          "firstName": {
            "type": "string",
            "description": "The user's first name",
            "example": "Nick"
          },
          "lastName": {
            "type": "string",
            "description": "The user's last name",
            "example": "Arcifa"
          },
          "userEmail": {
            "type": "string",
            "nullable": true,
            "description": "The user's email address (may be null)",
            "example": "arcifa@domain.com"
          }
        },
        "required": [
          "userId",
          "firstName",
          "lastName",
          "userEmail"
        ]
      },
      "SONIC-3856_GetAssignedUsersResponse": {
        "type": "object",
        "required": [
          "totalCount",
          "supplierName",
          "supplierBillingId",
          "users"
        ],
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "The total number of assigned users"
          },
          "workRequestName": {
            "type": "string",
            "nullable": true,
            "description": "The name of the work request"
          },
          "supplierName": {
            "type": "string",
            "description": "The name of the supplier"
          },
          "supplierBillingId": {
            "type": "string",
            "description": "The billing ID of the supplier"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_User"
            }
          }
        }
      },
      "SONIC-3856_User": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "The unique identifier of the assigned user"
          },
          "firstName": {
            "type": "string",
            "description": "The first name of the assigned user"
          },
          "lastName": {
            "type": "string",
            "description": "The last name of the assigned user"
          },
          "userType": {
            "type": "string",
            "enum": [
              "connectSupplier",
              "workerManagementWorker",
              "workforceManagementWorker"
            ],
            "description": "The type of user provider"
          }
        }
      },
      "SONIC-3856_GetWorkRequestQuestionsAnswersResponse": {
        "type": "object",
        "description": "Response containing work request questions and answers data",
        "properties": {
          "workRequestId": {
            "type": "string",
            "description": "Unique identifier for the work request",
            "example": "445755"
          },
          "workRequestName": {
            "type": "string",
            "description": "Name of the work request",
            "example": "Test WR"
          },
          "workRequestCategories": {
            "type": "array",
            "description": "Array of categories with questions and answers",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_CategoryWithAnswers"
            }
          },
          "forms": {
            "type": "array",
            "description": "Array of forms added for this work request",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_FormWithAnswers"
            }
          }
        },
        "required": [
          "workRequestId",
          "workRequestName",
          "workRequestCategories"
        ]
      },
      "SONIC-3856_FormWithAnswers": {
        "type": "object",
        "description": "Form containing categories of questions and answers",
        "properties": {
          "formId": {
            "type": "string",
            "description": "Unique identifier for the form",
            "example": "46896"
          },
          "formName": {
            "type": "string",
            "description": "Name of the form",
            "example": "Risk Assessment"
          },
          "categories": {
            "type": "array",
            "description": "Array of question categories within this form",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_CategoryWithAnswers"
            }
          }
        },
        "required": [
          "formId",
          "formName",
          "categories"
        ]
      },
      "SONIC-3856_CategoryWithAnswers": {
        "type": "object",
        "description": "Category containing questions and their answers",
        "properties": {
          "categoryId": {
            "type": "string",
            "description": "Unique identifier for the category",
            "example": "45500"
          },
          "categoryName": {
            "type": "string",
            "description": "Name of the category",
            "example": "Work Request Details"
          },
          "isRepeatable": {
            "type": "boolean",
            "description": "Whether this category can be repeated",
            "example": false
          },
          "questionsAndAnswers": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SONIC-3856_AnswersContainer"
              },
              {
                "type": "array",
                "items": {},
                "example": []
              }
            ],
            "description": "Container for answers (object for non-repeatable, array for repeatable categories)"
          }
        },
        "required": [
          "categoryId",
          "categoryName",
          "isRepeatable",
          "questionsAndAnswers"
        ]
      },
      "SONIC-3856_AnswersContainer": {
        "type": "object",
        "description": "Container for question answers",
        "properties": {
          "answers": {
            "type": "array",
            "description": "Array of question answers",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_QuestionAnswerValue"
            }
          }
        },
        "required": [
          "answers"
        ]
      },
      "SONIC-3856_QuestionAnswerValue": {
        "type": "object",
        "description": "Question with its answer values",
        "properties": {
          "questionId": {
            "type": "string",
            "description": "Unique identifier for the question",
            "example": "168846"
          },
          "values": {
            "type": "array",
            "description": "Array of answer values for this question",
            "items": {
              "type": "string"
            },
            "example": [
              "WSS demo"
            ]
          }
        },
        "required": [
          "questionId",
          "values"
        ]
      },
      "SONIC-3856_UpsertWorkRequestAnswersRequest": {
        "type": "object",
        "description": "Request body for upserting work request answers",
        "properties": {
          "categories": {
            "type": "array",
            "description": "Array of categories containing question answers",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_CategoryAnswers"
            }
          }
        },
        "required": [
          "categories"
        ]
      },
      "SONIC-3856_CategoryAnswers": {
        "type": "object",
        "description": "Category containing question answers",
        "properties": {
          "categoryId": {
            "type": "string",
            "description": "Unique identifier for the category",
            "example": "46896"
          },
          "questionAnswers": {
            "type": "array",
            "description": "Array of question answers within this category",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_QuestionAnswer"
            }
          }
        },
        "required": [
          "categoryId",
          "questionAnswers"
        ]
      },
      "SONIC-3856_QuestionAnswer": {
        "type": "object",
        "description": "Question with its corresponding answers",
        "properties": {
          "questionId": {
            "type": "string",
            "description": "Unique identifier for the question",
            "example": "177802"
          },
          "answers": {
            "type": "array",
            "description": "Array of answers for this question",
            "items": {
              "type": "string"
            },
            "example": [
              "This is for testing purposes"
            ]
          }
        },
        "required": [
          "questionId",
          "answers"
        ]
      },
      "SONIC-3856_UpsertWorkRequestAnswersResponse": {
        "type": "object",
        "description": "Response after successfully upserting work request answers",
        "properties": {
          "message": {
            "type": "string",
            "description": "Success message",
            "example": "Work Request(s) updated successfully"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL to access the updated work request",
            "example": "https://apso-app.avetta.com/avt-cli/processes/68add8236383c26ae7658898"
          }
        },
        "required": [
          "message",
          "url"
        ]
      },
      "SONIC-3856_CreateWorkRequestRequest": {
        "type": "object",
        "description": "Request body for creating a new work request",
        "properties": {
          "projectId": {
            "type": "string",
            "description": "Unique project identifier (must be created and active)",
            "example": "68891f1ba86cf933395a2396"
          },
          "supplierId": {
            "type": "string",
            "description": "Supplier identifier (must have proper connection to hierarchy)",
            "example": "5d91248c400000c4f3343ceb"
          },
          "siteIds": {
            "type": "array",
            "description": "Array of site identifiers (must belong to the hierarchy associated with clientId)",
            "items": {
              "type": "string"
            },
            "example": [
              "65b7f2734f0000c30022f4ff"
            ]
          },
          "work-request-name": {
            "type": "string",
            "description": "Name of the work request",
            "example": "Test WR"
          },
          "user": {
            "type": "string",
            "description": "User creating the work request",
            "example": "John Doe"
          }
        },
        "required": [
          "projectId",
          "supplierId",
          "siteIds",
          "work-request-name",
          "user"
        ]
      },
      "SONIC-3856_GetWorkRequestQuestionsResponse": {
        "type": "object",
        "description": "Response containing work request questions data",
        "properties": {
          "workRequestId": {
            "type": "string",
            "description": "Unique identifier for the work request",
            "example": "68add8236383c26ae7658898"
          },
          "workRequestName": {
            "type": "string",
            "description": "Name of the work request",
            "example": "wmint"
          },
          "workRequestCategories": {
            "type": "array",
            "description": "Array of question categories",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_QuestionCategory"
            }
          },
          "forms": {
            "type": "array",
            "description": "Array of forms added to the work request",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_Form"
            }
          },
          "isEditable": {
            "type": "boolean",
            "description": "Indicates whether the work request is in a state in which it's questions could be answered.",
            "example": true
          }
        },
        "required": [
          "workRequestId",
          "workRequestName",
          "workRequestCategories",
          "isEditable"
        ]
      },
      "SONIC-3856_Form": {
        "type": "object",
        "description": "Form containing categories of questions",
        "properties": {
          "formId": {
            "type": "string",
            "description": "Unique identifier for the form",
            "example": "46896"
          },
          "formName": {
            "type": "string",
            "description": "Name of the form",
            "example": "Risk Assessment"
          },
          "categories": {
            "type": "array",
            "description": "Array of categories within this form",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_QuestionCategory"
            }
          },
          "isEditable": {
            "type": "boolean",
            "description": "Indicates whether the form is in a state in which it can be edited by the user",
            "example": true
          }
        },
        "required": [
          "formId",
          "formName",
          "categories",
          "isEditable"
        ]
      },
      "SONIC-3856_QuestionCategory": {
        "type": "object",
        "description": "Category containing related questions",
        "properties": {
          "categoryId": {
            "type": "string",
            "description": "Unique identifier for the category",
            "example": "46896"
          },
          "categoryName": {
            "type": "string",
            "description": "Name of the category",
            "example": "Work Request Details"
          },
          "isRepeatable": {
            "type": "boolean",
            "description": "Whether this category can be repeated",
            "example": false
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether questions in this category are editable by the user",
            "example": true
          },
          "questions": {
            "type": "array",
            "description": "Array of questions within this category",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_Question"
            }
          }
        },
        "required": [
          "categoryId",
          "categoryName",
          "isEditable",
          "questions"
        ]
      },
      "SONIC-3856_Question": {
        "type": "object",
        "description": "Individual question details",
        "properties": {
          "questionId": {
            "type": "string",
            "description": "Unique identifier for the question",
            "example": "177802"
          },
          "question": {
            "type": "string",
            "description": "The question text",
            "example": "Work Request Details:"
          },
          "questionType": {
            "type": "string",
            "description": "Type of question response expected",
            "enum": [
              "longText",
              "shortText",
              "multipleChoice",
              "dateRangeWithZone",
              "fileUpload"
            ],
            "example": "longText"
          },
          "responseOptions": {
            "type": "array",
            "description": "Available response options for multiple choice questions",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_ResponseOption"
            },
            "example": []
          },
          "isRequired": {
            "type": "boolean",
            "description": "Whether this question is required to be answered",
            "example": true
          },
          "isEditable": {
            "type": "boolean",
            "description": "Whether this question is able to be answered",
            "example": true
          }
        },
        "required": [
          "questionId",
          "question",
          "questionType",
          "responseOptions",
          "isRequired",
          "isEditable"
        ]
      },
      "SONIC-3856_ResponseOption": {
        "type": "object",
        "description": "Response option for multiple choice questions",
        "properties": {
          "displayText": {
            "type": "string",
            "description": "Text displayed to the user",
            "example": "Yes"
          },
          "storageValue": {
            "type": "string",
            "description": "Value stored when this option is selected",
            "example": "1"
          }
        },
        "required": [
          "displayText",
          "storageValue"
        ]
      },
      "SONIC-3856_GetWorkRequestsResponse": {
        "type": "object",
        "description": "Response containing work requests data",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of work requests available",
            "example": 1
          },
          "workRequests": {
            "type": "array",
            "description": "Array of work requests",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_WorkRequest"
            }
          }
        },
        "required": [
          "totalCount",
          "workRequests"
        ]
      },
      "SONIC-3856_WorkRequest": {
        "type": "object",
        "description": "Work request details",
        "properties": {
          "projectId": {
            "type": "string",
            "description": "Unique identifier for the project",
            "example": "427603"
          },
          "projectName": {
            "type": "string",
            "description": "Name of the project",
            "example": "wmint"
          },
          "siteId": {
            "type": "string",
            "description": "Site identifier",
            "example": "250410673"
          },
          "supplierId": {
            "type": "string",
            "description": "Supplier identifier",
            "example": "250028423"
          },
          "workRequestId": {
            "type": "string",
            "description": "Unique identifier for the work request",
            "example": "427605"
          },
          "workRequestName": {
            "type": "string",
            "description": "Name of the work request",
            "example": "wmint"
          },
          "workRequestStatus": {
            "type": "string",
            "description": "Current status of the work request",
            "example": "In Progress"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the work request was created",
            "example": "2025-08-26T15:52:03.741Z"
          },
          "updatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the work request was last updated",
            "example": "2025-08-26T16:17:21.694Z"
          }
        },
        "required": [
          "projectId",
          "projectName",
          "siteId",
          "supplierId",
          "workRequestId",
          "workRequestName",
          "workRequestStatus",
          "createdDate",
          "updatedDate"
        ]
      },
      "SONIC-3856_GetProjectTemplatesResponse": {
        "type": "object",
        "description": "Response containing project templates data",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of project templates available",
            "example": 1
          },
          "templates": {
            "type": "array",
            "description": "Array of project templates",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_ProjectTemplate"
            }
          }
        },
        "required": [
          "totalCount",
          "templates"
        ]
      },
      "SONIC-3856_ProjectTemplate": {
        "type": "object",
        "description": "Project template details",
        "properties": {
          "templateId": {
            "type": "string",
            "description": "Unique identifier for the project template",
            "example": "68af3d0599450f37bbe9a2fc"
          },
          "accountId": {
            "type": "string",
            "description": "Account identifier associated with the template",
            "example": "250410663"
          },
          "templateName": {
            "type": "string",
            "description": "Name of the project template",
            "example": "Caterpillar Project"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the template was created",
            "example": "2025-08-27T17:14:45.744Z"
          },
          "updatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the template was last updated",
            "example": "2025-08-27T17:14:45.744Z"
          }
        },
        "required": [
          "templateId",
          "accountId",
          "templateName",
          "createdDate",
          "updatedDate"
        ]
      },
      "SONIC-3856_GetProjectsResponse": {
        "type": "object",
        "description": "Response containing projects data",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of projects available",
            "example": 151
          },
          "projects": {
            "type": "array",
            "description": "Array of projects",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_Project"
            }
          }
        },
        "required": [
          "totalCount",
          "projects"
        ]
      },
      "SONIC-3856_Project": {
        "type": "object",
        "description": "Project details",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the project",
            "example": "688935a12b483c201e473e78"
          },
          "projectName": {
            "type": "string",
            "description": "Name of the project",
            "example": "Test"
          },
          "isActive": {
            "type": "boolean",
            "description": "Whether the project is currently active",
            "example": true
          },
          "projectTemplateId": {
            "type": "string",
            "description": "Identifier of the project template used",
            "example": "687fed2f44a5846c03f5be03"
          },
          "projectTemplateName": {
            "type": "string",
            "description": "Name of the project template",
            "example": "GM Test Project - Client Close"
          },
          "createdDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the project was created",
            "example": "2025-07-29T20:57:05.213Z"
          },
          "updatedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the project was last updated",
            "example": "2025-07-29T20:57:05.562Z"
          }
        },
        "required": [
          "id",
          "projectName",
          "isActive",
          "createdDate",
          "updatedDate"
        ]
      },
      "SONIC-3856_CreateWorkRequestResponse": {
        "type": "object",
        "description": "Response after successfully creating a work request",
        "properties": {
          "workRequest": {
            "type": "string",
            "description": "Unique identifier for the created work request",
            "example": "688a5808a86cf933395a239c"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL to access the created work request",
            "example": "https://app.avetta.com/avt-cli/processes/688a5808a86cf933395a239c"
          }
        },
        "required": [
          "workRequest",
          "url"
        ]
      },
      "SONIC-3856_CreateProjectRequest": {
        "type": "object",
        "description": "Request body for creating a new project",
        "properties": {
          "projectName": {
            "type": "string",
            "description": "Name of the project to be created",
            "example": "Test Project"
          },
          "templateId": {
            "type": "string",
            "description": "Unique identifier of the project template to use",
            "example": "68af3d0599450f37bbe9a2fc"
          }
        },
        "required": [
          "projectName",
          "templateId"
        ]
      },
      "SONIC-3856_CreateProjectResponse": {
        "type": "object",
        "description": "Response after successfully creating a project",
        "properties": {
          "project": {
            "type": "string",
            "description": "Unique identifier for the created project",
            "example": "434710"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "URL to access the created project",
            "example": "https://apso-app.avetta.com/avt-cli/processes/68bae9602342b50861bad961"
          }
        },
        "required": [
          "project",
          "url"
        ]
      },
      "SONIC-3856_GetAvailableFormsResponse": {
        "type": "object",
        "required": [
          "availableForms"
        ],
        "properties": {
          "availableForms": {
            "type": "array",
            "description": "List of form templates that can be created for the work request.",
            "items": {
              "$ref": "#/components/schemas/SONIC-3856_AvailableForm"
            }
          }
        }
      },
      "SONIC-3856_AvailableForm": {
        "type": "object",
        "required": [
          "formName",
          "formTemplateId"
        ],
        "properties": {
          "formName": {
            "type": "string",
            "description": "Display name of the form template.",
            "example": "Risk Observation"
          },
          "formTemplateId": {
            "type": "string",
            "description": "Unique identifier of the form template.",
            "example": "68191fcb858bfe0c34c12277"
          }
        }
      },
      "SONIC-3856_AuthenticationErrorResponse": {
        "type": "object",
        "description": "Authentication error response",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message describing the authentication failure",
            "example": "Could not authenticate request."
          },
          "code": {
            "type": "string",
            "description": "Specific error code for authentication failures",
            "example": "AUTH.102"
          }
        },
        "required": [
          "message",
          "code"
        ]
      },
      "SONIC-3856_ErrorResponse": {
        "type": "object",
        "description": "Standard error response format",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message",
            "example": "Invalid client ID provided"
          },
          "code": {
            "type": "string",
            "description": "Error code for programmatic handling",
            "example": "WSS.400.001"
          },
          "details": {
            "type": "object",
            "description": "Additional error details",
            "additionalProperties": true,
            "example": {
              "field": "clientId",
              "reason": "Client ID does not exist in hierarchy"
            }
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the error occurred",
            "example": "2025-01-31T10:30:00Z"
          },
          "requestId": {
            "type": "string",
            "description": "Unique request identifier for tracking",
            "example": "req-12345678-abcd-ef90"
          }
        },
        "required": [
          "error",
          "code",
          "timestamp"
        ]
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Compliance",
      "tags": [
        "Compliance"
      ]
    },
    {
      "name": "Account",
      "tags": [
        "Account"
      ]
    },
    {
      "name": "Worksite Safety",
      "tags": [
        "Worksite-Safety"
      ]
    },
    {
      "name": "Deprecated Endpoints",
      "tags": [
        "Deprecated Endpoints",
        "Error Handling"
      ]
    }
  ]
}