Line Items

Supported line item attributes:

Attribute Type Description
id number Unique identifier of the line item.
product_id string Unique identifier of the product based on which line item is created.
deal_id number Unique identifier of the deal.
order_id number Unique identifier of the order.
value string
("52.74")
Value of one unit of the product. It is product’s price after applying markup.
variation string
(""0.00")
Variation of the product’s price for this line item. Value of 5 means that 5% markup is added, -10 means there is a 10% discount.
currency string
("EUR")
Currency of value and price, specified in 3-character currency code (ISO4217) format.
quantity number Quantity of the product included in this line item. Default value is 1.
price string
("52.74")
Price of one unit of the product. Value is copied from the product.
name string Name of the product. Value is copied from the product.
sku string Stock Keeping Unit identification code. Value is copied from the product.
description string Description of the product. Value is copied from the product.
created_at string Date and time that the line item was created in UTC (ISO8601 format).

Endpoints

Stream Line Item

Read the stream of line_item events.

See the Firehose Overview article for more details on request and response formats and parameters.

Action

GET /v3/line_items/stream

Examples

Read the stream of line item events

GET /v3/line_items/stream?position=tailAccept: application/jsonAuthorization: Bearer $ACCESS_TOKENUser-Agent: $CLIENT_NAME
HTTP/1.1 200 OK   Content-Type: application/json
{ "items": [    {      "data": {        "quantity": 1,        "description": "Super Wallet",        "created_at": "2017-06-21T06:53:23Z",        "variation": "0.00",        "price": "23.12",        "product_id": 34134134,        "name": "Silk Wallet",        "currency": "USD",        "id": 2448709,        "sku": "wallet",        "deal_id": 123434324,        "value": "52.74",        "order_id": 143343      },      "meta": {        "event_cause": "interaction",        "sequence": 1,        "event_id": "tVhVkdMfQbGpmX0Rqkgscg",        "event_type": "created",        "type": "line_item",        "event_time": "2017-06-21T06:53:23Z"      }    }  ],  "meta": {    "links": {      "next": "https://api.getbase.com/v3/line_items/stream?position=ZmlyZWhvc2UuZmFjdG9pZC5jb250YWN0LnNuYXBzaG90cywxLDMwNTQ5Mg=="    },    "position": "ZmlyZWhvc2UuZmFjdG9pZC5jb250YWN0LnNuYXBzaG90cywxLDMwNTQ5Mg==",    "top": false  }}