The Item Master NextPn API is used to insert a new item into the database with the next available part number or revision.
URL-{Root URL}/api/ItemMaster/NextPn/{API KEY}
Parameters
Parameter |
Description |
Required |
Comment |
uniqkey |
Item Unique Identifier Key |
Y |
Used to select the part. |
revOnly |
Revision Only |
N |
RevOnly is used to note whether or not to increase next part by part number, or to increase by revision only. |
part_class |
Part Class |
N |
You can change the part class for the next part number. |
part_type |
Part Type |
N |
You can change the part type for the next part number. |
Example Strings
Edit Part Description
URL-?uniqkey=UNIQUEKEY&revOnly=true
JSON
{
'uniqkey':'UNIQUEKEY',
'revOnly':'true'
}
A successful request should result in
{
"$id": "1",
"Code": 200,
"Message": "Inventor next part number generated successfully. Part number:'121-1000003' and Revision:'1'",
"SessionId": null,
"IsValidUser": true,
"ResponseObject": null
}
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/NexPn/123456789'.",
"MessageDetail": "No action was found on the controller 'InventoryHandling' that matches the name 'NexPn'."
}
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
}
|