POST UserDefinedFields/SaveUserDefinedField

Saves a UserDefinedFieldRequest


Parameters

NameDescriptionAdditional information
request
The UserDefinedFieldRequest

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "UserDefinedFieldId": 1,
  "Description": "sample string 2",
  "DisplayName": "sample string 3",
  "Tooltip": "sample string 4",
  "Mandatory": true,
  "FieldType": 0,
  "HyperlinkPath": "sample string 6",
  "HyperlinkText": "sample string 7",
  "Precision": 1,
  "MaxLength": 1,
  "Default": "sample string 8",
  "ItemSpecific": true,
  "AllowEmployeeToPopulate": true,
  "TableId": "294e0152-31e7-4e94-9a62-290a6a790da7",
  "Format": 0,
  "AppliesToTableId": "8cca90d3-3e52-4208-b2cd-354caa49f24d",
  "MaxRows": 13,
  "ListItems": [
    {
      "ElementValue": 1,
      "ElementText": "sample string 2",
      "ElementOrder": 3,
      "Archived": true
    },
    {
      "ElementValue": 1,
      "ElementText": "sample string 2",
      "ElementOrder": 3,
      "Archived": true
    },
    {
      "ElementValue": 1,
      "ElementText": "sample string 2",
      "ElementOrder": 3,
      "Archived": true
    }
  ],
  "AllowSearch": true,
  "Order": 15,
  "Encrypted": true
}

application/xml, text/xml

Sample:
<UserDefinedFieldRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Requests">
  <AllowEmployeeToPopulate>true</AllowEmployeeToPopulate>
  <AllowSearch>true</AllowSearch>
  <AppliesToTableId>8cca90d3-3e52-4208-b2cd-354caa49f24d</AppliesToTableId>
  <Default>sample string 8</Default>
  <Description>sample string 2</Description>
  <DisplayName>sample string 3</DisplayName>
  <Encrypted>true</Encrypted>
  <FieldType>NotSet</FieldType>
  <Format>NotSet</Format>
  <HyperlinkPath>sample string 6</HyperlinkPath>
  <HyperlinkText>sample string 7</HyperlinkText>
  <ItemSpecific>true</ItemSpecific>
  <ListItems xmlns:d2p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types">
    <d2p1:UdfListElement>
      <d2p1:Archived>true</d2p1:Archived>
      <d2p1:ElementOrder>3</d2p1:ElementOrder>
      <d2p1:ElementText>sample string 2</d2p1:ElementText>
      <d2p1:ElementValue>1</d2p1:ElementValue>
    </d2p1:UdfListElement>
    <d2p1:UdfListElement>
      <d2p1:Archived>true</d2p1:Archived>
      <d2p1:ElementOrder>3</d2p1:ElementOrder>
      <d2p1:ElementText>sample string 2</d2p1:ElementText>
      <d2p1:ElementValue>1</d2p1:ElementValue>
    </d2p1:UdfListElement>
    <d2p1:UdfListElement>
      <d2p1:Archived>true</d2p1:Archived>
      <d2p1:ElementOrder>3</d2p1:ElementOrder>
      <d2p1:ElementText>sample string 2</d2p1:ElementText>
      <d2p1:ElementValue>1</d2p1:ElementValue>
    </d2p1:UdfListElement>
  </ListItems>
  <Mandatory>true</Mandatory>
  <MaxLength>1</MaxLength>
  <MaxRows>13</MaxRows>
  <Order>15</Order>
  <Precision>1</Precision>
  <TableId>294e0152-31e7-4e94-9a62-290a6a790da7</TableId>
  <Tooltip>sample string 4</Tooltip>
  <UserDefinedFieldId>1</UserDefinedFieldId>
</UserDefinedFieldRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response body formats

The UserDefinedFieldResponse

application/json, text/json

Sample:
{
  "Item": {
    "UserDefinedId": 0,
    "AppliesTo": 0,
    "Order": 0,
    "Archived": false,
    "DisplayName": "DisplayName",
    "Description": "Description",
    "Tooltip": "Tooltip",
    "Mandatory": false,
    "FieldType": 4,
    "HyperlinkPath": null,
    "HyperlinkText": null,
    "Precision": null,
    "MaxLength": null,
    "Default": null,
    "ListElements": null
  },
  "ResponseInformation": null
}

application/xml, text/xml

Sample:
<UserDefinedFieldResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Responses">
  <ResponseInformation i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common" />
  <Item xmlns:d2p1="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Types.Employees" xmlns="http://schemas.datacontract.org/2004/07/SpendManagementApi.Models.Common">
    <d2p1:AppliesTo>Employees</d2p1:AppliesTo>
    <d2p1:Archived>false</d2p1:Archived>
    <d2p1:ListElements i:nil="true" />
    <d2p1:Order>0</d2p1:Order>
    <d2p1:UserDefinedId>0</d2p1:UserDefinedId>
  </Item>
</UserDefinedFieldResponse>
URI parameters
=
Headers | Add header
: Delete
Body
Samples:
Status
Headers
Body