HostFact API versie 3.1



Offertes

Offertes zijn te beheren via de controller 'pricequote'.



sendbyemail

Middels deze functie verstuurt u een offerte per e-mail.
Voorbeeldbestand: /voorbeelden/pricequote/pricequote.sendbyemail.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een offerte
PriceQuoteCode string Het offertenummer
Verplichte velden: Identifier of PriceQuoteCode

Voorbeeld invoer:
<?php

require_once("../hostfact_api.php");

$api = new HostFactAPI();

$priceQuoteParams = array(
				'PriceQuoteCode'	=> 'OF0001'
);

$response = $api->sendRequest('pricequote', 'sendbyemail', $priceQuoteParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => pricequote
    [action] => sendbyemail
    [status] => success
    [date] => 2022-11-24T12:00:00+02:00
    [success] => Array
        (
            [0] => Offerte OF0001 is per e-mail verzonden naar info@company.com
        )

    [pricequote] => Array
        (
            [Identifier] => 1
            [PriceQuoteCode] => OF0001
            [Debtor] => 1
            [DebtorCode] => DB0001
            [Status] => 2
            [Date] => 2018-01-14
            [Term] => 30
            [ExpirationDate] => 2018-02-13 00:00:00
            [AmountExcl] => 165.00
            [AmountTax] => 34,65
            [AmountIncl] => 199.65
            [TaxRate] => 0
            [Compound] => no
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [Coupon] => 
            [ReferenceNumber] => 
            [CompanyName] => Company X
            [Sex] => m
            [Initials] => John
            [SurName] => Jackson
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@company.com
            [PriceQuoteMethod] => 0
            [Template] => 2
            [SentDate] => 2022-11-24
            [Sent] => 1
            [Description] => 
            [Comment] => 
            [PriceQuoteLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 1
                            [Date] => 2018-01-14
                            [Number] => 1
                            [NumberSuffix] => 
                            [ProductCode] => 
                            [Description] => Setupfee
                            [PriceExcl] => 150
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [Periods] => 1
                            [Periodic] => 
                            [StartPeriod] => 
                            [EndPeriod] => 
                            [NoDiscountAmountIncl] => 181.5
                            [NoDiscountAmountExcl] => 150
                            [DiscountAmountIncl] => 0
                            [DiscountAmountExcl] => 0
                        )

                    [1] => Array
                        (
                            [Identifier] => 2
                            [Date] => 2018-01-14
                            [Number] => 1
                            [NumberSuffix] => 
                            [ProductCode] => P003
                            [Description] => Domain example.com
                            [PriceExcl] => 15
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [TaxPercentage] => 21
                            [Periods] => 1
                            [Periodic] => j
                            [StartPeriod] => 2018-01-14
                            [EndPeriod] => 2018-01-14
                            [NoDiscountAmountIncl] => 18.15
                            [NoDiscountAmountExcl] => 15
                            [DiscountAmountIncl] => 0
                            [DiscountAmountExcl] => 0
                        )

                )

            [Created] => 2022-11-24 11:00:00
            [Modified] => 2022-11-24 11:00:00
            [AcceptURL] => <a href={"}http://company.com/klantenpaneel/accept/?pricequote=OF0001&key=ddb48368d0aa7ec6c9c8a4f2a6a3d3b1{"}>http://company.com/klantenpaneel/accept/?pricequote=OF0001&key=ddb48368d0aa7ec6c9c8a4f2a6a3d3b1</a>
            [Attachments] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 5
                            [Filename] => sample.pdf
                        )

                )

            [Translations] => Array
                (
                    [Status] => Verzonden
                    [Country] => Nederland
                    [PriceQuoteMethod] => Per e-mail
                    [Template] => Offerte
                )

            [AmountDiscount] => 0
            [AmountDiscountIncl] => 0
            [UsedTaxrates] => Array
                (
                    [0.21] => Array
                        (
                            [AmountExcl] => 165
                            [AmountTax] => 34.65
                            [AmountIncl] => 199.65
                        )

                )

        )

)