API reference · Quotes

Answer Quote

PUThttps://api.sandbox.cws.digital/partnerBudgets/{id}

Description

Answers a pending quote: you provide the price, the delivery lead time and your product code, and CWS creates the corresponding stock and presents your offer to the customer.

Parameters

Path parameters

FieldTypeRequiredDescriptionValue
idintegerYes

Quote id, as it came in id in the pending listing.

Request body

Content-Typeapplication/jsonRequired
Edit the body with
FieldTypeRequiredDescriptionValue
pricenumberYes

Unit price of your offer. Minimum 0.01 — it is not possible to offer zero.

leadTimeintegerYes

Delivery lead time in days, from 0 to 99. 0 means ready for delivery.

partnerPartCodestringYes

Product code in your catalog. Cannot be empty.

Business rules

Answering creates the product stock

When you answer, CWS stores a stock with the price, the lead time and the code you provided, in the quantity the customer requested, and links this stock to the quote.

That is why partnerPartCode is required — it is the code by which you will recognize the item when the order arrives.

The stock is created in your first warehouse

The created stock is associated with the first warehouse of your store.

A quote is answered only once

A quote that already has an answer is rejected with Orcamento já respondido.

The quotation closes at the fifth answered quote

The customer's request accepts answers from several partners. On the first answer the customer is notified that the product was found; from the fifth on, the request is closed and the quotes not yet answered are discarded.

Responses

  • 401

    Missing, malformed or expired token.

Try it

Sandbox

Language

Credentials

Access token: saved in this tab and used on every endpoint.

Each token only reaches the partner's own data and that of the branches with an authorized link.

Don't have sandbox credentials yet? See how to request them

Request

cURL
curl --request PUT \
  --url 'https://api.sandbox.cws.digital/partnerBudgets/4480101' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "price": 1250,
  "leadTime": 7,
  "partnerPartCode": "SKU-A-001"
}'

Response

Click Try it to see the real response here, or pick a documented example: