Share

Update an item’s cost - identify the item using manufacturer information

PATCH /api/erp/v1/part/mfr_name/{mfrName}/mfr_part_number/{mfrPartNumber}/cost_purchased posts the updated cost to Upchain. The part is identified using manufacturer’s information.

Request schema

Method URL
PATCH /api/erp/v1/part/mfr_name/{mfrName}/mfr_part_number/{mfrPartNumber}/cost_purchased

Request header

*indicates required fields

Field Value type Description of values
*Authorization String Enter: Bearer access token.
*mfrName String Manufacturer’s name. To get this name:
  1. In the Upchain web app, open the BOM section of the project.
  2. Select the item in the BOM table to open its details pane.
The value is found in the Manufacturer field.
*mfrPartNumber Integer Manufacturer's part number. To get this number:
  1. In the Upchain web app, open the BOM section of the project.
  2. Select the item in the BOM table to open its details pane.
The value is found in the Manufacturer Item Number field.
*Upc-Selected-Company Integer Company’s ID. Use the value returned in the id field received in response to the following request: GET /api/auth/v1/companies.
X-User-Id Text Enter the email address of the user being impersonated. This value is required if you are using a two-legged token. If you are using a three-legged token, then this field is not required.

Request body

Field Value type Description of values
partMajorRevision String Part’s major revision. Part’s major revision may be found when viewing the part in the eBOM table.
supplierName String Supplier’s name.
costValue Number The cost for the part.
divisionNum String Division’s number. This can be obtained using the GET /api/division/v1/divisions endpoint. Use the value returned in the id field.
currencyCode String Currency in which the part’s cost is listed.

Sample request

{
"partMajorRevision": "AA",
"supplierName": "Supplier 1",
"costValue": 3.00,
"divisionNum": "DIV1000055",
"currencyCode": "CAD"
}

Response schema

Response body

Field Value type Description of values
result Integer Always 1 for a 200-http response when the item’s cost is successfully updated.

Sample response

{
"result": 1
}

Was this information helpful?