Geliştirici Merkezi

TR

GetInvoices

Belirtilen kriterlere göre faturaların detaylarını alın.

Method / Endpoint

GET/ {{API_URL}} Billing/GetInvoices?page=1&limit=10

İstek Parametreleri

Parametre Adı Türü Açıklama
page Integer Mevcut Sayfa Numarası
limit Integer Sayfa başı listelenecek fatura sayısı. Minimum:1, maksimum değer: 50. Varsayılan:10
sort String Sıralama Alanı. Alabileceği değerler: "id',' "number',' "created_at',' "due_date',' "payment_date',' "total". Varsayılan: "id"
sort_type String Sıralama Türü. Alabileceği değerler: "ASC',' "DESC". Varsayılan: "DESC"
filter[status] String Fatura Durumu. Kabul edilebilir değerler: "all',' "pending',' "unpaid',' "paid',' "cancelled',' "refunded". Varsayılan: "all"
filter[local] Boolean Fatura Yerelleştirilme Durumu. Alabileceği değerler: "none", "true", "false". Varsayılan: "none"
filter[taxfree] Boolean Fatura Vergi Muafiyeti Durumu. Alabileceği değerler: "none", "true", "false". Varsayılan: "none"
filter[formalized] Boolean Fatura Resmiyet Durumu. Alabileceği değerler: "none", "true", "false". Varsayılan: "none"
filter[id] Integer Fatura ID Numarası
filter[created_at_from] String Fatura Oluşturulma Tarihi Başlangıç (Format: YYYY-MM-DD HH:ii:ss)
filter[created_at_to] String Fatura Oluşturulma Tarihi Bitiş (Format: YYYY-MM-DD HH:ii:ss)
filter[due_date_from] String Fatura Son Ödeme Tarihi Başlangıç (Format: YYYY-MM-DD HH:ii:ss)
filter[due_date_to] String Fatura Son Ödeme Tarihi Bitiş (Format: YYYY-MM-DD HH:ii:ss)
filter[payment_date_from] String Fatura Ödenen Tarihi Başlangıç (Format: YYYY-MM-DD HH:ii:ss)
filter[payment_date_to] String Fatura Ödenen Tarihi Bitiş (Format: YYYY-MM-DD HH:ii:ss)
filter[refund_date_from] String Fatura İade Tarihi Başlangıç (Format: YYYY-MM-DD HH:ii:ss)
filter[refund_date_to] String Fatura İade Tarihi Bitiş (Format: YYYY-MM-DD HH:ii:ss)
filter[number] String Fatura Seri Numarası

Harici Örnek

curl --location 'https://example.com/api/Billing/GetInvoices?page=1&limit=10' \
--header 'Apikey: [YOUR_API_KEY]'

Dahili Örnek

try {
    $result = Api::Billing()->GetInvoices([
        'page' => 1,
        'limit' => 10,
        'filter' => [
            'status' => "unpaid",
        ]
    ]);
    print_r($result);
}
catch (Exception $e)
{
    echo 'Error: '.$e->getMessage();
}

Örnek JSON Yanıtı

{
    "status": "successful",
    "total": 2,
    "page": 1,
    "limit": 10,
    "next_page": 0,
    "data": [
        {
            "id": 327,
            "number": "#327",
            "user": {
                "id": "2",
                "lang": "en",
                "type": "corporate",
                "identity": null,
                "company_name": "Smith LLC",
                "company_tax_number": "551244",
                "company_tax_office": "SaintXV2rf",
                "name": "Micheal",
                "surname": "Smith",
                "full_name": "Micheal Smith",
                "email": "[email protected]",
                "phone": "12025550109",
                "address": {
                    "country_code": "FR",
                    "country_name": "France",
                    "city": "Paris",
                    "state": "ageagae",
                    "detail": "asdsafaeg",
                    "zipcode": "1234"
                }
            },
            "taxation_type": "exclusive",
            "notes": "Invoice note test123",
            "created_at": "2022-11-23 16:06:00",
            "due_date": "2022-11-23 16:06:00",
            "payment_date": "2022-11-23 16:09:46",
            "refund_date": "0000-00-00 00:00:00",
            "status": "paid",
            "formalize": false,
            "local": false,
            "taxfree": false,
            "formalize_file": null,
            "exchange_rate": 1,
            "currency": "USD",
            "tax_rate": 0,
            "subtotal": 0.68859999999999998987476601541857235133647918701171875,
            "tax": 0,
            "total": 0.550899999999999945288209346472285687923431396484375,
            "payment_method": "PayPal",
            "payment_method_data": {
                "capture_id": "P123456"
            },
            "payment_method_commission":0,
            "payment_method_commission_rate":0,
            "share": {
                "token": "VCsxZWZPQkI0bDFhdDNqV0RWZHdyQllGbmN5cGkzcGhRd09tWEc0VTIyMD0=",
                "link": "https://example.com/invoice?token=VCsxZWZPQkI0bDFhdDNqV0RWZHdyQllGbmN5cGkzcGhRd09tWEc0VTIyMD0="
            },
            "discounts": [
                {
                    "type": "promotion",
                    "item_id": 408,
                    "rate": 20,
                    "description": "Promotion 1",
                    "amount": 0.137699999999999989075405437688459642231464385986328125
                }
            ],
            "items": [
                {
                    "id": 408,
                    "owner_id": 327,
                    "description": "blamydomain.com (#125) (Domain Name Registration) | Yearly\r\nWhois Protection: I want",
                    "quantity": 1,
                    "tax_exempt": false,
                    "amount": 0.68859999999999998987476601541857235133647918701171875,
                    "total": 0.68859999999999998987476601541857235133647918701171875,
                    "order_id": 125,
                    "due_date": "2022-11-23 16:06:07",
                    "attributes" : {
                        "event":"DomainNameRegisterOrder"
                    }
                }
            ]
        },
        {
            "id": 367,
            "number": "#367",
            "user": {
                "id": 2,
                "lang": "en",
                "identity": null,
                "type": "corporate",
                "name": "Glen",
                "surname": "Daigle",
                "full_name": "Glen Daigle",
                "email": "[email protected]",
                "phone": "16055762309",
                "company_name": "TEST1 LLC",
                "company_tax_number": "659898989",
                "company_tax_office": "gdsgs",
                "address": {
                    "country_code": "US",
                    "country_name": "United States",
                    "city": "Alaska",
                    "state": "Test",
                    "detail": "test testsdsdsf",
                    "zipcode": "1234"
                }
            },
            "taxation_type": "exclusive",
            "notes": null,
            "created_at": "2023-03-11 19:49:00",
            "due_date": "2023-03-11 23:59:00",
            "payment_date": "2023-03-11 19:53:49",
            "refund_date": "0000-00-00 00:00:00",
            "status": "paid",
            "formalize": true,
            "local": true,
            "taxfree": false,
            "formalize_file": "https://example.com/resources/uploads/invoices/aa2f3fasd3fa3f4ed.pdf",
            "exchange_rate": 1,
            "currency": "USD",
            "tax_rate": 18,
            "subtotal": 21,
            "tax": 3.779999999999999804600747665972448885440826416015625,
            "total": 24.780000000000001136868377216160297393798828125,
            "payment_method": "Credit Card (Stripe)",
            "payment_method_data": {
                "Transaction ID": "PM12345"
            },
            "payment_method_commission":1,
            "payment_method_commission_rate":5,
            "send_bill_to_address": 0,
            "share": {
                "token": "VCsxZWZPQkI0bDFhdDNqV0RWZHdyQllGbmN5cGkzcGhRd09tWEc0VTIyMD0=",
                "link": "https://example.com/invoice?token=VCsxZWZPQkI0bDFhdDNqV0RWZHdyQllGbmN5cGkzcGhRd09tWEc0VTIyMD0="
            },
            "discounts": [],
            "items": [
                {
                    "id": 458,
                    "owner_id":367,
                    "description": "test description",
                    "quantity": 1,
                    "tax_exempt": false,
                    "amount": 20,
                    "total": 20,
                    "order_id": 0,
                    "due_date": "0000-00-00 00:00:00",
                    "attributes":[]
                }
            ]
        }
    ]
}

Yanıt Parametreleri

"GetInvoice" belgesindeki yanıt parametreleri ile birebir aynıdır.

GetInvoice CreateInvoice

Bir Sorunuz mu Var?

Bize yazmaktan çekinmeyin. En kısa sürede yanıt göndereceğiz.
Bize Ulaşın.
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top