Sections

Create section

Creates a new section in page<br>Required scopes: <b>write_requests</b>

post/partner_api/v1/sections

Request

  • Base URL
    https://api.contentsnare.com
  • Auth
    • OAuth 2
      Authorization code: /oauth/authorization
      Token URL: /oauth/token scopes: write_requests
    • or HTTP bearer

Request body

compressedboolean

A boolean value indicating whether the section is displayed as a single compressed block with one submit button

namestring

Section name. If it isn't set then the source template name is used.

page_idstring required

Id of a page where a new section should be added

source_template_idstring

Source section template id (source_template_id or source_template_name should be set)

source_template_namestring

Source section template name (source_template_id or source_template_name should be set)

Example request

{
  "name": "Section 1",
  "page_id": "pag_jAxqEgBi4prM6g",
  "source_template_id": "rtp_pdYGVjPxSJvA6y",
  "source_template_name": "Section Template 1"
}

Response

successful

compressedboolean

A boolean value indicating whether the section is displayed as a single compressed block with one submit button

idstring
instruction_textstring
namestring
show_instructionboolean
sorting_positioninteger
reference_idstring

A reference ID is an identifier, unique within a page, that remains consistent across all instances of a section, whether in multiple requests or within duplicated pages of the same request

Example response

{
  "fields": [
    {
      "additional_fields": [
        {
          "id": "afd_LWdqOpnaT56vo0",
          "text": "Option1"
        }
      ],
      "answers": [
        {
          "attachment": {
            "byte_size": 74226,
            "filename": "doc1.jpeg",
            "signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6...",
            "url": "https://example.com/documents/doc1.jpeg"
          },
          "id": "ans_RQ1zp49c7Xz4km",
          "field_id": "fld_1lqbwY6TaMPmAo",
          "link": "https://...",
          "rejection_comment": "rejection reason",
          "row": [
            {
              "field_column_id": "fcl_G60KqQ61ubvAnP",
              "text": "table cell text"
            }
          ],
          "sorting_position": 3,
          "status": "todo",
          "text": [
            "answer text"
          ]
        }
      ],
      "field_columns": [
        {
          "id": "fcl_G60KqQ61ubvAnP",
          "name": "Column 1",
          "required": true
        }
      ],
      "field_configuration": {
        "id": "afd_LWdqOpnaT56vo0",
        "settings": {
          "some_setting1": "val1",
          "some_setting2": {
            "nested_setting1": "val2"
          }
        }
      },
      "id": "fld_1lqbwY6TaMPmAo",
      "images": [
        {
          "byte_size": 74226,
          "filename": "doc1.jpeg",
          "image": {
            "height": 183,
            "url": "https://example.com/documents/doc1.jpeg",
            "width": 275
          },
          "signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6...",
          "thumbnail": {
            "height": 64,
            "url": "https://example.com/documents/thumbnails/doc1.jpeg",
            "width": 92
          },
          "url": "https://example.com/documents/doc1.jpeg"
        }
      ],
      "instruction_text": "<h5>Field instruction</h5>",
      "min_answer_count": 1,
      "max_answer_count": 5,
      "name": "Text Field 1",
      "placeholder": "Placeholder text",
      "rejection_message": {
        "text": "rejection reason"
      },
      "repeater_enabled": true,
      "sorting_position": 5,
      "status": "redo",
      "reference_id": "rfld_1lqbwY6TaMPmAo",
      "sub_type": "text",
      "type": "Fields::Text",
      "values": [
        "Example completed field answer"
      ],
      "values_flat": "Example completed field answer",
      "values_structured": [
        {
          "value": "Example completed field answer"
        }
      ]
    }
  ],
  "id": "sec_YlVGMK1svdga0D",
  "instruction_text": "<h5>Section instruction</h5>",
  "name": "Section 1",
  "show_instruction": true,
  "sorting_position": 1,
  "reference_id": "rsec_YlVGMK1svdga0D"
}

Changes

No recorded changes to this operation across all 1 revision of this API.