Skip to main content
GET
/
v1
/
invoice_items
/
{id}
Retrieve a invoice item
curl --request GET \
  --url https://api.yorlet.com/v1/invoice_items/{id} \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.yorlet.com/v1/invoice_items/{id}"

headers = {"Authorization": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};

fetch('https://api.yorlet.com/v1/invoice_items/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.yorlet.com/v1/invoice_items/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.yorlet.com/v1/invoice_items/{id}"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.yorlet.com/v1/invoice_items/{id}")
  .header("Authorization", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.yorlet.com/v1/invoice_items/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "created": 123,
  "object": "invoice_item",
  "amount": 123,
  "apply_after": 123,
  "credit_amount": 123,
  "currency": "<string>",
  "customer": "<string>",
  "description": "<string>",
  "discount_amount": 123,
  "invoice": "<string>",
  "price_data": {
    "amount": 123,
    "currency": "<string>",
    "recurring": {
      "interval": "<string>",
      "interval_count": 123
    },
    "tax_percent": 50
  },
  "price": "<string>",
  "proration_amount": 123,
  "tax_percent": 50,
  "total_credit_grant_amount": 123,
  "transfer_destination": "<string>",
  "unit": "<string>",
  "account": "<string>",
  "deleted": false,
  "discount": 0,
  "metadata": {},
  "part_payment_amount": 0,
  "tax": 0,
  "transfer_behavior": "automatic"
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Response

200 - application/json

Retrieve a invoice item

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
invoice_item
amount
integer
required

The amount to be charged, represented as a whole integer if possible.

apply_after
integer | null
required

The date after which the invoice item will be applied.

credit_amount
integer
required

The amount of the credit to be applied to the invoice item.

currency
string
required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

customer
string
required

The ID of the customer the invoice item is for.

description
string | null
required

The description for the invoice item, to be displayed to the customer.

discount_amount
integer
required

The amount of the discount to be applied to the invoice item.

invoice
string | null
required

The ID of the invoice the invoice item is for.

Pattern: ^[a-zA-Z0-9_]+$
price_data
object | null
required
price
string | null
required

The ID of the price object.

Pattern: ^[a-zA-Z0-9_]+$
proration_amount
integer
required

The amount of the proration to be applied to the invoice item.

tax_percent
number
required

The tax percentage to use when calculating the tax amount.

Required range: 0 <= x <= 100
total_credit_grant_amount
integer
required

The total credit grant amount for the invoice item.

transfer_destination
string | null
required

ID of the owner that will be the transfer destination. Only allowed when the invoice item transfer behavior is owner.

type
enum<string>
required

The type of the invoice item.

Available options:
charge,
rent,
product
unit
string | null
required

The ID of the unit the invoice item is for.

Pattern: ^[a-zA-Z0-9_]+$
account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

discount
integer
default:0

The amount of the discount applied to the invoice item.

metadata
object | null

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

part_payment_amount
integer
default:0

The amount of the part payments already applied to the invoice item.

tax
integer
default:0

The amount of tax applied to the invoice item.

transfer_behavior
enum<string>
default:automatic

The invoice item transfer behavior. The default is automatic.

Available options:
automatic,
owner,
none