Skip to content

Patch a buyer

PATCH
/api/v1/buyers/{buyer_id}
curl --request PATCH \
--url https://external-api.moja-ai.com/api/v1/buyers/example \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "name": "example", "street_address": "example", "city": "example", "state": "example", "zip_code": "example", "country": "example", "phone_number": "example", "email": "example", "total_revenue_limit": 1, "timezone": "example", "permalink": "example", "allow_buyer_to_dispute_call_conversions": true, "allow_buyer_to_pause_target": true, "allow_buyer_to_set_target_concurrency": true, "disable_recordings": true, "access_to_call_recordings": true, "is_active": true, "advanced_caps": [ {} ], "external_id": "example" }'
buyer_id
required
Buyer Id
string
X-API-Key
Any of:
string
Media typeapplication/json
BuyerPatch
object
name
Any of:
string
>= 1 characters
street_address
Any of:
string
city
Any of:
string
state
Any of:
string
zip_code
Any of:
string
country
Any of:
string
phone_number
Any of:
string
email
Any of:
string
total_revenue_limit
Any of:
number
timezone
Any of:
string
permalink
Any of:
string
allow_buyer_to_dispute_call_conversions
Any of:
boolean
allow_buyer_to_pause_target
Any of:
boolean
allow_buyer_to_set_target_concurrency
Any of:
boolean
disable_recordings
Any of:
boolean
access_to_call_recordings
Any of:
boolean
is_active
Any of:
boolean
advanced_caps
Any of:
Array<object>
object
key
additional properties
any
external_id
Any of:
string
>= 1 characters <= 64 characters
Examplegenerated
{
"name": "example",
"street_address": "example",
"city": "example",
"state": "example",
"zip_code": "example",
"country": "example",
"phone_number": "example",
"email": "example",
"total_revenue_limit": 1,
"timezone": "example",
"permalink": "example",
"allow_buyer_to_dispute_call_conversions": true,
"allow_buyer_to_pause_target": true,
"allow_buyer_to_set_target_concurrency": true,
"disable_recordings": true,
"access_to_call_recordings": true,
"is_active": true,
"advanced_caps": [
{}
],
"external_id": "example"
}

Successful Response

Media typeapplication/json
BuyerResponse
object
id
required
Id
string
org_id
required
Org Id
string
name
required
Name
string
street_address
required
Street Address
string
city
required
City
string
state
required
State
string
zip_code
required
Zip Code
string
country
required
Country
string
phone_number
required
Phone Number
string
email
required
Email
string
total_revenue_limit
required
Total Revenue Limit
number
timezone
required
Timezone
string
permalink
required
Permalink
string
allow_buyer_to_dispute_call_conversions
Allow Buyer To Dispute Call Conversions
boolean
allow_buyer_to_pause_target
required
Allow Buyer To Pause Target
boolean
allow_buyer_to_set_target_concurrency
required
Allow Buyer To Set Target Concurrency
boolean
disable_recordings
Disable Recordings
boolean
access_to_call_recordings
required
Access To Call Recordings
boolean
is_active
required
Is Active
boolean
hourly
Hourly
integer
0
daily
Daily
integer
0
weekly
Weekly
integer
0
monthly
Monthly
integer
0
yearly
Yearly
integer
0
total
Total
integer
0
external_id
Any of:
string
created_at
Any of:
string format: date-time
updated_at
Any of:
string format: date-time
targets
Targets
Array<object>
object
key
additional properties
any
advanced_caps
Advanced Caps
Array<object>
object
key
additional properties
any
Example
{
"allow_buyer_to_dispute_call_conversions": false,
"disable_recordings": false,
"hourly": 0,
"daily": 0,
"weekly": 0,
"monthly": 0,
"yearly": 0,
"total": 0
}

Bad Request

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Not Found

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Conflict

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}

Too Many Requests

Media typeapplication/json
ErrorResponse
object
detail
required
ErrorBody
object
code
required
Code
string
message
required
Message
string
Examplegenerated
{
"detail": {
"code": "example",
"message": "example"
}
}