Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Job quotes

Describes the Job quotes API handler in Optimizely Configured Commerce.

HTTP Verb – GET

URL – /api/v1/jobquotes

Description – Return a collection job quotes

Base – HandlerBase<GetJobQuoteCollectionParameter, GetJobQuoteCollectionResult>

Handlers –

OrderHandlerDescription
500ValidateContextIf UserProfile object has no value, a forbidden error is returned.
600CreateQueryCreates the job quotes query. Applies filters and expands. The query is stored in the JobQuotesQuery property in the result object.
700CreateGetJobQuoteResultsExecutes the JobQuotesQuery, map result to the GetJobQuoteResult objects and stores it in the GetJobQuoteResults property in the result object.

HTTP Verb – GET

URL – /api/v1/jobquotes/{jobQuoteId}

Description – Return a single job quote record

Base – HandlerBase<GetJobQuoteParameter, GetJobQuoteResult>

Handlers –

OrderHandlerDescription
500GetCartRetrieves a cart using the GetCartHandler handler chain. If access to the cart is denied, an access denied error is returned. The cart is stored in the GetCartResult property in the result object.
600CreateGetJobQuoteResultMaps GetCartResult to the result object. Updates result properties. Maps GetCartResult.CartLineResults to the GetJobQuoteLineResult objects and stores it in the JobQuoteLineResults property in the result object.
700GetOrderLineQtySoldIf cart status equal "JobAccepted", then retrieves sold quantity for each order line and stores it in the OrderLineQtySold property in the result object.

HTTP Verb – PATCH

URL – /api/v1/jobquotes/{jobQuoteId}

Description – Update a single job quote record

Base – HandlerBase<UpdateJobQuoteParameter, UpdateJobQuoteResult>

Handlers –

OrderHandlerDescription
500ValidateContextRetrieves a job quote using the GetJobQuote handler chain. The job quote is stored in the GetJobQuoteResult property in the result object. Validates job quote quantities. If quantities are incorrect, an error is returned.
600CreateNewOrderCreates a new customer order by GetJobQuoteResult.Cart property, maps it to the GetCartResult object and stores it in the GetCartResult property in the result object.
700CopyOrderLinesCreates a copies of the GetJobQuoteResult.Cart.OrderLines objects. Sets QtyOrdered, UnitOfMeasure and QtyShipped properties to it. Adds a copies of order lines to the cart using AddCartLine pipeline.
800CopyOrderLineRfqsCreates a copies of the OrderLineRfq objects from GetJobQuoteResult.Cart.OrderLines. Inserts it to the database.