Update a product
https://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-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
idstringrequiredProduct identifier.
Example: MzYzMjgxZGEtNzIxMS00ZTU5LTg0MzMtYjc5Y2UyYTEwYzk0OjIyOTE1.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredProduct name.
Up to 100 characters.
descriptionstringProduct description.
Up to 2000 characters.
codestringrequiredProduct code. Must be unique among the account's products.
measurestringrequiredUnit 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.
valuenumberrequiredProduct unit price.
archivedbooleanrequiredArchives the product.
externalobjectFields of external
idstringProduct identifier in your system.
Up to 100 characters.Accepts: null.
productTypeobjectrequiredProduct 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
idstringProduct type identifier.
namestringName (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 (
resourceValidationErrwithmessage: product/service not found; there is no 404), invalid body orcodealready used by another product in the account.resourceValidationErr→ - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.