Skip to main content

Update a material

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

Updates a material. Send the full material: the body follows the same rules as creation.

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

Request​

Path parameters

idstringrequired

Material identifier.

Example: MmVkNjY1OTYtNTY1ZC00NjQxLTk0YzktNmVhZWYzMTE0MDNiOjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

namestringrequired

Material name. In accounts that migrated materials to products, the limit is up to 100 characters, with no minimum.

From 10 to 150 characters.

measurestringrequired

Unit of measure. Values outside this list are stored as unity.

Accepted values: unity, centimeter, meter, liter, milliliter.

archivedboolean

Archives the material.

Default: false.

Responses

  • 200

    Material updated. If the identifier is valid but the material does not exist, nothing is changed and the response is 200 with an empty body.

  • 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). 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.