Skip to main content

Add a product to the order

POSThttps://carchost.fieldcontrol.com.br/orders/{id}/products-v2

Adds 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-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Path parameters

idstringrequired

Work order identifier.

Example: NDJiMWQ0YzQtOWNmOC00NWE2LTg2MjItYjNjNzZjZjk0MmM4OjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

productobjectrequired
Fields of product
idstringrequired

Product identifier.

quantitynumberrequired

Quantity.

valuenumber or string

Unit 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.

storageobject

Storage 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
idstringrequired
descriptionstring

Description 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.