Skip to main content

Update a product

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

Updates a product. Send the full product: 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

Product identifier.

Example: MzYzMjgxZGEtNzIxMS00ZTU5LTg0MzMtYjc5Y2UyYTEwYzk0OjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

namestringrequired

Product name.

Up to 100 characters.

descriptionstring

Product description.

Up to 2000 characters.

codestringrequired

Product code. Must be unique among the account's products.

measurestringrequired

Unit of measure. Values outside this list are stored as unity. kilogram is stored, but comes back as null in responses.

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

valuenumberrequired

Product unit price.

archivedbooleanrequired

Archives the product.

externalobject
Fields of external
idstring

Product identifier in your system.

Up to 100 characters.Accepts: null.

productTypeobjectrequired

Product type, by id or by name. With name, the API uses the first type in the account whose name contains the given text, case-insensitive.

Fields of productType
idstring

Product type identifier.

namestring

Name (or part of the name) of the product type.

Responses

  • 200

    Product 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 identifier, or one from another account, in the URL (uriValidationErr), nonexistent product (resourceValidationErr with message: product/service not found; there is no 404), invalid body or code already used by another product in the account.

    resourceValidationErr →
  • 429

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

  • 500

    Unexpected server error.