Skip to main content

Update an equipment

PUThttps://carchost.fieldcontrol.com.br/equipments/{id}

Updates an equipment. customer and storage can be omitted. When customFields is sent, the current answers are erased and replaced by the ones sent.

Requires the X-Api-Key, User-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Path parameters

idstringrequired

Equipment identifier.

Example: NDgyYzI4MjctNmE4MS00MGExLWE1MWQtNjMxNjgzMGMxN2VhOjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

namestringrequired

Equipment name.

From 5 to 150 characters.

numberstringrequired

Serial number. Must be unique in the account.

From 1 to 150 characters.

notesstring

Equipment notes.

Up to 500 characters.Accepts: null.

qrCodestring

QR code. Must be unique in the account. Up to 150 characters, or 255 when it is a public Field Control QR code URL (contains /qrcode-publico/#/ or /equipamentos/gerador-qrcodes/#/).

Accepts: null.

avatarUrlstring

URL of the equipment photo.

Up to 150 characters.Accepts: null.

archivedboolean

Archives the equipment.

Default: false.

typeobjectrequired

Equipment type, by id or by name (exact name). If both are sent, id wins.

Fields of type
idstring

Equipment type identifier.

namestring

Equipment type name.

From 5 to 150 characters.

customerobject

Customer who owns the equipment, by id or by name (exact name). If both are sent, id wins.

Fields of customer
idstring

Customer identifier.

namestring

Customer name.

From 5 to 150 characters.

locationobject

Customer location where the equipment is.

Fields of location
idstringrequired

Location identifier.

storageobject

Storage where the equipment is kept.

Fields of storage
idstringrequired

Storage identifier.

customFieldslist of objects

Answers to the custom fields of the equipment type. On update, when sent, it replaces all current answers.

A field with a display condition (set in the Manager Panel) is only shown when the trigger has the expected answer among the answers sent. Answering a hidden field returns 422 (hidden by condition), and a required field with a condition that becomes visible without an answer returns 422 (required).

Fields of customFields
namestringrequired

Field name, the same as registered in the equipment type.

From 5 to 150 characters.

valuestringrequired

Answer. In multiple-choice, it must be one of the registered options.

From 1 to 500 characters.

typestringrequired

Field type.

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

positionstring

Display position.

Up to 150 characters.Accepts: null.

Responses

  • 200

    Equipment updated. The response does not include labels or status.

  • 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). An invalid identifier, or one from another account, in the URL also returns this error, with property: '@.id'.

  • 429

    Limit of 1 request per second exceeded. See Rate limit.

  • 500

    Unexpected server error. It also happens when the identifier is valid but the equipment does not exist.