Skip to main content

Install a part unit

POSThttps://carchost.fieldcontrol.com.br/part-units/{id}/install

Installs the unit in an equipment or location. If it was in a storage, the API records a removal movement. Any status is accepted, except discarded.

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 unit identifier.

Example: YzNkNGU1ZjYtYTdiOC05MDEyLWNkZWYtMTIzNDU2Nzg5MDEyOjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

equipmentIdstring

Equipment where the unit is installed.

locationIdstring

Location where the unit is installed.

locationSectorIdstring

Sector of the location.

locationEnvironmentIdstring

Room of the location.

installedAtstring (date and time)

Installation date. Defaults to the moment of the request.

replacementDueAtstring (date and time)

Expected replacement date.

Responses

  • 200

    Unit installed (status: installed).

  • 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

    Discarded unit (reason: invalid status) or nonexistent equipment, location, sector or room (resourceValidationErr). Nonexistent unit: 422 resourceNotFound (there is no 404). Invalid URL identifier or one from another account: uriValidationErr.

  • 429

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

  • 500

    Unexpected server error. It also happens when an identifier in the body is not in the expected format.