Skip to main content
GET
/
invoices
/
{invoice_id}
/
line_items
Get invoice line items
curl --request GET \
  --url https://api.zenskar.com/invoices/{invoice_id}/line_items \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>'
{
  "lines": [
    {
      "name": "P1",
      "quantity": {
        "value": 7203,
        "unit": "unit",
        "display": "7203 units"
      },
      "subtotal": {
        "value": 710.3,
        "unit": "USD",
        "display": "$710.30"
      },
      "pricing_model": "per-unit-pricing",
      "features": [
        {
          "type": "free-units",
          "name": "Free Units",
          "free_quantity": {
            "value": 100,
            "unit": "unit",
            "display": "100 units"
          },
          "remaining_quantity": {
            "value": 7103,
            "unit": "unit",
            "display": "7103 units"
          },
          "currency": "USD",
          "quantity_unit": "unit",
          "free_units_granted": {
            "value": 100,
            "unit": "unit",
            "display": "100 units"
          },
          "free_units_remaining": {
            "value": 0,
            "unit": "unit",
            "display": "0 units"
          },
          "price": {
            "value": 0,
            "unit": "USD/unit",
            "display": "$0.00 per unit"
          },
          "quantity": {
            "value": 100,
            "unit": "unit",
            "display": "100 units"
          },
          "total": {
            "value": 0,
            "unit": "USD",
            "display": "$0.00"
          },
          "display": [
            {
              "name": "Free Units",
              "price": "$0.00 per unit",
              "quantity": "100 units / 100 units",
              "total": "$0.00"
            }
          ]
        },
        {
          "type": "per-unit-pricing",
          "name": "Per Unit Pricing",
          "price": {
            "value": 0.1,
            "unit": "USD/unit",
            "display": "$0.10 per unit"
          },
          "quantity": {
            "value": 7103,
            "unit": "unit",
            "display": "7103 units"
          },
          "total": {
            "value": 710.3,
            "unit": "USD",
            "display": "$710.30"
          },
          "currency": "USD",
          "quantity_unit": "unit",
          "display": [
            {
              "name": "Per Unit Pricing",
              "price": "$0.10 per unit",
              "quantity": "7103 units",
              "total": "$710.30"
            }
          ]
        }
      ]
    },
    {
      "name": "Product Name Here",
      "quantity": {
        "value": 7203,
        "unit": "unit",
        "display": "7203 units"
      },
      "subtotal": {
        "value": 7203,
        "unit": "USD",
        "display": "$7,203.00"
      },
      "pricing_model": "volume-pricing",
      "features": [
        {
          "name": "Volume Pricing",
          "type": "volume-pricing",
          "price": {
            "value": 1,
            "unit": "USD/unit",
            "display": "$1.00 per unit"
          },
          "quantity": {
            "value": 7203,
            "unit": "unit",
            "display": "7203 units"
          },
          "total": {
            "value": 7203,
            "unit": "USD",
            "display": "$7,203.00"
          },
          "tiers": [
            2,
            1.5,
            1
          ],
          "prices": [
            2,
            1.5,
            1
          ],
          "currency": "USD",
          "quantity_unit": "unit",
          "display": [
            {
              "name": "Volume Pricing",
              "price": "$1.00 per unit",
              "quantity": "7203 units",
              "total": "$7,203.00"
            }
          ]
        },
        {
          "type": "discount",
          "name": "Discount",
          "total": {
            "value": -216.09,
            "unit": "USD",
            "display": "-$216.09"
          },
          "discount_given": {
            "value": 216.09,
            "unit": "USD",
            "display": "$216.09"
          },
          "currency": "USD",
          "discount_type": "percent",
          "discount_percent": 3,
          "display": [
            {
              "name": "Discount",
              "price": "3% off",
              "quantity": "",
              "total": "-$216.09"
            }
          ]
        }
      ]
    },
    {
      "name": "P3",
      "quantity": {
        "value": 7203,
        "unit": "unit",
        "display": "7203 units"
      },
      "subtotal": {
        "value": 7503,
        "unit": "USD",
        "display": "$7,503.00"
      },
      "pricing_model": "tiered-pricing",
      "features": [
        {
          "name": "Tiered Pricing",
          "type": "tiered-pricing",
          "quantity": {
            "value": 7203,
            "unit": "unit",
            "display": "7203 units"
          },
          "total": {
            "value": 7503,
            "unit": "USD",
            "display": "$7,503.00"
          },
          "tiers": [
            0,
            200,
            400
          ],
          "prices": [
            2,
            1.5,
            1
          ],
          "currency": "USD",
          "quantity_unit": "unit",
          "tier_breakdown": [
            {
              "tier": 1,
              "quantity": 200,
              "price": 2,
              "amount": 400
            },
            {
              "tier": 2,
              "quantity": 200,
              "price": 1.5,
              "amount": 300
            },
            {
              "tier": 3,
              "quantity": 6803,
              "price": 1,
              "amount": 6803
            }
          ],
          "display": [
            {
              "name": "Tiered Pricing Tier 1",
              "price": "$2.00 per unit",
              "quantity": "200 units",
              "total": "$400.00"
            },
            {
              "name": "Tiered Pricing Tier 2",
              "price": "$1.50 per unit",
              "quantity": "200 units",
              "total": "$300.00"
            },
            {
              "name": "Tiered Pricing Tier 3",
              "price": "$1.00 per unit",
              "quantity": "6803 units",
              "total": "$6,803.00"
            }
          ]
        },
        {
          "type": "simple-tax",
          "name": "Sales Tax",
          "tax_percent": 2.7,
          "tax_amount": {
            "value": 202.58,
            "unit": "USD",
            "display": "$202.58"
          },
          "currency": "USD",
          "amount_after_tax": {
            "value": 7705.581,
            "unit": "USD",
            "display": "$7,705.58"
          },
          "amount_before_tax": {
            "value": 7503,
            "unit": "USD",
            "display": "$7,503.00"
          },
          "total": {
            "value": 202.58,
            "unit": "USD",
            "display": "$202.58"
          },
          "display": [
            {
              "name": "Sales Tax",
              "price": "2.7% tax",
              "quantity": "",
              "total": "$202.58"
            }
          ]
        }
      ]
    },
    {
      "name": "P4",
      "quantity": {
        "value": 7203,
        "unit": "unit",
        "display": "7203 units"
      },
      "subtotal": {
        "value": 165.67,
        "unit": "USD",
        "display": "$165.67"
      },
      "pricing_model": "percent-pricing",
      "features": [
        {
          "name": "Percent Pricing",
          "type": "percent-pricing",
          "price": {
            "value": 2.3,
            "unit": "%",
            "display": "2.30%"
          },
          "currency": "USD",
          "quantity_unit": "unit",
          "quantity": {
            "value": 7203,
            "unit": "unit",
            "display": "7203 units"
          },
          "total": {
            "value": 165.67,
            "unit": "USD",
            "display": "$165.67"
          },
          "display": [
            {
              "name": "Percent Pricing",
              "price": "2.3%",
              "quantity": "7203 units",
              "total": "$165.67"
            }
          ]
        },
        {
          "type": "minimum-amount-overages",
          "name": "Minimum Amount Balance",
          "balance": {
            "value": 434.33,
            "unit": "USD",
            "display": "$434.33"
          },
          "currency": "USD",
          "minimum_amount": {
            "value": 600,
            "unit": "USD",
            "display": "$600.00"
          },
          "total": {
            "value": 434.33,
            "unit": "USD",
            "display": "$434.33"
          },
          "input_amount": {
            "value": 165.67,
            "unit": "USD",
            "display": "$165.67"
          },
          "display": [
            {
              "name": "Minimum Amount Balance",
              "price": "600 Cap",
              "quantity": "",
              "amount": "$434.33"
            }
          ]
        }
      ]
    },
    {
      "name": "P5",
      "quantity": {
        "unit": "unit",
        "display": ""
      },
      "subtotal": {
        "value": 1000,
        "unit": "USD",
        "display": "$1,000.00"
      },
      "pricing_model": "subscription-with-proration",
      "features": [
        {
          "name": "Subscription",
          "type": "subscription-pricing",
          "price": {
            "value": 1000,
            "unit": "USD",
            "display": "$1,000.00"
          },
          "currency": "USD",
          "subscription_amount": {
            "value": 1000,
            "unit": "USD",
            "display": "$1,000.00"
          },
          "total": {
            "value": 1000,
            "unit": "USD",
            "display": "$1,000.00"
          },
          "billed_days": 31,
          "display": [
            {
              "name": "Subscription",
              "price": "$1,000.00",
              "quantity": "",
              "total": "$1,000.00"
            }
          ]
        }
      ]
    },
    {
      "name": "P6",
      "quantity": {
        "value": 7203,
        "unit": "unit",
        "display": "7203 units"
      },
      "subtotal": {
        "value": 142,
        "unit": "USD",
        "display": "$142.00"
      },
      "pricing_model": "package-pricing",
      "features": [
        {
          "type": "free-units",
          "name": "Free Units",
          "free_quantity": {
            "value": 200,
            "unit": "unit",
            "display": "200 units"
          },
          "remaining_quantity": {
            "value": 7003,
            "unit": "unit",
            "display": "7003 units"
          },
          "currency": "USD",
          "quantity_unit": "unit",
          "free_units_granted": {
            "value": 200,
            "unit": "unit",
            "display": "200 units"
          },
          "free_units_remaining": {
            "value": 0,
            "unit": "unit",
            "display": "0 units"
          },
          "price": {
            "value": 0,
            "unit": "USD/unit",
            "display": "$0.00 per unit"
          },
          "quantity": {
            "value": 200,
            "unit": "unit",
            "display": "200 units"
          },
          "total": {
            "value": 0,
            "unit": "USD",
            "display": "$0.00"
          },
          "display": [
            {
              "name": "Free Units",
              "price": "$0.00 per unit",
              "quantity": "200 units / 200 units",
              "total": "$0.00"
            }
          ]
        },
        {
          "name": "Package Pricing",
          "currency": "USD",
          "quantity_unit": "unit",
          "type": "package-pricing",
          "price": {
            "value": 2,
            "unit": "USD/unit",
            "display": "$2.00 per 100 units"
          },
          "package_size": {
            "value": 100,
            "unit": "unit",
            "display": "100 units"
          },
          "quantity": {
            "value": 7003,
            "unit": "unit",
            "display": "7003 units"
          },
          "total": {
            "value": 142,
            "unit": "USD",
            "display": "$142.00"
          },
          "display": [
            {
              "name": "Package Pricing",
              "price": "$2.00 per 100 units",
              "quantity": "7003 units",
              "total": "$142.00"
            }
          ]
        }
      ]
    }
  ],
  "total": {
    "value": 20520,
    "unit": "USD",
    "display": "$20,520.00"
  },
  "features": [
    {
      "type": "discount",
      "name": "Discount",
      "total": {
        "value": -514.34,
        "unit": "USD",
        "display": "-$514.34"
      },
      "discount_given": {
        "value": 514.34,
        "unit": "USD",
        "display": "$514.34"
      },
      "currency": "USD",
      "discount_type": "percent",
      "discount_percent": 3,
      "display": [
        {
          "name": "Discount",
          "price": "3% off",
          "quantity": "",
          "total": "-$514.34"
        }
      ]
    },
    {
      "type": "minimum-amount-overages",
      "name": "Minimum Amount Balance",
      "balance": {
        "value": 3369.55,
        "unit": "USD",
        "display": "$3,369.55"
      },
      "currency": "USD",
      "minimum_amount": {
        "value": 20000,
        "unit": "USD",
        "display": "$20,000.00"
      },
      "total": {
        "value": 3369.55,
        "unit": "USD",
        "display": "$3,369.55"
      },
      "input_amount": {
        "value": 16630.45,
        "unit": "USD",
        "display": "$16,630.45"
      },
      "display": [
        {
          "name": "Minimum Amount Balance",
          "price": "20000 Cap",
          "quantity": "",
          "amount": "$3,369.55"
        }
      ]
    },
    {
      "type": "simple-tax",
      "name": "Sales Tax",
      "tax_percent": 2.6,
      "tax_amount": {
        "value": 520,
        "unit": "USD",
        "display": "$520.00"
      },
      "currency": "USD",
      "amount_after_tax": {
        "value": 20520,
        "unit": "USD",
        "display": "$20,520.00"
      },
      "amount_before_tax": {
        "value": 20000,
        "unit": "USD",
        "display": "$20,000.00"
      },
      "total": {
        "value": 520,
        "unit": "USD",
        "display": "$520.00"
      },
      "display": [
        {
          "name": "Sales Tax",
          "price": "2.6% tax",
          "quantity": "",
          "total": "$520.00"
        }
      ]
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Path Parameters

invoice_id
string<uuid>
required

Response

Successful Response