Update offer buyout amount
Updates the buyout amount on an offer. The offer must be in “pending” or “awaiting_customer” status.
POST
/{id}/buyoutPath parameters
idstringrequiredThe ID of the offer to update
Request body
application/jsonbuyoutAmountnumberrequiredBuyout amount in cents (e.g., 50000 = $500.00). Customer can opt to receive this amount instead of a replacement product.
min 0
Responses
200Offer buyout amount updated successfully
successbooleanrequiredWhether the offer buyout amount was updated successfully
buyoutAmountnumberrequiredThe buyout amount in cents that was persisted on the offer, read back after the update.
min 0
updatedAtstring<date-time>requiredTimestamp when the offer buyout amount was updated
400Bad request - Offer buyout could not be updated
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired401Unauthorized - Missing or invalid authentication
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired403Forbidden - Caller can view this offer but is not allowed to update it
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired404Not found - Offer does not exist or caller is not allowed to view it
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired500Internal server error
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequiredRequest
curl -X POST "https://api.sibipro.com/prod/offers/string/buyout" \
-H "Content-Type: application/json" \
-d '{
"buyoutAmount": 50000
}'const response = await fetch("https://api.sibipro.com/prod/offers/string/buyout", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"buyoutAmount": 50000
})
});Response
{
"success": true,
"buyoutAmount": 50000,
"updatedAt": "2024-01-20T12:00:00Z"
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "customer.email",
"error": "Invalid email"
},
{
"field": "address.postalCode",
"error": "Invalid"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "customer.email",
"error": "Invalid email"
},
{
"field": "address.postalCode",
"error": "Invalid"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "customer.email",
"error": "Invalid email"
},
{
"field": "address.postalCode",
"error": "Invalid"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "customer.email",
"error": "Invalid email"
},
{
"field": "address.postalCode",
"error": "Invalid"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "customer.email",
"error": "Invalid email"
},
{
"field": "address.postalCode",
"error": "Invalid"
}
]
}