Requisitions API handler
Return all order lines for a customer order marked with requisition status.
HTTP Verb – GET
URL – /api/v1/requisitions
Description – Returns all order lines for a customer order marked with requisition status
Base – HandlerBase<GetRequisitionCollectionParameter, GetRequisitionCollectionResult>
Handlers –
Order | Handler | Description |
---|---|---|
500 | GetRequisitionCollectionHandler | If website configuration setting, "Requisitions_Enabled" is not set to "true", then returns Not enabled error message. If there is no logged-in user or that user is not set as an Administrator, then Forbidden error result is returned. Otherwise, gets a collection of order lines for a customer order for the current bill to and ship to that is marked with a requisition order status. |
Order | Handler | Description |
---|---|---|
500 | GetRequisitionOrder | Retrieves a getRequisitionOrderResult using RequisitionPipeline. The result is stored in the RequisitionOrder property on the result object. |
550 | GetRequisitionRealTimeInventory | If InventoryService is set to RealTime, retrieves all products from RequisitionOrder's order lines. Uses GetRealTimeInventoryHandler to ensure that all of the inventory for all of the products is gotten in one request and cached in case the cache expires. |
600 | GetOrderLines | Retrieves a order line list for the RequisitionOrder. If RequisitionId property of the parameter object isn't empty, filters the order line list by RequisitionId. The result is stored in the OrderLines property on the result object. |
700 | ApplyPaging | Applies paging to the OrderLines property on the result object. If the PageSize property on the parameter object has a value, the query is paged using the PageSize and Page properties on the parameter object. |
800 | GetProductCollection | Retrieves all product ids from OrderLines property on the result object. Uses GetProductCollectionHandler to get product collection by the product id list. The result is stored in the ProductDtos property on the result object. |
900 | CreateGetRequisitionResults | Iterates over Requisitions result and call CreateGetCartLineResult cart pipeline per each requisition. If GetRequisitionLines parameter is false, then execute next handler, otherwise iterates over RequisitionLines and adds lines to the Requisition. The result is stored in the GetRequisitionResults property on the result object. |
HTTP Verb – GET
URL – /api/v1/requisitions/{requisitionid}
Description – Return a single order line from a customer order marked with requisition status
Base – HandlerBase<GetRequisitionParameter, GetRequisitionResult>
Handlers –
Order | Handler | Description |
---|---|---|
500 | GetRequisitionHandler | If website configuration setting, "Requisitions_Enabled" is not set to "true", then returns Not enabled error message. If there is no logged-in user or that user is not set as an Administrator, then Forbidden error result is returned. Otherwise, gets an order line of for a requisition for the matching requisitionid. If no order line is found, then Forbidden error result is returned. |
Order | Handler | Description |
---|---|---|
500 | GetRequisition | Retrieves a requisition using the GetRequisitionCollection handler chain. The requisition and requisition line collection are stored in the Requisition and RequisitionLineCollection properties in the result object. |
HTTP Verb – GET
URL – /api/v1/requisitions/{requisitionid}/requisitionlines
Description – Return a collection of requisition order lines
Base – HandlerBase<GetRequisitionLineCollectionParameter, GetRequisitionLineCollectionResult>
Handlers –
Order | Handler | Description |
---|---|---|
500 | GetRequisitionLineCollectionHandler | If website configuration setting, "Requisitions_Enabled" is not set to "true", then returns Not enabled error message. If there is no logged-in user or that user is not set as an Administrator, then Forbidden error result is returned. Otherwise, gets a collection of requisition order lines for a requisition for the matching requisitionid. |
Order | Handler | Description |
---|---|---|
500 | GetRequisition | Retrieves a requisition using the GetRequisitionOrder pipeline. The requisition is stored in the Requisition property in the result object. |
600 | GetRequisitionLinesQuery | Creates the initial requisitions query. The query is stored in the RequisitionLineQuery property in the result object. |
700 | ApplyFiltering | Applies filter by Requisition.Id to the RequisitionLineQuery. |
800 | ApplyPaging | Applies paging to the RequisitionLineQuery. If the PageSize property on the parameter object has a value, the query is paged using the PageSize and Page properties on the parameter object. If the PageSize property has no value, the default page size will be used (configured using the "Number of items that display per page by default." setting). |
900 | CreateGetRequisitionLineResults | Executes the RequisitionLineQuery after the query has been filtered and paged. The result is stored in the GetRequisitionLineResults property in the result object. |
HTTP Verb – GET
URL – /api/v1/requisitions/{requisitionid}/requisitionlines/{requisitionlineid}
Description – Return a single requisition order line
Base – HandlerBase<GetRequisitionLineParameter, GetRequisitionLineResult>
Handlers –
Order | Handler | Description |
---|---|---|
500 | GetRequisitionLineHandler | If website configuration setting, "Requisitions_Enabled" is not set to "true", then returns Not enabled error message. If there is no logged-in user or that user is not set as an Administrator, then Forbidden error result is returned. If no order is found matching the requisitionid or requisitionlineid, then Forbidden error result is returned. Otherwise, gets a requisition order line for a requisition for the matching requisitionid and requisitionlineid. |
Order | Handler | Description |
---|---|---|
500 | GetRequisitionLine | Retrieves a requisition line using the GetRequisitionOrder pipeline. The requisition line is stored in the RequisitionLine property in the result object. |
HTTP Verb – PATCH
URL – /api/v1/requisitions/{requisitionid}/requisitionlines/{requisitionlineid}
Description – Updates a single requisition order line
Base – HandlerBase<UpdateRequisitionLineParameter, UpdateRequisitionLineResult>
Handlers –
Order | Handler | Description |
---|---|---|
500 | UpdateRequisitionLineHandler | If website configuration setting, "Requisitions_Enabled" is not set to "true", then returns Not enabled error message. If there is no logged-in user or that user is not set as an Administrator, then Forbidden error result is returned. If no order is found matching the requisitionid or requisitionlineid, then Forbidden error result is returned. Otherwise, gets a requisition order line for a requisition for the matching requisitionid and requisitionlineid. If the passed in qty ordered value is 0, then the OrderLineRequisition is deleted. If the qty ordered on the OrderLine is 0 or less, then that associated OrderLine is removed. |
Order | Handler | Description |
---|---|---|
500 | GetRequisitionLine | Retrieves a requisition line using the GetRequisitionOrder pipeline. The requisition line is stored in the RequisitionLine property in the result object. |
600 | UpdateRequisitionLine | Updates order line QtyOrdered property (RequisitionLine.OrderLine.QtyOrdered). If QtyOrdered parameter is equal to 0, then remove requisition line. Otherwise set requisition line QtyOrdered value to the QtyOrdered parameter value. If order line QtyOrdered less or equal to 0, then remove the order line from cart using the RemoveCartLine pipeline. Otherwise recalculates the cart price using the GetCartPricing pipeline and retrieves the requisition using the GetRequisitionHandler handler chain. The GetRequisitionHandler handler chain result is stored in the GetRequisitionResult property in the result object. |
HTTP Verb – DELETE
URL – /api/v1/requisitions/{requisitionid}/requisitionlines/{requisitionlineid}
Description – Deletes a single requisition order line
Base – HandlerBase<RemoveRequisitionLineParameter, RemoveRequisitionLineResult>
Handlers –
Order | Handler | Description |
---|---|---|
500 | RemoveRequisitionLineHandler | If website configuration setting, "Requisitions_Enabled" is not set to "true", then returns Not enabled error message. If there is no logged-in user or that user is not set as an Administrator, then Forbidden error result is returned. If no order is found matching the requisitionid or requisitionlineid, then Forbidden error result is returned. Otherwise, gets a requisition order line for a requisition for the matching requisitionid and requisitionlineid. The OrderLineRequisition is deleted. If the qty ordered on the OrderLine is 0 or less, then that associated OrderLine is removed. |
Order | Handler | Description |
---|---|---|
500 | GetRequisitionLine | Retrieves a requisition line using the GetRequisitionOrder pipeline. The requisition line is stored in the RequisitionLine property in the result object. |
600 | RemoveRequisitionLine | Updates order line QtyOrdered property (RequisitionLine.OrderLine.QtyOrdered). Removes the requisition line. If order line QtyOrdered less or equal to 0, then remove the order line from cart using the RemoveCartLine pipeline. Otherwise recalculates the cart price using the GetCartPricing pipeline and retrieves the requisition using the GetRequisitionHandler handler chain. The GetRequisitionHandler handler chain result is stored in the GetRequisitionResult property in the result object. |
Updated over 1 year ago