Submit an order

Submit the customer's protection selection when they complete checkout.

The session_id in the path is the session for this purchase, from the TeakOS Widget (teak.get('token')). It carries the quoted items and the customer's choices, so you don't send item or pricing details here.

Responses

  • 202 Accepted: the order was accepted and is being created. Creation finishes shortly after the response, so the order may not be retrievable for a few seconds.
  • 204 No Content: no line is opted in, so there's nothing to issue and no order is created. For optional protection, that includes a session where no choice was recorded. This is a normal outcome, not an error.
  • 409 Conflict: the order was already submitted, for example by an earlier attempt that timed out. Treat it as accepted.

After you submit, the session is closed and can't be changed. Start a new session for the customer's next purchase.

Billing: Teak bills you for issued protection on your regular invoice. Always send payment as { "type": "invoice" }.

Errors: 401, 403, and 422 use those HTTP statuses. Other errors return HTTP 400 with the specific error in error.code, for example 404 for an unknown session. Check the HTTP status first, and for a 400, read error.code. See the error responses below.

Recipes
📨
Submit an order reliably
Open Recipe
🚀
Quickstart
Open Recipe
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

The session ID for this purchase.

Body Params

The customer and order details for a checkout.

string
required

Your order number. Must be unique across your orders. Use it to look the order up later.

customer
object
required

The customer who is purchasing.

BillingAddress | null

The customer's billing address. Recommended: it's used to determine where the customer is located.

payment
object
required

How the protection is billed. Always { "type": "invoice" }.

Responses

204

No line is opted in. No order was created.

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json