GET POST | /ProductSupplier/ProductSupplierGet | Gets information on existing product-supplier relationships | Uses your API Key and some Filters in an array format and returns
the search results using given filters. Optionally, you can use ReturnTopNRecords to limit the number of
the results to the specified number (omit, or add ReturnTopNRecords = -1 to get all the available results).
The ReturnTopNRecords chooses the top records in a ProductID descending order. You can also use "IncludeReferencedObjects"
to get additional data about lead time and quantity range
A. Return all the product suppliers that are linked to product with "ProductID = 1". The results are returned as mvProductSupplier objects.
We can add one Filter as shown below:
Value: {
"Filters": [
{
"FieldName": "ProductID",
"SearchOperator": "Equals",
"SearchValue": "1"
}
]
}
Response: {
"mvProductSupplier": [
{
"ProductID": 1,
"ProductSupplierID": 2,
"IsMainSupplier": false,
"ProductSupplierPrice": 15.370000000,
"ProductSupplierSKU": "PRODUCT_SUPPLIER_SKU_2",
"ProductSupplierDescription": "A Product supplied by supplier id = 2",
"ProductSupplierLeadTimeId": 2,
"ProductSupplierQuantityRangeId": 0,
"ProductSupplierLeadTimeExactDate": "/Date(16500108100000-0000)/",
"DefaultPurchaseQuantity": 1,
"MinimumPurchaseQuantity": 1,
"MaximumPurchaseQuantity": 100
},
{
"ProductID": 1,
"ProductSupplierID": 3,
"IsMainSupplier": true,
"ProductSupplierPrice": 10.190000000,
"ProductSupplierSKU": "PRODUCT_SUPPLIER_SKU_3",
"ProductSupplierDescription": "A Product supplied by supplier id = 3",
"ProductSupplierLeadTimeId": -99,
"ProductSupplierQuantityRangeId": 0,
"ProductSupplierLeadTimeExactDate": "/Date(-62135596800000-0000)/",
"DefaultPurchaseQuantity": 1,
"MinimumPurchaseQuantity": 1,
"MaximumPurchaseQuantity": 500
}
],
"ResponseStatus": {
"ErrorCode": "0"
}
}
B. Get additional lead time and quantity data using the "IncludeReferencedObjects" flag:
Value: {
"includeReferencedObjects": true
}
Response: {
"mvProductSupplier": [
{
"ProductID": 1,
"ProductSupplierID": 2,
"IsMainSupplier": false,
"ProductSupplierPrice": 15.370000000,
"ProductSupplierSKU": "PRODUCT_SUPPLIER_SKU_2",
"ProductSupplierDescription": "A Product supplied by supplier id = 2",
"ProductSupplierLeadTimeId": 2,
"ProductSupplierLeadTime": {
"LeadTimeID": 2,
"LeadTimeDescription": "Exact date",
"LeadTimeMinDaysFromNow": 1,
"LeadTimeMaxDaysFromNow": 5,
"LeadTimeColorOption": "FF0000",
"LeadTimeDisplayOrder": 1,
"LeadTimeIsDefault": false,
"LeadTimeSupplierID": 5
},
"ProductSupplierQuantityRangeId": 0,
"ProductSupplierQuantityRange": {
"QuantityRangeID": 0,
"QuantityRangeDescription": "Exact",
"QuantityRangeMinQuantity": 1.000000000,
"QuantityRangeMaxQuantity": 5.000000000,
"QuantityRangeColorOption": "3399FF",
"QuantityRangeDisplayOrder": 1,
"QuantityRangeIsDefault": false
},
"ProductSupplierLeadTimeExactDate": "/Date(16500108100000-0000)/",
"DefaultPurchaseQuantity": 1,
"MinimumPurchaseQuantity": 1,
"MaximumPurchaseQuantity": 100
},
{
"ProductID": 2,
"ProductSupplierID": 3,
"IsMainSupplier": true,
"ProductSupplierPrice": 10.870000000,
"ProductSupplierSKU": "PRODUCT_SUPPLIER_SKU_3",
"ProductSupplierDescription": "A Product supplied by supplier id = 3",
"ProductSupplierLeadTimeId": -99,
"ProductSupplierQuantityRangeId": 0,
"ProductSupplierQuantityRange": {
"QuantityRangeID": 0,
"QuantityRangeDescription": "Exact",
"QuantityRangeMinQuantity": 1.000000000,
"QuantityRangeMaxQuantity": 5.000000000,
"QuantityRangeColorOption": "3399FF",
"QuantityRangeDisplayOrder": 1,
"QuantityRangeIsDefault": false
},
"ProductSupplierLeadTimeExactDate": "/Date(-62135596800000-0000)/",
"DefaultPurchaseQuantity": 1,
"MinimumPurchaseQuantity": 1,
"MaximumPurchaseQuantity": 500
}
],
"ResponseStatus": {
"ErrorCode": "0"
}
}
|
---|