Skip to main content

Remove a product from the order

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

Removes a product from the work order and recalculates the totals. In accounts with the inventory control module, it returns the quantity to the storage given in the body.

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.

productIdstringrequired

Product identifier (not the order item identifier).

Example: MzYzMjgxZGEtNzIxMS00ZTU5LTg0MzMtYjc5Y2UyYTEwYzk0OjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

storageobject

Storage that receives the product back. Required in accounts with the inventory control module.

Fields of storage
idstringrequired
descriptionstring

Description stored in the inventory movement.

Responses

  • 204

    Removed. No body.

  • 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

    Order does not exist. No body.

  • 422

    Product not added to the order (message: product doesn't exist in order; there is no 404) or, with inventory control, missing storage (resourceValidationErr). Invalid order identifier: uriValidationErr.

  • 429

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

  • 500

    Unexpected server error.