{
  "openapi": "3.1.0",
  "info": {
    "x-metadata": {
      "status": "published",
      "tags": [
        "Featured"
      ]
    },
    "version": "1.0.0",
    "license": {
      "name": "Proprietary"
    },
    "title": "Global Monitoring",
    "description": "\nThe Global Monitoring API provides a suite of endpoints to Monitor changes to Company Information. Company changes can be retrieved by creating a Portfolio\n(a collection of companies) and configuring the eventRules (the criteria in which to trigger a change, e.g. company name changes, limit changes) \non the portfolio. When a company in your Portfolio changes to satisfy an eventRule, a notificationEvent will be raised to inform\nyou of the nature of the change. See here for Creditsafe's Global Monitoring capabilities.\n\n{% admonition type=\"info\" name=\"OAS 3.0.4 Trial Availability\" %}\n  The OAS 3.0.4 version of this API specification is provided for trial purposes only. While every effort is made to ensure its accuracy, the OAS 3.1.0 version is the primary managed and maintained specification and is recommended for all integrations and production use.\n{% /admonition %}\n"
  },
  "tags": [
    {
      "name": "Authentication",
      "description": "Endpoints to authenticate and generate an Authentication Token."
    },
    {
      "name": "User Details",
      "description": "Endpoints to retrieve user-specific details, such as user profiles and permissions."
    },
    {
      "name": "Create and View All Portfolios",
      "description": "Endpoints to create new portfolios and retrieve a list of all existing portfolios for monitoring."
    },
    {
      "name": "Importing Portfolios",
      "description": "Endpoints to bulk manage portfolios by importing companies using files in supported formats (e.g., CSV)."
    },
    {
      "name": "User Management of Portfolios",
      "description": "Endpoints to manage portfolios at a user level, including updating/deleting portfolio details, managing associated notifications and share portfolios with other users."
    },
    {
      "name": "Individual Portfolio Management",
      "description": "Endpoints to manage specific portfolios, such as adding or removing companies, applying event rules, and viewing portfolio-specific data."
    },
    {
      "name": "Event Rules and Notifications",
      "description": "Endpoints to view event rules for monitoring and retrieve notifications triggered by changes in monitored companies."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Authentication",
      "tags": [
        "Authentication"
      ]
    },
    {
      "name": "Administration",
      "tags": [
        "User Details"
      ]
    },
    {
      "name": "Portfolio Management",
      "tags": [
        "Create and View All Portfolios",
        "Importing Portfolios",
        "User Management of Portfolios",
        "Individual Portfolio Management"
      ]
    },
    {
      "name": "Monitoring Rules and Notifications",
      "tags": [
        "Event Rules and Notifications"
      ]
    }
  ],
  "servers": [
    {
      "url": "https://connect.sandbox.creditsafe.com/v1",
      "description": "Sandbox server"
    },
    {
      "url": "https://connect.creditsafe.com/v1",
      "description": "Production server"
    }
  ],
  "paths": {
    "/authenticate": {
      "post": {
        "operationId": "authenticate",
        "summary": "Authenticate",
        "security": [],
        "tags": [
          "Authentication"
        ],
        "description": "Supply your username and password to get an authentication token. Send the token in the `Authorization` header of every other request, as `Bearer <token>`. A token expires after one hour, so request a new one before then. See [Authentication](https://doc.creditsafe.com/connect-apis-catalog/information/authentication).\n\nFailed logins are rate limited. After 5 invalid requests within 2 minutes, further requests get `429` until the 2 minutes have passed. The `RateLimit-remaining` response header shows how many attempts are left. See [Rate Limiting](https://doc.creditsafe.com/connect-apis-catalog/information/ratelimiting).",
        "requestBody": {
          "required": true,
          "description": "Your Connect username and password.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectAuthenticationAuthRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Returns the authentication token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectAuthenticationAuthResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The response has one of two shapes. If `username` or `password` is missing, empty or not a string, the login service returns a validation error with `ValidationErrors`. If the body isn't valid JSON, the gateway returns the standard Connect error body.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "description": "Validation error from the login service.",
                      "required": [
                        "ValidationErrors"
                      ],
                      "properties": {
                        "ValidationErrors": {
                          "type": "array",
                          "description": "One entry for each field that failed validation.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "Name": {
                                "type": "string",
                                "description": "The field that failed validation, for example `Password`."
                              },
                              "Description": {
                                "type": "string",
                                "description": "Why the field failed validation."
                              }
                            }
                          }
                        },
                        "Type": {
                          "type": "string",
                          "description": "A link that identifies the error type."
                        },
                        "Title": {
                          "type": "string",
                          "description": "A short summary of the error."
                        },
                        "Status": {
                          "type": "integer",
                          "description": "The HTTP status code, `400`."
                        },
                        "Detail": {
                          "type": "string",
                          "description": "More detail about the error."
                        },
                        "Instance": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Always `null`."
                        },
                        "Extensions": {
                          "type": "object",
                          "description": "Always an empty object."
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                    }
                  ]
                },
                "examples": {
                  "missingFields": {
                    "summary": "Username and password missing",
                    "value": {
                      "ValidationErrors": [
                        {
                          "Name": "Password",
                          "Description": "The Password field is required."
                        },
                        {
                          "Name": "Username",
                          "Description": "The Username field is required."
                        }
                      ],
                      "Type": "https://httpstatuses.com/400",
                      "Title": "Validation Error",
                      "Status": 400,
                      "Detail": "See ValidationErrors for details",
                      "Instance": null,
                      "Extensions": {}
                    }
                  },
                  "invalidJson": {
                    "summary": "The body isn't valid JSON",
                    "value": {
                      "correlationId": "8eac0cce-bfe5-4962-ae15-8578c7effece",
                      "message": "Bad Request",
                      "details": "Invalid JSON in request body"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The username or password is wrong. Usernames and passwords are case sensitive.",
            "headers": {
              "RateLimit-remaining": {
                "description": "How many more invalid login attempts are allowed before requests are rate limited.",
                "schema": {
                  "type": "integer",
                  "example": 4
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectAuthFailedResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests. Too many invalid login attempts in a short time. Wait 2 minutes before trying again.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Why the request was refused."
                    }
                  }
                },
                "example": {
                  "message": "You sent too many requests. Please wait a while then try again"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/user/details": {
      "get": {
        "tags": [
          "User Details"
        ],
        "description": "You would use this endpoint to retrieve the user details related to the Global Monitoring product, such as the user's information.",
        "operationId": "monitoringUserDetails",
        "summary": "Monitoring User Details",
        "responses": {
          "200": {
            "description": "Success. Returns the user's Global Monitoring account details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringUserDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios": {
      "get": {
        "tags": [
          "Create and View All Portfolios"
        ],
        "description": "This endpoint allows you to manage portfolios. You can use the GET method to retrieve all portfolios associated with the user.",
        "operationId": "listAllPortfolios",
        "summary": "List All Portfolios",
        "parameters": [
          {
            "name": "searchQuery",
            "in": "query",
            "description": "Return portfolios that match the given value",
            "schema": {
              "type": "string"
            },
            "example": "Customers"
          },
          {
            "$ref": "#/components/parameters/gmPage"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the portfolios the user owns and the portfolios shared with them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringListPortfolios"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Create and View All Portfolios"
        ],
        "description": "This endpoint to create a new Portfolio based on the supplied criteria.<br><br> A portfolio can contain any number of companies that you wish to monitor changes to. The only required Body parameter is \"name\" for Connect users.",
        "operationId": "createMonitoringPortfolio",
        "summary": "Create Monitoring Portfolio",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringCreatePortfolioRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. The portfolio was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringCreatePortfolioResponse"
                },
                "examples": {
                  "created": {
                    "summary": "Portfolio created",
                    "value": {
                      "portfolioId": 123456,
                      "name": "Customers 2",
                      "isDefault": false,
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The body is missing or isn't valid JSON, `name` is missing or empty, or a field has the wrong type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "nameMissing": {
                    "summary": "name missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[object has missing required properties ([\"name\"])]"
                    }
                  },
                  "nameEmpty": {
                    "summary": "name empty",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Error validating JSON. Error: - Missing required field [name]"
                    }
                  },
                  "wrongType": {
                    "summary": "Field with the wrong type",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (string) does not match any allowed primitive type (allowed: [\"boolean\"])]"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. The user already has a portfolio with this name. Portfolio names must be unique for each user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceConflictResponse"
                },
                "examples": {
                  "nameExists": {
                    "summary": "Portfolio name already used",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Portfolio with given name already exists.",
                      "details": null
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/import": {
      "post": {
        "tags": [
          "Importing Portfolios"
        ],
        "description": "Endpoint allows you to import a list of companies to add to the selected portfolio along with some personal information for the company.<br><br>\nImporting a portfolio will add the companies to the specified portfolio, duplicates in the import file will be ignored. <br>\nYou may also optionally add an email to the body of the request and get an email notification when the import is processed.<br><br>\nThe file is processed in the background, so the companies don't appear in the portfolio straight away. How long it takes varies, for example with the size of the file. There's no endpoint to check an import's status: read the portfolio's companies to see when it has finished, or use the optional `email`.<br><br>\n**IMPORTANT**:  Detailed information on the structure of the CSV file and file size limits can be found in the help documentation: <a href=\"https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/importandsynccompanies\" target=\"_blank\" rel=\"noopener noreferrer\">Import and Sync Companies documentation</a>",
        "operationId": "importAPortfolioFile",
        "summary": "Import A Portfolio File",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringImportAndSyncPortfolioRequest"
              },
              "example": {
                "importcsv": "FILE_PATH",
                "email": "john.smith@example.com"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Accepted. The file was accepted for processing, and the message gives the import id. The file is processed in the background, so the companies don't appear in the portfolio straight away. How long it takes varies, for example with the size of the file. There's no endpoint to check an import's status: read the portfolio's companies to see when it has finished, or use the optional `email`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringImportAndSyncPortfolioResponse"
                },
                "examples": {
                  "accepted": {
                    "summary": "File accepted",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Accepted for processing. Import Id 12345"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request has no `ImportCsv` file.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "title": "Validation error",
                      "type": "object",
                      "description": "Validation error. Returned when the request has no `ImportCsv` file.",
                      "required": [
                        "type",
                        "title",
                        "status",
                        "errors"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "A link to the description of the error type.",
                          "example": "https://tools.ietf.org/html/rfc9110#section-15.5.1"
                        },
                        "title": {
                          "type": "string",
                          "description": "A summary of the error.",
                          "example": "One or more validation errors occurred."
                        },
                        "status": {
                          "type": "integer",
                          "description": "The HTTP status code.",
                          "example": 400
                        },
                        "errors": {
                          "type": "object",
                          "description": "The validation errors, keyed by the name of the field or part that failed, with a list of messages for each.",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "example": {
                            "ImportCsv": [
                              "A value for the 'ImportCsv' parameter or property was not provided."
                            ]
                          }
                        },
                        "traceId": {
                          "type": "string",
                          "description": "A trace identifier for the request.",
                          "example": "00-0123456789abcdef0123456789abcdef-0123456789abcdef-00"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "A unique ID assigned to this request.",
                          "example": "23921650-c073-11ea-860f-06bc8182190e"
                        }
                      }
                    },
                    {
                      "title": "Standard error",
                      "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                    }
                  ]
                },
                "examples": {
                  "fileMissing": {
                    "summary": "ImportCsv missing",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "ImportCsv": [
                          "A value for the 'ImportCsv' parameter or property was not provided."
                        ]
                      },
                      "traceId": "00-0123456789abcdef0123456789abcdef-0123456789abcdef-00",
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345",
                      "details": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/sync": {
      "post": {
        "tags": [
          "Importing Portfolios"
        ],
        "description": "Endpoint allows you to sync a portfolio file with your portfolio. <br><br> Sync action will delete all companies in your specified portfolio, and then add the companies from the file into the portfolio. <br><br>\nThe file is processed in the background, so the companies don't appear in the portfolio straight away. How long it takes varies, for example with the size of the file. There's no endpoint to check an import's status: read the portfolio's companies to see when it has finished, or use the optional `email`.<br><br>\n**IMPORTANT**:  Detailed information on the structure of the CSV file and file size limits can be found in the help documentation: <a href=\"https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/importandsynccompanies\" target=\"_blank\" rel=\"noopener noreferrer\">Import and Sync Companies documentation</a>",
        "operationId": "syncAPortfolioFile",
        "summary": "Sync A Portfolio File",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringImportAndSyncPortfolioRequest"
              },
              "example": {
                "importcsv": "FILE_PATH",
                "email": "john.smith@example.com"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Accepted. The file was accepted for processing, and the message gives the import id. The file is processed in the background, so the companies don't appear in the portfolio straight away. How long it takes varies, for example with the size of the file. There's no endpoint to check an import's status: read the portfolio's companies to see when it has finished, or use the optional `email`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringImportAndSyncPortfolioResponse"
                },
                "examples": {
                  "accepted": {
                    "summary": "File accepted",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Accepted for processing. Import Id 12345"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request has no `ImportCsv` file.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "title": "Validation error",
                      "type": "object",
                      "description": "Validation error. Returned when the request has no `ImportCsv` file.",
                      "required": [
                        "type",
                        "title",
                        "status",
                        "errors"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "A link to the description of the error type.",
                          "example": "https://tools.ietf.org/html/rfc9110#section-15.5.1"
                        },
                        "title": {
                          "type": "string",
                          "description": "A summary of the error.",
                          "example": "One or more validation errors occurred."
                        },
                        "status": {
                          "type": "integer",
                          "description": "The HTTP status code.",
                          "example": 400
                        },
                        "errors": {
                          "type": "object",
                          "description": "The validation errors, keyed by the name of the field or part that failed, with a list of messages for each.",
                          "additionalProperties": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "example": {
                            "ImportCsv": [
                              "A value for the 'ImportCsv' parameter or property was not provided."
                            ]
                          }
                        },
                        "traceId": {
                          "type": "string",
                          "description": "A trace identifier for the request.",
                          "example": "00-0123456789abcdef0123456789abcdef-0123456789abcdef-00"
                        },
                        "correlationId": {
                          "type": "string",
                          "description": "A unique ID assigned to this request.",
                          "example": "23921650-c073-11ea-860f-06bc8182190e"
                        }
                      }
                    },
                    {
                      "title": "Standard error",
                      "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                    }
                  ]
                },
                "examples": {
                  "fileMissing": {
                    "summary": "ImportCsv missing",
                    "value": {
                      "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
                      "title": "One or more validation errors occurred.",
                      "status": 400,
                      "errors": {
                        "ImportCsv": [
                          "A value for the 'ImportCsv' parameter or property was not provided."
                        ]
                      },
                      "traceId": "00-0123456789abcdef0123456789abcdef-0123456789abcdef-00",
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}": {
      "get": {
        "tags": [
          "User Management of Portfolios"
        ],
        "description": "This endpoint allows you to retrieve the portfolio details from the portfolioId.",
        "operationId": "retrievePortfolioById",
        "summary": "Retrieve Portfolio By Id",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier for the portfolio that you wish to retrieve, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the portfolio and its email notification settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringGetPortfolioById"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The `portfolioId` isn't an integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidId": {
                    "summary": "portfolioId not a number",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "User Management of Portfolios"
        ],
        "description": "This endpoint allows you to delete the portfolio using the portfolioId.",
        "operationId": "deletePortfolio",
        "summary": "Delete Portfolio",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio that you wish to delete, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. The portfolio and its companies were deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringDeletePortfolio"
                },
                "examples": {
                  "removed": {
                    "summary": "Portfolio removed",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Portfolio removed"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The `portfolioId` isn't an integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidId": {
                    "summary": "portfolioId not a number",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  },
                  "noPermission": {
                    "summary": "No permission to change the portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "User do not have permission to access this portfolio"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "User Management of Portfolios"
        ],
        "description": "This endpoint allows you to update Portfolio details such as Name, email recipients, language and subject line.",
        "operationId": "updatePortfolioDetails",
        "summary": "Update Portfolio Details",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringUpdatePortfolioRequest"
              },
              "example": {
                "name": "New portfolio Name",
                "emails": [
                  {
                    "firstName": "John",
                    "lastName": "Smith",
                    "emailAddress": "john.smith@example.com"
                  }
                ],
                "frequency": "1"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. The portfolio was updated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "correlationId": {
                      "type": "string",
                      "description": "A unique ID assigned to this request.",
                      "example": "23921650-c073-11ea-860f-06bc8182190e"
                    },
                    "message": {
                      "type": "string",
                      "description": "Confirms the update, with the portfolio ID.",
                      "example": "Portfolio 123456 updated"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. `name` is missing, a field has the wrong type, or an `emails` entry has no `emailAddress`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "nameMissing": {
                    "summary": "name missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[object has missing required properties ([\"name\"])]"
                    }
                  },
                  "emailAddressMissing": {
                    "summary": "emails entry without emailAddress",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[object has missing required properties ([\"emailAddress\"])]"
                    }
                  },
                  "wrongType": {
                    "summary": "Field with the wrong type",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (string) does not match any allowed primitive type (allowed: [\"boolean\"])]"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/countries": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "This endpoint provides a list of distinct countries associated with the companies monitored within a specific portfolio.",
        "operationId": "listCountriesOfMonitoredCompanies",
        "summary": "List Countries of Monitored Companies",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the country codes of the companies in the portfolio. The list is empty when the portfolio has no companies.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringMonitoredCountriesInPortfolio"
                },
                "examples": {
                  "countries": {
                    "summary": "Countries in the portfolio",
                    "value": [
                      "GB",
                      "FR",
                      "DE"
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/companies": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "This endpoints gets all companies from a specific portfolio based on the portfolio id, optionally filter with query parameters.",
        "operationId": "listCompaniesInAPortfolio",
        "summary": "List Companies In A Portfolio",
        "parameters": [
          {
            "name": "searchQuery",
            "in": "query",
            "description": "Return companies that match the given value",
            "schema": {
              "type": "string"
            },
            "example": "Example Trading"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/gmPage"
          },
          {
            "name": "countryCode",
            "in": "query",
            "description": "Return companies from the portfolio that match the given countryCode",
            "schema": {
              "type": "string"
            },
            "example": "GB"
          },
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the companies in the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringCompaniesInAPortfolio"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Adds a company to the portfolio, using its connectId or Safe Number. Every field in the body is required: send `\"\"` for `personalReference`, `freeText` or `personalLimit` if you don't need them. `null` isn't accepted, and returns `400`. See the two examples, with and without these fields.",
        "operationId": "addCompanyToPortfolio",
        "summary": "Add Company To Portfolio",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringAddCompanyToPortfolioRequest"
              },
              "examples": {
                "id only": {
                  "summary": "Only an id, with the other fields empty",
                  "value": {
                    "id": "GB-0-12345678",
                    "personalReference": "",
                    "freeText": "",
                    "personalLimit": ""
                  }
                },
                "All Fields": {
                  "summary": "Every field",
                  "value": {
                    "id": "GB-0-12345678",
                    "personalReference": "Some Text",
                    "freeText": "Some Useful Text",
                    "personalLimit": "40"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "Success. The company was added to the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringAddCompanyToPortfolioResponse"
                },
                "examples": {
                  "added": {
                    "summary": "Company added",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company Added"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. A field is missing, `null` or not a string, `id` isn't a valid connectId or Safe Number, or the company's country isn't covered by Global Monitoring.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "fieldsMissing": {
                    "summary": "Fields missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[object has missing required properties ([\"freeText\",\"personalLimit\",\"personalReference\"])]"
                    }
                  },
                  "nullValue": {
                    "summary": "null sent for a field",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (null) does not match any allowed primitive type (allowed: [\"string\"])]"
                    }
                  },
                  "invalidId": {
                    "summary": "id empty",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Invalid companyId"
                    }
                  },
                  "countryNotSupported": {
                    "summary": "Country not covered",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "BR country is not supported"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Forbidden",
                      "details": "PortfolioNotAccessible: Portfolio 123456 not accessible for user: GB123456789"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The company doesn't exist. The body differs for a Safe Number and a connectId.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                },
                "examples": {
                  "unknownSafeNumber": {
                    "summary": "Unknown Safe Number",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company UK12345678 not found"
                    }
                  },
                  "unknownConnectId": {
                    "summary": "Unknown connectId",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Not Found",
                      "details": "Company  not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict. The company is already in the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceConflictResponse"
                },
                "examples": {
                  "companyExists": {
                    "summary": "Company already in the portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company UK12345678 already in portfolio"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/companies/copy": {
      "post": {
        "tags": [
          "User Management of Portfolios"
        ],
        "description": "This endpoint allows you to copy companies from one portfolio to another. You can specify the source and destination portfolios to perform the copy operation.",
        "operationId": "copyCompaniesBetweenPortfolios",
        "summary": "Copy Companies Between Portfolios",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio you want to copy companies from, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "copyAll",
            "in": "query",
            "description": "When `false`, send both `portfolios` and `companies`. When `true`, send only `portfolios`: every company in this portfolio is copied, and `companies` must be empty.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringCopyAndMoveCompaniesRequest"
              },
              "example": {
                "portfolios": [
                  196854,
                  197369
                ],
                "companies": [
                  {
                    "id": "BE-X-733313367"
                  },
                  {
                    "id": "BE-X-868222848"
                  },
                  {
                    "id": "BE-X-835695382"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. `totalPortfoliosCompanies` is the number of company and portfolio pairs requested, and `successfulPortfoliosCompanies` the number copied. When a target portfolio already holds a company, that pair isn't copied, and `reason` lists it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringCopyAndMoveCompaniesResponse"
                },
                "examples": {
                  "copied": {
                    "summary": "Companies copied",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "data": {
                        "totalPortfoliosCompanies": 1,
                        "successfulPortfoliosCompanies": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. `portfolios` is missing, or a company isn't in the source portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidPortfolios": {
                    "summary": "portfolios missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Invalid Portfolios",
                      "details": null
                    }
                  },
                  "invalidCompanies": {
                    "summary": "Company not in the source portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Invalid Companies",
                      "details": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "accessForbidden": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Accesss Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Every target portfolio already holds the companies. When only some of them do, the response is `200`, and `data.reason` lists the duplicates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceConflictResponse"
                },
                "examples": {
                  "companiesExist": {
                    "summary": "Companies already in every target portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioCompanies already Exist",
                      "details": null
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/companies/remove": {
      "post": {
        "tags": [
          "User Management of Portfolios"
        ],
        "description": "This endpoint allows you to move companies from one portfolio to single (or) multiple portfolios. Removes the companies from the portfolio provided in the path parameter.",
        "operationId": "moveCompaniesBetweenPortfolios",
        "summary": "Move Companies Between Portfolios",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio you want to move companies from, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "removeAll",
            "in": "query",
            "description": "When `false`, send both `portfolios` and `companies`. When `true`, send only `portfolios`: every company is moved out of this portfolio, and `companies` must be empty.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringCopyAndMoveCompaniesRequest"
              },
              "example": {
                "portfolios": [
                  196854,
                  197369
                ],
                "companies": [
                  {
                    "id": "BE-X-733313367"
                  },
                  {
                    "id": "BE-X-868222848"
                  },
                  {
                    "id": "BE-X-835695382"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. `totalPortfoliosCompanies` is the number of company and portfolio pairs requested, and `successfulPortfoliosCompanies` the number moved. When a target portfolio already holds a company, that pair isn't moved, and `reason` lists it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringCopyAndMoveCompaniesResponse"
                },
                "examples": {
                  "moved": {
                    "summary": "Companies moved",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "data": {
                        "totalPortfoliosCompanies": 1,
                        "successfulPortfoliosCompanies": 1
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. `portfolios` is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidPortfolios": {
                    "summary": "portfolios missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Invalid Portfolios",
                      "details": null
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "accessForbidden": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Accesss Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "409": {
            "description": "Conflict. Every target portfolio already holds the companies, so none were moved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceConflictResponse"
                },
                "examples": {
                  "companiesExist": {
                    "summary": "Companies already in every target portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioCompanies already Exist",
                      "details": null
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/companies/clear": {
      "patch": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "This endpoint allows for companies to be deleted from the specified portfolio.",
        "operationId": "clearCompaniesFromPortfolio",
        "summary": "Clear Companies From Portfolio",
        "parameters": [
          {
            "name": "clearAll",
            "in": "query",
            "description": "When `false`, send the companies to remove in `companies`. When `true`, every company is removed from the portfolio, and `companies` must be empty. With no `companies` and `clearAll` not `true`, the response is `500`.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio you want to delete companies from, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringClearCompaniesRequest"
              },
              "example": {
                "companies": [
                  "BE-X-733313367",
                  "BE-X-868222848"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. The companies were removed from the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringClearCompaniesResponse"
                },
                "examples": {
                  "cleared": {
                    "summary": "Companies removed",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Companies deleted from portfolio"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. `companies` must be a list of connectIds or Safe Numbers as strings, not objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "wrongType": {
                    "summary": "companies as objects",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (object) does not match any allowed primitive type (allowed: [\"string\"])]"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "accessForbidden": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Accesss Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/companies/{companyId}": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "operationId": "getCompanyDetailsFromAPortfolio",
        "summary": "Get Company Details From A Portfolio",
        "description": "This endpoint allows you to get various company details from a portfolio. Requires a portfolioID and companyID in the PATH of the request.",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "A company Safe Number or Connect ID.",
            "schema": {
              "type": "string"
            },
            "example": "GB-0-12345678"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the company and its details in the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringGetCompanyFromPortfolio"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The company isn't in the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                },
                "examples": {
                  "notInPortfolio": {
                    "summary": "Company not in the portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioCompany not found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Endpoint to delete a company from a portfolio.",
        "operationId": "deleteCompanyFromPortfolio",
        "summary": "Delete Company From Portfolio",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "A company Safe Number or Connect ID.",
            "schema": {
              "type": "string"
            },
            "example": "GB-0-12345678"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. The company was removed from the portfolio. If it's also in another of the user's portfolios, the message says the credit wasn't decremented.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringDeleteCompanyFromPortfolio"
                },
                "examples": {
                  "deleted": {
                    "summary": "Company removed",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company deleted successfully from the portfolio"
                    }
                  },
                  "inOtherPortfolio": {
                    "summary": "Company also in another portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company deleted successfully from the portfolio, Credit not decremented as the Company lies in other portfolioId for the User"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The company id isn't valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidId": {
                    "summary": "Company id not valid",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "no country is not supported"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  },
                  "noPermission": {
                    "summary": "No permission to change the portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "User do not have permission to access this portfolio"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The company isn't in the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                },
                "examples": {
                  "notInPortfolio": {
                    "summary": "Company not in the portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioCompany not found"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Updates the company's details in the portfolio. All three fields are required: send `\"\"` for any you want to clear.",
        "operationId": "updateCompanyDetailsInPortfolio",
        "summary": "Update Company Details In Portfolio",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "A company Safe Number or Connect ID.",
            "schema": {
              "type": "string"
            },
            "example": "GB-0-12345678"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringUpdateCompanyDetailsInPortfolioRequest"
              },
              "example": {
                "personalReference": "personal reference",
                "freeText": "Some useful text",
                "personalLimit": "40"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. The company was updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringUpdateCompanyInPortfolio"
                },
                "examples": {
                  "updated": {
                    "summary": "Company updated",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company updated successfully"
                    }
                  },
                  "limitIgnored": {
                    "summary": "personalLimit not a number",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Non-numeric value of 'personalLimit' has been ignored."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. `personalReference`, `freeText` and `personalLimit` are all required.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "fieldsMissing": {
                    "summary": "Fields missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[object has missing required properties ([\"personalLimit\",\"personalReference\"])]"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The company isn't in the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                },
                "examples": {
                  "notInPortfolio": {
                    "summary": "Company not in the portfolio",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Company not present in portfolio"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/eventRules": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Get all notification `eventRules` for the given `portfolioId`. Notification event rules allow you to control which events you wish to monitor for the `companies` contained within the given `portfolio`.",
        "operationId": "listPortfolioEventRules",
        "summary": "List Portfolio Event Rules",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "description": "The unique identifier for the portfolio that you wish to retrieve notification event rules for, obtained from `/portfolios`.",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the notification event rules for the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringListPortfolioEventRules"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/eventRules/{countryCode}": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Endpoint that lists all the eventRules, their status, and parameters based on a portfolio Id, filtered by country. Newly created portfolios are without any notification event rules by default, but you can switch rules on/off per country or on a global basis. There are different rules available for each country due to the different type of change event data that's available. The following GET request lists all the available rules for a portfolio.<br><br> For guidance on how to use event rules with `PARAM` prefixes and to understand rule parameters, see the documentation here: [Special Event Rules](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/specialeventrules). For example, global rule 101 may require specific PARAM values as described in the linked documentation.",
        "operationId": "listPortfolioEventRulesByCountry",
        "summary": "List Portfolio Event Rules By Country",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "countryCode",
            "in": "path",
            "description": "An upper-case ISO 3166-1 alpha-2 country code, for example `GB`, or `XX` for the global rules only. The response has the global (`XX`) rules and the rules for the country.",
            "required": true,
            "schema": {
              "maxLength": 2,
              "minLength": 2,
              "type": "string"
            },
            "example": "GB"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the notification event rules for the country.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringListPortfolioEventRules"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "details": "An internal server error occurred",
                      "messages": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Endpoint to update an eventRule in a portfolio. Must provide a portfolio unique identifier and a country code in the URL of the PUT request. The Body of the request must contain the `ruleCode` number of the eventRule you want to update, with an `isActive` parameter. Some event rules may also contain specific parameters, which can be set with `param0`, `param1` and `param2`. For example, global rule 101 may require specific PARAM values as described in the [Special Event Rules documentation](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/specialeventrules). Get the above information by calling the [List All eventRules endpoint](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/globalmonitoring/individual-portfolio-management/listportfolioeventrules).<br><br> **Important Note**<br> It is recommended that any changes made to the `Event Rules` are verified using the List Portfolio Event Rules Endpoint after the PUT call has been made.",
        "operationId": "updateEventRules",
        "summary": "Update EventRules",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "countryCode",
            "in": "path",
            "description": "The country of the rules to update: an upper-case ISO 3166-1 alpha-2 country code, or `XX` for the global rules.",
            "required": true,
            "schema": {
              "maxLength": 2,
              "minLength": 2,
              "type": "string"
            },
            "example": "GB"
          }
        ],
        "requestBody": {
          "description": "The rules to update. Send several rules in one request where you can; rules you don't send keep their current setting. Send global rules to `XX` and local rules to their country code. For each rule you send, include `isActive` and all of its parameters, as strings. Some rules, such as global rule 101, require specific PARAM values. Please refer to the [Special Event Rules documentation](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/specialeventrules) for guidance on correct parameter usage.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringUpdateEventRulesRequest"
              },
              "example": [
                {
                  "ruleCode": 1802,
                  "isActive": 1,
                  "param0": "10"
                },
                {
                  "ruleCode": 1815,
                  "isActive": 0
                }
              ]
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content. The rules were updated. There's no response body."
          },
          "400": {
            "description": "Bad Request. The body must be a list of rules. Each rule needs a `ruleCode`, `isActive` must be an integer, and the parameters must be strings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "notAList": {
                    "summary": "Body is an object",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (object) does not match any allowed primitive type (allowed: [\"array\"])]"
                    }
                  },
                  "ruleCodeMissing": {
                    "summary": "ruleCode missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[object has missing required properties ([\"ruleCode\"])]"
                    }
                  },
                  "wrongType": {
                    "summary": "Parameter as a number",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (integer) does not match any allowed primitive type (allowed: [\"string\"]), format attribute \"int32\" not supported]"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "details": "An internal server error occurred",
                      "messages": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/eventRules/setDefault": {
      "put": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Update a portfolios event rules to default state. In Connect, default state means all rules are turned off.",
        "operationId": "setPortfolioDefaultRules",
        "summary": "Set Portfolio Default Rules",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The rules were updated. There's no response body."
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "emptyBody": {
                    "summary": "Portfolio not accessible (empty body)",
                    "value": {}
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/riskSummary": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Get current portfolio risk summary information.",
        "operationId": "portfolioRiskSummary",
        "summary": "Portfolio Risk Summary",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns how many of the portfolio's companies are in each rating band, and the percentage for each band.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringRiskSummary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "accessForbidden": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Accesss Forbidden"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The portfolio has no rating data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                },
                "examples": {
                  "noData": {
                    "summary": "No rating data",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioId 123456 has no valid data present"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/notificationEvents": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "description": "Get all notificationEvents based on the portfolio id, optionally filter with query parameters.",
        "operationId": "listPortfolioNotifications",
        "summary": "List Portfolio Notifications",
        "parameters": [
          {
            "name": "searchQuery",
            "in": "query",
            "description": "Return notificationEvents that match the given value",
            "schema": {
              "type": "string"
            },
            "example": "Example Trading"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/sortDir"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/gmPage"
          },
          {
            "$ref": "#/components/parameters/startDate"
          },
          {
            "$ref": "#/components/parameters/endDate"
          },
          {
            "$ref": "#/components/parameters/filterByCreatedDate"
          },
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the notification events for the portfolio.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringAllNotificationsEvents"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "data": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/companies/{companyId}/notificationEvents": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "operationId": "listCompanySpecificNotificationEvents",
        "summary": "Return Company Specific Notification Events",
        "description": "List of notification events based on the company id,optionally filtered with query parameters.",
        "parameters": [
          {
            "name": "searchQuery",
            "in": "query",
            "description": "Return notificationEvents that match the given value",
            "schema": {
              "type": "string"
            },
            "example": "Example Trading"
          },
          {
            "$ref": "#/components/parameters/sortDir"
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Number of items to return per Page (max 1000)",
            "schema": {
              "type": "integer",
              "default": 50
            }
          },
          {
            "$ref": "#/components/parameters/gmPage"
          },
          {
            "name": "isProcessed",
            "in": "query",
            "description": "A `true` or `false` flag for each event to indicate whether the system has performed an action on the notification.",
            "schema": {
              "type": "boolean",
              "enum": [
                true,
                false
              ]
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "description": "Sort results by this column. Null values of sort column are listed after non-nulls.",
            "schema": {
              "type": "string",
              "default": "companyName",
              "enum": [
                "companyName",
                "countryCode",
                "eventId",
                "eventDate"
              ]
            }
          },
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "description": "A company Safe Number or Connect ID.",
            "schema": {
              "type": "string"
            },
            "example": "GB-0-12345678"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the notification events for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringAllNotificationsEvents"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/sharingPermissions": {
      "get": {
        "tags": [
          "User Management of Portfolios"
        ],
        "operationId": "portfolioUserPermissions",
        "summary": "Portfolio User Permissions",
        "description": "Retrieve user permissions within the customer for a portfolio.",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the users the portfolio is shared with.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringListSharingPermissions"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "User Management of Portfolios"
        ],
        "description": "Update/Create user permissions within the customer for portfolio.",
        "operationId": "sharePortfolioWithUsers",
        "summary": "Share Portfolio With Users",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectMonitoringSharePortfolioRequest"
              },
              "example": {
                "revokeAll": "false",
                "userPermissions": [
                  {
                    "csUserId": 101106166,
                    "permissions": "View,Add"
                  },
                  {
                    "csUserId": 1000027380,
                    "permissions": "View,Add,Edit,Remove"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success. The sharing permissions were updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringSharePortfolioRequestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. A field has the wrong type: `revokeAll` must be the string `\"true\"` or `\"false\"`, and `csUserId` must be an integer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "revokeAllBoolean": {
                    "summary": "revokeAll as a boolean",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (boolean) does not match any allowed primitive type (allowed: [\"string\"])]"
                    }
                  },
                  "csUserIdString": {
                    "summary": "csUserId as a string",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "[instance type (string) does not match any allowed primitive type (allowed: [\"integer\"]), format attribute \"int32\" not supported]"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/companies/{id}/events": {
      "get": {
        "tags": [
          "Event Rules and Notifications"
        ],
        "description": "Endpoint to return a collection of `events` for the given company, optionally filtered on the supplied search criteria. Event information will only be returned if the company exists in at least one of your `portfolios`.",
        "operationId": "listCompanyEvents",
        "summary": "List Company Events",
        "parameters": [
          {
            "$ref": "#/components/parameters/startDate"
          },
          {
            "$ref": "#/components/parameters/endDate"
          },
          {
            "$ref": "#/components/parameters/gmPage"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "name": "id",
            "in": "path",
            "description": "The connectId of the company that you wish to retrieve events for.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "GB-0-12345678"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the events for the company.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringCompanyEvents"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The id isn't a valid connectId or Safe Number.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidId": {
                    "summary": "Id not valid",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "no is not supported"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/eventRules": {
      "get": {
        "tags": [
          "Event Rules and Notifications"
        ],
        "description": "Get all available notification event rules. <br><br> Notification event rules allow you to control which events you wish to monitor for the `companies` contained within a given `portfolio`.<br><br>\nThis endpoint returns all available notification event rules, including those that are not currently enabled for the specified portfolio.  To view only the notification event rules that are currently available for a portfolio you have please use the Endpoint [Portfolio Event Rules](doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/globalmonitoring/individual-portfolio-management/listportfolioeventrules).",
        "operationId": "allEventRules",
        "summary": "All EventRules",
        "responses": {
          "200": {
            "description": "Success. Returns the notification event rules for every country.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringEventRulesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/eventRules/{countryCode}": {
      "get": {
        "tags": [
          "Event Rules and Notifications"
        ],
        "description": "Get all available notification event rules for the given `countryCode`. Notification event rules allow you to control which events you wish to monitor for the `companies` contained within a given `portfolio`.",
        "operationId": "filteredEventRules",
        "summary": "Filtered EventRules",
        "parameters": [
          {
            "name": "countryCode",
            "in": "path",
            "description": "An upper-case ISO 3166-1 alpha-2 country code, for example `GB`, or `XX` for the global rules only. The response has the global (`XX`) rules and the rules for the country.",
            "required": true,
            "schema": {
              "maxLength": 2,
              "minLength": 2,
              "type": "string"
            },
            "example": "GB"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the global (`XX`) rules and the rules for the country.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringEventRulesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The request isn't valid. `details` says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/notificationEvents": {
      "get": {
        "tags": [
          "Event Rules and Notifications"
        ],
        "description": "Get all notification events generated for companies monitored in your portfolios, based on the notification rules enabled. The notification events returned will be filtered based upon the supplied search criteria.",
        "operationId": "allNotificationEvents",
        "summary": "All Notification Events",
        "parameters": [
          {
            "name": "searchQuery",
            "in": "query",
            "description": "Return notification events that match the given search value across multiple fields.  \nThe search query will filter results based on the following fields:  \n- **Company Name** - Returns events for companies whose name contains the search value  \n- **Country Code** - Returns events for companies in the specified country (e.g., \"GB\", \"US\")  \n- **Event Date** - Returns events that occurred on the specified date (format: YYYY-MM-DD)  \n- **Event ID** - Returns the specific notification event matching the provided ID  \n\n**Examples:**  \n- Searching for `\"creditsafe\"` will return all notification events where the company name, country code, event date, or event ID contains \"creditsafe\"  \n- Searching for a specific Event ID (e.g., `\"12345\"`) will return only that notification event  \n- Searching for `\"GB\"` will return notification events for companies in Great Britain  \n- Searching for `\"2025-11-12\"` will return notification events that occurred on November 12, 2025  ",
            "schema": {
              "type": "string"
            },
            "example": "Example Trading"
          },
          {
            "$ref": "#/components/parameters/sortBy"
          },
          {
            "$ref": "#/components/parameters/sortDir"
          },
          {
            "$ref": "#/components/parameters/startDate"
          },
          {
            "$ref": "#/components/parameters/endDate"
          },
          {
            "$ref": "#/components/parameters/gmPage"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/filterByCreatedDate"
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the notification events across the user's portfolios.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringAllNotificationsEvents"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. A query parameter isn't valid, for example a `sortBy` or `sortDir` value that isn't allowed, a negative `page`, a date in a format that isn't supported, or a `startDate` after the `endDate`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "invalidSortBy": {
                    "summary": "sortBy not allowed",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "The value \"nope\" is not valid for SortBy."
                    }
                  },
                  "invalidPaging": {
                    "summary": "Negative page",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Invalid paging information specified"
                    }
                  },
                  "invalidDate": {
                    "summary": "Date format not supported",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  },
                  "startAfterEnd": {
                    "summary": "startDate after endDate",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "data": "Invalid startDate and endDate values specified"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The user doesn't have access to this resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesResourceNotFoundRequest"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/monitoring/portfolios/{portfolioId}/notificationEvents/dataByDay": {
      "get": {
        "tags": [
          "Individual Portfolio Management"
        ],
        "summary": "Return Monitoring Portfolios Notification Events Data By Day",
        "description": "WARNING -  This endpoint returns daily event totals for the given range.",
        "operationId": "portfolioIdNotificationEventsDataByDay",
        "parameters": [
          {
            "name": "portfolioId",
            "in": "path",
            "required": true,
            "description": "The unique identifier of the portfolio, obtained from `/portfolios`.",
            "schema": {
              "type": "integer"
            },
            "example": 123456
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "The start date on which results are filtered. Required, with `endDate`. A date, for example `2026-11-25`. A date and time is also accepted, with or without a time zone, for example `2026-11-25T09:30:00` or `2026-11-25T09:30:00Z`. A date without hyphens, such as `20261125`, returns `400`.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-25",
            "required": true
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "The end date on which results are filtered. Required, with `startDate`. A date, for example `2026-11-25`. A date and time is also accepted, with or without a time zone, for example `2026-11-25T09:30:00` or `2026-11-25T09:30:00Z`. A date without hyphens, such as `20261125`, returns `400`.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-11-25",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Returns the number of notification events for each day.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectMonitoringNotificationsEventsDataByDay"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. `startDate` and `endDate` are both required, as dates (for example `2026-11-25`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "datesMissing": {
                    "summary": "Dates missing",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Bad Request",
                      "details": "Missing required request parameters: [endDate, startDate]"
                    }
                  },
                  "invalidDate": {
                    "summary": "Date format not supported",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The token is missing, invalid or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesInvalidToken"
                },
                "examples": {
                  "invalidToken": {
                    "summary": "Missing or invalid token",
                    "value": {
                      "error": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden. The portfolio doesn't exist, or the user can't access it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesAccessForbidden"
                },
                "examples": {
                  "portfolioNotAccessible": {
                    "summary": "Portfolio not accessible",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "PortfolioNotAccessible: Portfolio 123456 is not accessible for user: 12345"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. The requested resource wasn't found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "This object may contain any number of properties. The properties included can vary, for example by country or data provider.",
                  "example": {
                    "message": "Portfolio not found"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error. Try again later, and contact support with the `correlationId` if it persists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectErrorResponsesBadRequest"
                },
                "examples": {
                  "serverError": {
                    "summary": "Internal server error",
                    "value": {
                      "correlationId": "23921650-c073-11ea-860f-06bc8182190e",
                      "message": "Internal Server Error. If the problem persists please contact Customer Support."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "This API requires authentication for access to protected endpoints. Authentication is performed by providing a valid JWT token in the `Authorization` header of each request."
      }
    },
    "schemas": {
      "ConnectAuthenticationAuthRequest": {
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string",
            "description": "Your Connect username, as given to you when your account was set up. Case sensitive.",
            "example": "username@domain.com"
          },
          "password": {
            "type": "string",
            "description": "Your Connect password. Case sensitive.",
            "example": "^1gHySRA56aj>tf421o"
          }
        }
      },
      "ConnectAuthenticationAuthResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Authentication Token",
            "example": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImRodTNnNkFtTG5QQXVpOEJSMUFEVnp5ZHBnZyIsInR5cCI6IkpXVCIsIng1dCI6ImRodTNnNkFtTG5QQXVpOEJSMUFEVnp5ZHBnZyJ9.eyJuYmYiOjE1OTU0MTYyMDksImV4cCI6MTU5NTQxOTgwOSwiaXNzIjoiaHR0cHM6Ly9teWxvZ2luLnRlc3QuY3JlZGl0c2FmZS5jb20iLCJhdWQiOlsiaHR0cHM6Ly9teWxvZ2luLnRlc3QuY3JlZGl0c2FmZS5jb20vcmVzb3VyY2VzIiwiY29ubmVjdF9hcGkiLCJ1Ym9fYXBpX2dhdGV3YXkiXSwiY2xpZW50X2lkIjoiY29ubmVjdC5hcGkuY2xpZW50Iiwic3ViIjoiMTAxNTIwMjg1IiwiYXV0aF90aW1lIjoxNTk1NDE2MjA5LCJpZHAiOiJsb2NhbCIsInVzZXJuYW1lIjoiQ29ubmVjdHUxIiwiZW1haWwiOiJDb25uZWN0MUBnbWFpbC5jb20iLCJjdXN0b21lcklkIjoiMTAxNzY0NDA1IiwiY291bnRyeSI6IkMwIiwidXNlclJvbGUiOiJDcm1BZG1pblBsdXMiLCJzYl9jb3VudHJ5IjoiVVMiLCJzY29wZSI6WyJjb25uZWN0X2FwaSIsInVib19hcGlfZ2F0ZXdheSJdLCJhbXIiOlsicHdkIl19.p8kPAlKNB9iWEKiQbfbRXBoLQuBG7NuEDN__A8AQ55CL-gcIwkS1717Af1f9W0uifwIQ6HAZQR_x191LVkvuWD94Zw8zLzzr1ioUIhQny_zYuAS3G6EFNaTHh_mvOQ9XVi1FyuIy6YYcYcNLNZurFuITF2w5LuX4YQBjQy3rhEAdRoKcUKbtCClMFaH2dV35jiX2d7BqyhtJ8GeZyJ6yfMfdzznqxlJ4Osf5aasKUy8RYKEpjU2pkCURojoy5_oviGs8X4U9mJWcuajmPF3i5DHkqbhq1Mp0UZrDyoq_0BDStV5xqRgq6aOY8mc45kX7cwY3O2hPeGE7Ak8YtKFbA"
          }
        }
      },
      "ConnectErrorResponsesBadRequest": {
        "type": "object",
        "description": "Bad Request",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request."
          },
          "message": {
            "type": "string",
            "description": "A short summary of why the request was rejected. `details` gives more information."
          },
          "details": {
            "type": "string",
            "description": "Provides further information on why the request was rejected"
          }
        }
      },
      "ConnectAuthFailedResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Why the login failed."
          }
        },
        "example": {
          "message": "Access denied - Please check that your username and password are correct. Please be aware that usernames and passwords are case sensitive. If the problem persists, please contact your Creditsafe account manager."
        }
      },
      "ConnectMonitoringUserDetails": {
        "type": "array",
        "description": "The user's Global Monitoring account details.",
        "items": {
          "type": "object",
          "description": "A Global Monitoring user account.",
          "properties": {
            "countryCode": {
              "type": "string",
              "example": "US",
              "description": "The ISO/Alpha 2 format country code for the user's country."
            },
            "createdDate": {
              "type": "string",
              "example": "2020-01-01T00:00:00",
              "description": "The date that the Global Monitoring user account was created. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`."
            },
            "csCustomerId": {
              "type": "number",
              "example": 101662701,
              "description": "The unique identifier for the user's customer account, used across the Creditsafe product suite."
            },
            "csUserId": {
              "type": "number",
              "example": 101445010,
              "description": "The unique identifier for the user's account, used across the Creditsafe product suite."
            },
            "isAutoTracker": {
              "type": "boolean",
              "example": false,
              "description": "If auto-tracker is enabled, any companies that you pull a credit report for are automatically added to the portfolio that you have selected as default."
            },
            "languageCode": {
              "type": "string",
              "example": "en",
              "description": "The language code for the user's preferred language."
            },
            "lastAccessDate": {
              "type": [
                "string",
                "null"
              ],
              "example": "2020-02-01T14:30:00",
              "description": "The date the the user last accessed the Global Monitoring product. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`."
            },
            "modifiedDate": {
              "type": [
                "string",
                "null"
              ],
              "example": "2020-02-01T14:30:00",
              "description": "The date that the user's details were last modified. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`."
            },
            "contractEndDate": {
              "type": [
                "string",
                "null"
              ],
              "example": "2021-01-01T00:00:00",
              "description": "The date that the user's contract is currently set to expire. From this date onward, the user will be unable to access to Global Monitoring product. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`."
            },
            "userId": {
              "type": "number",
              "example": 10804,
              "description": "The internal identifier used to reference the user's account through the Global Monitoring product."
            },
            "homeUrl": {
              "type": "string",
              "example": "https://mylogin.creditsafe.com/en-gb",
              "description": "The URL of the user's Creditsafe login home page."
            }
          }
        }
      },
      "ConnectErrorResponsesInvalidToken": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Why the request wasn't authorised, for example `Invalid token.` when the token is missing, expired or isn't a valid Connect token."
          }
        },
        "description": "401 - Authorization Token has either expired or is not a valid Connect Token"
      },
      "ConnectErrorResponsesAccessForbidden": {
        "type": "object",
        "description": "403 - Access Forbidden",
        "properties": {
          "correlationId": {
            "description": "The unique identifier. (A UUID specified by RFC4122).",
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "description": "A short summary of why access was refused. `details` gives more information.",
            "example": "Access forbidden"
          },
          "details": {
            "type": "string",
            "description": "Provides further information on why the request was rejected"
          }
        }
      },
      "ConnectErrorResponsesResourceNotFoundRequest": {
        "type": "object",
        "description": "404 - Not Found",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "description": "A short summary of what wasn't found. `details` gives more information."
          },
          "details": {
            "type": "string",
            "description": "Provides further information on why the request was rejected"
          }
        }
      },
      "ConnectMonitoringPaging": {
        "type": "object",
        "description": "Paging parameters.",
        "properties": {
          "size": {
            "type": [
              "number",
              "null"
            ],
            "description": "The maximum number of results returned per page.",
            "example": 10
          },
          "prev": {
            "type": [
              "number",
              "null"
            ],
            "description": "The page number of the previous page, null if there is no previous page available.",
            "example": 0
          },
          "next": {
            "type": [
              "number",
              "null"
            ],
            "description": "The page number of the next page, null if there is no next page available.",
            "example": 2
          },
          "last": {
            "type": [
              "number",
              "null"
            ],
            "description": "The page number of the last page.",
            "example": 3
          }
        }
      },
      "ConnectMonitoringListPortfolios": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "totalCount": {
            "type": "number",
            "description": "The total number of portfolios returned for the logged in user.",
            "example": 1
          },
          "paging": {
            "$ref": "#/components/schemas/ConnectMonitoringPaging"
          },
          "data": {
            "type": "object",
            "description": "The portfolios the user owns, and the portfolios other users have shared with them.",
            "properties": {
              "portfolios": {
                "type": "array",
                "description": "The portfolios the user owns.",
                "items": {
                  "type": "object",
                  "description": "A portfolio the user owns.",
                  "properties": {
                    "portfolioId": {
                      "type": "number",
                      "description": "A unique ID assigned to each portfolio.",
                      "example": 131318
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the portfolio",
                      "example": "Customers 2"
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "A true or false value which shows if the portfolio is set as default",
                      "example": false
                    },
                    "emails": {
                      "type": "array",
                      "description": "The users who receive the email notifications for the portfolio.",
                      "items": {
                        "type": "object",
                        "description": "A user who receives the email notifications.",
                        "properties": {
                          "firstName": {
                            "type": "string",
                            "description": "The first name of the user to receive the email notification.",
                            "example": "John"
                          },
                          "lastName": {
                            "type": "string",
                            "description": "The last name of the user to receive the email notification.",
                            "example": "Doe"
                          },
                          "emailAddress": {
                            "type": "string",
                            "description": "The email address of the user to receive the email notification.",
                            "example": "john.doe@example.com"
                          }
                        }
                      }
                    },
                    "isSharedPortfolio": {
                      "type": "number",
                      "description": "Shows if the portfolio is shared with other users or not. 1 means the portfolio is shared.",
                      "example": 1
                    }
                  }
                }
              },
              "sharedPortfolios": {
                "type": [
                  "array",
                  "null"
                ],
                "description": "The portfolios other users have shared with this user.",
                "items": {
                  "type": "object",
                  "description": "A portfolio another user has shared with this user.",
                  "properties": {
                    "portfolioId": {
                      "type": "number",
                      "description": "A unique ID assigned to each portfolio.",
                      "example": 131318
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the portfolio.",
                      "example": "Customers 2"
                    },
                    "isDefault": {
                      "type": "boolean",
                      "description": "A true or false value which shows if the portfolio is set as default.",
                      "example": false
                    },
                    "permissions": {
                      "type": "string",
                      "description": "The permissions this user has on the shared portfolio, as a comma-separated list.",
                      "example": "View,Remove"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ConnectMonitoringCreatePortfolioRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the portfolio",
            "example": "Test Portfolio"
          },
          "isDefault": {
            "type": "boolean",
            "description": "can set the portfolio as default for company monitoring events.",
            "example": false
          },
          "emails": {
            "type": "array",
            "description": "The email address of the user to receive the email notification.",
            "items": {
              "type": "object",
              "description": "A user who receives the email notifications.",
              "properties": {
                "firstName": {
                  "type": "string",
                  "description": "The first name of the user to receive the email notification.",
                  "example": "John"
                },
                "lastName": {
                  "type": "string",
                  "description": "The last name of the user to receive the email notification.",
                  "example": "Doe"
                },
                "emailAddress": {
                  "type": "string",
                  "description": "The email address of the user to receive the email notification.",
                  "example": "john.doe@example.com"
                }
              }
            }
          },
          "emailSubject": {
            "type": "string",
            "description": "The subject of the email notification.",
            "example": "Creditsafe Monitoring Notification on portfolio {{portfolioName}}"
          },
          "emailLanguage": {
            "type": "string",
            "description": "The language of the email notification.",
            "example": "en"
          },
          "frequency": {
            "type": "string",
            "description": "The frequency property must be set to \"1\" to activate email notifications.",
            "example": "1"
          }
        },
        "required": [
          "name"
        ]
      },
      "ConnectMonitoringCreatePortfolioResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "14cc64a0-c108-11ea-b9af-06bcc69a383e"
          },
          "portfolioId": {
            "type": "number",
            "description": "A unique ID assigned to each portfolio.",
            "example": 131318
          },
          "name": {
            "type": "string",
            "description": "The name that was assigned to this portfolio",
            "example": "My New Portfolio"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Shows if the portfolio is set as Default for the user.",
            "example": false
          }
        }
      },
      "ConnectErrorResponsesResourceConflictResponse": {
        "type": "object",
        "description": "409 - Conflict",
        "properties": {
          "correlationId": {
            "description": "The unique identifier. (A UUID specified by RFC4122).",
            "type": "string",
            "format": "uuid"
          },
          "message": {
            "type": "string",
            "description": "A short summary of the conflict. `details` gives more information."
          },
          "details": {
            "type": "string",
            "description": "Provides further information on why the request was rejected"
          }
        }
      },
      "ConnectMonitoringImportAndSyncPortfolioRequest": {
        "type": "object",
        "properties": {
          "importcsv": {
            "type": "string",
            "format": "binary",
            "description": "The CSV file of companies. Required: a request without it returns `400`."
          },
          "email": {
            "type": "string",
            "description": "Option field. Provide an email and get a notification when the import has been completed with the details about the import.",
            "example": "john.smith@example.com"
          }
        },
        "required": [
          "importcsv"
        ]
      },
      "ConnectMonitoringImportAndSyncPortfolioResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "message": {
            "type": "string",
            "description": "A message about the status of this request, including the Import Id assigned to the file. The import is processed in the background.",
            "example": "Accepted for processing. Import Id 339523"
          }
        }
      },
      "ConnectMonitoringGetPortfolioById": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "portfolioId": {
            "type": "number",
            "description": "A unique ID assigned to each portfolio.",
            "example": 36
          },
          "name": {
            "type": "string",
            "description": "The name of the portfolio",
            "example": "Customers 2"
          },
          "isDefault": {
            "type": "boolean",
            "description": "States if the portfolio is set as Default or not",
            "example": false
          },
          "emailSubject": {
            "type": [
              "string",
              "null"
            ],
            "description": "The subject of the email notification.",
            "example": "Creditsafe Monitoring Notification on portfolio {{portfolioName}}"
          },
          "emails": {
            "type": "array",
            "description": "The email addresses of the user to receive the email notification.",
            "items": {
              "type": "object",
              "description": "A user who receives the email notifications.",
              "properties": {
                "firstName": {
                  "type": "string",
                  "description": "The first name of the user to receive the email notification.",
                  "example": "John"
                },
                "lastName": {
                  "type": "string",
                  "description": "The last name of the user to receive the email notification.",
                  "example": "Doe"
                },
                "emailAddress": {
                  "type": "string",
                  "description": "The email address of the user to receive the email notification.",
                  "example": "john.doe@example.com"
                }
              }
            }
          }
        }
      },
      "ConnectMonitoringDeletePortfolio": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "message": {
            "type": "string",
            "description": "Message stating if your request was successful",
            "example": "Portfolio removed"
          }
        }
      },
      "ConnectMonitoringUpdatePortfolioRequestEmail": {
        "type": "object",
        "description": "A user who receives the email notifications.",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "The first name of the user to receive the email notification.",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "description": "The last name of the user to receive the email notification.",
            "example": "Doe"
          },
          "emailAddress": {
            "type": "string",
            "description": "The email address of the user to receive the email notification.",
            "example": "john.doe@example.com"
          }
        },
        "required": [
          "emailAddress"
        ]
      },
      "ConnectMonitoringUpdatePortfolioRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the portfolio. Required in every update.",
            "example": "Customers 2"
          },
          "isDefault": {
            "type": "boolean",
            "description": "Change the setting of the portfolio as default for company monitoring events.<br><br> Changing the default portfolio will automatically change the status of the previous default to 'false'.",
            "example": false
          },
          "emails": {
            "type": "array",
            "description": "The users who receive the email notifications. Send the full list in every update.",
            "items": {
              "$ref": "#/components/schemas/ConnectMonitoringUpdatePortfolioRequestEmail"
            }
          },
          "emailSubject": {
            "type": "string",
            "description": "The subject of the email notification.",
            "example": "Creditsafe Monitoring Notification on portfolio {{portfolioName}}"
          },
          "emailLanguage": {
            "type": "string",
            "description": "The language of the email notification.",
            "example": "en"
          },
          "frequency": {
            "type": "string",
            "description": "For emails to be activated you must submit a value of '1'.",
            "example": "1"
          }
        },
        "required": [
          "name"
        ]
      },
      "ConnectMonitoringMonitoredCountriesInPortfolio": {
        "type": "array",
        "description": "The country codes of the companies in the portfolio.",
        "items": {
          "type": "string",
          "description": "An ISO/Alpha 2 country code.",
          "example": "FR"
        },
        "example": [
          "FR",
          "LU",
          "DE"
        ]
      },
      "ConnectMonitoringCompaniesInAPortfolio": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "totalCount": {
            "type": "number",
            "description": "The total number of companies returned for the given portfolio.",
            "example": 1
          },
          "paging": {
            "$ref": "#/components/schemas/ConnectMonitoringPaging"
          },
          "data": {
            "type": "array",
            "description": "The companies in the portfolio.",
            "items": {
              "type": "object",
              "description": "A company in the portfolio.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The connectId of the company. A connectId is the primary Company identifier that is used to uniquely identify all companies across Creditsafe's Universe and Partner Network.",
                  "example": "US-X-US22384484"
                },
                "safeNumber": {
                  "type": "string",
                  "description": "The Safe Number (Creditsafe's identifier on all Companies owned in the Creditsafe Universe) of the company.",
                  "example": "US22384484"
                },
                "name": {
                  "type": "string",
                  "description": "The name of the company.",
                  "example": "GOOGLE LLC"
                },
                "address": {
                  "type": "string",
                  "description": "The address of the company.",
                  "example": "VIA PABLO NERUDA, 4, TREZZANO SUL NAVIGLIO, 20090"
                },
                "countryCode": {
                  "type": "string",
                  "description": "ISO/Alpha 2 format country code of the company.",
                  "example": "US"
                },
                "portfolioId": {
                  "type": "number",
                  "description": "The portfolio Id of the portfolio that contains the company.",
                  "example": 589960
                },
                "creditLimit": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The credit limit of the company.",
                  "example": 10000
                },
                "dateLastEvent": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The date of the most recent event the company has had. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
                  "example": "2018-06-14T00:59:06"
                },
                "freeText": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Field that can be used to add a free text note to when adding a company to a portfolio.",
                  "example": "Key supplier"
                },
                "personalLimit": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Field that can be used to add a personal limit number against the company in a portfolio.",
                  "example": "10000"
                },
                "personalReference": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Field that can be used to add a personal reference against the company in a portfolio.",
                  "example": "Follow up Jan 2021"
                },
                "ratingCommon": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The rating score band that the company is in.",
                  "example": "A"
                },
                "ratingLocal": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Country specific rating score, returned as text: either a score, for example `'87'`, or a description, for example `Non trading`.",
                  "example": "Not rated - insufficient information to rate"
                },
                "companyStatus": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "In the Company status indicator.\nRegional models differ, so 2 may represent Pending or Inactive.\n\nPossible values:\n  1 (Active)\n  2 (Pending/Inactive)\n  3 (Inactive)\n  null (Unknown)\n\nFor full details, see [Company Status Property](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/status).",
                  "example": "1"
                },
                "dateAdded": {
                  "type": "string",
                  "description": "The date the company was added to the portfolio. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
                  "example": "2020-07-01T00:59:06"
                },
                "dateModified": {
                  "type": "string",
                  "description": "The date the company was last modified in the portfolio. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
                  "example": "2020-07-01T00:59:06"
                }
              }
            }
          }
        }
      },
      "ConnectMonitoringAddCompanyToPortfolioRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The connectId or Safe Number of the company.",
            "example": "GB-0-12345678"
          },
          "personalReference": {
            "description": "A personal reference for the company. Up to 150 characters are kept. Send `\"\"` if you don't need it.",
            "type": "string",
            "example": "Key supplier"
          },
          "freeText": {
            "description": "A free text note for the company in the portfolio. Send `\"\"` if you don't need it.",
            "type": "string",
            "example": "Review in January"
          },
          "personalLimit": {
            "description": "A personal limit for the company, separate from its credit limit. Send a number as a string, for example `'40'`, or `\"\"` for no limit. It's stored to 2 decimal places, so `'12.345'` is stored as `'12.35'`.",
            "type": "string",
            "example": "40"
          }
        },
        "required": [
          "id",
          "personalReference",
          "freeText",
          "personalLimit"
        ]
      },
      "ConnectMonitoringAddCompanyToPortfolioResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "message": {
            "type": "string",
            "description": "A status message relating to your request.",
            "example": "Company Added"
          }
        }
      },
      "ConnectMonitoringCopyAndMoveCompaniesBodyCompanies": {
        "type": "object",
        "description": "A company to copy or move.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The connectId or Safe Number of the company.",
            "example": "GB-0-12345678"
          }
        }
      },
      "ConnectMonitoringCopyAndMoveCompaniesRequest": {
        "type": "object",
        "properties": {
          "portfolios": {
            "description": "The IDs of the portfolios to copy or move the companies to.",
            "type": "array",
            "items": {
              "type": "integer",
              "description": "A target portfolio ID.",
              "example": 123456
            }
          },
          "companies": {
            "description": "The companies to copy or move. Not needed when the `copyAll` (copy) or `removeAll` (move) query parameter is `true`.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConnectMonitoringCopyAndMoveCompaniesBodyCompanies"
            }
          }
        },
        "required": [
          "portfolios"
        ]
      },
      "ConnectMonitoringCopyAndMoveCompaniesResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "data": {
            "type": "object",
            "description": "The result of the copy or move.",
            "properties": {
              "totalPortfoliosCompanies": {
                "type": "integer",
                "description": "The number of company and portfolio pairs requested: each company for each target portfolio.",
                "example": 5
              },
              "successfulPortfoliosCompanies": {
                "type": "integer",
                "description": "The number of company and portfolio pairs copied or moved.",
                "example": 3
              },
              "failedPortfoliosCompanies": {
                "type": "integer",
                "description": "The number of company and portfolio pairs that weren't copied or moved.",
                "example": 2
              },
              "reason": {
                "type": "string",
                "description": "Why some pairs weren't copied or moved, for example because a target portfolio already holds the company."
              }
            }
          }
        }
      },
      "ConnectMonitoringClearCompaniesRequest": {
        "type": "object",
        "properties": {
          "companies": {
            "type": "array",
            "description": "The connectIds or Safe Numbers of the companies to remove, as strings. Not needed when the `clearAll` query parameter is `true`.",
            "items": {
              "type": "string",
              "description": "The connectId or Safe Number of a company.",
              "example": "GB-0-12345678"
            }
          }
        },
        "description": "The companies to remove from the portfolio. Not needed when the `clearAll` query parameter is `true`."
      },
      "ConnectMonitoringClearCompaniesResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "message": {
            "type": "string",
            "description": "A message stating if your request was successful.",
            "example": "Companies deleted from portfolio"
          }
        }
      },
      "ConnectMonitoringGetCompanyFromPortfolio": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "connectId": {
            "type": "string",
            "description": "The connectId of the company. A connectId is the primary Company identifier that is used to uniquely identify all companies across Creditsafe's Universe and Partner Network.",
            "example": "US-X-US22384484"
          },
          "portfolioId": {
            "type": "number",
            "description": "The portfolio Id of the portfolio that contains the company.",
            "example": 589960
          },
          "personalReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Field that can be used to add a personal reference against the company in a portfolio.",
            "example": "Follow up Jan 2021"
          },
          "freeText": {
            "type": [
              "string",
              "null"
            ],
            "description": "Field that can be used to add a free text note to when adding a company to a portfolio.",
            "example": null
          },
          "personalLimit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Field that can be used to add a personal limit number against the company in a portfolio.",
            "example": "10000"
          },
          "safeNumber": {
            "type": "string",
            "description": "The Safe Number (Creditsafe's identifier on all Companies owned in the Creditsafe Universe) of the company.",
            "example": "US22384484"
          },
          "name": {
            "type": "string",
            "description": "The name of the company .",
            "example": "GOOGLE LLC"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO/Alpha 2 format country code of the company.",
            "example": "US"
          },
          "address": {
            "type": "string",
            "description": "The address of the company.",
            "example": "VIA PABLO NERUDA, 4, TREZZANO SUL NAVIGLIO, 20090"
          },
          "companyStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "In the Company status indicator.\n    Regional models differ, so 2 may represent Pending or Inactive.\n\n    Possible values:\n      1 (Active)\n      2 (Pending/Inactive)\n      3 (Inactive)\n      null (Unknown)\n\n    For full details, see [Company Status Property](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/status).\n",
            "example": "1"
          },
          "creditLimit": {
            "type": [
              "number",
              "null"
            ],
            "description": "The credit limit of the company.",
            "example": 10000
          },
          "ratingCommon": {
            "type": [
              "string",
              "null"
            ],
            "description": "The rating score band that the company is in.",
            "example": "A"
          },
          "ratingLocal": {
            "type": [
              "string",
              "integer",
              "null"
            ],
            "description": "Country specific rating score. It can be returned as a number, for example `-34`, or as text.",
            "example": -34
          },
          "dateLastEvent": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date of the most recent event the company has had. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
            "example": "2018-06-14T00:59:06"
          },
          "dateAdded": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date the company was added to the portfolio. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
            "example": "2020-07-01T00:59:06"
          },
          "dateModified": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date the company was last modified in the portfolio. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
            "example": "2020-07-01T00:59:06"
          }
        }
      },
      "ConnectMonitoringDeleteCompanyFromPortfolio": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "message": {
            "type": "string",
            "description": "A message stating successful deletion.",
            "example": "Company removed"
          }
        }
      },
      "ConnectMonitoringUpdateCompanyDetailsInPortfolioRequest": {
        "type": "object",
        "properties": {
          "personalReference": {
            "description": "A personal reference for the company. Up to 150 characters are kept. Send `\"\"` if you don't need it.",
            "type": "string",
            "example": "Key supplier"
          },
          "freeText": {
            "description": "A free text note for the company in the portfolio. Send `\"\"` if you don't need it.",
            "type": "string",
            "example": "Review in January"
          },
          "personalLimit": {
            "description": "A personal limit for the company, separate from its credit limit. Send a number as a string, for example `'40'`, or `\"\"` for no limit. It's stored to 2 decimal places, so `'12.345'` is stored as `'12.35'`. On update, `\"\"` clears the limit.",
            "type": "string",
            "example": "40"
          }
        },
        "required": [
          "personalReference",
          "freeText",
          "personalLimit"
        ]
      },
      "ConnectMonitoringUpdateCompanyInPortfolio": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "message": {
            "type": "string",
            "description": "A message stating successful update.",
            "example": "Company updated successfully"
          }
        }
      },
      "ConnectMonitoringListPortfolioEventRules": {
        "type": "array",
        "description": "The notification event rules for the portfolio.",
        "items": {
          "type": "object",
          "description": "A notification event rule and its settings for the portfolio.",
          "properties": {
            "isActive": {
              "type": "integer",
              "description": "Shows whether the notification event rule has been enabled for the given portfolio. `0` for inactive, `1` for active.",
              "example": 0
            },
            "ruleCode": {
              "type": "number",
              "description": "The unique identifier for the notification event rule.",
              "example": 101
            },
            "ruleCountryCode": {
              "type": "string",
              "description": "The ISO/Alpha 2 format country code for the notification event rule. \"XX\" is used for global rules that apply to companies from all countries.",
              "example": "XX"
            },
            "ruleType": {
              "type": "number",
              "description": "The unique identifier of the `ruleType` for the notification event rule.",
              "example": 4
            },
            "ruleTypeName": {
              "type": "string",
              "description": "A short description of the `ruleType` for the notification event rule.",
              "example": "Rating band change - 3 input"
            },
            "name": {
              "type": "string",
              "description": "The name for the notification event rule.",
              "example": "International Rating | Reduce by {0} Band(s) OR Less than Band {1}"
            },
            "param0": {
              "type": "string",
              "description": "Some notification event rules may include input parameters used to tailor the notifications generated to your preference.",
              "example": "1"
            },
            "param1": {
              "type": "string",
              "description": "Some notification event rules may include input parameters used to tailor the notifications generated to your preference.",
              "example": "A"
            },
            "param2": {
              "type": "string",
              "description": "Some notification event rules may include input parameters used to tailor the notifications generated to your preference.",
              "example": "true"
            },
            "exclusiveRuleCode": {
              "type": "integer",
              "description": "The `ruleCode` of the global (`XX`) rule that this country rule overlaps. Only returned on some country rules: local rating rules return `101` (International Score), and local limit rules return `102` (Limit).",
              "example": 101
            }
          }
        }
      },
      "ConnectMonitoringUpdateEventRulesBody": {
        "type": "object",
        "description": "A notification event rule to update, with its settings.",
        "properties": {
          "ruleCode": {
            "type": "integer",
            "description": "The `ruleCode` of the rule to update.",
            "example": 101
          },
          "isActive": {
            "type": "integer",
            "description": "Whether the rule is switched on for the portfolio. `1` for on, `0` for off.",
            "example": 1
          },
          "param0": {
            "type": "string",
            "example": "1",
            "description": "Optional parameter used by some rules, sent as a string. Each rule type may use this property differently.   For special event rules, consult the [Special Event Rules documentation](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/specialeventrules).   For other rules, use the [List Portfolio Event Rules endpoint](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/globalmonitoring/individual-portfolio-management/listportfolioeventrules) to see available options.\n"
          },
          "param1": {
            "type": "string",
            "example": "Any",
            "description": "Optional parameter used by some rules, sent as a string. Each rule type may use this property differently.   For special event rules, consult the [Special Event Rules documentation](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/specialeventrules).   For other rules, use the [List Portfolio Event Rules endpoint](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/globalmonitoring/individual-portfolio-management/listportfolioeventrules) to see available options.\n"
          },
          "param2": {
            "type": "string",
            "example": "true",
            "description": "Optional parameter used by some rules, sent as a string. Each rule type may use this property differently.   For special event rules, consult the [Special Event Rules documentation](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/documentation/specialeventrules).   For other rules, use the [List Portfolio Event Rules endpoint](https://doc.creditsafe.com/connect-apis-catalog/product-catalog/globalmonitoring/globalmonitoring/individual-portfolio-management/listportfolioeventrules) to see available options.\n"
          }
        },
        "required": [
          "ruleCode",
          "isActive"
        ]
      },
      "ConnectMonitoringUpdateEventRulesRequest": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ConnectMonitoringUpdateEventRulesBody"
        }
      },
      "ConnectMonitoringRiskSummary": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "totalCompanies": {
            "type": "number",
            "description": "The total number of companies in the portfolio.",
            "example": 66
          },
          "bandACount": {
            "type": "number",
            "description": "The number of companies in the portfolio with a rating in band A.",
            "example": 20
          },
          "bandApc": {
            "type": "number",
            "description": "The percentage of the portfolio's companies with a rating in band A, from 0 to 100.",
            "example": 40.625
          },
          "bandBCount": {
            "type": "number",
            "description": "The number of companies in the portfolio with a rating in band B.",
            "example": 17
          },
          "bandBpc": {
            "type": "number",
            "description": "The percentage of the portfolio's companies with a rating in band B, from 0 to 100.",
            "example": 26.5625
          },
          "bandCCount": {
            "type": "number",
            "description": "The number of companies in the portfolio with a rating in band C.",
            "example": 14
          },
          "bandCpc": {
            "type": "number",
            "description": "The percentage of the portfolio's companies with a rating in band C, from 0 to 100.",
            "example": 21.8775
          },
          "bandDCount": {
            "type": "number",
            "description": "The number of companies in the portfolio with a rating in band D.",
            "example": 5
          },
          "bandDpc": {
            "type": "number",
            "description": "The percentage of the portfolio's companies with a rating in band D, from 0 to 100.",
            "example": 7.8125
          },
          "bandECount": {
            "type": "number",
            "description": "The number of companies in the portfolio with a rating in band E.",
            "example": 2
          },
          "bandEpc": {
            "type": "number",
            "description": "The percentage of the portfolio's companies with a rating in band E, from 0 to 100.",
            "example": 3.125
          }
        }
      },
      "ConnectMonitoringCompanyInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The connectId of the company that triggered the `notificationEvent`. A connectId is the primary Company identifier that is used to uniquely identify all companies across Creditsafe's Universe and Partner Network.",
            "example": "US-X-US22384484"
          },
          "safeNumber": {
            "type": "string",
            "description": "The Safe Number (Creditsafe's identifier on all Companies owned in the Creditsafe Universe) of the company that triggered the `notificationEvent`.",
            "example": "US22384484"
          },
          "name": {
            "type": "string",
            "description": "The name of the company that triggered the `notificationEvent`.",
            "example": "GOOGLE LLC"
          },
          "countryCode": {
            "type": "string",
            "description": "ISO/Alpha 2 format country code of the company that triggered the `notificationEvent`.",
            "example": "US"
          },
          "portfolioId": {
            "type": "number",
            "description": "The portfolio Id of the portfolio that contains the company that triggered the `notificationEvent`.",
            "example": 589960
          },
          "portfolioName": {
            "type": "string",
            "description": "The name of the portfolio that contains the company that triggered the `notificationEvent`.",
            "example": "Default"
          }
        }
      },
      "ConnectMonitoringAllNotificationsEvents": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "totalCount": {
            "type": "number",
            "description": "The total number of notification events that match the request.",
            "example": 36
          },
          "data": {
            "type": "array",
            "description": "The notification events.",
            "items": {
              "type": "object",
              "description": "A notification event.",
              "properties": {
                "company": {
                  "description": "The company the notification event is about.",
                  "$ref": "#/components/schemas/ConnectMonitoringCompanyInfo"
                },
                "eventId": {
                  "type": "number",
                  "description": "The unique identifier of the event that triggered the generation of the `notificationEvent`. This identifier is consistent across all portfolios in the Global Monitoring product.",
                  "example": 426992366
                },
                "eventDate": {
                  "type": "string",
                  "description": "The date that the event occurred. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
                  "example": "2019-12-06T08:23:37"
                },
                "newValue": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Some events contain an `oldValue` and `newValue` (e.g. a change in Credit Limit).",
                  "example": "1600 AMPHITHEATRE PARKWAY, MOUNTAIN VIEW, CA, 94043-1351"
                },
                "oldValue": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Some events contain an `oldValue` and `newValue` (e.g. a change in Credit Limit).",
                  "example": "1604 AMPHITHEATRE PARKWAY, MOUNTAIN VIEW, CA, 94043-1351"
                },
                "notificationEventId": {
                  "type": "number",
                  "description": "The unique identifier for the `notificationEvent`. This identifier is tied to a specific `eventId` and `portfolioId`.",
                  "example": 51861887
                },
                "notificationId": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The unique identifier for the `notificationEvent`. This identifier is tied to a specific `eventId` and `portfolioId`.",
                  "example": null
                },
                "processedDate": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "If the Notification was sent by email, the date will be populated with when the notification was sent.",
                  "example": null
                },
                "ruleCode": {
                  "type": "number",
                  "description": "The unique identifier for the `ruleCode` that triggered the generation of the `notificationEvent`.",
                  "example": 105
                },
                "ruleName": {
                  "type": "string",
                  "description": "The name of the notification event rule that triggered the generation of the `notificationEvent`.",
                  "example": "Address"
                },
                "summary": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A short description of the notification event rule that triggered the `notificationEvent`.",
                  "example": "Address Change reported"
                },
                "ruleText": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A short description of the notification event rule that triggered the `notificationEvent`.",
                  "example": "Address Change reported"
                },
                "localEventCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The local code of the `notificationEvent`.",
                  "example": "LI2013"
                },
                "isProcessed": {
                  "type": "boolean",
                  "description": "A `true` or `false` flag for each event to indicate whether the system has performed an action on the notification.",
                  "example": true
                }
              }
            }
          },
          "paging": {
            "$ref": "#/components/schemas/ConnectMonitoringPaging"
          }
        }
      },
      "ConnectMonitoringListSharingPermissions": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "data": {
            "type": "object",
            "description": "The portfolio and the users it is shared with.",
            "properties": {
              "portfolioId": {
                "type": "integer",
                "description": "A unique ID assigned to each portfolio.",
                "example": 13437356
              },
              "customerId": {
                "type": "number",
                "description": "A unique ID assigned to your customer account.",
                "example": 101375376
              },
              "userPermissions": {
                "type": "array",
                "description": "The users the portfolio is shared with, and their permissions.",
                "items": {
                  "type": "object",
                  "description": "A user the portfolio is shared with.",
                  "properties": {
                    "csUserId": {
                      "type": "number",
                      "description": "The unique ID assigned to the user account the portfolios are shared with.",
                      "example": 101435674
                    },
                    "userName": {
                      "type": "string",
                      "description": "The username of the user.",
                      "example": "UPPStage"
                    },
                    "permissions": {
                      "type": "string",
                      "description": "The permissions this user has for this portfolio, as a comma-separated list.",
                      "example": "View,Remove"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ConnectMonitoringSharePortfolioRequestBody": {
        "type": "object",
        "description": "A user to share the portfolio with.",
        "properties": {
          "csUserId": {
            "type": "integer",
            "description": "The Creditsafe user ID of the user to share the portfolio with.",
            "example": 101234567
          },
          "permissions": {
            "type": "string",
            "description": "Comma separated permissions. \"View\" permission gets automatically added to the user if \"Add\", \"Edit\", \"Remove\" permissions are set.",
            "example": "View,Remove"
          }
        }
      },
      "ConnectMonitoringSharePortfolioRequest": {
        "type": "object",
        "properties": {
          "revokeAll": {
            "type": "string",
            "description": "If set to \"true\", all user permissions will be revoked for the portfolio. By default set to \"false\".",
            "example": "false"
          },
          "userPermissions": {
            "type": "array",
            "description": "The users to share the portfolio with, and their permissions.",
            "items": {
              "$ref": "#/components/schemas/ConnectMonitoringSharePortfolioRequestBody"
            }
          }
        }
      },
      "ConnectMonitoringSharePortfolioRequestResponse": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "data": {
            "type": "object",
            "description": "The result of the sharing request.",
            "properties": {
              "portfolioId": {
                "type": "integer",
                "description": "A unique ID assigned to each portfolio.",
                "example": 13437356
              },
              "customerId": {
                "type": "number",
                "description": "A unique ID assigned to your customer account.",
                "example": 101375376
              },
              "status": {
                "type": "string",
                "description": "A message about the status of this request.",
                "example": "Success"
              }
            }
          }
        }
      },
      "ConnectMonitoringCompanyEvents": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "totalCount": {
            "type": "number",
            "description": "The total number of events returned for the given company.",
            "example": 1
          },
          "data": {
            "type": "array",
            "description": "The events for the company.",
            "items": {
              "type": "object",
              "description": "An event for the company.",
              "properties": {
                "eventId": {
                  "type": "number",
                  "description": "The unique identifier for the event.",
                  "example": 192873729
                },
                "companyId": {
                  "type": "string",
                  "description": "The Safe Number (Creditsafe's identifier on all Companies owned in the Creditsafe Universe) of the company that triggered the event.",
                  "example": "UK00004371"
                },
                "portfolioId": {
                  "type": "number",
                  "description": "The portfolio Id of the portfolio that contains the company that you requested event information for.",
                  "example": 589960
                },
                "ruleName": {
                  "type": "string",
                  "description": "A short description of the company event.",
                  "example": "Credit Limit Change"
                },
                "localEventCode": {
                  "type": "string",
                  "description": "The local event code for the event.",
                  "example": "CL"
                },
                "globalEventCode": {
                  "type": "string",
                  "description": "The global event code that has been mapped to the local event.",
                  "example": "CL"
                },
                "newValue": {
                  "type": "string",
                  "description": "Some events contain an `oldValue` and `newValue` (e.g. a change in Credit Limit).",
                  "example": "7050000"
                },
                "oldValue": {
                  "type": "string",
                  "description": "Some events contain an `oldValue` and `newValue` (e.g. a change in Credit Limit).",
                  "example": "6100000"
                },
                "eventDate": {
                  "type": "string",
                  "description": "The date that the event occurred. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
                  "example": "2019-03-14T22:21:50"
                },
                "createdDate": {
                  "type": "string",
                  "description": "The date that the event was created in the Creditsafe database. Returned in ISO 8601 format without a time zone offset, for example `2022-01-20T12:45:43`.",
                  "example": "2019-03-14T22:21:50"
                }
              }
            }
          },
          "paging": {
            "$ref": "#/components/schemas/ConnectMonitoringPaging"
          }
        }
      },
      "ConnectMonitoringEventRulesResponse": {
        "type": "array",
        "description": "The notification event rules.",
        "items": {
          "type": "object",
          "description": "A notification event rule.",
          "properties": {
            "isActive": {
              "type": "integer",
              "description": "Shows whether the notification event rule has been enabled for the given portfolio. `0` for inactive, `1` for active.",
              "example": 0
            },
            "ruleCode": {
              "type": "number",
              "description": "The unique identifier for the notification event rule.",
              "example": 101
            },
            "ruleCountryCode": {
              "type": "string",
              "description": "The ISO/Alpha 2 format country code for the notification event rule. \"XX\" is used for global rules that apply to companies from all countries.",
              "example": "XX"
            },
            "ruleType": {
              "type": "number",
              "description": "The unique identifier of the `ruleType` for the notification event rule.",
              "example": 4
            },
            "ruleTypeName": {
              "type": "string",
              "description": "A short description of the `ruleType` for the notification event rule.",
              "example": "Rating band change - 3 input"
            },
            "name": {
              "type": "string",
              "description": "The name for the notification event rule.",
              "example": "International Score  |{2} Return Band(A-E) |Reduce by {0} Band(s) OR Less than Band {1}"
            },
            "param0": {
              "type": "string",
              "description": "Some notification event rules may include input parameters used to tailor the notifications generated to your preference.",
              "example": "1"
            },
            "param1": {
              "type": "string",
              "description": "Some notification event rules may include input parameters used to tailor the notifications generated to your preference.",
              "example": "A"
            }
          }
        }
      },
      "ConnectMonitoringNotificationsEventsDataByDay": {
        "type": "object",
        "properties": {
          "correlationId": {
            "type": "string",
            "description": "A unique ID assigned to this request.",
            "example": "23921650-c073-11ea-860f-06bc8182190e"
          },
          "totalCount": {
            "type": "number",
            "description": "The total number of results returned for the portfolio.",
            "example": 36
          },
          "data": {
            "type": "array",
            "description": "The number of notification events for each day in the date range.",
            "items": {
              "type": "object",
              "description": "The notification event count for one day.",
              "properties": {
                "dataDate": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date that the event occurred.",
                  "example": "2019-12-06T08:23:37Z"
                },
                "dataValue": {
                  "type": "integer",
                  "description": "The total number of events that occurred on the given date.",
                  "example": 3
                }
              }
            }
          },
          "paging": {
            "type": "object",
            "description": "Paging parameters.",
            "properties": {
              "first": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The page number of the first page, null if there is only one page.",
                "example": null
              },
              "size": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The maximum number of results returned per page.",
                "example": null
              },
              "prev": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The page number of the previous page, null if there is no previous page available.",
                "example": null
              },
              "next": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The page number of the next page, null if there is no next page available.",
                "example": null
              },
              "last": {
                "type": [
                  "number",
                  "null"
                ],
                "description": "The page number of the last page.",
                "example": null
              }
            }
          }
        }
      }
    },
    "parameters": {
      "gmPage": {
        "name": "page",
        "in": "query",
        "description": "Starting page number inGlobal Monitoring is `0`. If all items are displayed on one page this can also be left blank.",
        "schema": {
          "type": "integer",
          "default": 0
        }
      },
      "pageSize": {
        "name": "pageSize",
        "in": "query",
        "description": "Specifies the number of items to be displayed per page. Allowed values are between 1 and 100.",
        "example": 10,
        "schema": {
          "type": "integer"
        }
      },
      "sortBy": {
        "name": "sortBy",
        "in": "query",
        "description": "Sort results by this column. Null values of sort column are listed after non-nulls.",
        "schema": {
          "type": "string",
          "default": "eventId",
          "enum": [
            "companyName",
            "countryCode",
            "eventId",
            "eventDate"
          ]
        }
      },
      "sortDir": {
        "name": "sortDir",
        "in": "query",
        "description": "The direction that you wish to sort results by.",
        "schema": {
          "type": "string",
          "default": "asc",
          "enum": [
            "asc",
            "desc"
          ]
        }
      },
      "startDate": {
        "name": "startDate",
        "in": "query",
        "description": "The start date on which results are filtered. A date, for example `2026-11-25`. A date and time is also accepted, with or without a time zone, for example `2026-11-25T09:30:00` or `2026-11-25T09:30:00Z`. A date without hyphens, such as `20261125`, returns `400`.",
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-10-25"
      },
      "endDate": {
        "name": "endDate",
        "in": "query",
        "description": "The end date on which results are filtered. A date, for example `2026-11-25`. A date and time is also accepted, with or without a time zone, for example `2026-11-25T09:30:00` or `2026-11-25T09:30:00Z`. A date without hyphens, such as `20261125`, returns `400`.",
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-11-25"
      },
      "filterByCreatedDate": {
        "name": "filterByCreatedDate",
        "in": "query",
        "description": "Set to `true` to filter the Notification Events of the \"createdDate\" field when using `startDate` and `endDate` parameters. By default this is set to `false`, with the date parameters filtering using the \"eventDate\" field.",
        "schema": {
          "type": "boolean",
          "default": false,
          "enum": [
            false,
            true
          ]
        }
      }
    }
  },
  "security": [
    {
      "bearerToken": []
    }
  ]
}