Megaventory API v2017a

<back to all web services

ProductClientGet

The following routes are available for this service:
GET POST/ProductClient/ProductClientGetGets information on existing product-client relationshipsUses 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.

Examples:



A.

Return all the product clients that are linked to product with "ProductID = 1". The results are returned as mvProductClient objects.
We can add one Filter as shown below:

Value:

  {
   "Filters": [
      {
         "FieldName": "ProductID",
         "SearchOperator": "Equals",
         "SearchValue": "1"
      }
   ]
} 

Response:

 {
   "mvProductClient": [
      {
         "ProductID": 1,
         "ProductClientID": 1,
         "ProductClientPrice": 0,
         "ProductClientSKU": "",
         "ProductClientDescription": ""
      },
      {
         "ProductID": 1,
         "ProductClientID": 2,
         "ProductClientPrice": 0,
         "ProductClientSKU": "",
         "ProductClientDescription": ""
      }
   ],
   "ResponseStatus": {
      "ErrorCode": "0"
   }
}

To override the Content-type in your clients HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /csv/reply/ProductClientGet HTTP/1.1 
Host: api.megaventory.com 
Content-Type: text/csv
Content-Length: length

AndOr,Group,FieldName,SearchOperator,SearchValue
And,Undefined,String,Undefined,String

HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{Unable to show example output for type 'ProductClientGetResponse' using the custom 'csv' filter}Object reference not set to an instance of an object.