WeFact API versie 3.9



Facturen

Facturen zijn te beheren via de controller 'invoice'.



sendbyemail

Middels deze functie verstuurt u een factuur per e-mail, of indien van toepassing via Simplerinvoicing.
Voorbeeldbestand: /voorbeelden/invoice/invoice.sendbyemail.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een factuur
InvoiceCode string Het factuurnummer
Verplichte velden: Identifier of InvoiceCode

Voorbeeld invoer:
$parameters = [
    "Identifier" => 1
];

$api->sendRequest('invoice', 'sendbyemail', $parameters);

Voorbeeld uitvoer:
Array
(
    [controller] => invoice
    [action] => sendbyemail
    [status] => success
    [date] => 2019-07-0109:29:53+02:00
    [success] => Array
        (
            [0] => Factuur F0001 is per e-mail verzonden naar info@example.com.
        )

    [invoice] => Array
        (
            [Identifier] => 1
            [InvoiceCode] => F0001
            [Debtor] => 1
            [DebtorCode] => DB10000
            [Status] => 2
            [SubStatus] => 
            [Date] => 2019-07-03
            [Term] => 14
            [PayBefore] => 2019-07-17
            [PaymentURL] => https://www.mijnwefact.nl/betalen/?payment=F0001&key=a3f4b191a8884a17c8f140c4472594f5&aid=...
            [AmountExcl] => 229.64
            [AmountTax] => 48.22
            [AmountIncl] => 277.86
            [AmountPaid] => 0.00
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [Coupon] => 
            [ReferenceNumber] => 
            [CompanyName] => Jan Janssen B.V.
            [Initials] => Jan
            [SurName] => Janssen
            [Sex] => m
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@example.com
            [InvoiceMethod] => 0
            [SentDate] => 2019-07-03
            [Sent] => 1
            [Reminders] => 0
            [ReminderDate] => 
            [Summations] => 0
            [SummationDate] => 
            [Authorisation] => no
            [PaymentMethod] => 
            [PayDate] => 
            [TransactionID] => 
            [LanguageCode] => nl_nl
            [Currency] => EUR
            [Description] => 
            [Comment] => 
            [InvoiceLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 1
                            [Date] => 2019-05-22
                            [Number] => 2
                            [NumberSuffix] =>  
                            [ProductCode] => P0001
                            [Description] => Werkzaamheden gebaseerd op uurtarief
                            [PriceExcl] => 100
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [1] => Array
                        (
                            [Identifier] => 2
                            [Date] => 2019-05-22
                            [Number] => 155
                            [NumberSuffix] => km
                            [ProductCode] => P0002
                            [Description] => Reiskosten à € 0,19 per km
                            [PriceExcl] => 0.19
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                    [2] => Array
                        (
                            [Identifier] => 3
                            [Date] => 2019-05-22
                            [Number] => 1
                            [NumberSuffix] =>  
                            [ProductCode] => P0002
                            [Description] => Reiskosten à € 0,19 per km
                            [PriceExcl] => 0.19
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxCode] => V21
                            [TaxPercentage] => 21
                            [PeriodicID] => 0
                            [Periods] => 1
                            [Periodic] => 
                            [StartDate] => 
                            [EndDate] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                        )

                )

            [Created] => 2019-07-01 09:29:53
            [Modified] => 2019-07-01 09:29:53
            [VatShift] => no
            [Translations] => Array
                (
                    [Status] => Verzonden
                    [Country] => Nederland
                    [InvoiceMethod] => Per e-mail
                    [PaymentMethod] => 
                    [LanguageLabel] => Nederlands
                )

        )

)