Integratec API Platform
addressTableModify

Description

Modifies field values in each record of an address table.

Remarks

addressTable must be one of the following.

  • The ID of an address table. The ID of an address table is guaranteed to be unique.
  • The name$ prefix plus the name of an address table. The name of an address table is not required to be unique. However, if you use the name$ prefix to reference an address table with a name that is not unique, there is an error. In this case, you must refer to the address table by its ID.
  • The file$ prefix plus the name of a JSON file representing an address table, excluding extension. The file name must be lower case and have an extension of .json. The file must be in the addresstables/ folder.

index must be one of the following.

  • The ID of an index. The ID of an index is guaranteed to be unique.
  • The name$ prefix plus the name of the index. The name of an index is the same as the ID of the index.
  • default$. The value of the INDEXNAME property in the parent address table resource is used as the ID of the index.

selectivity must be one of the following.

  • The ID of a selectivity. The ID of a selectivity is guaranteed to be unique.
  • The name$ prefix plus the name of a selectivity. The name of a selectivity is not required to be unique. However, if you use the name$ prefix to reference a selectivity with a name that is not unique, there is an error. In this case, you must refer to the selectivity by its ID.
  • default$. The value of the SEL_ID property in the parent address table resource is used as the ID of the selectivity.
  • An object representing a selectivity.

Example

Request

This request sets the value of the field with a display name of N1 to the result of an expression that uses the Length() function.

{
"addressTable": "7112661645",
"selectivity": null,
"index": null,
"modifications": [
{
"field": {
"displayName": "N1"
},
"setExpression": "Length([ADDRESS])"
}
]
}

This request sets the value of the field named Batch to a constant value.

{
"addressTable": "7112661645",
"selectivity": null,
"index": null,
"modifications": [
{
"field": "Batch",
"setConstant": "Mailing 1"
}
]
}

Reply

The reply includes information about the records processed.

{
"recordsProcessed": 57032,
"recordsSelected": 57032,
"recordsModified": 57032,
"fieldsModified": 57032,
"fieldsNotModified": 0
}

recordsProcessed is the number of address table records processed.

recordsSelected is the number of address table records that meet the selectivity criteria.

recordsModified is the number of address table records modified.

fieldsModified is the number of field values modified.

fieldsNotModified is the number field values not modified due to an unresolved field reference.

Request Schema

{
"$schema":"http://json-schema.org/draft-04/schema#",
"description":"Modifies the data of an address table.",
"definitions":{
"fieldRef":{
"description":"Identifies a field in the address table.",
"oneOf":[
{
"description":"Identifies a field by name",
"type":"string",
"minLength":1
},
{
"description":"Identifies a field by display name.",
"type":"object",
"required":[
"displayName"
],
"properties":{
"displayName":{
"title":"Display Name",
"description":"Display name to match to a field.",
"type":"string",
"minLength":1
}
},
"additionalProperties":false
},
{
"description":"Identifies a field by address group and data type.",
"type":"object",
"required":[
"addressGroup",
"dataType"
],
"properties":{
"addressGroup":{
"title":"Address Group",
"description":"Address group to match to a field.",
"oneOf":[
{
"type":"integer",
"minimum":1,
"maximum":255
},
{
"type":"string",
"minLength":1
}
]
},
"dataType":{
"title":"Data Type",
"description":"Data type to match to a field.",
"oneOf":[
{
"type":"integer",
"minimum":1,
"maximum":255
},
{
"type":"string",
"minLength":1
}
]
}
},
"additionalProperties":false
}
]
}
},
"type":"object",
"required":[
"addressTable",
"modifications"
],
"properties":{
"addressTable":{
"title":"Address Table",
"description":"Resource item identifying the address table.",
"type":"string",
"pattern":"(?i)^([0-9]{10}|name\\$.+|file\\$[a-z]+)$"
},
"index":{
"title":"Index",
"default":null,
"oneOf":[
{
"description":"Resource item identifying the index to use.",
"type":"string",
"pattern":"(?i)^((?!name\\$|default\\$).*|name\\$.+|default\\$)$"
},
{
"description":"Indicates that no selectivity is to be used.",
"type":"null"
}
]
},
"selectivity":{
"title":"Selectivity",
"default":null,
"oneOf":[
{
"description":"Resource item identifying the selectivity to use.",
"type":"string",
"pattern":"(?i)^([0-9]{10}|name\\$.+|default\\$)$"
},
{
"description":"Indicates that no selectivity is to be used.",
"type":"null"
},
{
"description":"Defines a selectivity to use by its object representation, excluding the 'id' and 'name' properties.",
"type":"object",
"properties":{
"expression":{
"title":"Expression",
"description":"Expression defining the condition that a record must satisfy to be sampled.",
"default":null,
"oneOf":[
{
"type":"string",
"minLength":1
},
{
"type":"null"
}
]
},
"sampleInterval":{
"title":"Interval Sample",
"description":"Interval at which to sample records; if negative, the sample is inverted.",
"default":null,
"oneOf":[
{
"type":"integer"
},
{
"type":"null"
}
]
},
"sampleRandom":{
"title":"Random Sample",
"description":"Probability of a record being sampled at random.",
"default":null,
"oneOf":[
{
"type":"number",
"minimum":0,
"maximum":1
},
{
"type":"null"
}
]
},
"sampleMaximum":{
"title":"Maximum Sample",
"description":"The maximum number of records to be sampled.",
"default":null,
"oneOf":[
{
"type":"integer",
"minimum":0
},
{
"type":"null"
}
]
}
},
"additionalProperties":false
}
]
},
"modifications":{
"title":"Modifications",
"description":"List of modifications to be made to the address table.",
"type":"array",
"items":{
"oneOf":[
{
"type":"object",
"required":[
"field"
],
"properties":{
"field":{
"title":"Field",
"description":"Field reference identifying the field to modify.",
"$ref":"#/definitions/fieldRef"
},
"setConstant":{
"title":"Set Constant",
"description":"Constant value to set the field to.",
"oneOf":[
{
"type":[
"boolean",
"integer",
"null",
"number",
"string"
]
},
{
"type":"object",
"required":[
"dateTime"
],
"properties":{
"dateTime":{
"type":"string",
"pattern":"^([0-9]{4})-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])([T]([01][0-9]|2[0-3]):([0-5][0-9])(:([0-5][0-9])(\\.[0-9]{1,3})?)?)?$"
}
}
}
]
}
},
"additionalProperties":false
},
{
"type":"object",
"required":[
"field"
],
"properties":{
"field":{
"title":"Field",
"description":"Field reference identifying the field to modify.",
"$ref":"#/definitions/fieldRef"
},
"setExpression":{
"title":"Set Expression",
"description":"Expression to evaluate to determine the value to set the field to.",
"type":"string",
"minLength":1
}
},
"additionalProperties":false
},
{
"type":"object",
"required":[
"field"
],
"properties":{
"field":{
"title":"Field",
"description":"Field reference identifying the field to modify.",
"$ref":"#/definitions/fieldRef"
},
"mark":{
"title":"Mark",
"description":"Parameters for marking.",
"type":"object",
"properties":{
"includeHyphen":{
"title":"Include Hyphen",
"description":"Indicates whether or not to include a hyphen between the 5-digit ZIP code and the 4-digit add-on code.",
"default":false,
"type":"boolean"
},
"includeCheckDigit":{
"title":"Include Check Digit",
"description":"Indicates whether or not to include a check digit.",
"default":false,
"type":"boolean"
}
},
"additionalProperties":false
}
},
"additionalProperties":false
}
]
}
}
},
"additionalProperties":false
}

Reply Schema

{
"$schema":"http://json-schema.org/draft-04/schema#",
"type":"object",
"required":[
"recordsProcessed",
"recordsSelected",
"recordsModified",
"fieldsModified",
"fieldsNotModified"
],
"properties":{
"recordsProcessed":{
"title":"Records Processed",
"description":"Number of records processed in the address table, including records that are not selected.",
"type":"integer",
"minValue":1
},
"recordsSelected":{
"title":"Records Selected",
"description":"Number of records selected from the address table.",
"type":"integer",
"minValue":1
},
"recordsModified":{
"title":"Records Modified",
"description":"Number of records modified in the address table.",
"type":"integer",
"minValue":1
},
"fieldsModified":{
"title":"Fields Modified",
"description":"Number of field modifications made.",
"type":"integer",
"minValue":1
},
"fieldsNotModified":{
"title":"Fields Not Modified",
"description":"Number of field modifications not made because a field reference is incorrect.",
"type":"integer",
"minValue":1
}
},
"additionalProperties":false
}