Create business layer proxy API for organization operations

Description

Overview

Define and implement the business layer API for organization.

API listing: https://folio-org.atlassian.net/wiki/display/FOLIJET/Finance+Data+Model#FinanceDataModel-APIs.3

Approach

Proxy back to the storage module

API for proxy : https://docs.google.com/spreadsheets/d/1se-a2owRfHLG5eaAZglx4vLvRClCKGp2wZCfD39ZJRY/edit#gid=427229289

Acceptance Criteria

RAML and ModuleDescriptor are updated

API is implemented
Unit tests are updated
API tests are updated

Environment

None

Potential Workaround

None

Attachments

1
  • 19 May 2020, 09:21 AM

Checklist

hide

TestRail: Results

Activity

Show:

Andrei Makaranka May 19, 2020 at 9:21 AM

Verified in scope of PR API test

Viachaslau Khandramai May 19, 2020 at 6:14 AM

Hi
this can be verified on hosted envs.

Thanks,
Slava

Viachaslau Khandramai May 18, 2020 at 11:50 AM

6) Get organizations collection:

curl -i -X GET $OKAPI/organizations/organizations -H "X-Okapi-Token: $TOKEN" -w'\n' HTTP/1.1 200 OK X-Okapi-Trace: GET mod-authtoken-2.5.0-SNAPSHOT.66 http://10.0.2.15:9133/organizations/organizations : 202 15493us Content-Type: application/json transfer-encoding: chunked X-Okapi-Trace: GET mod-organizations-1.0.0-SNAPSHOT http://10.0.2.15:9174/organizations/organizations : 200 341745us { "organizations" : [ { "id" : "80fb5168-cdf1-11e8-a8d5-c2801f1b9f23", "name" : "Royal Society of Chemistry", "code" : "content_provider1", "status" : "Active", "aliases" : [ { "value" : "RSC" } ], "addresses" : [ ], "phoneNumbers" : [ ], "emails" : [ ], "urls" : [ ], "contacts" : [ ], "agreements" : [ ], "vendorCurrencies" : [ ], "interfaces" : [ "cd5926fa-77aa-4eb3-ac34-c9a1747ba21c" ], "accounts" : [ ], "isVendor" : false, "changelogs" : [ ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.388+0000", "updatedDate" : "2020-05-18T02:45:47.388+0000" } }, { "id" : "70fb4e66-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "Naxos of America, Inc.", "code" : "NAXO", "description" : "AV streaming services, other onilne content", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "Naxos", "description" : "" } ], "addresses" : [ { "addressLine1" : "416 Mary Lindsay Polk Dr.", "addressLine2" : "", "city" : "Franklin", "stateRegion" : "TN", "zipCode" : "37067", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "1-615-771-9393", "categories" : [ ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "service@naxosusa.com", "description" : "Customer Service", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "urls" : [ { "value" : "https://www.naxos.com/", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "notes" : "" } ], "contacts" : [ "70fb4e66-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "Naxos Music Library, Naxos Video Library", "discount" : 0.0, "referenceUrl" : "https://www.acs.org/content/acs/en.html", "notes" : "" } ], "erpCode" : "G64758-74827", "paymentMethod" : "EFT", "accessProvider" : true, "governmental" : false, "licensor" : true, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 0, "discountPercent" : 0.0, "expectedActivationInterval" : 30, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 365, "subscriptionInterval" : 365, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "interfaces" : [ "fae74b9c-5338-4cd6-8a17-47c750d40b7b" ], "accounts" : [ { "name" : "Serials", "accountNo" : "xxxx4367", "description" : "Libraries", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "service@naxosusa.com", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.505+0000", "updatedDate" : "2020-05-18T02:45:47.505+0000" } }, { "id" : "f0fb6130-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "Magnolia Press", "code" : "MGNP", "description" : "Serials-Foreign", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "Mangolia Press NZ", "description" : "" } ], "addresses" : [ { "addressLine1" : "Saint Lukes", "addressLine2" : "P.O. Box 41383", "city" : "Auckland", "stateRegion" : "", "zipCode" : "1346", "country" : "New Zealand", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "64-95-783-996", "categories" : [ ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "magnolia@mapress.com", "description" : "Customer Service", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "urls" : [ { "value" : "http://www.mapress.com/j/", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "notes" : "" } ], "contacts" : [ "f0fb6130-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "Zootaxa ", "discount" : 10.0, "referenceUrl" : "https://www.acs.org/content/acs/en.html", "notes" : "Acquisition of 2008-2010 Journal Archives" } ], "erpCode" : "G64758-74829", "paymentMethod" : "EFT", "accessProvider" : true, "governmental" : false, "licensor" : true, "materialSupplier" : true, "vendorCurrencies" : [ "NZD" ], "claimingInterval" : 0, "discountPercent" : 0.0, "expectedActivationInterval" : 30, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 365, "subscriptionInterval" : 365, "expectedReceiptInterval" : 30, "taxId" : "1819468", "liableForVat" : false, "taxPercentage" : 5.0, "interfaces" : [ "6c862414-a87c-4c19-b4dc-c9c2b68f296c" ], "accounts" : [ { "name" : "Serials", "accountNo" : "xxxx7859", "description" : "Libraries", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "magnolia@mapress.com", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.551+0000", "updatedDate" : "2020-05-18T02:45:47.551+0000" } }, { "id" : "14fb6608-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "Ro*Co films", "code" : "ZROCO$", "description" : "Distributor of documentary films", "status" : "Inactive", "language" : "English", "aliases" : [ { "value" : "Ro*Co Films Educational", "description" : "" } ], "addresses" : [ { "addressLine1" : "80 LIBERTY SHIP WAY7", "addressLine2" : "SUITE 5", "city" : "SAUSALITO", "stateRegion" : "CA", "zipCode" : "94965", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "1-415-332-6471", "categories" : [ ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "info@rocofilms.com", "description" : "initial contact address", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "language" : "English" } ], "urls" : [ { "value" : "http://www.rocofilms.com/", "description" : "main website", "language" : "English", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "14fb6608-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "50% discount if buying DVD (PPR included) + streaming license", "discount" : 50.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74825", "paymentMethod" : "EFT", "accessProvider" : false, "governmental" : false, "licensor" : true, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 30, "discountPercent" : 0.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "interfaces" : [ ], "accounts" : [ { "name" : "library orders", "accountNo" : "library orders 5000", "description" : "DVD/PPR/Streaming movies", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "dana@rocofilms.com", "libraryCode" : "pfirm", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.606+0000", "updatedDate" : "2020-05-18T02:45:47.606+0000" } }, { "id" : "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "Alexander Street Press", "code" : "ALEXS", "description" : "AV streaming services", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "Alexander Street", "description" : "" } ], "addresses" : [ { "addressLine1" : "3212 Duke Street", "addressLine2" : "", "city" : "Alexandria", "stateRegion" : "VA", "zipCode" : "22314", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-889-5937", "categories" : [ ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "customerservice@alexanderstreet.com", "description" : "main customer service email", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "urls" : [ { "value" : "https://alexanderstreet.com/", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "notes" : "" } ], "contacts" : [ "11fb627a-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "library access", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74828", "paymentMethod" : "Physical Check", "accessProvider" : true, "governmental" : false, "licensor" : true, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 0, "discountPercent" : 0.0, "expectedActivationInterval" : 1, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 365, "subscriptionInterval" : 365, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "interfaces" : [ "14e81009-0f98-45a0-b8e6-e25547beb22f" ], "accounts" : [ { "name" : "Library account", "accountNo" : "1234", "description" : "Main library account", "appSystemNo" : "", "paymentMethod" : "Physical Check", "accountStatus" : "Active", "contactInfo" : "customerservice@alexanderstreet.com", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.641+0000", "updatedDate" : "2020-05-18T02:45:47.641+0000" } }, { "id" : "c0fb5956-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "Otto Harrassowitz GmbH & Co. KG", "code" : "HARRA", "description" : "Use for monographs, approval plans, firms orders, and standing orders", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "Harrassowitz", "description" : "shorter name" } ], "addresses" : [ { "addressLine1" : "Kreuzberger Ring 6 b-d", "addressLine2" : "", "city" : "Wiesbaden", "stateRegion" : "", "zipCode" : "65205", "country" : "Germany", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195", "ab760714-4185-4859-b0dd-3e72f01c5c52", "cbfaec07-5df1-4197-bfa5-1bc91f9073cf" ], "language" : "German" } ], "phoneNumbers" : [ { "phoneNumber" : "49-611-530 ext. 0", "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195", "ab760714-4185-4859-b0dd-3e72f01c5c52", "cbfaec07-5df1-4197-bfa5-1bc91f9073cf" ], "isPrimary" : true, "language" : "German" } ], "emails" : [ { "value" : "service@harrassowitz.de", "description" : "customer service", "isPrimary" : true, "categories" : [ ], "language" : "German and English" } ], "urls" : [ { "value" : "https://www.harrassowitz.de/", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "c0fb5956-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "No formal agreement", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74835", "paymentMethod" : "Physical Check", "accessProvider" : false, "governmental" : false, "licensor" : false, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 75, "discountPercent" : 0.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "edi" : { "vendorEdiCode" : "v10063", "libEdiCode" : "COB", "prorateTax" : false, "prorateFees" : false, "ediNamingConvention" : "****.edu", "sendAcctNum" : true, "supportOrder" : true, "supportInvoice" : true, "notes" : "", "ediFtp" : { "ftpFormat" : "SFTP", "serverAddress" : "ftps://ftp.harrassowitz.de", "username" : "sample", "password" : "password", "ftpMode" : "Binary", "ftpConnMode" : "Passive", "ftpPort" : 22, "orderDirectory" : "/orders", "invoiceDirectory" : "/invoices", "notes" : "" }, "ediJob" : { "scheduleEdi" : true, "isMonday" : false, "isTuesday" : false, "isWednesday" : false, "isThursday" : false, "isFriday" : false, "isSaturday" : false, "isSunday" : false, "sendToEmails" : "", "notifyAllEdi" : true, "notifyInvoiceOnly" : false, "notifyErrorOnly" : false } }, "interfaces" : [ "00b1c903-38f2-45c7-a427-30a141cf643a" ], "accounts" : [ { "name" : "Main library account", "accountNo" : "xxxx34", "description" : "Main library account", "appSystemNo" : "", "paymentMethod" : "Physical Check", "accountStatus" : "Active", "contactInfo" : "service@harrassowitz.de", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "different account numbers for serials and standing orders" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.772+0000", "updatedDate" : "2020-05-18T02:45:47.772+0000" } }, { "id" : "80fb5168-cdf1-11e8-a8d5-c2801f1b9f22", "name" : "Minuteman Library", "code" : "consortia2", "description" : "The Minuteman Library Network is comprised of 41 public and academic libraries in the MetroWest region of Massachusetts.", "status" : "Active", "aliases" : [ { "value" : "MLN" } ], "addresses" : [ ], "phoneNumbers" : [ ], "emails" : [ ], "urls" : [ ], "contacts" : [ ], "agreements" : [ ], "vendorCurrencies" : [ ], "interfaces" : [ "cd5926fa-77aa-4eb3-ac34-c9a1747ba21b" ], "accounts" : [ ], "isVendor" : false, "changelogs" : [ ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.822+0000", "updatedDate" : "2020-05-18T02:45:47.822+0000" } }, { "id" : "80fb5168-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "American Chemical Society", "code" : "ACSO", "description" : "Serials - Domestic", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "ACS", "description" : "" } ], "addresses" : [ { "addressLine1" : "1155 Sixteenth Street, NW", "addressLine2" : "", "city" : "Washington", "stateRegion" : "DC", "zipCode" : "20036", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-333-9511", "categories" : [ ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "service@acs.org", "description" : "Customer Service", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "urls" : [ { "value" : "https://www.acs.org/content/acs/en.html", "description" : "main English language website", "language" : "en-us", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "notes" : "" } ], "contacts" : [ "80fb5168-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "ACS Web Editions", "discount" : 0.0, "referenceUrl" : "https://www.acs.org/content/acs/en.html", "notes" : "Multiyear agreement (2018-2020)" } ], "erpCode" : "G64758-74831", "paymentMethod" : "EFT", "accessProvider" : true, "governmental" : false, "licensor" : true, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 0, "discountPercent" : 0.0, "expectedActivationInterval" : 30, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 365, "subscriptionInterval" : 365, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "interfaces" : [ "60b952a6-5570-44f3-9972-f00c9dcb098e" ], "accounts" : [ { "name" : "Serialst", "accountNo" : "xxxx2149", "description" : "Libraries", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "liblink@acs.org", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.891+0000", "updatedDate" : "2020-05-18T02:45:47.891+0000" } }, { "id" : "12fb63b0-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "Taylor & Francis Group, LLC ", "code" : "TAFG", "description" : "Serials - Domestic", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "Taylor & Francis ", "description" : "" } ], "addresses" : [ { "addressLine1" : "Suite 300, 6000 Broken Sound Parkway, NW", "addressLine2" : "", "city" : "Boca Raton", "stateRegion" : "FL", "zipCode" : "33487", "country" : "USA", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195", "ab760714-4185-4859-b0dd-3e72f01c5c52", "cbfaec07-5df1-4197-bfa5-1bc91f9073cf" ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-634-7064", "categories" : [ ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "enquiries@taylorandfrancis.com", "description" : "Customer Servicel", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "urls" : [ { "value" : "http://taylorandfrancis.com/", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "12fb63b0-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "Association of Digital Humanities Journal Package", "discount" : 40.0, "referenceUrl" : "https://www.acs.org/content/acs/en.html", "notes" : "Amendment to Multiyear Master Agreement (2015-2019)" } ], "erpCode" : "G64758-74832", "paymentMethod" : "EFT", "accessProvider" : true, "governmental" : false, "licensor" : true, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 0, "discountPercent" : 0.0, "expectedActivationInterval" : 30, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 365, "subscriptionInterval" : 365, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "interfaces" : [ "92289a36-5d83-4794-9f45-97eda8938064" ], "accounts" : [ { "name" : "Serialst", "accountNo" : "xxxx4962", "description" : "Libraries", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "Richard.Plantagenet@taylorandfrancis.com", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.930+0000", "updatedDate" : "2020-05-18T02:45:47.930+0000" } }, { "id" : "13fb64dc-cdf1-11e8-a8d5-f2801f1b9fd1", "name" : "United States Geological Survey", "code" : "USGS", "description" : "Maps and materials from the USGS", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "USGS", "description" : "" } ], "addresses" : [ { "addressLine1" : "12201 Sunrise Valley Drive", "addressLine2" : "P.O. Box 15550", "city" : "Reston", "stateRegion" : "VA", "zipCode" : "20192", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "phoneNumbers" : [ { "phoneNumber" : "1-888-ASK-USGS", "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "isPrimary" : true, "language" : "English" } ], "emails" : [ { "value" : "usgsstore@usgs.gov", "description" : "main customer service email", "isPrimary" : true, "categories" : [ ], "language" : "English" } ], "urls" : [ { "value" : "https://www.usgs.gov/", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "13fb64dc-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74833", "paymentMethod" : "Credit Card", "accessProvider" : false, "governmental" : true, "licensor" : false, "materialSupplier" : true, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 45, "discountPercent" : 0.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 0, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "interfaces" : [ "766e42dc-386b-4710-897d-2ad226fa3679" ], "accounts" : [ { "name" : "Cartographic account", "accountNo" : "1234", "description" : "Monographic ordering unit accountt", "appSystemNo" : "", "paymentMethod" : "Credit Card", "accountStatus" : "Active", "contactInfo" : "usgsstore@usgs.gov", "libraryCode" : "COB", "libraryEdiCode" : "765987610", "notes" : "" } ], "isVendor" : true, "sanCode" : "", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T02:45:47.963+0000", "updatedDate" : "2020-05-18T02:45:47.963+0000" } } ], "totalRecords" : 17 }

Viachaslau Khandramai May 18, 2020 at 11:50 AM

Verification steps:
1) Export URL and TOKEN

export URL=...
export TOKEN=...

2) Create and organization

curl -i -X POST $OKAPI/organizations/organizations \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $TOKEN" -w'\n' \ -d '{ "name" : "Active org for API Test", "code" : "ACTIVEORG1", "description" : "Use for single title subscriptions.", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "EBSCO", "description" : "" } ], "addresses" : [ { "addressLine1" : "10 ESTES ST", "addressLine2" : "PO BOX 682", "city" : "Ipswich", "stateRegion" : "MA", "zipCode" : "01938", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "en" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-653-2726", "categories" : [ ], "isPrimary" : true, "language" : "en-us" } ], "emails" : [ { "value" : "jbeck@ebsco.com", "description" : "Customer Service Rep", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "language" : "en-us" } ], "urls" : [ { "value" : "http://www.ebsco.com", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "XXXXXX credit", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74837", "paymentMethod" : "EFT", "accessProvider" : false, "governmental" : false, "licensor" : false, "materialSupplier" : false, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 60, "discountPercent" : 10.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "edi" : { "vendorEdiCode" : "xx-xxx014186", "vendorEdiType" : "31B/US-SAN", "libEdiCode" : "VOY0081", "libEdiType" : "31B/US-SAN", "prorateTax" : true, "prorateFees" : false, "ediNamingConvention" : "*.edu", "sendAcctNum" : true, "supportOrder" : false, "supportInvoice" : true, "notes" : "", "ediFtp" : { "ftpFormat" : "SFTP", "serverAddress" : "ftps://ftp.ebsco.com", "username" : "edi_username", "password" : "ediPassword", "ftpMode" : "Binary", "ftpConnMode" : "Passive", "ftpPort" : 22, "orderDirectory" : "", "invoiceDirectory" : "", "notes" : "" }, "ediJob" : { "scheduleEdi" : false, "isMonday" : false, "isTuesday" : false, "isWednesday" : false, "isThursday" : false, "isFriday" : false, "isSaturday" : false, "isSunday" : false, "sendToEmails" : "bobbarker@priceisright.com", "notifyAllEdi" : false, "notifyInvoiceOnly" : true, "notifyErrorOnly" : false } }, "interfaces" : [ "ddfd8661-896d-4ffc-be57-d0f466cb790b" ], "accounts" : [ { "name" : "Serials", "accountNo" : "BRXXXXX-01", "description" : "Print serial subscriptions", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "Some basic contact information note.", "libraryCode" : "-01, -02, -03", "libraryEdiCode" : "VOY0081", "notes" : "" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T10:29:23.225+0000", "createdByUserId" : "00000001-1111-5555-9999-999999999999", "updatedDate" : "2020-05-18T10:29:23.225+0000", "updatedByUserId" : "00000001-1111-5555-9999-999999999999" } }' HTTP/1.1 100 Continue HTTP/1.1 201 Created X-Okapi-Trace: POST mod-authtoken-2.5.0-SNAPSHOT.66 http://10.0.2.15:9133/organizations/organizations : 202 83230us Location: http://10.0.2.15:9130/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 Content-Type: application/json transfer-encoding: chunked X-Okapi-Trace: POST mod-organizations-1.0.0-SNAPSHOT http://10.0.2.15:9174/organizations/organizations : 201 1922584us { "id" : "8316c8e3-aa7a-4d15-adf7-7465ff7385f3", "name" : "Active org for API Test", "code" : "ACTIVEORG1", "description" : "Use for single title subscriptions.", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "EBSCO", "description" : "" } ], "addresses" : [ { "addressLine1" : "10 ESTES ST", "addressLine2" : "PO BOX 682", "city" : "Ipswich", "stateRegion" : "MA", "zipCode" : "01938", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "en" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-653-2726", "categories" : [ ], "isPrimary" : true, "language" : "en-us" } ], "emails" : [ { "value" : "jbeck@ebsco.com", "description" : "Customer Service Rep", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "language" : "en-us" } ], "urls" : [ { "value" : "http://www.ebsco.com", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "XXXXXX credit", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74837", "paymentMethod" : "EFT", "accessProvider" : false, "governmental" : false, "licensor" : false, "materialSupplier" : false, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 60, "discountPercent" : 10.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "edi" : { "vendorEdiCode" : "xx-xxx014186", "vendorEdiType" : "31B/US-SAN", "libEdiCode" : "VOY0081", "libEdiType" : "31B/US-SAN", "prorateTax" : true, "prorateFees" : false, "ediNamingConvention" : "*.edu", "sendAcctNum" : true, "supportOrder" : false, "supportInvoice" : true, "notes" : "", "ediFtp" : { "ftpFormat" : "SFTP", "serverAddress" : "ftps://ftp.ebsco.com", "username" : "edi_username", "password" : "ediPassword", "ftpMode" : "Binary", "ftpConnMode" : "Passive", "ftpPort" : 22, "orderDirectory" : "", "invoiceDirectory" : "", "notes" : "" }, "ediJob" : { "scheduleEdi" : false, "isMonday" : false, "isTuesday" : false, "isWednesday" : false, "isThursday" : false, "isFriday" : false, "isSaturday" : false, "isSunday" : false, "sendToEmails" : "bobbarker@priceisright.com", "notifyAllEdi" : false, "notifyInvoiceOnly" : true, "notifyErrorOnly" : false } }, "interfaces" : [ "ddfd8661-896d-4ffc-be57-d0f466cb790b" ], "accounts" : [ { "name" : "Serials", "accountNo" : "BRXXXXX-01", "description" : "Print serial subscriptions", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "Some basic contact information note.", "libraryCode" : "-01, -02, -03", "libraryEdiCode" : "VOY0081", "notes" : "" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T11:08:20.847+0000", "createdByUserId" : "c7bb54a0-6a61-5f94-bc23-a0a69de69aa0", "updatedDate" : "2020-05-18T11:08:20.847+0000", "updatedByUserId" : "c7bb54a0-6a61-5f94-bc23-a0a69de69aa0" } }

3) Update an organization:

curl -i -X PUT $OKAPI/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 \ -H 'Content-Type: application/json' \ -H "x-okapi-token: $TOKEN" -w'\n' \ -d '{ "id" : "8316c8e3-aa7a-4d15-adf7-7465ff7385f3", "name" : "UPDATED NAME", "code" : "ACTIVEORG1", "description" : "Use for single title subscriptions.", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "EBSCO", "description" : "" } ], "addresses" : [ { "addressLine1" : "10 ESTES ST", "addressLine2" : "PO BOX 682", "city" : "Ipswich", "stateRegion" : "MA", "zipCode" : "01938", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "en" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-653-2726", "categories" : [ ], "isPrimary" : true, "language" : "en-us" } ], "emails" : [ { "value" : "jbeck@ebsco.com", "description" : "Customer Service Rep", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "language" : "en-us" } ], "urls" : [ { "value" : "http://www.ebsco.com", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "XXXXXX credit", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74837", "paymentMethod" : "EFT", "accessProvider" : false, "governmental" : false, "licensor" : false, "materialSupplier" : false, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 60, "discountPercent" : 10.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "edi" : { "vendorEdiCode" : "xx-xxx014186", "vendorEdiType" : "31B/US-SAN", "libEdiCode" : "VOY0081", "libEdiType" : "31B/US-SAN", "prorateTax" : true, "prorateFees" : false, "ediNamingConvention" : "*.edu", "sendAcctNum" : true, "supportOrder" : false, "supportInvoice" : true, "notes" : "", "ediFtp" : { "ftpFormat" : "SFTP", "serverAddress" : "ftps://ftp.ebsco.com", "username" : "edi_username", "password" : "ediPassword", "ftpMode" : "Binary", "ftpConnMode" : "Passive", "ftpPort" : 22, "orderDirectory" : "", "invoiceDirectory" : "", "notes" : "" }, "ediJob" : { "scheduleEdi" : false, "isMonday" : false, "isTuesday" : false, "isWednesday" : false, "isThursday" : false, "isFriday" : false, "isSaturday" : false, "isSunday" : false, "sendToEmails" : "bobbarker@priceisright.com", "notifyAllEdi" : false, "notifyInvoiceOnly" : true, "notifyErrorOnly" : false } }, "interfaces" : [ "ddfd8661-896d-4ffc-be57-d0f466cb790b" ], "accounts" : [ { "name" : "Serials", "accountNo" : "BRXXXXX-01", "description" : "Print serial subscriptions", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "Some basic contact information note.", "libraryCode" : "-01, -02, -03", "libraryEdiCode" : "VOY0081", "notes" : "" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T10:29:23.225+0000", "createdByUserId" : "00000001-1111-5555-9999-999999999999", "updatedDate" : "2020-05-18T10:29:23.225+0000", "updatedByUserId" : "00000001-1111-5555-9999-999999999999" } }' HTTP/1.1 100 Continue HTTP/1.1 204 No Content X-Okapi-Trace: PUT mod-authtoken-2.5.0-SNAPSHOT.66 http://10.0.2.15:9133/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 : 202 75922us X-Okapi-Trace: PUT mod-organizations-1.0.0-SNAPSHOT http://10.0.2.15:9174/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 : 204 162792us

3) Get an organization by id:

curl -i -X GET $OKAPI/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 -H "X-Okapi-Token: $TOKEN" -w'\n' HTTP/1.1 200 OK X-Okapi-Trace: GET mod-authtoken-2.5.0-SNAPSHOT.66 http://10.0.2.15:9133/organizations/organizations/66f4d3e6-5c8d-49c6-b5d1-51631ba88b36 : 202 5280us Content-Type: application/json transfer-encoding: chunked X-Okapi-Trace: GET mod-organizations-1.0.0-SNAPSHOT http://10.0.2.15:9174/organizations/organizations/66f4d3e6-5c8d-49c6-b5d1-51631ba88b36 : 200 48595us { "id" : "66f4d3e6-5c8d-49c6-b5d1-51631ba88b36", "name" : "UPDATED NAME", "code" : "ACTIVEORG1", "description" : "Use for single title subscriptions.", "status" : "Active", "language" : "en-us", "aliases" : [ { "value" : "EBSCO", "description" : "" } ], "addresses" : [ { "addressLine1" : "10 ESTES ST", "addressLine2" : "PO BOX 682", "city" : "Ipswich", "stateRegion" : "MA", "zipCode" : "01938", "country" : "USA", "isPrimary" : true, "categories" : [ ], "language" : "en" } ], "phoneNumbers" : [ { "phoneNumber" : "1-800-653-2726", "categories" : [ ], "isPrimary" : true, "language" : "en-us" } ], "emails" : [ { "value" : "jbeck@ebsco.com", "description" : "Customer Service Rep", "isPrimary" : true, "categories" : [ "f52ceea4-8e35-404b-9ebd-5c7db6613195" ], "language" : "en-us" } ], "urls" : [ { "value" : "http://www.ebsco.com", "description" : "main website", "language" : "en-us", "isPrimary" : true, "categories" : [ ], "notes" : "" } ], "contacts" : [ "50fb6ae0-cdf1-11e8-a8d5-f2801f1b9fd1" ], "agreements" : [ { "name" : "XXXXXX credit", "discount" : 0.0, "referenceUrl" : "", "notes" : "" } ], "erpCode" : "G64758-74837", "paymentMethod" : "EFT", "accessProvider" : false, "governmental" : false, "licensor" : false, "materialSupplier" : false, "vendorCurrencies" : [ "USD" ], "claimingInterval" : 60, "discountPercent" : 10.0, "expectedActivationInterval" : 0, "expectedInvoiceInterval" : 30, "renewalActivationInterval" : 0, "subscriptionInterval" : 0, "expectedReceiptInterval" : 30, "taxId" : "", "liableForVat" : false, "taxPercentage" : 0.0, "edi" : { "vendorEdiCode" : "xx-xxx014186", "vendorEdiType" : "31B/US-SAN", "libEdiCode" : "VOY0081", "libEdiType" : "31B/US-SAN", "prorateTax" : true, "prorateFees" : false, "ediNamingConvention" : "*.edu", "sendAcctNum" : true, "supportOrder" : false, "supportInvoice" : true, "notes" : "", "ediFtp" : { "ftpFormat" : "SFTP", "serverAddress" : "ftps://ftp.ebsco.com", "username" : "edi_username", "password" : "ediPassword", "ftpMode" : "Binary", "ftpConnMode" : "Passive", "ftpPort" : 22, "orderDirectory" : "", "invoiceDirectory" : "", "notes" : "" }, "ediJob" : { "scheduleEdi" : false, "isMonday" : false, "isTuesday" : false, "isWednesday" : false, "isThursday" : false, "isFriday" : false, "isSaturday" : false, "isSunday" : false, "sendToEmails" : "bobbarker@priceisright.com", "notifyAllEdi" : false, "notifyInvoiceOnly" : true, "notifyErrorOnly" : false } }, "interfaces" : [ "ddfd8661-896d-4ffc-be57-d0f466cb790b" ], "accounts" : [ { "name" : "Serials", "accountNo" : "BRXXXXX-01", "description" : "Print serial subscriptions", "appSystemNo" : "", "paymentMethod" : "EFT", "accountStatus" : "Active", "contactInfo" : "Some basic contact information note.", "libraryCode" : "-01, -02, -03", "libraryEdiCode" : "VOY0081", "notes" : "" } ], "isVendor" : true, "sanCode" : "1234567", "changelogs" : [ { "description" : "This is a sample note.", "timestamp" : "2008-05-15T10:53:00.000+0000" } ], "metadata" : { "createdDate" : "2020-05-18T10:45:59.521+0000", "createdByUserId" : "c7bb54a0-6a61-5f94-bc23-a0a69de69aa0", "updatedDate" : "2020-05-18T10:48:29.007+0000", "updatedByUserId" : "c7bb54a0-6a61-5f94-bc23-a0a69de69aa0" } }

4) Delete an organization

curl -i -X DELETE $OKAPI/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 -H "X-Okapi-Token: $TOKEN" -w'\n' HTTP/1.1 204 No Content X-Okapi-Trace: DELETE mod-authtoken-2.5.0-SNAPSHOT.66 http://10.0.2.15:9133/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 : 202 76599us X-Okapi-Trace: DELETE mod-organizations-1.0.0-SNAPSHOT http://10.0.2.15:9174/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 : 204 73928us

5) Get an organization by id - NOT FOUND

curl -i -X GET $OKAPI/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 -H "X-Okapi-Token: $TOKEN" -w'\n' HTTP/1.1 404 Not Found X-Okapi-Trace: GET mod-authtoken-2.5.0-SNAPSHOT.66 http://10.0.2.15:9133/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 : 202 6148us Content-Type: application/json transfer-encoding: chunked X-Okapi-Trace: GET mod-organizations-1.0.0-SNAPSHOT http://10.0.2.15:9174/organizations/organizations/8316c8e3-aa7a-4d15-adf7-7465ff7385f3 : 404 32195us { "errors" : [ { "message" : "Not found", "code" : "genericError", "parameters" : [ ] } ], "total_records" : 1 }
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 April 15, 2020 at 7:53 AM
Updated July 31, 2020 at 11:45 AM
Resolved May 19, 2020 at 9:22 AM
TestRail: Cases
TestRail: Runs

Flag notifications