Skip to main content

Update a part

PUThttps://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-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Path parameters

idstringrequired

Part identifier.

Example: YjJjM2Q0ZTUtZjZhNy04OTAxLWJjZGUtZjEyMzQ1Njc4OTAxOjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

namestring

Part name. Must be unique in the account.

codestring

Part code. Must be unique in the account.

partTypeIdstring

Part type identifier.

descriptionstring

Part description.

imageUrlstring

URL of the part image.

usageConditionstring

Usage condition.

Accepted values: new, semi_new, used, refurbished, defective.

valuenumber

Unit price.

externalIdstring

Part identifier in your system.

archivedboolean

Archives the part.

minimalQuantitynumber

Minimum quantity in storage. Cannot be negative.

minimalQuantityAtRisknumber

Quantity from which the stock is considered at risk. Cannot be negative.

equipmentTypeIdslist of string

Ignored on update. Use the part equipment type endpoints.

customFieldslist of objects

Custom fields. When sent, it replaces all current fields.

Fields of customFields
namestring

Field name.

valuestring

Field value.

typestringrequired

Field type. Missing or outside this list results in a 500 error and nothing is stored.

Accepted values: question, multiple-choice, date, number.

positioninteger

Display 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.