Skip to main content

Create an equipment

POSThttps://carchost.fieldcontrol.com.br/equipments

Creates an equipment belonging to a customer (customer) or kept in a storage (storage), already with the answers to the custom fields.

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

Request​

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

  • 201

    Equipment created. 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 (resourceValidationErr): customer and storage missing, number or qrCode already used in the account (reason: duplicated), type or customer not found by name (reason: not found), or custom field answer with a nonexistent name, type or option.

  • 429

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

  • 500

    Unexpected server error.