Update Country Settings


This request changes country settings attributes.

Resource

PATCH /countrysettings/<OID>

Where OID is the oid of the country settings

Parameters

None

Payload

Fields

Name Patch Operations

nonLocalPrefixes

add, remove

normalizationRules

add, remove

Response

None

Context

Authorization

Administrator

Errors

Example

Request
PATCH https://xelion.nl/api/v1/master/countrysettings/1627410
Payload

change country settings direct member

{
    "operations": [
            {
        "op": "replace",
            "path": "/commonName",
            "value": "country settings 6"
            }
    ]
}

add a new non local prefix to the country settings , first add a new entry with virtual id 1 and then set the member(s) by adding replace operations on the virtual id '1'

{
  "operations": [
      {
      "op": "add",
      "path": "/nonLocalPrefixes/1"
      },
      {
      "op": "replace",
      "path": "/nonLocalPrefixes/1/matchString",
      "value": "+88"
      }
    ]
}

remove non local prefix from a country settings object, <OID> is the oid of the entry

{
     "operations": [
            {
            "op": "remove",
            "path": "/nonLocalPrefixes/1726623"
            }
    ]
}

change non local prefix submember

{
  "operations": [
      {
      "op": "replace",
      "path": "/nonLocalPrefixes/1799181/matchString",
      "value": "+888"
      }
    ]
}

add a new normalization rule to the country settings , first add a new entry with virtual id 1 and then set the member(s) by adding replace operations on the virtual id '1'

{
  "operations": [
      {
      "op": "add",
      "path": "/normalizationRules/1"
      },
      {
      "op": "replace",
      "path": "/normalizationRules/1/prefix",
      "value": "0"
      }
    ]
}

remove normalization rule from a country settings object, <OID> is the oid of the entry

{
     "operations": [
            {
            "op": "remove",
            "path": "/normalizationRules/1726623"
            }
    ]
}

change normalization rule submember

{
  "operations": [
      {
      "op": "replace",
      "path": "/normalizationRules/1799181/prefix",
      "value": "1"
      }
    ]
}