Related Documents
Document Properties
Kbid27771T
Last Modified23-Jun-2020
Added to KB20-Jul-2016
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Set quote request line items


Note

Starting with 7.10 our REST API is documented using Redoc accessible at docs.intershop.com.

URI

/customers/<customerID>/users/<userID>/quoterequests/<quoteRequestID>/items

Http Method

PUT

Short Description

Sets the list of quote line items

Query Parameters

None

Example Requests

/customers/AgroNet/users/fbirdo@test.intershop.de/quoterequests/MgkKDgAsrg0AAAFS7gJb2PSB/items

HTTP Status Codes

200 OK

400 Bad Request - If the list of quote request item can not be set

Possible values for header value "error-key":

    • quoterequest.lineitem.missing.error

401 Unauthorized - If no authorization is provided or authorization is wrong

403 Forbidden - If the user is not allowed or quote request is not editable anymore

Possible values for header value "error-key":

    • quoterequest.not_editable.error

404 Not found - If customer for <customerID> or user for <userID> or the quote request for <quoteRequestID> is not found

Description

Sets the list of quote line items. If there are already items in the list they will be replaced by the new list. Every product is validated if it can be added to the quote. A validator checks if a product with the SKU exists and if it is online and available. The result object (QuoteLineItemResult) contains a list of SKUs which can not be added to the quote (failedSKUs). Additionally a field status indicates if there were failures (values "SUCCESS", "ERROR").

Cartridge

app_sf_rest_b2b
Application

SMB Web Shop

Product Version

7.7

Product To Version

 
Status

final

JSON

Request data format

application/json

Request related java object

com.intershop.application.storefront.rest.b2b.capi.quote.resource.UserQuoteRequestsLineItemListResource
com.intershop.application.storefront.rest.b2b.capi.quote.resourceobject.QuoteRequestLineItemRO
com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO

Request data example

{
    "elements": [
        {
            "productSKU": "9438012",
            "quantity": {
                "value": 7
            }
        },
        {
            "productSKU": "859910",
            "quantity": {
                "value": 2
            }
        }
    ]
}

Response data format

application/json

Response related java object

com.intershop.application.storefront.rest.b2b.capi.quote.resource.UserQuoteRequestsLineItemListResource
com.intershop.application.storefront.rest.b2b.capi.quote.resourceobject.QuoteLineItemResultRO

Response data example

Success:

{
  "type": "QuoteLineItemResult",
  "status": "SUCCESS",
  "failedProductSKUs": []
}

With failures:

{
  "type": "QuoteLineItemResult",
  "status": "ERROR",
  "failedProductSKUs": [
    "8599101",
    "8599102"
  ]
}

XML

Request data format

 

Request related java object

com.intershop.application.storefront.rest.b2b.capi.quote.resource.UserQuoteRequestsLineItemListResource
com.intershop.application.storefront.rest.b2b.capi.quote.resourceobject.QuoteRequestLineItemRO
com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO

Request data example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QuoteRequestLineItemCollection type="QuoteRequestLineItemCollection">
    <elements type="QuoteRequestLineItem">
        <QuoteRequestLineItem type="QuoteRequestLineItem">
            <productSKU>9438012</productSKU>
            <quantity type="Quantity">
                <value>7</value>
            </quantity>
        </QuoteRequestLineItem>
        <QuoteRequestLineItem type="QuoteRequestLineItem">
            <productSKU>8599101</productSKU>
            <quantity type="Quantity">
                <value>3</value>
            </quantity>
        </QuoteRequestLineItem>
    </elements>
</QuoteRequestLineItemCollection>

Response data format

text/xml

Response related java object

com.intershop.application.storefront.rest.b2b.capi.quote.resource.UserQuoteRequestsLineItemListResource
com.intershop.application.storefront.rest.b2b.capi.quote.resourceobject.QuoteLineItemResultRO

Response data example

Success:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QuoteLineItemResult type="QuoteLineItemResult">
    <status>SUCCESS</status>
</QuoteLineItemResult>

 

With Failures:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<QuoteLineItemResult type="QuoteLineItemResult">
    <failedProductSKUs>
        <sku>8599101</sku>
        <sku>8599102</sku>
    </failedProductSKUs>
    <status>ERROR</status>
</QuoteLineItemResult>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets