Add a product to the order
https://carchost.fieldcontrol.com.br/orders/{id}/products-v2Adds a product to the work order and recalculates the totals. In accounts with the inventory control module, it removes the product from the given storage. An order accepts up to 150 products.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Path parameters
idstringrequiredWork order identifier.
Example: NDJiMWQ0YzQtOWNmOC00NWE2LTg2MjItYjNjNzZjZjk0MmM4OjIyOTE1.
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
productobjectrequiredFields of product
idstringrequiredProduct identifier.
quantitynumberrequiredQuantity.
valuenumber or stringUnit price. If omitted, the product price is used; null stores 0. In accounts with the inventory control module, it is always the product price.
Accepts: null.
storageobjectStorage the product leaves from. Required in accounts with the inventory control module: the API records a removal movement and rejects quantities greater than the balance.
Fields of storage
idstringrequireddescriptionstringDescription stored in the inventory movement.
Responses
- 201
Product added.
- 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. - 404
Resource not found. The response body is empty.
- 422
Invalid body (resourceValidationErr): nonexistent product, already added (
reason: already exists), limit of 150 products, or, with inventory control, missing storage, product with no balance in the storage or quantity greater than the balance (reason: not enough). Invalid order identifier: uriValidationErr. - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.