01. Products

Interface

It allows you:

Prerequisites:

In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:

Columns that can be used as filters:

Actions can be done:

API Methods:

List:

URL: https://api.socratecloud.com/webapi/rest/product/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}

Method: GET

Available filter parameters:

{

    "attribute_name1":"attribute_value1",                                         --> single attribute value

    "attribute_name2":"attribute_value2",                                         --> single attribute value

    "attribute_name3":["attribute_value3","attribute_value4","attribute_value5"]  --> multiple attribute values

}

Return: JSON object with next format:

{

    "data": [

        {

            "Organization": "Demo SRL",

            "Created": "2020-02-27 12:36:31+0000",

            "CreatedBy": "DEMO",

            "Updated": "2022-05-11 12:05:35+0000",

            "UpdatedBy": "DEMO",

            "Value": "030",

            "Name": "PRODUCT 30",

            "Description": null,

            "Help": null,

            "UPC": "030",

            "SKU": "030",

            "Active": true,

            "UOM": "Each",

            "OfferUOM": null,

            "OfferUOMCoef": null,

            "TaxCategory": "TVA",

            "ProductCategory": "FOOD PRODUCTS",

            "ProductSubcategory": null,

            "ProductFamily": "FAMILIE PRODUS TEST_1",

            "FamilyType": "TIP FAMILIE TEST",

            "ProductType": "Item",

            "NetWeight": 0.24,

            "Weight": 0.25,

            "Volume": 1,

            "QtyOnHand": 0,

            "QtyAvailable": 0,

            "HasStock": false,

            "PriceList": "Vanzare RON",

            "PriceListVersion": "Vanzare RON vers1",

            "Currency": "RON",

            "IsTaxIncluded": false,

            "IsSold": true,

            "ListPrice": null,

            "StdPrice": null,

            "Tax": "19%",

            "TaxRate": 19,

            "AttributeSet": "Proprietate Produs 30",

            "attributes": {

                "Proprietate test 1": "white",

                "Proprietate noua 1": "Black"

            },

            "Organization_ID": 1005272,

            "Product_ID": 1121036,

            "TaxCategory_ID": 1000812,

            "UOM_ID": 100,

            "ProductCategory_ID": 1003060,

            "ProductSubcategory_ID": null,

            "ProductFamily_ID": 1001416,

            "IsPurchased": true,

            "IsStocked": true,

            "VersionNo": "2",

            "Classification": "A",

            "DocumentNote": null,

            "GuaranteeDays": 12,

            "AttributeSet_ID": 1001933,

            "Make": "FABRICA TEST",

            "Model": "Model_test",

            "CreatedBy_ID": 1014218,

            "UpdatedBy_ID": 1014218,

            "ProductPurchasings": [],

            "SalesRep": "REPR_NOU",

            "SalesRep_ID": 1030593,

            "SubscriptionType": null,

            "SubscriptionType_ID": null,

            "GuaranteeDaysMin": 5,

    "Discontinued": false

        }

    ],

    "totalRows": 1

}

List full:

URL: https://api.socratecloud.com/webapi/rest/product/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}

Method: GET

Available filter parameters:

{

    "attribute_name1":"attribute_value1",                                          --> single attribute value

    "attribute_name2":"attribute_value2",                                          --> single attribute value

    "attribute_name3":["attribute_value3","attribute_value4","attribute_value5"]   --> multiple attribute values

}

Return: JSON object with next format:

{

    "data": [

        {

            "Organization": "DEMO SRL",

            "Created": "2020-02-27 12:36:31+0000",

            "CreatedBy": "User_1",

            "Updated": "2022-05-11 12:05:35+0000",

            "UpdatedBy": "User_1",

            "Value": "030",

            "Name": "PRODUCT 30",

            "Description": null,

            "Help": null,

            "UPC": "030",

            "SKU": "030",

            "Active": true,

            "UOM": "Each",

            "OfferUOM": null,

            "OfferUOMCoef": null,

            "TaxCategory": "TVA",

            "ProductCategory": "FOOD PRODUCTS",

            "ProductSubcategory": null,

            "ProductFamily": "FAMILIE PRODUS TEST_1",

            "FamilyType": "TIP FAMILIE TEST",

            "ProductType": "Item",

            "NetWeight": 0.24,

            "Weight": 0.25,

            "Volume": 1,

            "QtyOnHand": 0,

            "QtyAvailable": 0,

            "HasStock": false,

            "PriceList": "Vanzare RON",

            "PriceListVersion": "Vanzare RON vers1",

            "Currency": "RON",

            "IsTaxIncluded": false,

            "IsSold": true,

            "ListPrice": null,

            "StdPrice": null,

            "Tax": "19%",

            "TaxRate": 19,

            "AttributeSet": "Proprietate Produs 30",

            "attributes": {

                "Proprietate test 1": "white",

                "Proprietate noua 1": "Black"

            },

            "Organization_ID": 1005272,

            "Product_ID": 1121036,

            "TaxCategory_ID": 1000812,

            "UOM_ID": 100,

            "ProductCategory_ID": 1003060,

            "ProductSubcategory_ID": null,

            "ProductFamily_ID": 1001416,

            "IsPurchased": true,

            "IsStocked": true,

            "VersionNo": "2",

            "Classification": "A",

            "DocumentNote": null,

            "GuaranteeDays": 12,

            "AttributeSet_ID": 1001933,

            "Make": "FABRICA TEST",

            "Model": "Model_test",

            "CreatedBy_ID": 1014218,

            "UpdatedBy_ID": 1014218,

            "BPartnerProducts": [

                {

                    "Organization": "DEMO SRL",

                    "Created": "2022-05-12 09:59:41+0000",

                    "CreatedBy": "User_1",

                    "Updated": "2022-05-12 09:59:41+0000",

                    "UpdatedBy": "User_1",

                    "Product": "030",

                    "ProductName": "PRODUCT 30",

                    "ProductUOM": "Each",

                    "BPartner": "CT1",

                    "BPartnerName": "CLIENT TEST 1",

                    "Description": "some_product 030",

                    "Active": true,

                    "IsGenerallyValid": false,

                    "VendorProductNo": "Tcode030",

                    "VendorCategory": null,

                    "Manufacturer": "TestPROD",

                    "QualityRating": 0,

                    "ShelfLifeMinPct": 1,

                    "ShelfLifeMinDays": 20,

                    "OrderUOM": "Each",

                    "OrderUOMCoef": 24,

                    "Order_Min": 48,

                    "ShipUOM": "Bax",

                    "ShipUOMCoef": 48,

                    "InvoiceUOM": "Bax",

                    "InvoiceUOMCoef": 48

                }

            ],

            "ProductPurchasings": [

                {

                    "Organization_ID": 1005272,

                    "Active": true,

                    "Created": "2020-02-27 12:37:34+0000",

                    "CreatedBy": 1014218,

                    "Updated": "2020-02-27 12:37:34+0000",

                    "UpdatedBy": 1014218,

                    "CurrentVendor": true,

                    "UOM_ID": 100,

                    "Currency_ID": 102,

                    "ListPrice": 0,

                    "POPrice": 0,

                    "PriceEffective": null,

                    "LastPOPrice": 0,

                    "LastInvoicePrice": null,

                    "UPC": null,

                    "PartnerCategory": null,

                    "Discontinued": false,

                    "DiscontinuedBy": null,

                    "MinimumOrderQty": 1,

                    "OrderPackQty": 1,

                    "CostPerOrder": null,

                    "ActualDeliveryTime": null,

                    "LeadTime": null,

                    "RoyaltyAmount": null,

                    "Manufacturer": null,

                    "QualityRating": null,

                    "Description": null,

                    "PartnerProductKey": "030",

                    "BPartner_ID": 1018006,

                    "CalendarUpdated": null

                }

            ],

            "SalesRep": "REPR_NOU",

            "SalesRep_ID": 1030593,

            "SubscriptionType": null,

            "SubscriptionType_ID": null,

            "GuaranteeDaysMin": 5,

    "Discontinued": false


        }

    ],

    "totalRows": 1

}

Create:

URL: https://api.socratecloud.com/webapi/rest/product/create/{version}?accessToken={access_token}

Method: POST

Return: product value for success or error message (start with "ERROR: ")

Data format:

{

    "Organization": "Demo SRL",

    "Value": "9865953956",

    "Name": "some_name",

    "Description": null,

    "Help": null,

    "UPC": null,

    "SKU": null,

    "Active": true,

    "UOM": "Each",

    "TaxCategory": "TVA 24%",

    "ProductCategory": "English Book",

    "ProductSubcategory": null,

    "ProductFamily": null,

    "FamilyType": null,

    "ProductType": "Item",

    "NetWeight": 0,

    "Volume": 0,

    "PriceList": null,

    "PriceListVersion": null,

    "ListPrice": null,

    "StdPrice": "100",

    "IsSold": false,

    "AttributeSet": "W&H",

            "attributes": {

                "Width": 10,

                "Height": 25},

   "SalesRep": "AdminTitular",

   "SalesRep_ID": null,

   "SubscriptionType": "Abonament Food",

   "SubscriptionType_ID": 1000006,

   "Model": null,

   "GuaranteeDays": null,

   "GuaranteeDaysMin": 30

    

}

Create full:

URL:https://api.socratecloud.com/webapi/rest/product/full/create/{version}?accessToken={access_token}

Method: POST

Return: product value for success or error message (start with "ERROR: ")

Data format:

{

            "Organization": "Demo SRL",

            "Created": "2007-08-22 08:30:19+0300",

            "CreatedBy": "System",

            "Updated": "2015-01-29 09:05:26+0200",

            "UpdatedBy": "Florin David",

            "Value": "Standard Product For BBX TEEESt",

            "Name": "Standard",

            "Description": null,

            "Help": null,

            "UPC": "123",

            "SKU": "2222",

            "Active": true,

            "UOM": "Each",

            "OfferUOM": null,

            "OfferUOMCoef": null,

            "TaxCategory": "SCUTIT",

            "ProductCategory": "Autoturisme",

            "ProductSubcategory": null,

            "ProductFamily": null,

            "FamilyType": "Nokia",

            "ProductType": "Item",

            "NetWeight": null,

            "Weight": 20,

            "Volume": null,

            "QtyOnHand": 17,

            "QtyAvailable": 1,

            "HasStock": true,

            "PriceList": "C1PiatraOnline",

            "PriceListVersion": "10/09/2019",

            "Currency": "RON",

            "IsTaxIncluded": false,

            "IsSold": true,

            "ListPrice": null,

            "StdPrice": 10,

            "Tax": null,

            "TaxRate": null,

            "AttributeSet": "Inaltime si culoare",

            "attributes": {

                "Inaltime": "120"

            },

            "Organization_ID": 1000001,

            "Product_ID": 1000001,

            "TaxCategory_ID": 1000001,

            "UOM_ID": 100,

            "ProductCategory_ID": 1000014,

            "ProductSubcategory_ID": null,

            "ProductFamily_ID": null,

            "IsPurchased": true,

            "IsStocked": true,

            "VersionNo": null,

            "Classification": null,

            "DocumentNote": null,

            "GuaranteeDays": null,

            "AttributeSet_ID": 1000000,

            "Make": "Mercedes",

            "Model": "C KLASS",

            "RDS_ID_Inventory": null,

            "RDS_SubcategorieTehnica": null,

            "CreatedBy_ID": 0,

            "UpdatedBy_ID": 1000054,

            "BPartnerProducts": [],

            "ProductPurchasings": [

                {

                    "Organization_ID": 1000001,

                    "Active": true,

                    "Created": "2020-07-10 13:00:15+0300",

                    "CreatedBy": 1000002,

                    "Updated": "2020-07-10 14:07:25+0300",

                    "UpdatedBy": 1000002,

                    "CurrentVendor": false,

                    "UOM_ID": 100,

                    "Currency_ID": 102,

                    "ListPrice": 11.5,

                    "POPrice": 9.5,

                    "PriceEffective": null,

                    "UPC": null,

                    "PartnerCategory": null,

                    "Discontinued": false,

                    "DiscontinuedBy": null,

                    "MinimumOrderQty": 1,

                    "OrderPackQty": 1,

                    "CostPerOrder": 0.5,

                    "LeadTime": 0,

                    "RoyaltyAmount": 0,

                    "Manufacturer": null,

                    "QualityRating": 0,

                    "Description": null,

                    "PartnerProductKey": "TDK91TEST",

                    "BPartner_ID": 1000003,

                    "CalendarUpdated": null

                }

            ],

            "SalesRep": null,

            "SalesRep_ID": null,

            "SubscriptionType": null,

            "SubscriptionType_ID": null,

    "GuaranteeDaysMin": 30

        }

Update:

URL: https://api.socratecloud.com/webapi/rest/product/update/{version}?accessToken={access_token}&Value={product_value}

Method: POST

Return: product value for success or error message (start with "ERROR: ")

Data format:

{

    "Organization": "Demo SRL",

    "Value": "9865953956",

    "Name": "new_name",

    "Description": null,

    "Help": null,

    "UPC": null,

    "SKU": null,

    "Active": true,

    "UOM": "Each",

    "TaxCategory": "TVA 24%",

    "ProductCategory": "English Book",

    "ProductSubcategory": null,

    "ProductFamily": null,

    "FamilyType": null,

    "ProductType": "Item",

    "NetWeight": 0,

    "Volume": 0,

    "PriceList": null,

    "PriceListVersion": null,

    "ListPrice": null,

    "StdPrice": "100",

    "IsSold": false,

    "SalesRep": "AdminTitular",

    "SalesRep_ID": null,

    "SubscriptionType": "Abonament Food",

     "SubscriptionType_ID": 1000006,

    "GuaranteeDays": null,

    "GuaranteeDaysMin": 30

     "AttributeSet": "W&H",

            "attributes": {

                "Width": 10,

                "Height": 25}

}

Delete:

URL: https://api.socratecloud.com/webapi/rest/product/delete/{version}?&accessToken={access_token}&Value={product_value}

Method: POST

Return: 'Deleted' for success or error message (start with "ERROR: ")

Get picture:

URL: https://api.socratecloud.com/webapi/rest/product/picture/{version}?startRow={0}&endRow={100}&accessToken={access_token}&Value={product_value}

Method: GET

Available parameters:

Return: File or 204/"No Content" if no picture found

Set picture:

URL: https://api.socratecloud.com/webapi/rest/product/picture/set/{version}?startRow={0}&endRow={100}&accessToken={access_token}&Value={product_value}

Method: POST

Available parameters:

Return 'Ok' for success or error message (start with "ERROR: ")

Note: Only image files are accepted

Delete picture:

URL: https://api.socratecloud.com/webapi/rest/product/picture/delete/{version}?startRow={0}&endRow={100}&accessToken={access_token}&Value={product_value}

Method: POST

Available parameters:

Return 'Ok' for success or error message (start with "ERROR: ")

List picture:

URL: https://api.socratecloud.com/webapi/rest/product/picture/list/{version}?accessToken={access_token}&Value={product_value}

Method: GET

Available parameters:

Return: JSON with the following format

{

    "data": [

        {

            "FileName": "20x20.gif",

            "Length": 784

        },

        {

            "FileName": "800x600.jpg",

            "Length": 7767

        }

    ],

    "totalRows": 2

}