Function
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 | |
1 | uniqkey | Item unique identifier key | Y | Used to select the part. |
2 | revOnly | Revision only | N | RevOnly indicates to either increase the next part by part number or to increase by revision only. |
3 | part_class | Part class | N | Users can change the part class for the next part number. |
4 | part_type | Part type | N | Users 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 an 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" } |