Add acquisitions-unit-assignments.recordId to poLine views

Description

Overview

As part of the acquisitions unit effort, the acquisitions unit assignments table needs to be integrated into the view used for querying po-lines.

Approach

Currently we have the ability to query the poLines table directly (GET /orders-storage/po-lines?query=...). Instead this should query a new view that joins the po-lines and acquisitions-unit-assignments tables on poline.purchaseOrderId == acquisitions-unit-assignment.recordId.

NOTE: DISTINCT ON is required here to avoid duplicate rows

We also have the ability to query a view which combines purchase-order, po-line, etc. tables (GET /orders-storage/order-lines?query=...). This should also be updated to include acquisitions-unit-assignments.

Additional background can be found on the wiki

Acceptance Criteria

  • The new view is created and used when querying po-lines

  • The existing "order-lines" view is updated

  • Unit tests are updated

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Craig McNallyJuly 11, 2019 at 4:58 PM

Verified on folio-testing:

GET some orders to work with:

$ curl $OKAPI/orders/composite-orders/8c328a18-5761-4329-95f6-599412c32310 -H "X-Okapi-Token: $TOKEN" { "id" : "8c328a18-5761-4329-95f6-599412c32310", "approved" : true, "dateOrdered" : "2018-07-24T00:00:00.000+0000", "manualPo" : true, "notes" : [ ], "poNumber" : "14383007", "orderType" : "Ongoing", "reEncumber" : false, "renewal" : { "cycle" : "6 Months", "interval" : 182, "manualRenewal" : true, "reviewPeriod" : 30, "renewalDate" : "2019-04-09T00:00:00.000+0000" }, "totalEstimatedPrice" : 0.0, "totalItems" : 1, "vendor" : "15fb695a-cdf1-11e8-a8d5-f2801f1b9fd1", "workflowStatus" : "Open", "compositePoLines" : [ { "id" : "b0fb580c-cdf1-11e8-a8d5-f2801f1b9fd1", "edition" : "First edition", "checkinItems" : false, "instanceId" : "30fcc8e7-a019-43f4-b642-2edc389f4501", "agreementId" : "e4b9bd57-c5be-4772-ba1c-9e693a81147b", "acquisitionMethod" : "Gift", "alerts" : [ ], "cancellationRestriction" : false, "cancellationRestrictionNote" : "", "claims" : [ { "claimed" : true, "grace" : 0 } ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 0.0, "listUnitPriceElectronic" : 0.0, "currency" : "USD", "additionalCost" : 0.0, "discount" : 2.0, "discountType" : "amount", "quantityPhysical" : 1, "quantityElectronic" : 0, "poLineEstimatedPrice" : 0.0 }, "description" : "", "details" : { "receivingNote" : "", "productIds" : [ { "productId" : "AJMEAZ", "productIdType" : "593b78cb-32f3-44d1-ba8c-63fd5e6989e6" }, { "productId" : "0002-9343", "productIdType" : "913300b2-03ed-469a-8179-c1092c991227" }, { "productId" : "med49002270", "productIdType" : "c858e4f2-2b6b-4385-842b-60732ee14abb" } ], "subscriptionInterval" : 0 }, "donor" : "Tsuda College", "fundDistribution" : [ { "code" : "GIFT-SUBN", "encumbrance" : "eb506834-6c70-4239-8d1a-6414a5b08009", "fundId" : "e9f9bc2f-bad5-4613-9d6c-f55efa5805e7", "percentage" : 100.0 } ], "locations" : [ { "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371", "quantity" : 1, "quantityElectronic" : 0, "quantityPhysical" : 1 } ], "orderFormat" : "Physical Resource", "paymentStatus" : "Payment Not Required", "physical" : { "createInventory" : "Instance, Holding, Item", "materialType" : "1a54b431-2e4f-452d-9cae-9cee66c9a892", "materialSupplier" : "80fb5168-cdf1-11e8-a8d5-c2801f1b9f22", "volumes" : [ "vol. 1" ] }, "poLineDescription" : "", "poLineNumber" : "14383007-1", "purchaseOrderId" : "8c328a18-5761-4329-95f6-599412c32310", "receiptStatus" : "Awaiting Receipt", "reportingCodes" : [ ], "requester" : "stp0", "rush" : false, "selector" : "ay", "source" : { "code" : "", "description" : "Manually entered" }, "tags" : [ "giftsubscription" ], "title" : "The American Journal of Medicine", "vendorDetail" : { "instructions" : "no. 42 and continuations", "noteFromVendor" : "", "vendorAccount" : "" } } ] } $ curl $OKAPI/orders/composite-orders/55b97a4a-6601-4488-84e1-8b0d47a3f523 -H "X-Okapi-Token: $TOKEN" { "id" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "approved" : true, "dateOrdered" : "2019-07-11T11:43:12.848+0000", "manualPo" : false, "notes" : [ ], "poNumber" : "101113", "orderType" : "Ongoing", "reEncumber" : false, "renewal" : { "cycle" : "6 Months", "interval" : 182, "manualRenewal" : false, "reviewPeriod" : 30, "renewalDate" : "2019-04-09T00:00:00.000+0000" }, "totalEstimatedPrice" : 412.32, "totalItems" : 2, "vendor" : "d0fb5aa0-cdf1-11e8-a8d5-f2801f1b9fd1", "workflowStatus" : "Open", "compositePoLines" : [ { "id" : "b9cc5473-bb40-1d61-afc0-d3a5ba0ed0a8", "edition" : "Second edition", "checkinItems" : false, "instanceId" : "c1d3be12-ecec-4fab-9237-baf728575185", "agreementId" : "6bbc890c-0fa9-4ab3-802a-471ee18f72d5", "acquisitionMethod" : "Purchase", "alerts" : [ ], "cancellationRestriction" : false, "cancellationRestrictionNote" : "", "claims" : [ { "claimed" : false, "grace" : 0 } ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 240.0, "listUnitPriceElectronic" : 0.0, "currency" : "USD", "additionalCost" : 0.0, "discount" : 14.1, "discountType" : "percentage", "quantityPhysical" : 2, "quantityElectronic" : 0, "poLineEstimatedPrice" : 412.32 }, "description" : "", "details" : { "receivingNote" : "v. 1-6 in 10 parts", "productIds" : [ { "productId" : "9781868885015", "productIdType" : "8261054f-be78-422d-bd51-4ed9f33c3422" } ], "subscriptionInterval" : 0 }, "donor" : "", "fundDistribution" : [ { "code" : "STATE-MONOSER", "encumbrance" : "eb506834-6c70-4239-8d1a-6414a5b08010", "fundId" : "bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0", "percentage" : 100.0 } ], "locations" : [ { "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371", "quantity" : 1, "quantityElectronic" : 0, "quantityPhysical" : 1 } ], "orderFormat" : "Physical Resource", "paymentStatus" : "Awaiting Payment", "physical" : { "createInventory" : "Instance, Holding", "materialType" : "d9acad2f-2aac-4b48-9097-e6ab85906b25", "materialSupplier" : "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1", "receiptDue" : "2018-08-31T00:00:00.000+0000", "volumes" : [ "vol. 6" ] }, "poLineDescription" : "", "poLineNumber" : "101113-1", "publicationDate" : "2018", "publisher" : "SAGE", "purchaseOrderId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "receiptStatus" : "Awaiting Receipt", "reportingCodes" : [ ], "requester" : "", "rush" : false, "selector" : "", "source" : { "code" : "", "description" : "Manually entered" }, "tags" : [ ], "title" : "The city post-modernity edited by Alan Latham", "vendorDetail" : { "instructions" : "", "noteFromVendor" : "", "vendorAccount" : "" }, "metadata" : { "createdDate" : "2019-07-11T11:43:12.951+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T11:43:12.951+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } } ], "metadata" : { "createdDate" : "2019-07-11T11:43:12.970+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T11:43:12.970+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } }

Ensure they aren't assigned to any acq. units already

$ curl "$OKAPI/orders/acquisitions-unit-assignments" -G --data-urlencode "query=recordId==55b97a4a-6601-4488-84e1-8b0d47a3f523 OR recordId==8c328a18-5761-4329-95f6-599412c32310" -H "X-Okapi-Token: $TOKEN" { "acquisitionsUnitAssignments" : [ ], "totalRecords" : 0 }

GET two acq. units to work with

$ curl $OKAPI/acquisitions-units/units -G --data-urlencode "query=name=math OR name=law" -H "X-Okapi-Token: $TOKEN"{ "acquisitionsUnits" : [ { "id" : "9ef44274-ffd1-4c91-91b2-395695672eea", "name" : "math", "protectCreate" : true, "protectRead" : false, "protectUpdate" : true, "protectDelete" : true, "metadata" : { "createdDate" : "2019-07-11T16:33:46.661+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:33:46.661+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } }, { "id" : "eda42ff7-fb21-4bc3-924f-4511a098fbea", "name" : "law", "protectCreate" : true, "protectRead" : false, "protectUpdate" : true, "protectDelete" : true, "metadata" : { "createdDate" : "2019-07-11T16:33:03.917+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:33:03.917+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } } ], "totalRecords" : 2 }

Assign one order to the "law" unit and both to the "math" unit

$ curl "$OKAPI/orders/acquisitions-unit-assignments" -H "X-Okapi-Token: $TOKEN" -H "Content-Type: application/json" -w '\'n --data-binary '{ "recordId": "55b97a4a-6601-4488-84e1-8b0d47a3f523", "acquisitionsUnitId": "eda42ff7-fb21-4bc3-924f-4511a098fbea" }' { "id" : "a63dd8b8-a438-4fcb-b69e-0dd13f6f2cd9", "recordId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "acquisitionsUnitId" : "eda42ff7-fb21-4bc3-924f-4511a098fbea", "metadata" : { "createdDate" : "2019-07-11T16:44:47.849+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:44:47.849+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } } $ curl "$OKAPI/orders/acquisitions-unit-assignments" -H "X-Okapi-Token: $TOKEN" -H "Content-Type: application/json" -w '\'n --data-binary '{ "recordId": "55b97a4a-6601-4488-84e1-8b0d47a3f523", "acquisitionsUnitId": "9ef44274-ffd1-4c91-91b2-395695672eea" }' { "id" : "a7e8c16b-2963-4516-97e9-d4624843eb1f", "recordId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "acquisitionsUnitId" : "9ef44274-ffd1-4c91-91b2-395695672eea", "metadata" : { "createdDate" : "2019-07-11T16:45:08.995+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:45:08.995+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } } $ curl "$OKAPI/orders/acquisitions-unit-assignments" -H "X-Okapi-Token: $TOKEN" -H "Content-Type: application/json" -w '\'n --data-binary '{ "recordId": "8c328a18-5761-4329-95f6-599412c32310", "acquisitionsUnitId": "9ef44274-ffd1-4c91-91b2-395695672eea" }' { "id" : "45e39260-d27e-4e62-878a-0f3877587cbc", "recordId" : "8c328a18-5761-4329-95f6-599412c32310", "acquisitionsUnitId" : "9ef44274-ffd1-4c91-91b2-395695672eea", "metadata" : { "createdDate" : "2019-07-11T16:45:31.820+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:45:31.820+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } }

Sanity check that the assignments look right

$ curl "$OKAPI/orders/acquisitions-unit-assignments" -G --data-urlencode "query=recordId==55b97a4a-6601-4488-84e1-8b0d47a3f523 OR recordId==8c328a18-5761-4329-95f6-599412c32310" -H "X-Okapi-Token: $TOKEN" { "acquisitionsUnitAssignments" : [ { "id" : "a63dd8b8-a438-4fcb-b69e-0dd13f6f2cd9", "recordId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "acquisitionsUnitId" : "eda42ff7-fb21-4bc3-924f-4511a098fbea", "metadata" : { "createdDate" : "2019-07-11T16:44:47.865+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:44:47.865+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } }, { "id" : "a7e8c16b-2963-4516-97e9-d4624843eb1f", "recordId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "acquisitionsUnitId" : "9ef44274-ffd1-4c91-91b2-395695672eea", "metadata" : { "createdDate" : "2019-07-11T16:45:09.007+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:45:09.007+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } }, { "id" : "45e39260-d27e-4e62-878a-0f3877587cbc", "recordId" : "8c328a18-5761-4329-95f6-599412c32310", "acquisitionsUnitId" : "9ef44274-ffd1-4c91-91b2-395695672eea", "metadata" : { "createdDate" : "2019-07-11T16:45:31.832+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T16:45:31.832+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } } ], "totalRecords" : 3 }

Query orders view (get all orders assigned to the "math" unit):

$ curl $OKAPI/orders/composite-orders -G --data-urlencode "query=acquisitionsUnitId==9ef44274-ffd1-4c91-91b2-395695672eea" -H "X-Okapi-Token: $TOKEN" { "purchaseOrders" : [ { "id" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "approved" : true, "dateOrdered" : "2019-07-11T11:43:12.848+0000", "manualPo" : false, "notes" : [ ], "poNumber" : "101113", "orderType" : "Ongoing", "reEncumber" : false, "renewal" : { "cycle" : "6 Months", "interval" : 182, "manualRenewal" : false, "reviewPeriod" : 30, "renewalDate" : "2019-04-09T00:00:00.000+0000" }, "vendor" : "d0fb5aa0-cdf1-11e8-a8d5-f2801f1b9fd1", "workflowStatus" : "Open", "metadata" : { "createdDate" : "2019-07-11T11:43:12.970+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T11:43:12.970+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } }, { "id" : "8c328a18-5761-4329-95f6-599412c32310", "approved" : true, "dateOrdered" : "2018-07-24T00:00:00.000+0000", "manualPo" : true, "notes" : [ ], "poNumber" : "14383007", "orderType" : "Ongoing", "reEncumber" : false, "renewal" : { "cycle" : "6 Months", "interval" : 182, "manualRenewal" : true, "reviewPeriod" : 30, "renewalDate" : "2019-04-09T00:00:00.000+0000" }, "vendor" : "15fb695a-cdf1-11e8-a8d5-f2801f1b9fd1", "workflowStatus" : "Open" } ], "totalRecords" : 2 }

Query the order lines view (again get all poLines assigned to the "math" unit)

$ curl $OKAPI/orders/order-lines -G --data-urlencode "query=acquisitionsUnitId==9ef44274-ffd1-4c91-91b2-395695672eea" -H "X-Okapi-Token: $TOKEN" { "poLines" : [ { "id" : "b0fb580c-cdf1-11e8-a8d5-f2801f1b9fd1", "edition" : "First edition", "checkinItems" : false, "instanceId" : "30fcc8e7-a019-43f4-b642-2edc389f4501", "agreementId" : "e4b9bd57-c5be-4772-ba1c-9e693a81147b", "acquisitionMethod" : "Gift", "alerts" : [ ], "cancellationRestriction" : false, "cancellationRestrictionNote" : "", "claims" : [ { "claimed" : true, "grace" : 0 } ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 0.0, "listUnitPriceElectronic" : 0.0, "currency" : "USD", "additionalCost" : 0.0, "discount" : 2.0, "discountType" : "amount", "quantityPhysical" : 1, "quantityElectronic" : 0, "poLineEstimatedPrice" : 0.0 }, "description" : "", "details" : { "receivingNote" : "", "productIds" : [ { "productId" : "AJMEAZ", "productIdType" : "593b78cb-32f3-44d1-ba8c-63fd5e6989e6" }, { "productId" : "0002-9343", "productIdType" : "913300b2-03ed-469a-8179-c1092c991227" }, { "productId" : "med49002270", "productIdType" : "c858e4f2-2b6b-4385-842b-60732ee14abb" } ], "subscriptionInterval" : 0 }, "donor" : "Tsuda College", "fundDistribution" : [ { "code" : "GIFT-SUBN", "encumbrance" : "eb506834-6c70-4239-8d1a-6414a5b08009", "fundId" : "e9f9bc2f-bad5-4613-9d6c-f55efa5805e7", "percentage" : 100.0 } ], "locations" : [ { "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371", "quantity" : 1, "quantityElectronic" : 0, "quantityPhysical" : 1 } ], "orderFormat" : "Physical Resource", "paymentStatus" : "Payment Not Required", "physical" : { "createInventory" : "Instance, Holding, Item", "materialType" : "1a54b431-2e4f-452d-9cae-9cee66c9a892", "materialSupplier" : "80fb5168-cdf1-11e8-a8d5-c2801f1b9f22", "volumes" : [ "vol. 1" ] }, "poLineDescription" : "", "poLineNumber" : "14383007-1", "purchaseOrderId" : "8c328a18-5761-4329-95f6-599412c32310", "receiptStatus" : "Awaiting Receipt", "reportingCodes" : [ ], "requester" : "stp0", "rush" : false, "selector" : "ay", "source" : { "code" : "", "description" : "Manually entered" }, "tags" : [ "giftsubscription" ], "title" : "The American Journal of Medicine", "vendorDetail" : { "instructions" : "no. 42 and continuations", "noteFromVendor" : "", "vendorAccount" : "" } }, { "id" : "b9cc5473-bb40-1d61-afc0-d3a5ba0ed0a8", "edition" : "Second edition", "checkinItems" : false, "instanceId" : "c1d3be12-ecec-4fab-9237-baf728575185", "agreementId" : "6bbc890c-0fa9-4ab3-802a-471ee18f72d5", "acquisitionMethod" : "Purchase", "alerts" : [ ], "cancellationRestriction" : false, "cancellationRestrictionNote" : "", "claims" : [ { "claimed" : false, "grace" : 0 } ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 240.0, "listUnitPriceElectronic" : 0.0, "currency" : "USD", "additionalCost" : 0.0, "discount" : 14.1, "discountType" : "percentage", "quantityPhysical" : 2, "quantityElectronic" : 0, "poLineEstimatedPrice" : 412.32 }, "description" : "", "details" : { "receivingNote" : "v. 1-6 in 10 parts", "productIds" : [ { "productId" : "9781868885015", "productIdType" : "8261054f-be78-422d-bd51-4ed9f33c3422" } ], "subscriptionInterval" : 0 }, "donor" : "", "fundDistribution" : [ { "code" : "STATE-MONOSER", "encumbrance" : "eb506834-6c70-4239-8d1a-6414a5b08010", "fundId" : "bbd4a5e1-c9f3-44b9-bfdf-d184e04f0ba0", "percentage" : 100.0 } ], "locations" : [ { "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371", "quantity" : 1, "quantityElectronic" : 0, "quantityPhysical" : 1 } ], "orderFormat" : "Physical Resource", "paymentStatus" : "Awaiting Payment", "physical" : { "createInventory" : "Instance, Holding", "materialType" : "d9acad2f-2aac-4b48-9097-e6ab85906b25", "materialSupplier" : "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1", "receiptDue" : "2018-08-31T00:00:00.000+0000", "volumes" : [ "vol. 6" ] }, "poLineDescription" : "", "poLineNumber" : "101113-1", "publicationDate" : "2018", "publisher" : "SAGE", "purchaseOrderId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "receiptStatus" : "Awaiting Receipt", "reportingCodes" : [ ], "requester" : "", "rush" : false, "selector" : "", "source" : { "code" : "", "description" : "Manually entered" }, "tags" : [ ], "title" : "The city post-modernity edited by Alan Latham", "vendorDetail" : { "instructions" : "", "noteFromVendor" : "", "vendorAccount" : "" }, "metadata" : { "createdDate" : "2019-07-11T11:43:12.951+0000", "createdByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51", "updatedDate" : "2019-07-11T11:43:12.951+0000", "updatedByUserId" : "149c86d7-77ba-5c09-90ea-877f0079fd51" } } ], "totalRecords" : 2 }

Query the receiving-history view (same criteria) - technically part of https://folio-org.atlassian.net/browse/MODORDSTOR-96#icft=MODORDSTOR-96 but here since I'm verifying them together

$ curl $OKAPI/orders/receiving-history -G --data-urlencode "query=acquisitionsUnitId==9ef44274-ffd1-4c91-91b2-395695672eea" -H "X-Okapi-Token: $TOKEN" { "receivingHistory" : [ { "id" : "3a9f04a9-74d1-4d05-a42c-98919e7bf672", "caption" : "Tutorial Volume 375", "comment" : "Special Edition", "dateOrdered" : "2018-07-24T00:00:00.000+0000", "checkin" : false, "instanceId" : "30fcc8e7-a019-43f4-b642-2edc389f4501", "itemId" : "1714f71f-b845-444b-a79e-a577487a6f7d", "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371", "poLineId" : "b0fb580c-cdf1-11e8-a8d5-f2801f1b9fd1", "poLineNumber" : "14383007-1", "poLineReceiptStatus" : "Awaiting Receipt", "pieceFormat" : "Physical", "purchaseOrderId" : "8c328a18-5761-4329-95f6-599412c32310", "receivingNote" : "", "receivingStatus" : "Expected", "supplement" : true, "title" : "The American Journal of Medicine" }, { "id" : "4a22fdd9-072e-4620-a831-2a7b79a47e7f", "dateOrdered" : "2019-07-11T11:43:12.848+0000", "checkin" : false, "instanceId" : "c1d3be12-ecec-4fab-9237-baf728575185", "locationId" : "fcd64ce1-6995-48f0-840e-89ffa2288371", "poLineId" : "b9cc5473-bb40-1d61-afc0-d3a5ba0ed0a8", "poLineNumber" : "101113-1", "poLineReceiptStatus" : "Awaiting Receipt", "pieceFormat" : "Physical", "purchaseOrderId" : "55b97a4a-6601-4488-84e1-8b0d47a3f523", "receivingNote" : "v. 1-6 in 10 parts", "receivingStatus" : "Expected", "title" : "The city post-modernity edited by Alan Latham" } ], "totalRecords" : 2 }

Piotr KalashukJuly 4, 2019 at 10:22 AM

Verified on folio-testing environment

  1. Set up environment variables

    export OKAPITOKEN=... export OKAPI=https://folio-testing-okapi.aws.indexdata.com
  2. Create 2 acq units
    Request 1

    curl -X POST $OKAPI/acquisitions-units-storage/units \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "name": "Test unit 1" }' -w '\n'

    Response

    { "id" : "b440f482-0fd1-4a91-b90b-621dfeb2341e", "name" : "Test unit 1", "protectCreate" : true, "protectRead" : false, "protectUpdate" : true, "protectDelete" : true, "metadata" : { "createdDate" : "2019-07-04T08:29:37.926+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T08:29:37.926+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }

    Request 2

    curl -X POST $OKAPI/acquisitions-units-storage/units \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "name": "Test unit 2" }' -w '\n'

    Response

    { "id" : "145e2ab6-4df2-4bcd-a8f5-ea06d919cc0a", "name" : "Test unit 2", "protectCreate" : true, "protectRead" : false, "protectUpdate" : true, "protectDelete" : true, "metadata" : { "createdDate" : "2019-07-04T08:33:43.953+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T08:33:43.953+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }
  3. Create 2 orders (different vendors)
    Request 1

    curl -X POST $OKAPI/orders-storage/purchase-orders \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "orderType": "One-Time", "notes": [ "MODORDSTOR-94", "MODORDSTOR-95" ], "poNumber": "TESTVIEWS1", "vendor": "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1" }' -w '\n'

    Response

    { "id" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "approved" : false, "notes" : [ "MODORDSTOR-94", "MODORDSTOR-95" ], "orderType" : "One-Time", "poNumber": "TESTVIEWS1", "reEncumber" : false, "vendor" : "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1", "workflowStatus" : "Pending", "metadata" : { "createdDate" : "2019-07-04T09:15:24.036+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:15:24.036+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }

    Request 2

    curl -X POST $OKAPI/orders-storage/purchase-orders \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "orderType": "One-Time", "notes": [ "MODORDSTOR-94", "MODORDSTOR-95" ], "vendor": "e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1" }' -w '\n'

    Response

    { "id" : "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "approved" : false, "notes" : [ "MODORDSTOR-94", "MODORDSTOR-95" ], "orderType" : "One-Time", "poNumber": "TESTVIEWS2", "reEncumber" : false, "vendor" : "e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1", "workflowStatus" : "Pending", "metadata" : { "createdDate" : "2019-07-04T09:18:23.244+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:18:23.244+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }
  4. Create one line for each order
    Request 1

    curl -X POST $OKAPI/orders-storage/po-lines \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "acquisitionMethod": "Purchase", "purchaseOrderId": "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "source": { "code": "FOLIO" }, "orderFormat": "Physical Resource", "physical":{ "createInventory": "None" }, "cost":{ "currency":"USD", "listUnitPrice": 1, "quantityPhysical":1 }, "title": "Line for the first order" }' -w '\n'

    Response

    { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }

    Request 1

    curl -X POST $OKAPI/orders-storage/po-lines \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "acquisitionMethod": "Purchase", "purchaseOrderId": "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "source": { "code": "FOLIO" }, "orderFormat": "Physical Resource", "physical":{ "createInventory": "None" }, "cost":{ "currency":"USD", "listUnitPrice": 1, "quantityPhysical":1 }, "title": "Line for the second order" }' -w '\n'

    Response

    { "id" : "a386efb8-ce04-461d-b534-eb40d21bffce", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the second order", "metadata" : { "createdDate" : "2019-07-04T09:31:37.974+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:31:37.974+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }
  5. Assign both units to the first order
    Request 1

    curl -X POST $OKAPI/orders-storage/acquisitions-unit-assignments \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "recordId": "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "acquisitionsUnitId": "b440f482-0fd1-4a91-b90b-621dfeb2341e" }' -w '\n'

    Response

    { "id" : "9c9911c4-4a0b-4256-8f26-aea52e18088c", "recordId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "acquisitionsUnitId" : "b440f482-0fd1-4a91-b90b-621dfeb2341e", "metadata" : { "createdDate" : "2019-07-04T09:24:14.861+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:24:14.861+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }

    Request 2

    curl -X POST $OKAPI/orders-storage/acquisitions-unit-assignments \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "recordId": "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "acquisitionsUnitId": "145e2ab6-4df2-4bcd-a8f5-ea06d919cc0a" }' -w '\n'

    Response

    { "id" : "57b648c6-f7fd-43a1-855f-fae57ff4d824", "recordId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "acquisitionsUnitId" : "145e2ab6-4df2-4bcd-a8f5-ea06d919cc0a", "metadata" : { "createdDate" : "2019-07-04T09:24:46.817+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:24:46.817+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }
  6. Assign only one unit to the second order
    Request

    curl -X POST $OKAPI/orders-storage/acquisitions-unit-assignments \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $OKAPITOKEN" \ -d '{ "recordId": "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "acquisitionsUnitId": "b440f482-0fd1-4a91-b90b-621dfeb2341e" }' -w '\n'

    Response

    { "id" : "26f15038-cb75-47d5-9d18-b4f6668575e1", "recordId" : "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "acquisitionsUnitId" : "b440f482-0fd1-4a91-b90b-621dfeb2341e", "metadata" : { "createdDate" : "2019-07-04T09:25:49.397+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:25:49.397+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }
  7. Search for orders using /orders-storage/po-lines endpoint

    • Get order lines for the first unit
      Request

      curl $OKAPI/orders-storage/po-lines --data-urlencode 'query=acquisitionsUnitId==b440f482-0fd1-4a91-b90b-621dfeb2341e' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }, { "id" : "a386efb8-ce04-461d-b534-eb40d21bffce", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the second order", "metadata" : { "createdDate" : "2019-07-04T09:31:37.974+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:31:37.974+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 2 }
    • Get order lines for the first unit and for specific title
      Request

      curl $OKAPI/orders-storage/po-lines --data-urlencode 'query=acquisitionsUnitId==b440f482-0fd1-4a91-b90b-621dfeb2341e and title=first' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 1 }
    • Get order lines for the first unit including PO criteria (this endpoint does not support such queries)
      Request

      curl $OKAPI/orders-storage/po-lines --data-urlencode 'query=acquisitionsUnitId==b440f482-0fd1-4a91-b90b-621dfeb2341e and vendor==e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ ], "totalRecords" : 0 }
    • Get order lines for the second unit
      Request

      curl $OKAPI/orders-storage/po-lines --data-urlencode 'query=acquisitionsUnitId==145e2ab6-4df2-4bcd-a8f5-ea06d919cc0a' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 1 }
  8. Search for orders using /orders-storage/order-lines endpoint

    • Get order lines for the first unit
      Request

      curl $OKAPI/orders-storage/order-lines --data-urlencode 'query=acquisitionsUnitId==b440f482-0fd1-4a91-b90b-621dfeb2341e' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } }, { "id" : "a386efb8-ce04-461d-b534-eb40d21bffce", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the second order", "metadata" : { "createdDate" : "2019-07-04T09:31:37.974+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:31:37.974+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 2 }
    • Get order lines for the first unit and specific title
      Request

      curl $OKAPI/orders-storage/order-lines --data-urlencode 'query=acquisitionsUnitId==b440f482-0fd1-4a91-b90b-621dfeb2341e and title=first' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 1 }
    • Get order lines for the first unit and for specific vendor (order criteria)
      Request

      curl $OKAPI/orders-storage/order-lines --data-urlencode 'query=acquisitionsUnitId==b440f482-0fd1-4a91-b90b-621dfeb2341e and vendor==e0fb5df2-cdf1-11e8-a8d5-f2801f1b9fd1' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "a386efb8-ce04-461d-b534-eb40d21bffce", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "79a1b92b-24b7-4a00-bb2b-d158a6f4a136", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the second order", "metadata" : { "createdDate" : "2019-07-04T09:31:37.974+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:31:37.974+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 1 }
    • Get order lines for the second unit
      Request

      curl $OKAPI/orders-storage/order-lines --data-urlencode 'query=acquisitionsUnitId==145e2ab6-4df2-4bcd-a8f5-ea06d919cc0a' -H "X-Okapi-Token: $OKAPITOKEN" -w '\n' -G -s

      Response

      { "poLines" : [ { "id" : "9c0c2884-2e07-45e3-b522-a0e93bebfba4", "checkinItems" : false, "acquisitionMethod" : "Purchase", "alerts" : [ ], "claims" : [ ], "collection" : false, "contributors" : [ ], "cost" : { "listUnitPrice" : 1.0, "currency" : "USD", "discountType" : "percentage", "quantityPhysical" : 1 }, "fundDistribution" : [ ], "locations" : [ ], "orderFormat" : "Physical Resource", "paymentStatus" : "Pending", "physical" : { "createInventory" : "None", "volumes" : [ ] }, "purchaseOrderId" : "f660e48d-42fa-44d9-b17b-59c3b4bffca0", "receiptStatus" : "Pending", "reportingCodes" : [ ], "rush" : false, "source" : { "code" : "FOLIO" }, "tags" : [ ], "title" : "Line for the first order", "metadata" : { "createdDate" : "2019-07-04T09:30:38.090+0000", "createdByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd", "updatedDate" : "2019-07-04T09:30:38.090+0000", "updatedByUserId" : "7ad1799c-6255-595b-966e-911b6ed351dd" } } ], "totalRecords" : 1 }
  9. Delete created records
    Request

    curl -i -XDELETE $OKAPI/orders-storage/po-lines/9c0c2884-2e07-45e3-b522-a0e93bebfba4 -H "x-okapi-token: $OKAPITOKEN" -w '\n' curl -i -XDELETE $OKAPI/orders-storage/po-lines/a386efb8-ce04-461d-b534-eb40d21bffce -H "x-okapi-token: $OKAPITOKEN" -w '\n' curl -i -XDELETE $OKAPI/orders-storage/purchase-orders/f660e48d-42fa-44d9-b17b-59c3b4bffca0 -H "x-okapi-token: $OKAPITOKEN" -w '\n' curl -i -XDELETE $OKAPI/orders-storage/purchase-orders/79a1b92b-24b7-4a00-bb2b-d158a6f4a136 -H "x-okapi-token: $OKAPITOKEN" -w '\n' curl -i -XDELETE $OKAPI/acquisitions-units-storage/units/b440f482-0fd1-4a91-b90b-621dfeb2341e -H "x-okapi-token: $OKAPITOKEN" -w '\n' curl -i -XDELETE $OKAPI/acquisitions-units-storage/units/145e2ab6-4df2-4bcd-a8f5-ea06d919cc0a -H "x-okapi-token: $OKAPITOKEN" -w '\n'

    Response

    HTTP/2 204 ... HTTP/2 204 ... HTTP/2 204 ... HTTP/2 204 ... HTTP/2 204 ... HTTP/2 204 ...
Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Thunderjet

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created June 6, 2019 at 8:41 PM
Updated July 11, 2019 at 4:58 PM
Resolved July 11, 2019 at 4:58 PM
TestRail: Cases
TestRail: Runs

Flag notifications