Share

Update an item's cost - identify the item using the item number

PATCH /api/erp/v1/part/{itemNumber}/cost updates the part’s cost in Upchain. The part is specified in the itemNumber field.

Request schema

Method URL
PATCH /api/erp/v1/part/{itemNumber}/cost

Request header

*indicates required fields

Field Value type Description of values
*Authorization String Enter: Bearer access token.
*itemNumber Integer Item number recorded against an item. To get this number, open the BOM section of the project in the Upchain web app and locate the item in the BOM table.
*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 part’s updated cost.
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 of the part’s updated cost.

Sample request

{
"partMajorRevision": "AA",
"supplierName": "Supplier 1",
"costValue": 3.00,
"divisionNum": "Upchain",
"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?