iotoms Docs

Update a draft quotation

PUT
/api/v1/sales/quotations/{id}

Replaces the details and lines of a quotation. Only draft quotations can be edited; sent, accepted or converted ones are rejected.

How to use it

  1. Get the quotation with Get a quotation and check its status is DRAFT; other statuses are rejected.
  2. Send only the header fields you want to change; omitted fields keep their values.
  3. To change lines, send the complete new items list: it replaces every existing line. Omit items to keep the lines.
  4. Prices, tax and totals are recalculated by the server.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
customerNumber?|

Change the customer, from List customers. Omit to keep the current one.

storeId?|

Change the merchant store, from List stores. Omit to keep it.

Formatint64
quoteDate?|

New quotation date (YYYY-MM-DD). Omit to keep it.

Formatdate
validUntil?|

New last valid date (YYYY-MM-DD); cannot be before the quotation date. Omit to keep it.

Formatdate
currency?|

Three-letter ISO currency code. Omit to keep it.

notes?|

New notes. Omit to keep the current notes.

terms?|

New terms and conditions. Omit to keep them.

items?array<>|

Full new set of lines, replacing all existing ones. Omit to leave the lines unchanged.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was processed; otherwise an error status.

message*string

Short human-readable message describing the outcome, e.g. which record was saved or why the call failed.

data?

The quotation with its lines and current status.

Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/sales/quotations/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "quoteNumber": "string",    "customerNumber": "string",    "customerName": "string",    "customerContact": "string",    "storeId": 0,    "storeName": "string",    "status": "string",    "effectiveStatus": "string",    "quoteDate": "2019-08-24",    "validUntil": "2019-08-24",    "daysUntilExpiry": 0,    "currency": "string",    "subtotal": 0,    "discountTotal": 0,    "taxTotal": 0,    "grandTotal": 0,    "notes": "string",    "terms": "string",    "lostReason": "string",    "sentAt": "2019-08-24T14:15:22Z",    "acceptedAt": "2019-08-24T14:15:22Z",    "convertedAt": "2019-08-24T14:15:22Z",    "convertedTransactionId": "ffec8c36-02ff-4068-8a67-e53c0a6dd346",    "items": [      {        "id": 0,        "itemId": "string",        "itemName": "string",        "description": "string",        "quantity": 0,        "unitPrice": 0,        "discountAmount": 0,        "taxRate1": 0,        "taxRate2": 0,        "taxAmount": 0,        "lineTotal": 0,        "uomId": "4df47f00-a69d-4ff2-b50d-4a7649a4b70c",        "priceSource": "string",        "sortOrder": 0      }    ],    "createdBy": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z"  }}