Web Services Developer Guide - Parts Management Service

Overview


This article contains documentation for the Parts Management web service, all related API calls and possible errors.

You can use Ctrl+F to search for the required error message.

For more information about all available Web Services and corresponding methods, refer to the Introduction to Web Services article.



Information

This web service includes the following methods:


createParts

(SvMpPart[] svMpParts)


Description

The createParts service method creates a unique part for the specified serviceOrganizationId; checks if the categoryName exists for the serviceOrganizationId. If the categoryName is not created, it is created along with the new part.


Method Signature

Ordinal

DataType

Can be Null?

Description

svMpPart[]

SvMpPart

No

The list of parts that need to be created

Return Result

SvMpPartResult

No

The result object. Any errors for createParts are indicated in the SvMpPartResult object.


Error Messages (in the SvMpPartResult object)

"PartCategory should not be more than 60 characters" - Returned if the categoryName is longer than 60 characters.

"PartNumber cannot be blank" - Returned if the partNumber is empty.

"PartNumber should not be more than 15 characters" - Returned if the partNumber is longer than 15 characters.

"PartNumber should not have special characters" - Returned if the partNumber is not alphanumeric and contains special characters.

"PartName should not be more than 100 characters" - Returned if the partName is longer than 100 characters.

"Suggested Unit Price should not be less than 0" - Returned if the suggested unit price is a negative value.

"Suggested Unit Price should not be greater than 9999.99 " - Returned if the unit price is higher than the maximum unit price accepted.

"Barcode should not be more than 15 characters" - Returned if the barcode value is longer than 15 characters.

"PartCategory cannot be blank" - Returned if the catergoryName is empty.

"PartNumber should be unique for the ServiceOrganization" - Returned if the partNumber is already associated with the serviceOrganizationId.

 

updateParts

(SvMpPart[] svMpParts)


Description

The updateParts service method updates existing part for the specified serviceOrganizationId; checks if the categoryName exists; if it does not exist, the new categoryName is created along with the updating part details.


Method Signature

Ordinal

DataType

Can be Null?

Description

svMpPart[]

SvMpPart

No

The list of parts that need to be updated.

Return Result

SvMpPartResult

No

The result object. Any errors in updateParts are indicated in the SvMpPartResult object.


Error Messages (in the SvMpPartResult object)

"PartCategory should not be more than 60 characters" - Returned if the categoryName is longer than 60 characters.

"PartNumber cannot be blank" - Returned if the partNumber is empty.

"PartNumber should not be more than 15 characters" - Returned if the partNumber is longer than 15 characters.

"PartNumber should not have special characters" - Returned if the partNumber is not alphanumeric and contains special characters in it.

"PartName should not be more than 100 characters" - Returned if the partName is more than 100 characters.

"Suggested Unit Price should not be less than 0" - Returned if the suggested unit price is a negative value.

"Suggested Unit Price should not be greater than 9999.99 " - Returned if the unit price is higher than the maximum unit price accepted.

"Barcode should not be more than 15 characters" - Returned if the barcode longer is more than 15 characters.

"PartNumber used for update doesn't exist with the ServiceOrganization" - Returned if the partNumber is not found under the serviceOrganizationId.

 

deleteParts

(String[] partNumbers)


Description

The deleteParts service methods deletes the parts of the specific serviceOrganizationId.


Method Signature

Ordinal

DataType

Can be Null?

Description

partNumbers[]

String

No

The list of parts that need to be deleted.

Return Result

SvResult

No

The result object. Any errors in deleteParts are indicated in the SvResult object.


Error Messages (on the SvResult object)

"PartNumber cannot be blank" - Returned if the partNumbers array is empty.

"Number of input exceeds max allowed (5000) per API call." - Returned if the deleteParts array is exceeds the allowed size.

 "PartNumber should not be more than 15  characters" - Returned if the partNumber length is longer than 15 characters.

"PartNumber should not have special characters" - Returned if the partNumber is not alphanumeric and contains special characters.

"Part deletion failed." - Returned if any internal server error occurs while deleting the part.


PartsManagementWebService Error Codes

Error Code

Description of Error

General Error Codes (Apply across multiple methods)

0

Success (No Error)

1

PartCategory cannot be blank

2

PartNumber cannot be blank

3

PartNumber should not be longer than 15 characters

4

PartName should not be longer than 100 characters

5

PartNumber should be unique for the ServiceOrganization

6

PartNumber doesn't exist within the ServiceOrganization

7

Part deletion failed.

8

PartNumber should not have special characters

9

Suggested Unit Price should not be less than 0

10

Suggested Unit Price should not be greater than 9999.99

11

Number of input exceeds max allowed (5000) per API call.

12

PartCategory should not be longer than 60 characters

13

Barcode should not be longer than 15 characters

 

SvMpPart

Field

Data Type

Comments

partNumber

SvString

The partNumber that needs to be created or updated.

partName

SvString

The partName

suggestedUnitPrice

float

The suggested unit price of the part

barcode

SvString

The barcode for the part

categoryName

SvString

The categoryName of the part that needs to be created or updated

 

SvMpPartResult

Field

Data Type

Comments

partNumber

String

The partNumber that was given as the input.

errorCode

int

The error code that denotes the error

errorMessage

String

The error message for the errorCode we received.

 

Back to top

Comments

0 comments

Article is closed for comments.