Reference
Buy a released purchase now instead of after its hold
A new purchase released to Automated Savings waits up to 24 hours before LevelFour sends it to AWS, so it can still be cancelled. This ends the wait: the executor sends it on its next run, within about five minutes. Organization admins only. Answers where the purchase stands; calling it again changes nothing. 409 purchase_not_held for a purchase that is not released to Automated Savings, tranche_keeps_its_day for a tranche of a purchase schedule, purchase_cancelled once it was cancelled, and purchase_already_sent once it was sent. 404 for an id that is no purchase.
Authorization
BearerAuth In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/commitments/purchase/string/buy-now"{
"success": true,
"timestamp": "2019-08-24T14:15:22Z",
"data": {
"recommendation_id": "string",
"payer_account_id": "string",
"plan_type": "compute",
"term_months": 0,
"payment_option": "all_upfront",
"commitment_hourly": 0,
"profile": "conservative",
"capped_by": [
"string"
],
"monthly_savings": 0,
"grain": "daily",
"source": "cur",
"created_by": "string",
"created_at": "string",
"rebindable": false,
"kind": "reserved_instance",
"origin": "recommended",
"target": {},
"resource": "string",
"quantity": 0,
"offering_id": "string",
"quote": {},
"draft": false,
"draft_expires_at": "string",
"buying_account_id": "string",
"schedule_id": "string",
"tranche_number": 0,
"tranches_total": 0,
"buy_after_utc": "string",
"verified_active_at": "string",
"execution": {
"status": "not_started",
"provider_state": "string",
"purchase_id": "string",
"error": "string",
"starts_at": "string",
"send_at": "string",
"can_buy_now": false,
"can_cancel": false
},
"bought_outside": {
"plan_id": "string",
"started_on": "string"
},
"trigger_info": {
"property1": null,
"property2": null
},
"execution_steps": [
{
"step_id": "string",
"label": "string",
"status": "done",
"duration_seconds": 0,
"parent_step_id": "string"
}
],
"execution_logs": [
{
"step_id": "string",
"label": "string",
"status": "done",
"commands": [
{
"order": 0,
"command": "string",
"output": "string"
}
]
}
]
}
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"details": null
},
"timestamp": "2019-08-24T14:15:22Z"
}Re-size a purchase nobody has decided yet PATCH
A body naming kind re-sizes a purchase raised as a NewPurchase: its size, term, payment option and offering, looked up again in AWS. Its target and buying account stay as raised (409 for another). A body without kind points a purchase raised from its proposal at another profile or commitment_hourly, sized on today's proposal; naming neither re-sizes the pick it was raised on. Each body fits only its own kind of purchase (409 otherwise). Keeps the id. 404 for an id that is no purchase, 409 once anybody has accepted, rejected or requested it, and 409 for any refusal a raise meets. Answers rebound true. A draft is re-sized by the person who raised it alone (404 for anybody else), which renews its expiry, and 409 purchase_draft_expired once it has expired.
Cancel a purchase before it is sent to AWS POST
Stops a purchase that has not been sent to AWS: it is rejected, reads cancelled_before_purchase, and stays that way, so it cannot be accepted or released again; raise a new purchase to buy it. An organization admin or the member who raised or requested it may cancel. Calling it again changes nothing. 409 purchase_already_sent once a purchase was sent and may have been bought, purchase_closed for one already bought or rejected, and purchase_bought_by_hand for one released to be bought by hand, which may already be bought. 404 for an id that is no purchase.