Update LRN Prefix
This request updates an LRN prefix, targeted by secure ID.
| patch | /phonenumber/lrn_prefixes/{lrn_prefix_sid} |
| put | /phonenumber/lrn_prefixes/{lrn_prefix_sid} |
Sample
A sample PATCH request to update the LRN Prefix object, targeted by secure ID, with the values in the request body:
curl -X PATCH \
'https://api.carrierx.com/core/v2/phonenumber/lrn_prefixes/cc367acb-94c8-418f-b247-85dce5806ef4' \
-H 'Content-Type: application/json' \
--data-binary '{"name":"lrn prefix"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200 status code with a serialized copy of the updated LRN Prefix object:
{
"attributes": {},
"callback_url": null,
"lrn_prefix_sid": "cc367acb-94c8-418f-b247-85dce5806ef4",
"lrn_sid": null,
"name": "lrn prefix",
"partner_sid": "e00430c3-a7d0-4666-ab5c-f7202448382f",
"prefix": "1520",
"source_trunk_group_sid": null,
"string_key_1": null,
"string_key_2": null,
"transformations": [],
"trunk_group_sid": null
}
An LRN Prefix object can be updated using either a PATCH or PUT request.
-
A
PATCHrequest can be used to update one or more attribute values. When using aPATCHrequest, only the attributes specified in the request payload will be updated, all the other attributes and values will remain the same. The LRN prefix secure ID is passed in the query URL, and the values to be modified are passed in the request body.The LRN Prefix object also contains nested Attributes and Transformations objects. Refer to this section to learn how nested objects can be updated using the
PATCHrequest. -
A
PUTrequest can be used to update the entire LRN Prefix object. The LRN prefix secure ID is passed in the query URL, and the entire LRN Prefix object is passed in the request body.
Note, while all the fields must be present in a PUT request, this request may be unable to modify all the attribute values because as soon as an object has been created, some of its values become read-only values, e.g. the LRN prefix sid.
Required Scopes
To update an LRN Prefix object, the partner must have one of the following scopes enabled:
phonenumber.managephonenumber.update
Path Arguments
| Parameter | Data Type | Description |
|---|---|---|
| lrn_prefix_sid required | string | The LRN prefix secure ID. |
Query Arguments
| Parameter | Data Type | Description |
|---|---|---|
| nested_objects | string | Determines if the nested objects fields and values should be replaced. Value accepted in this field is replace. |
Body Arguments
JSON representation of the fields and values to be updated.
Fields that can be modified are:
attributescallback_urlnameprefixsource_trunk_group_sidstring_key_1string_key_2transformations
Refer to this table to view all fields that appear in the LRN Prefix object.