Accept offer
Accepts an offer by placing orders for its included offering.
POST
/{id}/acceptPath parameters
idstringrequiredThe ID of the offer to accept
Responses
200Offer accepted successfully
successbooleanrequiredWhether the offer was accepted successfully
acceptedAtstring<date-time>requiredTimestamp when the offer was accepted
400Bad request - Offer is not in an acceptable state
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 accept 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/accept"const response = await fetch("https://api.sibipro.com/prod/offers/string/accept", {
method: "POST"
});Response
{
"success": true,
"acceptedAt": "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"
}
]
}