# Check Update Consequences

Some changes to your company profile will result in your profile having to be revalidated, such as a change in your company address. With this endpoint you can check what the possible concequences are of the update you want to perform, to make sure you don't accidentally invalidate your profile.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Company Profiles API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.cm.com"
    }
  ],
  "paths": {
    "/voice-companyprofilesapi/v1/{accountGuid}/companyprofiles/{companyProfileGuid}/update-consequences": {
      "post": {
        "tags": [
          "Company Profile"
        ],
        "summary": "Check Update Consequences",
        "description": "Some changes to your company profile will result in your profile having to be revalidated, such as a change in your company address. With this endpoint you can check what the possible concequences are of the update you want to perform, to make sure you don't accidentally invalidate your profile.",
        "parameters": [
          {
            "name": "accountGuid",
            "in": "path",
            "description": "Unique identifier of the Logical Account or Voice Account.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyProfileGuid",
            "in": "path",
            "description": "Unique identifier of the company profile.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The updated company profile",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUpdateCompanyProfile"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUpdateCompanyProfile"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ApiUpdateCompanyProfile"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiCompanyProfile"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCollection"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorCollection"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiCompanyProfile": {
        "title": "Company Profile",
        "required": [
          "city",
          "companyCountryCode",
          "companyName",
          "contactFirstName",
          "contactLastName",
          "emailAddresses",
          "phoneNumberCountryCode",
          "phoneNumberTypes",
          "postalCode",
          "profileName",
          "registrationNumber",
          "representativeFirstName",
          "representativeLastName",
          "street",
          "streetNumber"
        ],
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "description": "Unique identifier of the company profile.",
            "format": "uuid"
          },
          "voiceAccountGuid": {
            "type": "string",
            "description": "Unique identifier of the Logical Account or Voice Account.",
            "format": "uuid"
          },
          "profileName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "The name of the company profile. This name does not have to be equal to your company name, it's just to make\r\nthis profile more easily identifiable in our tooling. If the company has multiple branches, this profile\r\ncan be named 'Amsterdam Office' for example."
          },
          "companyName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "The name of the company that will be using the phone numbers requested with this profile."
          },
          "registrationNumber": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Business register number of the company (e.g. KVK number for Dutch companies)."
          },
          "representativeFirstName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "First name of company’s representative that is authorized to sign contracts for the company."
          },
          "representativeLastName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Last name of company’s representative that is authorized to sign contracts for the company"
          },
          "representativePhoneNumber": {
            "maxLength": 20,
            "minLength": 6,
            "type": "string",
            "description": "Phone number of company’s representative that is authorized to sign contracts for the company",
            "nullable": true
          },
          "companyCountryCode": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "Country code of the company address in ISO 3166-1 alpha-2 format."
          },
          "requiredFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Depending on the country of the company address, we might require additional information that needs to be\r\nsupplied with the API call. See the `Verify Required Fields` endpoint documentation for more information.",
            "nullable": true
          },
          "region": {
            "maxLength": 100,
            "type": "string",
            "description": "Region of the company address.",
            "nullable": true
          },
          "city": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "City of the company address."
          },
          "postalCode": {
            "maxLength": 12,
            "minLength": 1,
            "type": "string",
            "description": "Postal code of the company address."
          },
          "street": {
            "maxLength": 255,
            "minLength": 1,
            "type": "string",
            "description": "Street of the company address."
          },
          "streetNumber": {
            "maxLength": 10,
            "minLength": 1,
            "type": "string",
            "description": "Street number of the company address."
          },
          "streetNumberExt": {
            "maxLength": 255,
            "type": "string",
            "description": "Extra information about the street number. E.g. apartment or suite.",
            "nullable": true
          },
          "phoneNumberCountryCode": {
            "maxLength": 2,
            "minLength": 2,
            "type": "string",
            "description": "The country code of the country this company profile will request numbers for. For example, if you supply\r\n`NL`, you will only be able to request Dutch phone numbers with this profile."
          },
          "phoneNumberTypes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "minLength": 1,
              "type": "string"
            },
            "description": "The types of phone numbers this profile is able to request. This can be `LOCAL`, `NATIONAL` and `TOLLFREE`."
          },
          "contactFirstName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "First name of the person that CM.com will be able to contact regarding this profile. This contact can be about\r\nthe approval status of your profile or a request for additional information."
          },
          "contactLastName": {
            "maxLength": 100,
            "minLength": 1,
            "type": "string",
            "description": "Last name of the person that CM.com will be able to contact regarding this profile. This contact can be about\r\nthe approval status of your profile or a request for additional information."
          },
          "emailAddresses": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "format": "email"
            },
            "description": "One or more email addresses that CM.com will be able to contact regarding this profile. This contact can be about\r\nthe approval status of your profile or a request for additional information."
          },
          "callbackUrl": {
            "type": "string",
            "description": "URL that we'll send a POST request to when the status of the request has been updated. The body of this post\r\nrequest will contain the entire company profile, including the updated status.",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDocument"
            },
            "description": "List of documents that are legaly required for us to be able to request phone numbers.",
            "nullable": true
          },
          "deletedOn": {
            "type": "string",
            "description": "UTC DateTime on which the current profile was deleted. Can be null if the profile is still active.",
            "format": "date-time",
            "nullable": true
          },
          "statusKey": {
            "type": "string",
            "description": "The current approval status of the company profile.",
            "nullable": true
          },
          "statusComment": {
            "type": "string",
            "description": "Optional comment on the current approval status of the profile.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A company profile that represents a company with a physical address that can be used for requesting new phone\r\nnumbers within the CM.com Voice platform."
      },
      "ApiDocument": {
        "title": "Document",
        "type": "object",
        "properties": {
          "requirementKey": {
            "type": "string",
            "description": "The key of the requirement which this document represents.",
            "nullable": true
          },
          "documentGuid": {
            "type": "string",
            "description": "Unique identifier of the document in the Voice Documents API.",
            "format": "uuid",
            "nullable": true
          },
          "approved": {
            "type": "boolean",
            "description": "Whether or not the document was approved by CM.com."
          },
          "approvalComment": {
            "type": "string",
            "description": "Additional information on the documents approval status, should only be filled in when the document has been\r\ndenied.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A document that's required by rules and regulations of a specific country for requesting and operating phone\r\nnumbers."
      },
      "ApiUpdateCompanyProfile": {
        "title": "Update Company Profile",
        "type": "object",
        "properties": {
          "profileName": {
            "type": "string",
            "description": "The name of the company profile. This name does not have to be equal to your company name, it's just to make\r\nthis profile more easily identifiable in our tooling. If the company has multiple branches, this profile\r\ncan be named 'Amsterdam Office' for example.",
            "nullable": true
          },
          "companyName": {
            "type": "string",
            "description": "The name of the company that will be using the phone numbers requested with this profile.",
            "nullable": true
          },
          "registrationNumber": {
            "type": "string",
            "description": "Business register number of the company (e.g. KVK number for Dutch companies).",
            "nullable": true
          },
          "representativeFirstName": {
            "type": "string",
            "description": "First name of company’s representative that is authorized to sign contracts for the company.",
            "nullable": true
          },
          "representativeLastName": {
            "type": "string",
            "description": "Last name of company’s representative that is authorized to sign contracts for the company",
            "nullable": true
          },
          "representativePhoneNumber": {
            "type": "string",
            "description": "Phone number of company’s representative that is authorized to sign contracts for the company",
            "nullable": true
          },
          "requiredFields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Depending on the country of the company address, we might require additional information that needs to be\r\nsupplied with the API call. See the `Verify Required Fields` endpoint documentation for more information.",
            "nullable": true
          },
          "phoneNumberCountryCode": {
            "type": "string",
            "description": "The country code of the country this company profile will request numbers for. For example, if you supply\r\n`NL`, you will only be able to request Dutch phone numbers with this profile.",
            "nullable": true
          },
          "phoneNumberTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The types of phone numbers this profile is able to request. This can be `LOCAL`, `NATIONAL` and `TOLLFREE`.",
            "nullable": true
          },
          "contactFirstName": {
            "type": "string",
            "description": "First name of the person that CM.com will be able to contact regarding this profile. This contact can be about\r\nthe approval status of your profile or a request for additional information.",
            "nullable": true
          },
          "contactLastName": {
            "type": "string",
            "description": "Last name of the person that CM.com will be able to contact regarding this profile. This contact can be about\r\nthe approval status of your profile or a request for additional information.",
            "nullable": true
          },
          "emailAddresses": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "One or more email addresses that CM.com will be able to contact regarding this profile. This contact can be about\r\nthe approval status of your profile or a request for additional information.",
            "nullable": true
          },
          "callbackUrl": {
            "type": "string",
            "description": "URL that we'll send a POST request to when the status of the request has been updated. The body of this post\r\nrequest will contain the entire company profile, including the updated status.",
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiDocument"
            },
            "description": "List of documents that are legaly required for us to be able to request phone numbers.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Update model for a company profile."
      },
      "Error": {
        "title": "Error",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ErrorCollection": {
        "title": "Error Collection",
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "nullable": true
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "X-CM-PRODUCTTOKEN": {
        "type": "apiKey",
        "description": "Your producttoken",
        "name": "X-CM-PRODUCTTOKEN",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "X-CM-PRODUCTTOKEN": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 244,
      "2": 4,
      "3": 93,
      "4": 108,
      "5": 235,
      "6": 38,
      "7": 0,
      "8": 75,
      "9": 131,
      "10": 174,
      "11": 193
    }
  }
}
```