# Get market versions

The endpoint will return the markets in active status according to the query parameters: market code and registration type

Endpoint: GET /v1/projects/{projectId}/markets/details
Version: 1.0.0
Security: OAuth2

## Path parameters:

  - `projectId` (string, required)
    Customer's project id

## Query parameters:

  - `marketCode` (string)
    Filter by ISO market code (ex. 'IT', 'AU', 'KW', etc.)
    Example: "MK"

  - `activePolicies` (boolean)
    Filter to enable viewing only active policies in markets. Default: false, returns all policies within market

  - `pageToken` (string)
    Add token from previous query if needed to retrieve more markets

  - `pageSize` (integer)
    Number of markets per page

  - `registrationType` (string)
    Type of Sender ID to be registered. Options: ALPHANUMERIC_SENDER_ID for alpha registration, LONG_NUMBER for long number sms services registration, SHORT_CODE for short code sms services registration, RCS_AGENT for RCS agent
    Enum: "ALPHANUMERIC_SENDER_ID", "LONG_NUMBER", "SHORT_CODE", "RCS_AGENT"

## Response 200 fields (application/json):

  - `marketVersions` (array)
    List of Market versions that matches with the request criteria.

  - `marketVersions.createTime` (string)
    Creation time of this major/minor market version.
    Example: "2023-09-17 06:22:34.372747"

  - `marketVersions.id` (string)
    Market Version Id.
    Example: "ddede333432ededed2"

  - `marketVersions.majorVersion` (integer)
    Major version of the policy. Indicates market requirement changes that may require resubmitting requests in progress.
    Example: 1

  - `marketVersions.marketCode` (string)
    ISO country code.
    Example: "AU"

  - `marketVersions.minorVersion` (integer)
    Minor version of the policy. Indicates market requirement changes that do not require resubmitting requests in progress.

  - `marketVersions.registrationType` (string)
    Type of Sender ID referenced by this market.
    Enum: same as `registrationType` (4 values)

  - `marketVersions.specialConditions` (object)

  - `marketVersions.specialConditions.chainedSpecialConditions` (array)
    A chained special conditions that contains an answer of a previous question, a new question/answers if needed, a policy id if there are no more questions

  - `marketVersions.specialConditions.chainedSpecialConditions.answer` (string)
    Answer to previous question
    Example: "No"

  - `marketVersions.specialConditions.chainedSpecialConditions.description` (string)
    The Description field provides context or additional information to help users understand the purpose and usage of the Answer field.
    Example: "Promotional, marketing or advertising purposes"

  - `marketVersions.specialConditions.chainedSpecialConditions.chainedSpecialConditions` (array)
    A chained special conditions that contains an answer of a previous question, a new question/answers if needed, a policy id if there are no more questions

  - `marketVersions.specialConditions.chainedSpecialConditions.policyId` (string)
    In markets without special conditions, the policy id is here. This field will be ignored (not exist) if there are chained special conditions
    Example: "43342642354352344"

  - `marketVersions.specialConditions.chainedSpecialConditions.prompt` (string)
    A question to be answered with the chained special conditions. This field will be ignored (not exist) if there are not chained special conditions
    Example: "Is this brand registered as a local legal entity in this market?"

  - `marketVersions.specialConditions.policyId` (string)
    In markets without special conditions, the policy id is here. This field will be ignored (not exist) if there are chained special conditions
    Example: "43342642354352344"

  - `marketVersions.specialConditions.prompt` (string)
    A question to be answered with the chained special conditions. This field will be ignored (not exist) if there are not chained special conditions
    Example: "Is this brand registered as a local legal entity in this market?"

  - `marketVersions.status` (string)
    Market status, it can be active or disabled
    Enum: "ACTIVE", "DISABLED"

  - `nextPageToken` (string)
    next token to be used to retrieve more markets
    Example: "CgptYXJrZXRDb2RlEk4KRnR5cGUuZ29vZ2xlYXBpcy5jb20vc2luY2gubnVtcmVnLnBvbGljeS52MWFscGhhMi5NYXJrZXRWZXJzaW9uUGFnZU1hcmsSBAoCS1o="

  - `totalSize` (integer)
    Total Number of markets.
    Example: 50

## Response 400 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.message` (string)

  - `error.status` (string)


