OpenTV ENTera & OpenTV Platform Documentation
25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2
25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2

Make an impulse purchase for a customer

Request

To make a purchase of a product ("impulse order") on behalf of a customer (for example, when a customer makes a purchase by phone), send a POST request to:

http://<host>:<port>/orders/operator/v1/account/{accountId}/orders

Mandatory fields

  • accountId (in URL) – the ID of the customer account

  • deviceID (in body) – the ID of the device

  • originId – the ID of the system generating the request

  • items (there can be one or more items):

    • productId – the ID of the product being purchased

You can specify the total price for the products being ordered as part of the request (in the finalPrice field), for example, to give the customer a discount. If you do not supply a total price, the regular, defined prices for the products are used.

For all available fields, see Orders API documentation.

Example

A request with this payload purchases the specified product on behalf of the user (whose account ID is specified in the URL):

{
  "deviceId": "iPhone-123456789",
  "originId": "MPP",
  "finalPrice": 0,
  "items": [
    {
      "productId": "2f5339bd-e915-4c32-b377-acc488974b35"
    }
  ]
}

Response

A successful request returns an HTTP 201 status. The response includes the complete order object.

An unsuccessful request returns an HTTP 400 status if there was a problem with the request.

An unauthorised request returns an HTTP 401 status.

See also

For full details of this API, see Orders API documentation.