Skip to main content

Create a product

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

Creates a product.

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

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

  • 201

    Product created.

  • 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), code already used by another product in the account (message: product code already exists) or productType without id or name.

  • 429

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

  • 500

    Unexpected server error. It also happens when productType is not sent.