Update Partner
This request updates the Partner object, targeted by secure ID, with the values in the request body.
patch | /partners/{partner_sid} |
put | /partners/{partner_sid} |
Sample
A sample PATCH request to update the partner targeted by secure ID:
curl -X PATCH \
'https://api.carrierx.com/core/v2/partners/ed437757-002d-4ecc-aa5a-efdf5e50dba0' \
-H 'Content-Type: application/json' \
--data-binary '{"address1":"4300 E Pacific Coast Hwy"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a serialized copy of the updated Partner object:
{
"acls": [],
"address1": "4300 E Pacific Coast Hwy",
"address2": null,
"attributes": {},
"available_scopes": [],
"balance": "351.52",
"billing_email": "example@example.com",
"callbacks": {},
"charge_at": "20",
"city": null,
"company_name": "CarrierX",
"country_code": "USA",
"daily_spending_limit": "500",
"daily_spent_amount": "0",
"date_created": "2023-09-20T21:34:55.000Z",
"display_id": "CX72521509",
"login": "example",
"name": "John Smith",
"owner_email": "example@example.com",
"parent_assigned_acls": [
{
"access_control_rules": [
"93525bae-f9a9-336b-b92a-7f421df7a11e"
],
"direction": "outbound",
"sms_action_false": null,
"sms_action_true": "accept",
"voice_action_false": null,
"voice_action_true": null
}
],
"parent_sid": "ac38616e-d2e3-4cd6-99ae-b6658f0728b6",
"partner_sid": "ed437757-001d-4ecc-aa5a-efdf5e50dba0",
"payment_type": "prepay",
"phonenumber": "15162065574",
"prepay_amount": "100",
"spending_limit": "0",
"state": null,
"status": "active",
"tech_email": "example@example.com",
"transformations": [],
"zip": "90804"
}
A Partner object can be updated using either a PATCH
or PUT
request.
-
A
PATCH
request can be used to update one or more attribute values. When using aPATCH
request, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The partner secure ID is passed in the query URL, and the values to be modified are passed in the request body.The Partner object also contains nested ACLs, Attributes, Callbacks, Parent Assigned ACLs, and Transformations objects. Refer to this section to learn how nested objects can be updated using the
PATCH
request. -
A
PUT
request can be used to update an entire Partner object. The partner secure ID is passed in the query URL, and the entire Partner object is passed in the request body.
Note, while all the fields must be present in a PUT
request, not all the attribute values may be modified after the initial creation, because when created, some of them become read-only.
Required Scopes
To update a Partner object, the partner must have one of the following scopes enabled:
partners.manage
partners.update
Path Arguments
Parameter | Data Type | Description |
---|---|---|
partner_sid required | string | The partner 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:
acls
address1
address2
attributes
billing_email
callbacks
city
company_name
name
owner_email
parent_assigned_acls
phonenumber
tech_email
transformations
zip
Refer to this table to view all fields that appear in the Partner object.