Update a part
https://carchost.fieldcontrol.com.br/parts/{id}Updates a part. Send only the fields that will change. The equipment types are changed through their own endpoints.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
idstringrequiredPart identifier.
Example: YjJjM2Q0ZTUtZjZhNy04OTAxLWJjZGUtZjEyMzQ1Njc4OTAxOjIyOTE1.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringPart name. Must be unique in the account.
codestringPart code. Must be unique in the account.
partTypeIdstringPart type identifier.
descriptionstringPart description.
imageUrlstringURL of the part image.
usageConditionstringUsage condition.
Accepted values: new, semi_new, used, refurbished, defective.
valuenumberUnit price.
externalIdstringPart identifier in your system.
archivedbooleanArchives the part.
minimalQuantitynumberMinimum quantity in storage. Cannot be negative.
minimalQuantityAtRisknumberQuantity from which the stock is considered at risk. Cannot be negative.
equipmentTypeIdslist of stringIgnored on update. Use the part equipment type endpoints.
customFieldslist of objectsCustom fields. When sent, it replaces all current fields.
Fields of customFields
namestringField name.
valuestringField value.
typestringrequiredField type. Missing or outside this list results in a 500 error and nothing is stored.
Accepted values: question, multiple-choice, date, number.
positionintegerDisplay position. Defaults to the order in the array, starting at 1.
Responses
- 200
Part updated.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 422
Invalid body, with the same rules as creation (resourceValidationErr); negative minimum quantity; invalid URL identifier (
property: @.id). Nonexistent part: 422 resourceNotFound (there is no 404). Invalid identifier or one from another account: uriValidationErr. - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.