Producten

Producten zijn te beheren via de controller 'product'.


add

Middels deze functie is het mogelijk een product toe te voegen.


Invoerparameters:


Veldnaam Waarde Omschrijving
ProductCode string Het productnummer
Geef deze parameter niet mee wanneer het productnummer automatisch bepaald mag worden.
ProductName string Productnaam
ProductKeyPhrase string Omschrijving op factuur
ProductDescription string Uitgebreide (interne) omschrijving
NumberSuffix string Eenheid bijvoorbeeld: Kg.
Barcode string Barcode
PriceExcl float Prijs per stuk (excl. BTW)
PricePeriod string Zie variabelen-lijst. Standaard: '' (= Geen abonnement)
TaxCode string BTW code
AccountingCostCentre string Code kostenplaats boekhoudpakket
Enkel beschikbaar indien geactiveerd.
AccountingProject string Code project boekhoudpakket
Enkel beschikbaar indien geactiveerd.
Groups array array met ID's van productgroepen of lege string voor geen productgroepen
ProductInventory array productvoorraad module:
- IsProductInventoryEnabled 'yes' of 'no'     Voorraad bijwerken
Standaard: yes
- TotalStock float     Aantal op voorraad
- StockWarningThreshold string     Waarschuwen vanaf (dit veld leeg meegeven om de standaard uit de instellingen te gebruiken)
- SupplierIds array array met ID's van gekoppelde leveranciers of lege string voor geen gekoppelde leveranciers
- WarehouseID int Magazijn locatie
Verplichte velden: ProductName, ProductKeyPhrase en PriceExcl

Voorbeeld invoer:


$parameters = [
    "ProductName" => "Service contract",
    "ProductKeyPhrase" => "Service contract",
    "PriceExcl" => 150,
    "PricePeriod" => "m"
];

$api->sendRequest('product', 'add', $parameters);

Voorbeeld uitvoer:


Array
(
    [controller] => product
    [action] => add
    [status] => success
    [date] => 2024-01-21T12:00:00+02:00
    [product] => Array
        (
            [Identifier] => 1
            [ProductCode] => P0001
            [ProductName] => Service contract
            [ProductKeyPhrase] => Service contract
            [ProductDescription] => 
            [NumberSuffix] => 
            [Barcode] => 
            [PriceExcl] => 150
            [PricePeriod] => m
            [TaxCode] => V21
            [TaxPercentage] => 21
            [Groups] => Array
                (
                )

            [Created] => 2024-01-21 11:00:00
            [Modified] => 2024-01-21 11:00:00
            [Translations] => Array
                (
                    [PricePeriod] => maand
                )

        )

)