Copy

The Item Master cop API is used to copy an item's details to a new part number. 

URL-{Root URL}/api/ItemMaster/copy/{API KEY}

Parameters

Parameter Description Required Comment
uniqkey  Item Unique Identifier Key  Y Used to select the part.  
part_no  Part Number  N Part_no can also be used to select part.  
newPartNumber  New Part Number  N Use newPartNumber to select which part number the item details will be copied to.
newRevision New Revision   N Use newRevision to set the revision of the part the items are being copied to. 

Example Strings

Edit Part Description

URL-?uniqkey=UNIQUEKEY&newPartNumber=PartNumber&newRevision=Revision

JSON

{

'uniqkey':'UNIQUEKEY',

'newPartNumber':'PartNumber',

'newRevision':'Revision'

}

A successful request should result in

{

"$id": "1",

"Code": 200,

"Message": "Inventory copied, newly generated uniq_key:",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": "1K5DOWK6G1"

}

Common Errors

API Key Error

If there is an error with the entered API key the system will return an error describing it.

{

"$id": "1",

"Code": 403,

"Message": "Invalid API Key.",

"SessionId": null,

"IsValidUser": false,

"ResponseObject": null

}

URL Error

If there is an error within the URL the system will return a HTTP error.

{

"$id": "1",

"Message": "No HTTP resource was found that matches the request URI 'http://localhost/api/InventoryHandling/Cop/123456789'.",

"MessageDetail": "No action was found on the controller 'InventoryHandling' that matches the name 'Cop'."

}

Missing Required Parameter

If a required parameter is missing the system will return an error describing the incorrect parameter.

{

"$id": "1",

"Code": 403,

"Message": "Inventor edit failed.Unique_key required.",

"SessionId": null,

"IsValidUser": true,

"ResponseObject": null

}