POST /external/api/v3/url

Get an URL for a questionnaire.

Request Information

URI Parameters

None.

Body Parameters

GenerateRequest
NameDescriptionTypeAdditional informationNullable
CreateAnswers

Do not create answers (will increase the speed of the request but result in a non working desktop URL; default = true).

boolean

None

False
CustomerCounter

Use counter.

boolean

None

True
Data

Collection of customer data.

Collection of UrlCustomerData

None

False
Host

Override the host in the URL.

string

None

False
Intro

Default message to be included in the URL (must be configured by Expoints).

boolean

None

True
Mapping

Indicates whether to use mappings to add or remove data.

boolean

None

True
Short

Shorten URL using Bitly (must be configured by Expoints).

boolean

None

False
IsTest

Customers will be added as test records.

boolean

None

False
TransactionDate

Date of the transaction. If not provided, the current date and time will be selected.

date

None

True
Validate

Validate customer based on provided data (default = true).

boolean

None

False
PreviousId

Id of previous customer. If supplied, data of previous customer will be copied. Any provided data will override the duplicate copied data.

integer

None

True
Answers

Collection of pre-filled answers.

Collection of ImportAnswerExternal

None

False
AnswersToCopy

Collection of answers ids to copy from previous customer.

Collection of integer

None

False
CopyAllAnswers

Copy all answers from previous customer.

boolean

None

True
IsConcept

Marks a customer as concept and automatically as test. Use this only for testing concept questionnaires (when available).

boolean

None

True

Request Formats

application/json

Sample:
{
  "CreateAnswers": true,
  "CustomerCounter": true,
  "Data": [
    {
      "CustomerDataColumnId": 1,
      "CustomerDataTechnicalName": "sample string 1",
      "CustomerDataExternalTechnicalName": "sample string 2",
      "Value": "sample string 3"
    },
    {
      "CustomerDataColumnId": 1,
      "CustomerDataTechnicalName": "sample string 1",
      "CustomerDataExternalTechnicalName": "sample string 2",
      "Value": "sample string 3"
    }
  ],
  "Host": "sample string 2",
  "Intro": true,
  "Mapping": true,
  "Short": true,
  "IsTest": true,
  "TransactionDate": "2024-12-07T20:32:10.1634457+01:00",
  "Validate": true,
  "PreviousId": 1,
  "Answers": [
    {
      "BaseQuestionId": 1,
      "IsNotApplicableSelected": true,
      "Text": "sample string 2",
      "SelectedScalePositions": [
        {
          "Id": 1,
          "Label": "sample string 1",
          "Value": 1,
          "Ranking": 1
        },
        {
          "Id": 1,
          "Label": "sample string 1",
          "Value": 1,
          "Ranking": 1
        }
      ],
      "DateAnswered": "2024-12-07T20:32:10.1634457+01:00",
      "FileAnswers": [
        {
          "Id": 1,
          "AnswerId": 2,
          "FileName": "sample string 3",
          "FileSize": 4,
          "FileType": "sample string 5",
          "Data": "QEA=",
          "IsEncrypted": true,
          "CertificateThumbprint": "sample string 7",
          "EncryptionKey": "sample string 8"
        },
        {
          "Id": 1,
          "AnswerId": 2,
          "FileName": "sample string 3",
          "FileSize": 4,
          "FileType": "sample string 5",
          "Data": "QEA=",
          "IsEncrypted": true,
          "CertificateThumbprint": "sample string 7",
          "EncryptionKey": "sample string 8"
        }
      ],
      "PageRepetition": 1,
      "SectionRepetition": 1
    },
    {
      "BaseQuestionId": 1,
      "IsNotApplicableSelected": true,
      "Text": "sample string 2",
      "SelectedScalePositions": [
        {
          "Id": 1,
          "Label": "sample string 1",
          "Value": 1,
          "Ranking": 1
        },
        {
          "Id": 1,
          "Label": "sample string 1",
          "Value": 1,
          "Ranking": 1
        }
      ],
      "DateAnswered": "2024-12-07T20:32:10.1634457+01:00",
      "FileAnswers": [
        {
          "Id": 1,
          "AnswerId": 2,
          "FileName": "sample string 3",
          "FileSize": 4,
          "FileType": "sample string 5",
          "Data": "QEA=",
          "IsEncrypted": true,
          "CertificateThumbprint": "sample string 7",
          "EncryptionKey": "sample string 8"
        },
        {
          "Id": 1,
          "AnswerId": 2,
          "FileName": "sample string 3",
          "FileSize": 4,
          "FileType": "sample string 5",
          "Data": "QEA=",
          "IsEncrypted": true,
          "CertificateThumbprint": "sample string 7",
          "EncryptionKey": "sample string 8"
        }
      ],
      "PageRepetition": 1,
      "SectionRepetition": 1
    }
  ],
  "AnswersToCopy": [
    1,
    2
  ],
  "CopyAllAnswers": true,
  "IsConcept": true
}

application/xml

Sample:
<GenerateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Expoints.API.Extern.V1.Requests">
  <Answers xmlns:d2p1="http://schemas.datacontract.org/2004/07/Expoints.API.Extern.Models">
    <d2p1:ImportAnswerExternal>
      <d2p1:DateAnswered>2024-12-07T20:32:10.1634457+01:00</d2p1:DateAnswered>
      <d2p1:FileAnswers>
        <d2p1:FileAnswer>
          <d2p1:AnswerId>2</d2p1:AnswerId>
          <d2p1:CertificateThumbprint>sample string 7</d2p1:CertificateThumbprint>
          <d2p1:Data>QEA=</d2p1:Data>
          <d2p1:EncryptionKey>sample string 8</d2p1:EncryptionKey>
          <d2p1:FileName>sample string 3</d2p1:FileName>
          <d2p1:FileSize>4</d2p1:FileSize>
          <d2p1:FileType>sample string 5</d2p1:FileType>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:IsEncrypted>true</d2p1:IsEncrypted>
        </d2p1:FileAnswer>
        <d2p1:FileAnswer>
          <d2p1:AnswerId>2</d2p1:AnswerId>
          <d2p1:CertificateThumbprint>sample string 7</d2p1:CertificateThumbprint>
          <d2p1:Data>QEA=</d2p1:Data>
          <d2p1:EncryptionKey>sample string 8</d2p1:EncryptionKey>
          <d2p1:FileName>sample string 3</d2p1:FileName>
          <d2p1:FileSize>4</d2p1:FileSize>
          <d2p1:FileType>sample string 5</d2p1:FileType>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:IsEncrypted>true</d2p1:IsEncrypted>
        </d2p1:FileAnswer>
      </d2p1:FileAnswers>
      <d2p1:PageRepetition>1</d2p1:PageRepetition>
      <d2p1:SectionRepetition>1</d2p1:SectionRepetition>
      <d2p1:SelectedScalePositions>
        <d2p1:ScalePosition>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:Label>sample string 1</d2p1:Label>
          <d2p1:Ranking>1</d2p1:Ranking>
          <d2p1:Value>1</d2p1:Value>
        </d2p1:ScalePosition>
        <d2p1:ScalePosition>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:Label>sample string 1</d2p1:Label>
          <d2p1:Ranking>1</d2p1:Ranking>
          <d2p1:Value>1</d2p1:Value>
        </d2p1:ScalePosition>
      </d2p1:SelectedScalePositions>
      <d2p1:Text>sample string 2</d2p1:Text>
      <d2p1:BaseQuestionId>1</d2p1:BaseQuestionId>
    </d2p1:ImportAnswerExternal>
    <d2p1:ImportAnswerExternal>
      <d2p1:DateAnswered>2024-12-07T20:32:10.1634457+01:00</d2p1:DateAnswered>
      <d2p1:FileAnswers>
        <d2p1:FileAnswer>
          <d2p1:AnswerId>2</d2p1:AnswerId>
          <d2p1:CertificateThumbprint>sample string 7</d2p1:CertificateThumbprint>
          <d2p1:Data>QEA=</d2p1:Data>
          <d2p1:EncryptionKey>sample string 8</d2p1:EncryptionKey>
          <d2p1:FileName>sample string 3</d2p1:FileName>
          <d2p1:FileSize>4</d2p1:FileSize>
          <d2p1:FileType>sample string 5</d2p1:FileType>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:IsEncrypted>true</d2p1:IsEncrypted>
        </d2p1:FileAnswer>
        <d2p1:FileAnswer>
          <d2p1:AnswerId>2</d2p1:AnswerId>
          <d2p1:CertificateThumbprint>sample string 7</d2p1:CertificateThumbprint>
          <d2p1:Data>QEA=</d2p1:Data>
          <d2p1:EncryptionKey>sample string 8</d2p1:EncryptionKey>
          <d2p1:FileName>sample string 3</d2p1:FileName>
          <d2p1:FileSize>4</d2p1:FileSize>
          <d2p1:FileType>sample string 5</d2p1:FileType>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:IsEncrypted>true</d2p1:IsEncrypted>
        </d2p1:FileAnswer>
      </d2p1:FileAnswers>
      <d2p1:PageRepetition>1</d2p1:PageRepetition>
      <d2p1:SectionRepetition>1</d2p1:SectionRepetition>
      <d2p1:SelectedScalePositions>
        <d2p1:ScalePosition>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:Label>sample string 1</d2p1:Label>
          <d2p1:Ranking>1</d2p1:Ranking>
          <d2p1:Value>1</d2p1:Value>
        </d2p1:ScalePosition>
        <d2p1:ScalePosition>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:Label>sample string 1</d2p1:Label>
          <d2p1:Ranking>1</d2p1:Ranking>
          <d2p1:Value>1</d2p1:Value>
        </d2p1:ScalePosition>
      </d2p1:SelectedScalePositions>
      <d2p1:Text>sample string 2</d2p1:Text>
      <d2p1:BaseQuestionId>1</d2p1:BaseQuestionId>
    </d2p1:ImportAnswerExternal>
  </Answers>
  <AnswersToCopy xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </AnswersToCopy>
  <CopyAllAnswers>true</CopyAllAnswers>
  <CreateAnswers>true</CreateAnswers>
  <CustomerCounter>true</CustomerCounter>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Expoints.API.Extern.V1.Models">
    <d2p1:UrlCustomerData>
      <d2p1:CustomerDataColumnId>1</d2p1:CustomerDataColumnId>
      <d2p1:CustomerDataExternalTechnicalName>sample string 2</d2p1:CustomerDataExternalTechnicalName>
      <d2p1:CustomerDataTechnicalName>sample string 1</d2p1:CustomerDataTechnicalName>
      <d2p1:Value>sample string 3</d2p1:Value>
    </d2p1:UrlCustomerData>
    <d2p1:UrlCustomerData>
      <d2p1:CustomerDataColumnId>1</d2p1:CustomerDataColumnId>
      <d2p1:CustomerDataExternalTechnicalName>sample string 2</d2p1:CustomerDataExternalTechnicalName>
      <d2p1:CustomerDataTechnicalName>sample string 1</d2p1:CustomerDataTechnicalName>
      <d2p1:Value>sample string 3</d2p1:Value>
    </d2p1:UrlCustomerData>
  </Data>
  <Host>sample string 2</Host>
  <Intro>true</Intro>
  <IsConcept>true</IsConcept>
  <IsTest>true</IsTest>
  <Mapping>true</Mapping>
  <PreviousId>1</PreviousId>
  <Short>true</Short>
  <TransactionDate>2024-12-07T20:32:10.1634457+01:00</TransactionDate>
  <Validate>true</Validate>
</GenerateRequest>

Response Information

Resource Description

GenerateResponse
NameDescriptionTypeAdditional informationNullable
URL

URL to open questionnaire.

string

None

False

Response Formats

application/json, text/json

Sample:
{
  "URL": "sample string 1"
}

application/xml, text/xml

Sample:
<GenerateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Expoints.API.Extern.V1.Responses">
  <URL>sample string 1</URL>
</GenerateResponse>

Response Status Codes

Status Code Name Description
200 OK The request has succeeded.
400 Bad Request Fulfilling the request would cause an invalid state. Request needs modification.
401 Unauthorized Missing or invalid authentication token.
403 Forbidden Server refuses to authorize the request.
408 Request Timeout The server timed out waiting for the request.
429 Too Many Requests Too many requests in a given amount of time.
500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request.
503 Service Unavailable The server is unable to proces the request at the moment, try again later.