# Get policy details

Returns the whole configuration of a given policyId, including multi configuration, fields, sections and attachments.

Endpoint: GET /v1/projects/{projectId}/policies/{policyId}
Version: 1.0.0
Security: OAuth2

## Path parameters:

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

  - `policyId` (string, required)
    Id of the policy

## Response 200 fields (application/json):

  - `attachments` (array)
    Attachment Definition

  - `attachments.description` (string)
    Attachment description
    Example: "This document is required for any Third party registration in MK local."

  - `attachments.id` (string)
    Attachment Definition Id
    Example: "43342642354352344"

  - `attachments.mandatory` (boolean)
    whether the attachment is mandatory in this policy

  - `attachments.template` (boolean)
    Whether the attachment contains a template or not. Templates can be downloaded with /template endpoint

  - `attachments.title` (string)
    Attachment title
    Example: "Third Party Authority Form"

  - `attachments.allowedMimeTypes` (array)
    Array of allowed mime types. If empty, no restrictions are applied.
    Example: ["application/pdf","application/pdf"]

  - `attachments.allowedDocumentTypes` (array)
    Document types allowed for this attachment. If specified, the documentType field in the attachment must be one of the allowed types.
    Example: ["Passport","Driver's License"]

  - `id` (string)
    Policy Version Id
    Example: "43342642354352344"

  - `jsonPolicy` (object)

  - `jsonPolicy.companyDetailsTemplate` (object)
    Policy section related to company details

  - `jsonPolicy.companyDetailsTemplate.properties` (array)

  - `jsonPolicy.companyDetailsTemplate.properties.description` (string)
    Description of the field
    Example: "Between 3 - 11 characters.\\nMust be related to the brand name.\\nMarketing SIDs are currently not allowed."

  - `jsonPolicy.companyDetailsTemplate.properties.x-placeholder` (string)
    Placeholder text shown in the field when it is empty. An example of what should be entered in the field
    Example: "e.g. name.surname@yourCompany.com"

  - `jsonPolicy.companyDetailsTemplate.properties.maxLength` (integer)
    Max length of text field
    Example: 11

  - `jsonPolicy.companyDetailsTemplate.properties.minLength` (integer)
    Min length of text field
    Example: 3

  - `jsonPolicy.companyDetailsTemplate.properties.name` (string)
    Name of the field. Serves as a key (reference) to a field
    Example: "senderId"

  - `jsonPolicy.companyDetailsTemplate.properties.required` (boolean)
    Indicator that specifies whether a field is optional or required

  - `jsonPolicy.companyDetailsTemplate.properties.title` (string)
    Name of field shown in user interface. In some cases, there is a question for which an answer is expected in the field
    Example: "Alphanumeric Sender ID"

  - `jsonPolicy.companyDetailsTemplate.properties.type` (string)
    Type of field. Possible types are 'string' - for a simple text field or enum or 'array' - for multiple texts in one field
    Enum: "string", "array"

  - `jsonPolicy.companyDetailsTemplate.properties.examples` (array)
    Used as suggestions for possible response in the field
    Example: ["By subscribing to our loyalty program","By making a purchase in-store or online"]

  - `jsonPolicy.companyDetailsTemplate.properties.pattern` (string)
    Regex pattern validation
    Example: "^[+][0-9]+$"

  - `jsonPolicy.companyDetailsTemplate.properties.message` (object)
    Pattern validation message

  - `jsonPolicy.companyDetailsTemplate.properties.message.pattern` (string)
    Pattern validation message
    Example: "The number needs to start with country code. For example +1"

  - `jsonPolicy.companyDetailsTemplate.properties.message.maxLength` (integer)
    Max length of the field value
    Example: 11

  - `jsonPolicy.companyDetailsTemplate.properties.message.minLength` (integer)
    Min length of the field value
    Example: 3

  - `jsonPolicy.companyDetailsTemplate.properties.items` (object)
    When the field type is 'array', this object describes the array items. Typically a checkbox. Contains an enum when the array items are restricted to a set of values.

  - `jsonPolicy.companyDetailsTemplate.properties.items.enum` (any)
    Possible values for the array items

  - `jsonPolicy.companyDetailsTemplate.properties.items.type` (string)
    Type of the array items. Possible types are 'string' or 'integer'
    Enum: "string", "integer"

  - `jsonPolicy.companyDetailsTemplate.properties.minItems` (integer)
    Minimum number of items selected when the field type is 'array'
    Example: 1

  - `jsonPolicy.companyDetailsTemplate.properties.enum` (any)
    Possible values for the field when the field type is not an array. Typically a dropdown. In some cases the enum contains true and null. This is for mandatory checks according to market regulations.

  - `jsonPolicy.contactPersonTemplate` (object)
    Policy section related to contact person details

  - `jsonPolicy.contactPersonTemplate.properties` (array)

  - `jsonPolicy.senderIdTemplate` (object)
    Policy section related to sender ID details

  - `jsonPolicy.senderIdTemplate.properties` (array)

  - `jsonPolicy.marketSpecificDetailsTemplate` (object)
    Only available for RCS Agent policies. This section shows some market specific requirements, while others are general for all markets.

  - `jsonPolicy.marketSpecificDetailsTemplate.properties` (array)

  - `policyMultiType` (string)
    Indicates whether the policy accepts single or multi sender id requested in each registration process
    Enum: "SINGLE", "MULTI_SENDER"

  - `policyStatus` (string)
    Policy status
    Enum: "ENABLED", "DISABLED", "INACTIVE"

  - `price` (object)

  - `price.mode` (string)
    Type of policy pricing.
    Enum: "SUBSCRIBED", "MANUAL", "NONE"

  - `price.subscription` (object)

  - `price.subscription.currency` (string)
    Currency of user

  - `price.subscription.frequency` (integer)
    Frequency of recurrent fee, is 0 when there is not recurrent fee. The number ranges from 0 to 12, where 1 indicates monthly payments and 12 indicates yearly payments

  - `price.subscription.recurrentFeeAmount` (string)
    Amount of recurrent fee

  - `price.subscription.setupFeeAmount` (string)
    Amount of setup fee

  - `isOpenPolicy` (boolean)
    Indicates if the policy has open registration system. This means that any sender ID requested is automatically approved, without any manual intervention.

  - `statusDisclaimer` (string)
    Contains disclaimer for disabled policies. Empty if policy is ACTIVE
    Example: "Policy has been disabled as Registrations for these market conditions are now dynamic."

  - `fees` (boolean)
    True if policy registration has any fees associated

## Response 404 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.message` (string)

  - `error.status` (string)


