HostFact API versie 3.1



Bestelling

Bestellingen zijn te beheren via de controller 'order'.



orderline delete

Middels deze functie verwijdert u een bestelregel van een bestaande bestelling.
Voorbeeldbestand: /voorbeelden/order/orderline.delete.php


Invoerparameters:
Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een bestelling
OrderCode string Het bestelnummer
OrderLines array Bestelregel:
- Identifier int     De unieke ID van een regel
Verplichte velden: Identifier of OrderCode en OrderLines Identifier

Voorbeeld invoer:
<?php

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

$api = new HostFactAPI();

$orderLineParams = array(
					'OrderCode'		=> 'B0001',
					
					'OrderLines'	=> array(
						array(
							'Identifier'	=> 2
						)
					)
);

$response = $api->sendRequest('orderline', 'delete', $orderLineParams);

print_r_pre($response);

?>

Voorbeeld uitvoer:
Array
(
    [controller] => orderline
    [action] => delete
    [status] => success
    [date] => 2022-11-24T12:00:00+02:00
    [success] => Array
        (
            [0] => Er zijn 1 bestelregels verwijderd
        )

    [order] => Array
        (
            [Identifier] => 1
            [OrderCode] => B0001
            [Debtor] => 1
            [Date] => 2018-01-14 14:10:51
            [Term] => 14
            [AmountExcl] => 150.00
            [AmountTax] => 31.50
            [AmountIncl] => 181.50
            [Discount] => 0
            [VatCalcMethod] => excl
            [IgnoreDiscount] => no
            [Coupon] => 
            [CompanyName] => Company X
            [Sex] => m
            [Initials] => John
            [SurName] => Jackson
            [Address] => Keizersgracht 100
            [ZipCode] => 1015 AA
            [City] => Amsterdam
            [Country] => NL
            [EmailAddress] => info@company.com
            [InvoiceMethod] => 0
            [Template] => 1
            [Authorisation] => no
            [PaymentMethod] => 
            [Paid] => 0
            [TransactionID] => 
            [IPAddress] => 
            [Comment] => 
            [Status] => 0
            [OrderLines] => Array
                (
                    [0] => Array
                        (
                            [Identifier] => 1
                            [Date] => 2018-01-14
                            [Number] => 1
                            [ProductCode] => 
                            [Description] => Setupfee
                            [PriceExcl] => 150
                            [TaxPercentage] => 21
                            [DiscountPercentage] => 0
                            [DiscountPercentageType] => line
                            [Periods] => 1
                            [Periodic] => 
                            [ProductType] => 
                            [Reference] => 0
                            [NoDiscountAmountIncl] => 181.5
                            [NoDiscountAmountExcl] => 150
                            [DiscountAmountIncl] => 0
                            [DiscountAmountExcl] => 0
                        )

                )

            [Created] => 2022-11-24 11:00:00
            [Modified] => 2022-11-24 11:00:00
            [Translations] => Array
                (
                    [Country] => Nederland
                    [InvoiceMethod] => Per e-mail
                    [Template] => Factuur
                    [PaymentMethod] => 
                    [Status] => Ontvangen
                )

            [AmountDiscount] => 0
            [AmountDiscountIncl] => 0
            [UsedTaxrates] => Array
                (
                    [0.21] => Array
                        (
                            [AmountExcl] => 150
                            [AmountTax] => 31.5
                            [AmountIncl] => 181.5
                        )

                )

        )

)