Create a product or service
https://carchost.fieldcontrol.com.br/products-servicesCreates a product or a service, according to type. In accounts with the inventory control module, a product can be created already with a balance in the storages (storageProducts).
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredProduct or service name.
Up to 100 characters.
typestring or numberrequiredproduct or service. A number or any other text results in a 500 error.
Accepted values: product, service.
descriptionstringDescription.
Up to 2000 characters.
measurestringrequiredUnit of measure, also required for services. 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.
valuenumberrequiredUnit price.
archivedbooleanrequiredArchives the product or service.
externalobjectFields of external
idstringIdentifier in your system.
Up to 100 characters.Accepts: null.
storageProductslist of objectsInitial balance in each storage. Only considered when creating products (type: product) in accounts with the inventory control module: the API records one entry movement per item. Ignored on update.
Fields of storageProducts
storageobjectrequiredFields of storage
idstringrequiredStorage identifier.
quantitynumberrequiredEntry quantity.
minimalQuantitynumberMinimum quantity of the product in the storage.
Accepts: null.
minimalQuantityAtRisknumberQuantity from which the stock is considered at risk.
Accepts: null.
Responses
- 201
Product or service 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).
- 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error. It also happens when
typeis neitherproductnorservice.