Use a sales offer for this company
POST
/v1/offers/redeem
const url = 'https://api.vocapable.com/v1/offers/redeem';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/offers/redeem \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Bind the offer to this company, once, and return the checkout request that buys it.
Charges nothing and grants nothing: the ordinary production checkout does both. Redeeming again for the same company answers the same request.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
SalesOfferRequest
object
token
required
Token
string
Examplegenerated
{ "token": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
SalesOfferRedemption
object
offer
required
SalesOfferPreview
object
business_name
required
Business Name
string
prepared_by
required
Prepared By
string
quote_version
required
Quote Version
integer
terms_reference
required
Terms Reference
string
workload_class_name
required
Workload Class Name
string
minimum_term
required
Minimum Term
string
currency
required
Currency
string
lines
required
Lines
Array<object>
SalesOfferLineobject
label
required
Label
string
quantity
required
Quantity
integer
monthly_minor
required
Monthly Minor
integer
monthly_discount_minor
required
Monthly Discount Minor
integer
monthly_total_minor
required
Monthly Total Minor
integer
expires_at
required
Expires At
string format: date-time
accepted
required
Accepted
boolean
redeemed_here
required
Redeemed Here
boolean
subscribed
required
Subscribed
boolean
checkout
required
Any of:
SalesOfferCheckout
The POST /v1/subscription request that buys exactly this offer.
object
workload_class
required
Workload Class
string
term
required
Term
string
extra_sessions
required
Extra Sessions
integer
receptionist_connections
required
Receptionist Connections
integer
null
checkout
required
SalesOfferCheckout
The POST /v1/subscription request that buys exactly this offer.
object
workload_class
required
Workload Class
string
term
required
Term
string
extra_sessions
required
Extra Sessions
integer
receptionist_connections
required
Receptionist Connections
integer
Example
{ "offer": { "checkout": { "workload_class": "engage", "term": "mtm" } }, "checkout": { "workload_class": "engage", "term": "mtm" }}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
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": {} } ]}