API Products BULK

Z Podpora.nextis.cz
Verze z 4. 8. 2020, 13:37, kterou vytvořil Chrzaszcz (diskuse | příspěvky) (Založena nová stránka s textem „==== Description ==== Method allows You to update and create new products in system. ==== Exact name ==== <code>API_Products_BULK</code> ==== Type ==== S…“)
(rozdíl) ← Starší verze | zobrazit aktuální verzi (rozdíl) | Novější verze → (rozdíl)
Přejít na: navigace, hledání

Description

Method allows You to update and create new products in system.

Exact name

API_Products_BULK

Type

Standard executable stored procedure with table-Valued Parameters.

Table-Valued Parameters Specification

Columns name Data type Value range Description Relation
SupplierID int Supplier ID API_GetCustomers.ID
GroupID int Group ID API_GetProductGroups.ID
SupplierProductCode nvarchar(40) Supplier product code
ManufacturerSupplier nvarchar(50) Manufacturer supplier
Prefix nvarchar(3) Prefix
SupplierItemName nvarchar(150) Supplier item name
MinimumOrderableQuantity decimal(18,2) Minimum orderable quantity
ForeignPrice decimal(19,6) Foreign price
BasicPrice decimal(18,6) Basic price
InfoReturnOfGoods nvarchar(50) Info return of goods
ID3 int Internal system id. If you create it, set it to null API_GetProducts.ID
SupplierIsArchiving int Supplier is archiving. If you create it, set it to null


Return

0 : OK
100 : Error

Example

DECLARE @return_value int
Declare @Product dbo.APIsProduct 
INSERT INTO @Product
SELECT [SupplierID], [GroupID], [SupplierProductCode], [ManufacturerSupplier], [Prefix], [SupplierItemName], [MinimumOrderableQuantity], [ForeignPrice], [BasicPrice], 'Product cannot be returned', [ID], [IsArchiving]
FROM [API_GetProducts]
WHERE SupplierID = 7
union
SELECT 7, 15, 'W72100', 'WALKER', '', '', 1, 15, 400, 'Product cannot be returned', null, null

exec @return_value = dbo.API_Products_BULK @Product

Notices

API_Products_BULK procedure uses own data type called Products (dbo.APIsProduct).