Producten

Producten zijn te beheren via de controller 'product'.


edit

Met behulp van deze functie is het mogelijk om een product te bewerken.
Alleen ingevoerde parameters worden gewijzigd.


Invoerparameters:


Veldnaam Waarde Omschrijving
Identifier int De unieke ID van een product.
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: Identifier of ProductCode

Voorbeeld invoer:


$parameters = [
    "ProductCode" => "P0001",
    "PriceExcl" => 50
];

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

Voorbeeld uitvoer:


Array
(
    [controller] => product
    [action] => edit
    [status] => success
    [date] => 2024-01-21T12:00:00+02:00
    [product] => Array
        (
            [Identifier] => 1
            [ProductCode] => P0001
            [ProductName] => Uurtarief
            [ProductKeyPhrase] => Werkzaamheden gebaseerd op uurtarief
            [ProductDescription] => 
            [NumberSuffix] => 
            [Barcode] => 
            [PriceExcl] => 50
            [PricePeriod] => 
            [TaxCode] => V21
            [TaxPercentage] => 21
            [Groups] => Array
                (
                    [1] => Array
                        (
                            [id] => 1
                            [GroupName] => Consultancy
                        )

                )

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

        )

)