github.com/grokify/go-ringcentral-client@v0.3.31/codegen/specs-engagedigital_v3.0.0/openapi-spec_custom-fields.json (about)

     1  {
     2      "openapi":"3.0.0",
     3      "info":{
     4        "description":"",
     5        "version":"1.0",
     6        "title":"Engage Digital API",
     7        "termsOfService":"https://developer.ringcentral.com"
     8      },
     9      "tags":[
    10        {
    11          "name":"CustomFields"
    12        }
    13      ],
    14      "paths":{
    15        "/custom_fields":{
    16          "get":{
    17            "tags":[
    18              "CustomFields"
    19            ],
    20            "summary":"Getting all custom fields",
    21            "operationId":"getAllCustomFields",
    22            "description":"This method renders custom fields ordered by position (ascending).\n\nAuthorization​: only users that can see custom fields in administration section.",
    23            "parameters":[
    24              {
    25                "name":"offset",
    26                "in":"query",
    27                "description":"The record index to start. Default value is 0.",
    28                "required":false,
    29                "schema":{
    30                  "type":"integer",
    31                  "format":"int32"
    32                }
    33              },
    34              {
    35                "name":"limit",
    36                "in":"query",
    37                "description":"The max number of records to return. Default value is 30, max value is 150.",
    38                "required":false,
    39                "schema":{
    40                  "type":"integer",
    41                  "format":"int32"
    42                }
    43              }
    44            ],
    45            "responses":{
    46              "200":{
    47                "description":"Success",
    48                "content":{
    49                  "application/json":{
    50                    "schema":{
    51                      "$ref":"#/components/schemas/GetAllCustomFieldsResponse"
    52                    }
    53                  }
    54                }
    55              }
    56            }
    57          },
    58          "post":{
    59            "tags":[
    60              "CustomFields"
    61            ],
    62            "summary":"Creating a custom field",
    63            "operationId":"createCustomField",
    64            "description":"This method creates a custom field. In case of success it renders the custom field, otherwise, it renders an error (422 HTTP code).\n\nAuthorization​: only users that can create custom fields.",
    65            "parameters":[
    66              {
    67                "name":"associated_type_name",
    68                "in":"query",
    69                "required":true,
    70                "description":"The associated type of custom field. It can be IdentityGroup or Intervention.",
    71                "schema":{
    72                  "type":"string",
    73                  "enum":["IdentityGroup","Intervention"]
    74                }
    75              },
    76              {
    77                "name":"label",
    78                "in":"query",
    79                "required":true,
    80                "description":"The label of the custom field.",
    81                "schema":{
    82                  "type":"string"
    83                }
    84              },
    85              {
    86                "name":"key",
    87                "in":"query",
    88                "required":false,
    89                "description":"The key of the custom field (example: customer_id). This is used to determine how it is stored on identity groups.",
    90                "schema":{
    91                  "type":"string"
    92                }
    93              },
    94              {
    95                "name":"type",
    96                "in":"query",
    97                "required":false,
    98                "description":"The type of the custom field. It can be string, boolean, text, integer, float, single_choice,",
    99                "schema":{
   100                  "type":"string",
   101                  "enum":[
   102                    "string",
   103                    "boolean",
   104                    "text",
   105                    "integer",
   106                    "float",
   107                    "single_choice",
   108                    "multiple_choice"
   109                  ]
   110                }
   111              },
   112              {
   113                "name":"choices",
   114                "in":"query",
   115                "required":false,
   116                "explode":true,
   117                "description":"A list of choices to be for single_choice, or multiple_choice types. This must be given",
   118                "schema":{
   119                  "type":"array",
   120                  "items":{
   121                    "type":"string"
   122                  }
   123                }
   124              },
   125              {
   126                "name":"multiple",
   127                "in":"query",
   128                "required":false,
   129                "description":"true or false, this as no effect on single_choice, multiple_choice or boolean types",
   130                "schema":{
   131                  "type":"boolean"
   132                }
   133              },
   134              {
   135                "name":"position",
   136                "in":"query",
   137                "required":false,
   138                "description":"an integer that indicates custom field’s position between others (default: -1).",
   139                "schema":{
   140                  "type":"integer",
   141                  "default":-1
   142                }
   143              }
   144            ],
   145            "responses":{
   146              "200":{
   147                "description":"Success",
   148                "content":{
   149                  "application/json":{
   150                    "schema":{
   151                      "$ref":"#/components/schemas/CustomField"
   152                    }
   153                  }
   154                }
   155              }
   156            }
   157          }
   158        },
   159        "/custom_fields/{customFieldId}":{
   160          "get":{
   161            "tags":[
   162              "CustomFields"
   163            ],
   164            "summary":"Getting a custom field from its id",
   165            "operationId":"getCustomField",
   166            "description":"This method renders a custom field from given id.\n\nAuthorization​: only users that can see custom fields in administration section.",
   167            "parameters":[
   168              {
   169                "name":"customFieldId",
   170                "in":"path",
   171                "required":true,
   172                "schema":{
   173                  "type":"string"
   174                }
   175              }
   176            ],
   177            "responses":{
   178              "200":{
   179                "description":"Success",
   180                "content":{
   181                  "application/json":{
   182                    "schema":{
   183                      "$ref":"#/components/schemas/CustomField"
   184                    }
   185                  }
   186                }
   187              }
   188            }
   189          },
   190          "put":{
   191            "tags":[
   192              "CustomFields"
   193            ],
   194            "summary":"Updating a custom field",
   195            "operationId":"updateCustomField",
   196            "description":"This method updates an existing custom field from given attributes and renders it in case of success.\n\nAuthorization​: only users that are able to update custom fields.",
   197            "parameters":[
   198              {
   199                "name":"customFieldId",
   200                "in":"path",
   201                "required":true,
   202                "schema":{
   203                  "type":"string"
   204                }
   205              },
   206              {
   207                "name":"label",
   208                "description":"Custom field’s label.",
   209                "in":"query",
   210                "required":false,
   211                "schema":{
   212                  "type":"string"
   213                }
   214              },
   215              {
   216                "name":"choices",
   217                "in":"query",
   218                "required":false,
   219                "explode":true,
   220                "schema":{
   221                  "type":"array",
   222                  "items":{
   223                    "type":"string"
   224                  }
   225                }
   226              },
   227              {
   228                "name":"position",
   229                "description":"Custom field’s position.",
   230                "in":"query",
   231                "required":false,
   232                "schema":{
   233                  "type":"integer",
   234                  "format":"int32"
   235                }
   236              }
   237            ],
   238            "responses":{
   239              "200":{
   240                "description":"Success",
   241                "content":{
   242                  "application/json":{
   243                    "schema":{
   244                      "$ref":"#/components/schemas/CustomField"
   245                    }
   246                  }
   247                }
   248              }
   249            }
   250          },
   251          "delete":{
   252            "tags":[
   253              "CustomFields"
   254            ],
   255            "summary":"Deleting a custom field",
   256            "operationId":"deleteCustomField",
   257            "description":"This method destroys an existing custom field. It renders custom field itself. It renders a 404 if id is invalid.\n\nAuthorization​: only users that are able to destroy custom fields..",
   258            "parameters":[
   259              {
   260                "name":"customFieldId",
   261                "in":"path",
   262                "required":true,
   263                "schema":{
   264                  "type":"string"
   265                }
   266              }
   267            ],
   268            "responses":{
   269              "200":{
   270                "description":"Success",
   271                "content":{
   272                  "application/json":{
   273                    "schema":{
   274                      "$ref":"#/components/schemas/CustomField"
   275                    }
   276                  }
   277                }
   278              }
   279            }
   280          }
   281        }
   282      },
   283      "servers":[
   284        {
   285          "url":"https://DOMAIN.api.engagement.dimelo.com/1.0"
   286        }
   287      ],
   288      "components":{
   289        "schemas":{
   290          "GetAllCustomFieldsResponse":{
   291            "properties":{
   292              "count":{
   293                "type":"integer",
   294                "format":"int32"
   295              },
   296              "limit":{
   297                "type":"integer",
   298                "format":"int32"
   299              },
   300              "offset":{
   301                "type":"integer",
   302                "format":"int32"
   303              },
   304              "records":{
   305                "type":"array",
   306                "items":{
   307                  "$ref":"#/components/schemas/CustomField"
   308                }
   309              }
   310            }
   311          },
   312          "CustomField":{
   313            "required":[
   314              "id",
   315              "label"
   316            ],
   317            "properties":{
   318              "id":{
   319                "type":"string"
   320              },
   321              "created_at":{
   322                "type":"string",
   323                "format":"date-time"
   324              },
   325              "updated_at":{
   326                "type":"string",
   327                "format":"date-time"
   328              },
   329              "label":{
   330                "type":"string"
   331              },
   332              "associated_type_name":{
   333                "type":"string"
   334              },
   335              "key":{
   336                "type":"string"
   337              },
   338              "multiple":{
   339                "type":"boolean"
   340              },
   341              "position":{
   342                "type":"integer"
   343              },
   344              "type":{
   345                "type":"string"
   346              }
   347            }
   348          }
   349        }
   350      }
   351    }