NAV
request response

Introduction

Scientist’s Application Programming Interface (API) gives application developers programmatic access to the Scientist.com marketplace platform. Developers servicing suppliers and client organizations can use the API to add value to marketplace. Some example applications are:

Overview

The API provides facilities for free-text and faceted search of the major entities stored in the marketplace. Unless otherwise noted, GET requests with no parameters to the endpoints returns the the first page of results and a facets object describing the features available for query. Developers can use the information returned by the first request to create a picklist or otherwise issue another request with more specific criteria.

Most index endpoints accept per_page= and page= query string parameters. Use the response from the initial query to iterate over pages of responses. See URL Query Parameters for information on free-text and facet searching for endpoints that support that feature.

Included in this API is a powerful Webhooks callback mechanism allowing applictions to register callbacks to private applications whereby events occuring on the marketplace are delivered to developer applications. In this way third party applications maintain synchronicity with activities on the Scientist.com marketplace.

To use the API you first authenticate using either token or OAuth2.

API Versions

Currently the API implements a set of Version 1 ("API V1") and Version 2 ("API V2") endpoints. The API V2 includes all the API V1 endpoints, plus additional endpoints.

Changelog

Changes to the API including new endpoints or breaking changes to response formats will be provided here.

Scientist API V2 ChangeLog

Note: Not all version bumps are in chronological order since merge events are distinct from versioning. Also, versioned releases can be generate but never integrated into the main RX system build.

2.79.0

commit 19dea58d8a0831237621e85ddf3e84f1b88e4317 Merge: ea61c8a 2903f9c Author: Alisha Evans alisha@scientist.com Date: Thu Mar 23 16:25:39 2023 -0500

Merge pull request #248 from assaydepot/sentry-errors

Sentry errors

commit 2903f9c70485076f56f3ddf2b5542f28e357b13d Author: Chris Petersen chris@petersen.io Date: Thu Mar 23 14:00:11 2023 -0700

Version bump 2.79.0

commit a81ac6d740148a79d1804b20d776aa1830d01f5d Author: Chris Petersen chris@petersen.io Date: Thu Mar 23 13:59:35 2023 -0700

Adding sentry capture_exception commands to the API. Closes #246

commit 6b9e1b8a1419a7cea5789b16b845a59040f127d6 Author: Chris Petersen chris@petersen.io Date: Thu Mar 23 13:59:19 2023 -0700

Fixing the webhook_config.events validation

2.78.2

commit ea61c8a3e4471b8f985a5c1c7996a435bde80c8a Author: Harrison Okins harrison@scientist.com Date: Wed Mar 22 12:51:37 2023 -0400

Load users by organization instead of access (#245)

* Load users by organization instead of access

Custom is getting removed. Instead, we can find users on a more granular basis by loading them through the current_organization.

* 2.78.0 bump for User.search change

* Remove redundant access token

The second access_token was only being used to access the user, which can be referenced directly from the initial access_token_without token.

access_token_without also isn't used in any other test, so I have moved it directly into the one test referencing it.

* Generate user & token once

Users are now associated with marketplaces via organizations instead of origin or access. As such, we need to explicitly define this in our spec suite.

Defining these variables in a before(:all) hook also speeds up this spec by not re-generating an identical token and user for each test.

* User spec improvements (2.78.1)

* Version bump to include changes from main

This release includes the recent changes from 2.77.x that were merged to main and this branch has been rebased on top of.

2.77.5

commit 5b5af1bab6a5f9fdbde6e6ce69463191387e484e Author: Ron Ranauro ron@scientist.com Date: Wed Mar 22 11:49:12 2023 -0400

241 create a purchase order when accepting an sow (#244)

* add the po_number to #create_quote_group_params

* wip: accept sow spec

* added spec for adding po_number to accept SOW; 2.77.1 version

* accept_sow action will raise gracefully if Pg::Organizaiton.backoffice_organization does not exist

* create the :backoffice_organization before each test

* 2.77.3 version bump

* remove raised error on missing backoffice_organization.

* 2.77.4 version bump

* remove commmented error check in accept_sow; 2.77.5 version bump

---------

Co-authored-by: Alisha Evans alisha@scientist.com

2.76.2

commit 58f7c707ca70a415939685e6d1ae5c648ef2b2f8 Author: Ron Ranauro ron@scientist.com Date: Tue Mar 7 10:37:57 2023 -0500

207 send to vendor update (#236)

* added quote_group.compliant? validation and error message to QuoteGroup#send_to_vendors action

* send_to_vendors will not raise compliance errors if the send will not occur

* added specs for non-compliant requests for send_to_vendors and accept_sow

* version bump 2.76.0

* review feedback to use the Action.compliance_required? instead of rolling own

* refine specs to exercise compliance failures including toggling organization feature settings

* 2.76.1 version bump

* removed unused require_compliance logic from send_to_vendors

* 2.76.2 version bump

2.75.0

commit 23febbf00009f670adb36bce17ed57007ec41374 Author: Ron Ranauro ron@scientist.com Date: Tue Mar 7 09:09:58 2023 -0500

234 add client application id to quote group controller#create action (#235)

* added client_application_id parameter to QuoteGroupController#create action

* added test to confirm client_application_id added to request

* bumped API Version to: 2.75.0

commit 901819aa03e7780954a0961f4e6d4b25e8ab5911 Author: Steven McFarlane steven@notch8.com Date: Tue Mar 7 07:08:35 2023 -0700

update calls to reindex for searchkick upgrade (#239)

2.74.0

commit d988b0aa24d785bcfd2dd53fbfc599ef87947fad Author: Ron Ranauro ron@scientist.com Date: Thu Feb 23 11:16:25 2023 -0500

189 fix the purchase orders endpoint (#233)

* fixed unitialized @purchase_orders in quote_groups/quoted_wares/purchase_orders endpoint

* added specs to test quote_groups/quoted_wares/purchase_orders endpoint

* bumped tagged version to 2.74.0

commit 799bd949011f5c17f8fdbb4ee7c5133ccd8336b5 Author: Alisha Evans alisha@scientist.com Date: Wed Feb 22 05:45:31 2023 -0600

only define quote_group_update_params once (#231)

2.73.0

commit f34f5176680c0109c385dd33a58d7c6cd731f13d Author: Ron Ranauro ron@scientist.com Date: Fri Feb 17 13:23:43 2023 -0500

228 quotegroup access control should be enforced consistently (#230)

* added Unauthorized subclass of StandardError

* removed NOT_AUTHORIZED message constants from controller

* update access logic to reject tokens with no user

* modified load_quote_groups to reject tokens with no user

* replaced message constants with string literals

* fixed specs to expect 401 unauthorized instead of 403 forbidden for tokens with no users

* 2.73.0 version bump

2.72.0

commit 607f4128e9325e288ea1fc581c12c77821f7fd42 Author: Ron Ranauro ron@scientist.com Date: Thu Feb 9 11:41:33 2023 -0500

Add Ware with Encoded name to WaresProvidersSpec (#221)

* imroved error handling ware/provider create

* factored wares_providers_spec; added ware requiring encoded name

* added name, description, snippet, keywords to Pg:Ware.search in providers_wares_controller#index for compatibility with wares_controller#index; 2.71.1

* review feedback: 'replace ware.defined?' with in WareRefSerializer; v2.27.2

* fix quote_group_create_spec.rb; v2.72.0

commit 97f8943 Author: Ron Ranauro ron@scientist.com Date: Mon Feb 6 16:56:03 2023 -0500

205 full text ware search (#224)

* refreshed Pg::Ware.search to borrow search configuration from wares_controller.rb in RX

* added tests for searching free text with hits in name, description, and snippet

2.70.4

commit 6006dc8 Author: Ron Ranauro ron@scientist.com Date: Mon Feb 6 16:55:24 2023 -0500

Notes controller uses @note.valid? (#218)

* create note logic to handle validations

* updated pg_note factory requires quote_group to pass validations

* bumped version to 2.70.0

* removed add_note action from quote_groups_controller; delegated to quote_groups/notes controller

* added rescue for error handling; update spec to match

* bumping version to 2.70.1

* revised specs to deal with revised validation logic; V22.70.2

* note_save! method added to notes_controller.rb; fixed broken specs;2.70.3 bump

* added context: :validate_associations to note.save!; confirmed specs

* Version 2.70.4 version bump

commit 7b72109 Author: Ron Ranauro ron@scientist.com Date: Fri Feb 3 07:13:30 2023 -0500

163 accept an sow (#216)

* added send_to_vendors member route to quote_groups_controller

* added send_to_vendors action to quote_groups_controller; uses RX' quote_group_controller as model

* added 'send to vendors' tests to spec suite

* added accept_sow member route to quote_gropus_controller

* added accept_sow action to quote_group_controller

* specs added for accept_sow endpoint

commit 543c11f Author: Ron Ranauro ron@scientist.com Date: Thu Feb 2 10:13:59 2023 -0500

207 send to vendor api endpoint (#213)

* added send_to_vendors member route to quote_groups_controller

* added send_to_vendors action to quote_groups_controller; uses RX' quote_group_controller as model

* added 'send to vendors' tests to spec suite

commit 97905ec Author: Ron Ranauro ron@scientist.com Date: Thu Feb 2 10:13:22 2023 -0500

Adds uuid to QuoteGroupRefSerializer (#212)

commit 427b38e Author: Ron Ranauro ron@scientist.com Date: Thu Feb 2 10:13:02 2023 -0500

update the initialize endpoint updated routes file for /wares/:ware_id/quote_group/new.json; revised specs to use the new endpoint specification (#211)

commit 539001c Author: Ron Ranauro ron@scientist.com Date: Thu Feb 2 10:12:42 2023 -0500

214 add the quoted ware ref serializer to the quote group (#219)

* fixed calling arguments for QuotedWareRefSerializer

* added QuotedWareRefSerializer to QuoteGroupSerializer response

* spec to test presence of quoted_ware_refs in quote_group response

commit e87d6ad Author: Ron Ranauro ron@scientist.com Date: Thu Feb 2 10:11:06 2023 -0500

Verify correct operation of Free Text searching of wares (#220)

* added free_text search to spec suite

* added free_text search to spec suite

2.69.1

commit 5a1f050 Merge: e441d50 019e030 Author: Micah Iriye hello@micahiriye.com Date: Wed Jan 18 14:32:09 2023 -0800

Merge pull request #206 from assaydepot/detach-archived-organizations-from-organization-associations

Detach archived organizations from OrganizationAssociation

commit 019e030 Author: Harrison Okins harrison@scientist.com Date: Tue Jan 10 17:35:02 2023 -0700

Detach archived organizations from OrganizationAssociation

archived organizations are effectively soft-deleted, and should not inherit any associations.

commit e441d50 Merge: b316cb0 5ed0dd1 Author: Harrison Okins harrison@scientist.com Date: Wed Jan 18 11:38:24 2023 -0700

Merge pull request #203 from assaydepot/167-add-messages-endpoint-to-quotegroups-controller

167 add messages endpoint to quotegroups controller

commit 5ed0dd1 Merge: 7e89b71 b316cb0 Author: Ron Ranauro ron@scientist.com Date: Thu Jan 5 07:34:24 2023 -0500

Merge branch 'main' into 167-add-messages-endpoint-to-quotegroups-controller

commit b316cb0 Merge: 1c640e3 8711bf1 Author: Harrison Okins harrison@scientist.com Date: Wed Jan 4 15:43:43 2023 -0700

Merge pull request #202 from assaydepot/201-transient-spec-errors-in-warescontrollerspecrb

Transient spec errors in WaresController and WaresProvidersControlller

2.68.4

commit 7e89b71 Author: rranauro ron@scientist.com Date: Tue Jan 3 16:50:03 2023 -0500

version bump 2.68.4

commit c7dc48d Author: rranauro ron@scientist.com Date: Tue Jan 3 16:47:57 2023 -0500

added quote_groups/:id/messages.json spec in notes_controller_spec.rb

commit ee9b0a6 Author: rranauro ron@scientist.com Date: Tue Jan 3 16:46:41 2023 -0500

added quote_groups/:id/messages.json endpoint and controller action

commit 8711bf1 Author: rranauro ron@scientist.com Date: Tue Jan 3 08:59:24 2023 -0500

modified wares_controller_spec and wares_providers spec to fix transient spec errors resulting from false positive/negative searchkick hits

2.68.2

commit 1c640e3 Author: Ron Ranauro ron@scientist.com Date: Tue Jan 3 05:20:16 2023 -0500

API Tagged Release 2.68.2 (#200)

* add back 161-update-request code

* add back 161-update-request spec

* version bump 2.68.2; all tests run

commit 0043653 Author: Ron Ranauro ron@scientist.com Date: Thu Dec 22 12:48:23 2022 -0500

Initialize New Request Endpoint (#198)

* added quote_groups#new endpoint; specs with basic ware name checking; added routes

* tests for DynamicForms; tests error response for missing ware

commit cbf6ff4 Author: Ron Ranauro ron@scientist.com Date: Thu Dec 22 12:26:09 2022 -0500

added quote_group update to routes (#194)

added update method to quote_groups_controller.rb; modelled on RX Added tests for quote_group update and validation cases. initial implementation of accept_sow controller action

commit 6b74de9 Author: Ron Ranauro ron@scientist.com Date: Thu Dec 22 11:10:54 2022 -0500

added quote_group update to routes (#193)

added update method to quote_groups_controller.rb; modelled on RX Added tests for quote_group update and validation cases.

commit d21a779 Merge: ed911ae 8bb94b4 Author: Harrison Okins harrison@scientist.com Date: Fri Dec 16 09:49:02 2022 -0700

Merge pull request #197 from assaydepot/version-bump-2-68-0

Confirming system level CI specs run.

commit 8bb94b4 Author: rranauro ron@scientist.com Date: Fri Dec 16 11:02:02 2022 -0500

We set the Airboren base_url configuration to include the /api/v2 before each spec; Individual spec may reset the base_url, for example to fetch a logo from the RX controller

2.68.0

commit ed911ae Author: Ron Ranauro ron@scientist.com Date: Thu Dec 15 16:45:35 2022 -0500

bumps version to 2.68.0 (#196)

commit 7e1eeb0 Author: Ron Ranauro ron@scientist.com Date: Thu Dec 15 13:39:16 2022 -0500

wares/:ware_id/quote_groups#create endpoint allows POST to create new request (#186)

commit 9f97784 Merge: 54de1d6 24d3f74 Author: Christopher Petersen chris@scientist.com Date: Mon Dec 12 08:43:23 2022 -0800

Merge pull request #183 from assaydepot/175-return-a-promo_image_url-property-from-provider-specific-wares

175 Add /wares/:id/promo_image endpoint and spec

commit 24d3f74 Author: rranauro ron@scientist.com Date: Wed Dec 7 16:14:12 2022 -0500

Verifies the Serializer proper formatting of the promo_image_url and verifies using the marketplace URL

commit b6ade6c Author: rranauro ron@scientist.com Date: Wed Dec 7 16:13:29 2022 -0500

WareRefSerializer will adds the promo_image url contatenating Marketplace_url and ware.promo_image_url; If no image attachment exists, no url will be sent to the client

commit 54de1d6 Author: Jeremy Friesen jeremy.n.friesen@gmail.com Date: Wed Nov 30 10:17:29 2022 -0500

Jeremyf refactor as part of code read (#187)

* Removing temporal coupling from provider_rfi_annotations

In my experience having multiple before_actions in a controller can create situations that become more and more complex to disentangle.

With this refactor, I'm removing an instance variable (e.g. @start_time) in favor of a local variable.

I'm also setting the @provider_rfi_annotation within the method and then adjusting the generate_csv implementation to handle the guard clause.

By passing the parameter to generate_csv I'm further demonstrating that this method must be called after we've set the provider_rfi_annotation.

* Amending readme to better match desired rendered state.

* Adding note regarding array pagination

commit 887c188 Author: Ron Ranauro ron@scientist.com Date: Wed Nov 30 10:17:07 2022 -0500

158 Adds searchkick to providers_wares_controller (#180)

* Adds searchkick to providers_wares_controller; uses WareRefSerializer; adjustment to spec for compatibility with ware.to_ware_ref

* moved reindex for test purposes out of controller and into wares_proviers_spec.rb

commit 9f52168 Author: Ron Ranauro ron@scientist.com Date: Fri Nov 11 09:20:34 2022 -0500

WareRef Cleanup: Part D - Replaced ware.to_ware_ref with WareRefSerializer (#179)

* replaced ware.to_ware_ref with WareRefSerializer; updated related specs

* Update lib/scientist_api_v2/app/serializers/scientist_api_v2/ware_ref_serializer.rb

Co-authored-by: Harrison Okins harrison@scientist.com

* Update lib/scientist_api_v2/app/serializers/scientist_api_v2/ware_ref_serializer.rb

Co-authored-by: Harrison Okins harrison@scientist.com

* Update lib/scientist_api_v2/app/serializers/scientist_api_v2/ware_ref_serializer.rb

Co-authored-by: Harrison Okins harrison@scientist.com

Co-authored-by: Harrison Okins harrison@scientist.com

commit 1913053 Author: Harrison Okins harrison@scientist.com Date: Wed Nov 9 13:03:34 2022 -0500

Use Notes::Report to generate audit trail (#182)

* Use Notes::Report to generate audit trail

This should result in the exact same CSV export, but moves the logic out of the model layer, and is more explicit about exactly which notes are getting rendered.

* Test Note CSV content

commit 7b21ddf Merge: d43d69e 887cae0 Author: Harrison Okins harrison@scientist.com Date: Wed Nov 9 10:31:06 2022 -0500

Merge pull request #178 from assaydepot/157a-providersidwaresjson-should-use-warerefserializer

WareRef Cleanup Part A - Adds 2 new fields to ware_ref_serializer;

commit 887cae0 Author: rranauro ron@scientist.com Date: Wed Nov 2 16:55:22 2022 -0400

added fields to WareRefSerializer

2.67.1

commit d43d69e Author: Ron Ranauro ron@scientist.com Date: Wed Nov 2 15:54:40 2022 -0400

removes deprecated 'providers' field from WareRefSerializer; 2.67.1 bump (#177)

commit 275bd0e Author: Ron Ranauro ron@scientist.com Date: Wed Nov 2 12:54:29 2022 -0400

made change to ware_controller available_facets and change beacon_uuids to more natural category_uuids in index response hash; 2.67.2 (#176)

2.66.3

commit 3411554 Merge: a65a410 d9e40e1 Author: Harrison Okins harrison@scientist.com Date: Tue Oct 25 10:57:32 2022 -0400

Merge pull request #174 from assaydepot/171a-include-site-address-for-provider-rfi-annotations

uses 'full_address' instead of 'text' for provider_rfi_annotation

commit d9e40e1 Author: rranauro ron@scientist.com Date: Fri Oct 21 10:41:57 2022 -0400

uses 'full_address' instead of 'text' for provider_rfi_annotation responses

2.63.6

commit a65a410 Author: Ron Ranauro ron@scientist.com Date: Thu Oct 13 14:05:08 2022 -0400

RFI Annotation Serializer (#172)

* address to RFI annotation serializer; guard agains nil assignees in quote_group_ref_serializer

* fix placement of safe navigation operator; 2.63.6

2.63.2

commit 79d4538 Author: Ron Ranauro ron@scientist.com Date: Thu Sep 29 13:53:53 2022 -0400

Changed from ::Base to ::API controller inheritance; 2.63.2 bump (#170)

* Changed from ::Base to ::API controller inheritance; 2.63.1 bump

* Changed from ::Base to ::API controller inheritance; 2.63.2 bump

2.63.0

commit 9287d76 Merge: 2569d66 4c81b11 Author: Harrison Okins harrison@scientist.com Date: Fri Sep 16 08:56:14 2022 -0400

Merge pull request #156 from assaydepot/155-invalid-authenticity-token-i

skip_before_action :verify_authenticity_token; 2.63.0

commit 4c81b11 Author: rranauro ron@scientist.com Date: Thu Sep 15 11:24:16 2022 -0400

skip_before_action :verify_authenticity_token; 2.63.0

commit 2569d66 Merge: 1554553 3ab1db5 Author: Micah Iriye hello@micahiriye.com Date: Wed Sep 14 10:45:32 2022 -0700

Merge pull request #152 from assaydepot/stop-delegating-quoted-ware-assignees

Stop delegating QuotedWare#assignees

2.62.0

commit 3ab1db5 Author: Harrison Okins harrison@scientist.com Date: Tue Aug 30 16:43:49 2022 -0400

Call assignees on the parent QuoteGroup

This skips over the QuotedWare#assignees delegation, and calls the source method on the parent directly. This will allow us to stop delegating QuotedWare#assignees.

commit 1554553 Merge: d126f55 3a5fc17 Author: Harrison Okins harrison@scientist.com Date: Thu Aug 25 09:09:41 2022 -0400

Merge pull request #151 from assaydepot/remove-reference-to-providers-visible

Remove reference to Pg::QuoteGroup#providers_visible

2.61.0

commit 3a5fc17 Author: Harrison Okins harrison@scientist.com Date: Wed Aug 24 16:10:34 2022 -0400

2.61.0 version bump

commit 49a8f97 Author: Harrison Okins harrison@scientist.com Date: Wed Aug 24 16:10:07 2022 -0400

Encode the country_name spec parameter

This is a follow-up to #150, which started spec-ing out the search parameters that can be passed to the /providers endpoint. However, this caused transient URI must be ascii only errors depending on the country_name. This resolves it.

commit 6003c04 Author: Harrison Okins harrison@scientist.com Date: Wed Aug 24 15:52:53 2022 -0400

Remove reference to Pg::QuoteGroup#providers_visible

The logic that relied on this attribute was removed in rx in https://github.com/assaydepot/rx/pull/16282 (specifically 69afde4855de812e23921401c49754a3e41f43bc). It is no longer used (and was returning incorrect values prior to this anyway, and should not have been relied on).

commit d126f55 Merge: 7735319 edd24b7 Author: Harrison Okins harrison@scientist.com Date: Tue Aug 23 09:46:43 2022 -0400

Merge pull request #150 from assaydepot/149-providersjson-facet-searching-is-not-working

fixed broken /providers.json facet search; 2.60.0 version bump

2.60.1

commit edd24b7 Author: rranauro ron@scientist.com Date: Mon Aug 22 13:15:54 2022 -0400

replaced ProviderFacetBuilder with discrete list of facets in providers_controller.rb

2.60.0

commit e3c46ff Author: rranauro ron@scientist.com Date: Thu Aug 18 14:42:20 2022 -0400

fixed broken /providers.json facet search; 2.60.0 version bump

commit 7735319 Merge: 5018d20 da200cf Author: Steven McFarlane steven@notch8.com Date: Thu Jun 30 08:42:31 2022 -0600

Merge pull request #146 from assaydepot/use-sent-instead-of-access

Use Pg::QuotedWare#sent instead of access

2.59.2

commit da200cf Author: Harrison Okins harrison@scientist.com Date: Mon Jun 27 12:30:15 2022 -0400

Bump the patch version for sent query fixes

commit ca3312d Author: Harrison Okins harrison@scientist.com Date: Mon Jun 27 12:29:37 2022 -0400

Mark the vendor-available requests as "Sent"

commit a4e9a77 Author: Harrison Okins harrison@scientist.com Date: Mon Jun 27 12:28:44 2022 -0400

Correctly set _not status clause

We're no longer initializing the where hash with a _not key, so we have to explicitly define it here.

2.59.0

commit 4998c37 Author: Harrison Okins harrison@scientist.com Date: Thu Jun 16 13:22:14 2022 -0400

Bump minor version for Pg::QuotedWare#sent change

commit f96a23b Author: Harrison Okins harrison@scientist.com Date: Thu Jun 16 13:20:48 2022 -0400

Stop checking status to determine backoffice access

A QuotedWare cannot be sent and also be in "Internal Review". Thusly, we only need to check one of these attributes.

commit 79c537e Author: Harrison Okins harrison@scientist.com Date: Thu Jun 16 13:19:23 2022 -0400

Use sent instead of access

https://github.com/assaydepot/rx/pull/18647 added a new sent boolean to Pg::QuotedWare which gets set to true once a request has been sent to the backoffice. This allows us to stop referencing access.

commit 5018d20 Merge: f45333c 4770093 Author: Mumen Musa mumen@musa.ai Date: Tue Jun 21 09:13:15 2022 -0700

Merge pull request #92 from assaydepot/so-po-breakout-api-changes

SO/PO Breakout API V2 Changes

2.58.4

commit 4770093 Author: Mumen Musa mumen@musa.ai Date: Wed Jun 15 11:42:25 2022 -0700

Fix up organizational scoping

2.58.3

commit 263e8af Author: Mumen Musa mumen@musa.ai Date: Tue Jun 14 16:36:57 2022 -0700

Bump up version

commit b876d24 Author: Mumen Musa mumen@musa.ai Date: Tue Jun 14 16:36:30 2022 -0700

Conditional provider/customer based on backoffice flag

2.58.2

commit 133b1da Author: Mumen Musa mumen@musa.ai Date: Wed Jun 8 17:04:37 2022 -0700

Version bump

commit 98de07e Author: Mumen Musa mumen@musa.ai Date: Wed Jun 8 17:04:21 2022 -0700

Revert back to customer PO to match controller

2.58.1

commit ecd8bb0 Author: Mumen Musa mumen@musa.ai Date: Wed Jun 8 16:17:52 2022 -0700

Bump version

commit e499579 Author: Mumen Musa mumen@musa.ai Date: Wed Jun 8 16:04:14 2022 -0700

Fix up references to the purchase orders

2.58.0

commit c53147c Author: Mumen Musa mumen@musa.ai Date: Fri May 27 17:23:48 2022 -0700

Version bump

commit b81d606 Merge: e43310c f45333c Author: Mumen Musa mumen@musa.ai Date: Wed May 25 14:54:55 2022 -0700

Merge branch 'main' into so-po-breakout-api-changes

commit f45333c Merge: 3f767bc ad355cd Author: Steven McFarlane steven@notch8.com Date: Fri May 6 11:03:20 2022 -0600

Merge pull request #135 from assaydepot/bundle_update_for_rails-5.x

Bundle update for rails 5.x

commit ad355cd Merge: 835dfa2 3f767bc Author: Max mrobock@gmail.com Date: Fri May 6 09:46:50 2022 -0700

Merge branch 'main' into bundle_update_for_rails-5.x

commit 835dfa2 Author: Max mrobock@gmail.com Date: Wed May 4 10:31:16 2022 -0700

bundle update

commit d45ecd9 Author: Max mrobock@gmail.com Date: Wed May 4 10:30:48 2022 -0700

version bump after 5.2 merge

commit 3f767bc Merge: 6862a29 5336c44 Author: Harrison Okins harrison@scientist.com Date: Thu Apr 21 12:31:39 2022 -0400

Merge pull request #145 from assaydepot/143-bad-parameter-in-nested_quoted_ware_resource

Sci2Lead fixes

2.56.0

commit 5336c44 Author: rranauro ron@scientist.com Date: Thu Apr 21 09:29:15 2022 -0400

2.56.0 version bump

commit 3c6e058 Author: rranauro ron@scientist.com Date: Thu Apr 21 09:18:29 2022 -0400

fixed nested_quoted_ware_resource; added organization_name to UserRefSerializer; refactored UserRefSerializer.new to take organization parameter

commit 6862a29 Merge: 88f06bb cae16f2 Author: Harrison Okins harrison@scientist.com Date: Wed Apr 20 11:13:28 2022 -0400

Merge pull request #142 from assaydepot/141-ware-provider-associations-performance-issues

Wares Providers Associations Performance Issues

2.55.1

commit cae16f2 Author: rranauro ron@scientist.com Date: Fri Apr 8 13:39:47 2022 -0400

PR review optimizations; 2.55.1 bump

2.55.0

commit f12f30a Author: rranauro ron@scientist.com Date: Thu Apr 7 13:40:45 2022 -0400

replaced wares_providers_controller create/destroy methods with code modeled on service_settings_controller.rb; version bump 2.55.0

2.54.7

commit 88f06bb Author: Ron Ranauro ron@scientist.com Date: Fri Apr 1 13:38:15 2022 -0400

87 quoted ware serializer pattern (#139)

* major cleanup of quoted_ware serializer; remove collection_serializer

* includes 2.54.X versions; bumped to 2.54.7

* added Counter initializer to purchase_order_controller_spec.rb; all specs running

commit 3044c0e Author: Ron Ranauro ron@scientist.com Date: Thu Mar 31 06:35:20 2022 -0400

127 compliance manifest access (#140)

* work in process; do not merge

* Fix error in test for rails 5.2

* Update lib/scientist_api_v2/version.rb

Co-authored-by: Harrison Okins harrison@scientist.com

* bump version in gemfile.lock

* 2.54.2

* remove unused load_compliance_manifests

Co-authored-by: Steven McFarlane steven@scientist.com Co-authored-by: Steven McFarlane steven@notch8.com Co-authored-by: Harrison Okins harrison@scientist.com

commit 80944e6 Author: Ron Ranauro ron@scientist.com Date: Thu Mar 31 06:33:23 2022 -0400

112 duplicate approvers (#138)

* added uniq to potential_approvers method

* 2.54.5

commit 1055d37 Author: Ron Ranauro ron@scientist.com Date: Thu Mar 31 06:32:31 2022 -0400

128 quote group index serializer needs fixing (#137)

* fix serializer and remove unused controller methods

* 2.24.4

commit 6904409 Author: Ron Ranauro ron@scientist.com Date: Thu Mar 31 06:31:13 2022 -0400

129 webhooks should accept all events (#136)

* fixed webhook config logic

* 2.54.3

commit 3e38d9e Author: Ron Ranauro ron@scientist.com Date: Wed Mar 30 14:33:27 2022 -0400

Added ?full=true option to /categories.json for Beacon.tree (#127)

* Added ?full=true option to /categories.json for Beacon.tree

* bump verions 2.54.0

* 2.54.1

2.53.1

commit acabd32 Author: Max mrobock@gmail.com Date: Fri Mar 18 10:14:37 2022 -0700

bump version after rebasing on 2.53 main

commit 4a0d9e4 Author: Max mrobock@gmail.com Date: Mon Mar 14 17:33:20 2022 -0700

fix spec. Still parses fine in CSV.parse (acts like a string, or automatically takes body value)

commit 880d769 Author: Max mrobock@gmail.com Date: Mon Mar 14 17:15:12 2022 -0700

update with binding.pry

commit 743933e Author: Max mrobock@gmail.com Date: Sun Mar 6 11:34:16 2022 -0800

version collision, 2.51 taken

commit 888fc62 Author: Max mrobock@gmail.com Date: Sun Mar 6 11:33:09 2022 -0800

closes #130, bundle update for rails 5

rspec-rails is for rails <5, but lets update everything as long as it keeps working

2.54.0

commit 2059358 Merge: 41f201e acc7ab5 Author: Steven McFarlane steven@notch8.com Date: Thu Mar 10 16:21:38 2022 -0700

Merge pull request #132 from assaydepot/131_fix_error_in_test_for_rails_5_2

Fix error in test for rails 5.2

commit acc7ab5 Author: Steven McFarlane steven@scientist.com Date: Thu Mar 10 16:05:24 2022 -0700

bump version in gemfile.lock

commit 746b4d6 Author: Steven McFarlane steven@notch8.com Date: Thu Mar 10 16:04:42 2022 -0700

Update lib/scientist_api_v2/version.rb

Co-authored-by: Harrison Okins harrison@scientist.com

commit 9b95ff4 Author: Steven McFarlane steven@scientist.com Date: Thu Mar 10 15:54:40 2022 -0700

Fix error in test for rails 5.2

2.50.4

commit 41f201e Merge: 4a730b3 90af947 Author: Micah Iriye hello@micahiriye.com Date: Tue Feb 1 13:54:18 2022 -0800

Merge pull request #125 from assaydepot/111-manifest-badges

Adding annotation badges to the OrganizationProviderRefSerializer

commit 90af947 Author: Ron Ranauro ron@scientist.com Date: Tue Feb 1 16:48:13 2022 -0500

better rfis link for org providers; 2.50.4

commit 232bdcf Author: Ron Ranauro ron@scientist.com Date: Tue Feb 1 16:46:15 2022 -0500

Update lib/scientist_api_v2/app/serializers/scientist_api_v2/organization_provider_ref_serializer.rb

Co-authored-by: Micah Iriye hello@micahiriye.com

commit fb1ab6f Author: Ron Ranauro ron@scientist.com Date: Tue Feb 1 12:23:06 2022 -0500

2.50.3 bump

commit 9b1165d Author: Ron Ranauro ron@scientist.com Date: Tue Feb 1 12:22:30 2022 -0500

added provider_rfis url to org provider

commit 43fc0ee Author: Ron Ranauro ron@scientist.com Date: Tue Feb 1 11:08:00 2022 -0500

added missing annotation serializer; added spec for serializer; removed spurious puts statements

commit 896de1d Author: Ron Ranauro ron@scientist.com Date: Tue Feb 1 07:15:16 2022 -0500

added annotation_serializer.rb

2.50.2

commit c8b2c6e Author: Ron Ranauro ron@scientist.com Date: Thu Jan 27 16:48:55 2022 -0500

tweak provider_spec; 2.50.2

commit ccc8921 Author: Ron Ranauro ron@scientist.com Date: Thu Jan 27 14:49:36 2022 -0500

fixed providers.json?full=true; bump 2.50.1

commit 2bec7f8 Author: Ron Ranauro ron@scientist.com Date: Thu Jan 27 10:48:20 2022 -0500

added spec for ?full=true option to /providers.json

commit c06e217 Author: Ron Ranauro ron@scientist.com Date: Thu Jan 27 09:07:35 2022 -0500

added annoation badges to providers; fixed OrgProviderRef/OrgProvider Serializers; 2.50.0 version bump

commit 4a730b3 Merge: 173fcd6 73d6a36 Author: Harrison Okins harrison@scientist.com Date: Wed Jan 19 13:47:35 2022 -0500

Merge pull request #123 from assaydepot/download-s3-attachments

Download S3 Attachments fix

2.49.0

commit 73d6a36 Author: Ron Ranauro ron@scientist.com Date: Tue Jan 18 13:14:01 2022 -0500

fix propsoal download crash

2.48.0

commit 173fcd6 Merge: 901c341 a43f94a Author: Steven McFarlane steven@notch8.com Date: Mon Jan 17 11:51:55 2022 -0700

Merge pull request #121 from assaydepot/update_gemfile_lock

update gemfile.lock

commit a43f94a Author: Steven McFarlane stevemac72@gmail.com Date: Mon Jan 17 11:50:11 2022 -0700

update gemfile.lock

commit 901c341 Merge: 4fc12f5 9a6ecf6 Author: Steven McFarlane steven@notch8.com Date: Mon Jan 17 11:27:29 2022 -0700

Merge pull request #119 from assaydepot/fixes_for_rails_5_1

Fixes for rails 5 1

commit 9a6ecf6 Author: Steven McFarlane stevemac72@gmail.com Date: Mon Jan 17 10:33:43 2022 -0700

update version

commit 591c75b Author: Steven McFarlane stevemac72@gmail.com Date: Thu Jan 13 11:27:57 2022 -0700

update render text: to render plain:

2.47.0

commit 4fc12f5 Merge: 2619705 f2d61ff Author: Micah Iriye hello@micahiriye.com Date: Fri Jan 14 12:10:23 2022 -0800

Merge pull request #120 from assaydepot/release-for-compliance-and-configuration-work

New minor release to combine #113 and #116

commit f2d61ff Author: Harrison Okins harrison@scientist.com Date: Fri Jan 14 12:06:42 2022 -0800

New minor release to combine #113 and #116

#113 accidentally got merged without cutting a new release that includes the changes from #116. This remedies that by including both.

commit 2619705 Merge: b5ddb11 3dde567 Author: Micah Iriye hello@micahiriye.com Date: Fri Jan 14 10:36:22 2022 -0800

Merge pull request #113 from assaydepot/remove-hidden-configuration-logic

Ignore hidden when querying service settings

commit 3dde567 Merge: bafb89c b5ddb11 Author: Micah Iriye hello@micahiriye.com Date: Fri Jan 14 10:20:39 2022 -0800

Merge branch 'main' into remove-hidden-configuration-logic

commit b5ddb11 Merge: 010d80c 8f00fa3 Author: Micah Iriye hello@micahiriye.com Date: Fri Jan 14 09:49:52 2022 -0800

Merge pull request #116 from assaydepot/remove-origin-and-access-from-compliance-manifests

Stop setting origin and access on compliance manifests

commit 8f00fa3 Author: Harrison Okins harrison@scientist.com Date: Thu Jan 13 08:09:58 2022 -0800

Minor version bump for compliance manifest origin/access changes

commit 4b36616 Author: Harrison Okins harrison@scientist.com Date: Tue Jan 4 16:14:53 2022 -0500

Stop setting origin and access for compliance manifests

commit e43310c Author: Mumen Musa mumen@musa.ai Date: Tue Oct 5 16:14:21 2021 -0700

Changes to adhere to the new breakout structure

commit bafb89c Author: Harrison Okins harrison@scientist.com Date: Thu Jan 6 16:26:49 2022 -0500

Bump the gemfile patch number, too

2.45.1

commit 563f032 Author: Harrison Okins harrison@scientist.com Date: Thu Jan 6 16:26:03 2022 -0500

Patch version bump to include recent changes from main

commit 817ecb2 Author: Harrison Okins harrison@scientist.com Date: Thu Jan 6 10:06:01 2022 -0500

Minor version bump to include recent changes from main

commit 6556875 Author: Harrison Okins harrison@scientist.com Date: Tue Jan 4 11:47:26 2022 -0500

Ignore hidden when querying service settings

We removed the hidden logic from the main app when we launched the new Supplier Intelligence Portal, and now we are doing the same here to keep things consistent (see https://github.com/assaydepot/rx/issues/15836).

commit 010d80c Merge: 6403ecc 85b08c9 Author: Harrison Okins harrison@scientist.com Date: Thu Jan 6 16:19:30 2022 -0500

Merge pull request #118 from assaydepot/stop-skipping-unused-csrf-protection-callback

Remove unused CSRF protection override

commit 85b08c9 Author: Harrison Okins harrison@scientist.com Date: Thu Jan 6 14:40:15 2022 -0500

Remove unused CSRF protection override

verify_authenticity_token is not actually enqueued as a before_action anywhere. In Rails 4 this fails silently, but in Rails 5 it will raise an error.

Normally, we would call protect_from_forgery in the ApiController, which enqueues verify_authenticity_token as a before_action. However, the API is stateless and doesn't use cookies, so we don't need this.

Resolves #117.

commit 6403ecc Merge: 4019329 4cfa211 Author: Harrison Okins harrison@scientist.com Date: Thu Jan 6 09:59:35 2022 -0500

Merge pull request #115 from assaydepot/fix-transient-ware-spec-failures

Fix transient WareController spec by URI encoding service names

commit 4019329 Author: Ron Ranauro ron@scientist.com Date: Thu Jan 6 09:47:16 2022 -0500

Rails 5 Upgrade (#103)

* merged conflict in compliance_manifests_controller.rb

* 2.43.0; change before_filter to before_action in controllers

* 2.44.1

* initial PR change requests; 2.44.2 bump

2.44.1

commit 4cfa211 Author: Harrison Okins harrison@scientist.com Date: Tue Jan 4 12:31:14 2022 -0500

URI encode service names to handle special characters

This will prevent transient URI must be ascii only errors from popping up when running the specs.

2.42.1

commit d793bee Merge: 6e7a80d 9f54d16 Author: Micah Iriye hello@micahiriye.com Date: Mon Jan 3 08:58:54 2022 -0800

Merge pull request #110 from assaydepot/stop-passing-domain-to-purchase-order-pdfs

Stop passing domain to purchase order PDFs

commit 9f54d16 Author: Harrison Okins harrison@scientist.com Date: Mon Jan 3 09:20:21 2022 -0500

Bump version after rebase

2.42.0

commit b497144 Author: Harrison Okins harrison@scientist.com Date: Wed Dec 29 11:01:48 2021 -0500

Stop passing domain to purchase order PDFs

This argument has been unused for some time and is no longer needed. Part of https://github.com/assaydepot/rx/issues/17388.

Getting Started

Organization

Organization of this site is alphabetical.

The endpoint references the Terminology for definitions of terms used throughout the platform. Terminology is cross-linked throughout the site.

A number of endpoints provide facet query facilities the function identically though the facet names are obviously different depending on the objects being searched. Refer to the URL Query Paramaters for details on how to format URL query strings.

If you link to a location in the site, use the browser back button to return.

Endpoint documentation

Each endpoint is described in the main panel of the site. To the right there are request and response tabs. The former showing the curl style command you would use to contact the endpoint. Select the response tab to see and example of the server response.

Location

The Scientist.com API is accessible at whatever website you use to access the marketplace.

For /api/v1 and subsequent API versions subsequent to v2 substitute v1 or other version acronym for v2 in the above examples.

Authentication

Before using Scientist.com API you create a Client Application on the Scientist.com web site. In order to do so requires that you obtain the developer feature flag associated to your account.

To authenticate an application developers first "create" the application using their Scientist.com account as follows:

  1. Log in to your Scientist account
  2. Go to Developer > Applications > New Application
  3. Fill in the fields as appropriate and click Create
  4. If you intend to use Oauth2authentication then you must supply a callback URL where the Oauth2 Server can issue a CODE to be given as argument to the Token URL before an ACCESS_TOKEN is issued.

Token Authentication

GET https://app.scientist.com/api/resource.json?access_token=ACESS_TOKEN

The simplest means to use the API is to embed the ACCESS_TOKEN as a URL query string.

curl --header "Authorization: Bearer ACCESS_TOKEN" https://app.scientist.com/api/resource.json

Alternatively submit the token as a header property as follows: "Authorization: Bearer ACCESS_TOKEN" where the provided token is substituted for the ACCESS_TOKEN in the header string.

Oauth2

The Scientist.com API supports a full Oauth2 workflow. The steps are:

  1. Use the CLIENT_ID and CLIENT_SECRET to initiate an authorization session. The Oauth2 server will respond to the callback server with a CODE once the user credentials have been established.
  2. Substitute the CODE provided in Step 1 to the Token URL to request an access token.
  3. The Token URL responds with an access token to be used in the manner of the Token Authentication described above.

Authorization URL

GET https://app.scientist.com/oauth/authorize?client_id=CLIENT_ID

Request a CODE by substitute the CLIENT_ID provided by the web site into the Authorization URL.

Token URL

GET https://app.scientist.com/oauth/token?grant_type=authorization_code&code=CODE&client_id=CLIENT_SECRET&client_secret=CLIENT_SECRET

Substitute the CLIENT_ID, CLIENT_SECRET provided by the web site, the CODE from the authorization URL response into the Token URL.

Terminology

The Scientist.com platform relies on a specific set of concepts, terms and meanings. Below is a list of some of the major terms and concepts important to API:

Action Item

Action Items are documents that provide a trace back of the events timeline for requests, proposals, purchase orders and other activities on the Scientist.com platform.

By way of example, if a supplier submits an SOW (Statement Of Work), the marketplace expects the next action is the user will accept that sow. The action item for the submitting SOW user is updated to reflect, action_performed: "sow_submitted", and a new action next_action: "accept_sow" get created. The new action includes a generated link to the page where the requesting user can actually accept the SOW. Subsequent action items can trigger webhooks (including email notices and push notifications), as well as populating the digest emails.

Approval

A document describing the approval context and status of a compliance manifest.

Approval documents can be approved, denied, delegated, and cancelled.

Approver

A user authorized on behalf of a client organization to review and approve compliance manifests.

Category

A description of a set of related wares.

Suppliers of goods and services registering on the marketplace select from a list of categories to describe their wares. Applications can use this information to create picklists or otherwise search the marketplace for specific, relevant categories of suppliers.

Compliance Manifest

Approval document associated with requests, proposals, and purchases. Requestors complete manifest questionaires based on the policies for specific marketplaces. Approvers receive notifications from the marketplace alerting them to pending compliance manifest approvals. Approvers can elect to Approve, Deny, Delegate, or Cancel a request for approval.

Dynamic Form

A custom form used to request goods and services, inform compliance, or structure proposals in the case of a provider.

Dynamic List

Dynamic Lists provide a means to support custom lists in the platform. Companies with list of things that they want users to select from during compliance (or whatever step in the system) can use Dynamic Lists to implement these rules.

Event

Any marketplace event. Examples include a submitted request for quotation or proposal, or accepted proposal.

Organization

A client company that uses the marketplace to request, approve, and procure goods and services. By contrast Providers refer to suppliers of goods and survices on the marketplace.

Proposal

A providers response to a Request is a proposal. A proposal is attached to a Quoted Ware which is itself associated with the corresponding Quote Group.

Provider

A supplier or vendor of goods and services.

Provider-Ware

A set of 1 or more wares associated with a provider.

Quote Group

A collection of 1 or more requests for quotation for a specific set of goods and services. Visible to the requesting client organization.

Marketplace "quote groups" refer to the customer view of a request for quote for wares. By contrast, a quoted ware represents the provider view of the similar information.

Quoted Ware

A collection of 1 or more responses or proposals submitted on behalf of a provider in response to a request from a client. Visible to the provider submitting the quote(s).

Marketplace "quoted wares" refer to provider view of a request for goods and services initiated by a client on the system. By contrast, a quote group represents the client view of similar information.

Request

A request for goods and services on the system resulting in a Quote Group

Requestor

A user who initiates a request for goods and services.

Token-User

The user account connected to the authorization token granting access to the API.

User

An authorized user on the system who is a member of either a Provider or client Organization on the marketplace.

Wares

A collection of goods and services available for sale via the marketplace.

Ware-Provider

A set of 1 or more providers associated with a ware.

Webhook

A URL accepting a request and data from the marketplace in response to an event occurring on the marketplace. See Webhooks.

Webhooks

Webhooks provide a way for application developers to register http request callbacks and implement their own business logic for Marketplace Events. Examples of webhook events and associated webhook actions are:

For a complete list of webhook events, see Marketplace Events

An example JSON POST body:
{
    email: "email",
    subject: "subject string",
    subdomain: "subdomain",
    url: "url",
    quote_group_description_html: "html_description",
    quote_group_description_text: "description",
    compliance_type: "type",
    identifier: "identifier",
    vendor_identifier: "vendor_identifier",
    quote_group_id: "quote_group_id",
    quoted_ware_id: "quoted_ware_id",
    provider_rfi_annotation_status: "status",
    provider_rfi_annotation_badge_type: "badge_type",
    proposal_id: "proposal_id",
    purchase_order_id: "purchase_order_id",
    compliance_manifest_id: "compliance_manifest_id",
    multipage_form_id: "multipage_form_id",
    multipage_form_name: "multipage_form_name",
    multipage_form_expires_on: "multipage_form_expires_on",
    approval_id: "approval_id",
    note_id: "note_id",
    provider_id: "provider_id",
    provider_name: "provider_name",
    title: "title",
    action_performed: "action_performed",
    action_performed_human: "action_performed_human",
    marketplace: "marketplace",
    html_description: "html_description",
    text_description: "text_description",
    body: "string reason for cancelling or other attachments",
    template_name: "email_template",
    attachments: "attached_pdfs"
}

Developers configuring webhooks must implement the corresponding callback server POST request corresponding to url provided to the webhook. The json body supplied with the callback provides the complete context of the triggered event.

The Scientist.com server relies on the host server handling the webhook POST request to authenticate the POST request and to verify the ligitimacy of the webhook. One approach is to use Basic authentication configured on the webhook URL. Another approach is to supply a key and verify it using the params key/value hash provided when instantiating the webhook. To avoid unneccessary privacy exposures, we strongly recommend you host your application using SSL encryption.

Marketplace Events

Marketplace events are used by the notification engine to trigger notifications that certain events are happening which may require their involvement. See Webhook Configuration for details on configuring webhooks.

Webhooks can be registered for specific events or all events See Marketplace Events for details. Once a webhook is registered, whenever an event occurs, the marketplace engine will initiate a POST request to the supplied URL with a payload describing the Quoted Ware in the case of a Provider user, or a Quote Group in the case of a Client user. In addition, the webhook can be configured to deliver known key/values to the callback server which can be used to verify the legitimacy of the callback.

Eligible webhook events depend on the user status on the marketplace for the associated Authorization Code.

Event Category Event Tag
approver approval_requested
compliance_manifest_approved_by
user_legal_obligation_changed
customer added_as_follower
amendment_submitted
approval_requested
cancelled_request
complete
compliance_manifest_approved_by
compliance_submitted
estimate_submitted
invoice_submitted
proposal_compliance_approved
proposal_compliance_denied
request_compliance_required
resumed
signature_requested
signature_voided
signing_complete
sow_accepted_for_external_purchase
sow_accepted
sow_submitted
timeline_post_added
unapproved_for_payment
internal_timeline_post_added
wip_timeline_post_added
user_legal_obligation_changed
work_started
customer_follower added_as_follower
amendment_submitted
approval_requested
cancelled_request
complete
compliance_manifest_approved_by
compliance_submitted
estimate_submitted
proposal_compliance_approved
proposal_compliance_denied
request_compliance_required
resumed
signature_requested
signature_voided
signing_complete
sow_accepted_for_external_purchase
sow_accepted
sow_submitted
timeline_post_added
internal_timeline_post_added
wip_timeline_post_added
user_legal_obligation_changed
work_started
site_rep amendment_submitted
cancelled_request
complete
compliance_manifest_approved_by
estimate_submitted
legal_documents_challenged
new_request
proposal_compliance_approved
proposal_compliance_denied
request_compliance_approved
request_updated_proposal
request_sent_to_vendors
resumed
rfi_badged
signature_requested
signature_voided
signing_complete
sow_accepted_for_external_purchase
sow_accepted
sow_requested
sow_submitted
supplier_added
timeline_post_added
internal_timeline_post_added
wip_timeline_post_added
user_legal_obligation_changed
work_started
vendor added_as_follower
cancelled_request
legal_documents_updated
new_request
po_obsoleted
request_updated_proposal
rfi_submitted
signature_requested
signature_voided
sow_requested
supplier_approval_required
timeline_post_added
work_started
vendor_follower added_as_follower
cancelled_request
legal_documents_updated
new_request
po_obsoleted
request_updated_proposal
rfi_submitted
signature_requested
signature_voided
sow_requested
supplier_approval_required
timeline_post_added
work_started

V2 API Endpoints

Action Items

GET https://app.scientist.com/api/v2/action_items.json

The endpoint provides paged access to all action items associated with the token-user. Use the standard per_page and page query parameters to control number of results returned with each request. See Paging and Sorting for more details on paging and sorting.

Filter By Webhook Name

GET https://app.scientist.com/api/v2/action_items.json?name=Webhook+Config+Name

It is possible for a webhook configuration to declare notification only on certain events. In that case the requestor can use the URL query string the ?name=Application Name substituting the name of the webhook configuration for Application Name in this example. By specifying the ?name=Application Name query parameter only events related to the named webhook configuration will be returned in the response.

Approvals

GET https://app.scientist.com/api/v2/compliance_manifests/:uuid/approvals.json

Approval documents are children of Compliance Manifests.

Use the compliance_manifests/:uuid/approvals.json endpoint to fetch the approval_refs associated with a compliance manifest document. This endpoint is an alternative to the /compliance_manifest/:uuid.json endpoint returning the same approval_refs without the additional compliance manifest document detail.

Actions available to compliance manifest approvals include: approve, deny, delegate, and undo.

Approve

PUT https://app.scientist.com/api/v2/compliance_manifests/:approvable_uuid/approvals/:uuid/approve.json
  {"approval": 
    {
      "reason": "my reason"
    }
  }

Approve requests by PUT to the approve.json endpoint with the :approvable_uuid for the compliance manifest and the approval document :uuid. Include a json body document with an approval property containing an object with a reason property describing why the request is approved.

Deny

Deny requests by PUT to the deny.json endpoint with the :approvable_uuid for the compliance manifest and the :uuid of the approval document. Include a json body document with an approval property containing an object with a reason property describing why the request is denied.

PUT  https://app.scientist.com/api/v2/compliance_manifests/:approvable_uuid7/approvals/24107c08-d923-44fd-931/:uuid/deny.json
  {"approval": 
    {
      "reason": "my denial reason"
    }
  }

Delegate

PUT  https://app.scientist.com/api/v2/compliance_manifests/:approvable_uuid7/approvals/24107c08-d923-44fd-931/:uuid/delegate.json
{"approval": {"reassign_approval_to": ["ron@scientist.com"]}}

Delegate request approvals to another eligible approver for the current marketplace by PUT to the delegate.json endpoint with the :approvable_uuid for the compliance manifest and :uuid for the approval document. Include a json body document with an approval property containing an object with an reassign_approval_to property containing an array of email strings.

The endpoint will filter any reassigned emails lacking privilege to complete the approval.

Undo

PUT  https://app.scientist.com/api/v2/compliance_manifests/:approvable_uuid7/approvals/24107c08-d923-44fd-931/:uuid/cancel.json

The '/undo.json` endpoint resets an approval to its original state before the approval was either Denied or Approved. As such this endpoint has no effect on an approval in its initial state.

Undo request approvals by PUT to the undo.json endpoint with the :approvable_uuid for the compliance manifest and :uuid for the approval document.

Categories

GET https://app.scientist.com/api/v2/categories.json

The API V2 /categories.json index endpoint produces a flattened array of categories each with 0 or more ancestor-slugs and a connection to the immediate parent category via parent-slug or parent-uuid.

Categories can have multiple sub-categories. There is no physical limit to the category nesting. Each category, regardless of its place in the hierarchy has a unique slug identifier provided in the response object.

Category Tree

GET https://app.scientist.com/api/v2/categories.json?tree=true

Use the ?tree=true URL query string for compatibility with the API V1 /categories.json endpoint. The response is an array of top level categories, each with one or more children categories. In turn, each child can have 0 or more children in a hierarchical fashion.

A Specific Category

GET http://app.scientist.com/api/v2/categories/:slug.json

Use the slug to request an individual category record.

Compliance Manifests

GET http://app.scientist.com/api/v2/compliance_manifests.json

This endpoint retrieves all compliance manifests visible to the requestor.

The /compliance_manifests.json endpoint responds with a response json with a the first page of compliance manifest documents. The response includes two json properties compliance_manifest_refs and facets. The former is an array of documents you can use to populate your table. The response property facets contains a structured json of search criteria related to the remaining documents available, based on the current value of the search.

See URL Query Parameters for details on paging, sorting and facet searching.

A Specific Compliance Manifest

GET http://app.scientist.com/api/v2/compliance_manifests/;uuid.json

Use the uuid associated with a specific compliance manifest document to retrieve a detailed json response.

The response json will include details of the associated request or quote_group, additional approval documents approval_refs as well as details for associated proposal and purchase_order objects.

Dynamic Forms

GET https://app.scientist.com/api/v2/dynamic_form/:form_id.json

The API has limited functions in relation to dynamic forms. However, dynamic forms are data-driven therefore the API provides some means for reading dynamic forms data from the database for rendering on mobile devices and for archival purposes.

This endpoint retrieves a specific form by its identifier.

Dynamic Lists

GET https://app.scientist.com/api/v2/dynamic_lists.json

Use Dynamic Lists to align internal systems with the marketplace.

A Specific Dynamic List

GET https://app.scientist.com/api/v2/dynamic_lists/:slug.json"

Use the dynamic list :slug to fetch a specific list.

Create A Dynamic List

POST https://app.scientist.com/api/v2/dynamic_lists/:slug.json
 # POST this JSON to the dynamic_lists endpoint
{
  "items": [
    {
      "value": "a",
      "human_readable_value": "A"
    },
    {
      "value": "b",
      "human_readable_value": "B"
    },
    {
      "value": "c",
      "human_readable_value": "C"
    }
  ]
}

Create a named dynamic list in the system by POST to the dynamic_lists endpoint.

Inventory Items

Multiple Items

GET https://app.scientist.com/api/v2/inventory_items.json

The API V2 /inventory_items.json index endpoint returns a page worth of items. This endpoint accepts 2 parameters.

Single Item

GET https://app.scientist.com/api/v2/inventory_items/9136e1b8-1d5c-4abe-93c1-803bd60cd8bb.json

Returns the data for a single item. The item's UUID is required in the URL.

Organizations

GET https://app.scientist.com/api/v2/organizations.json

Access to organizations records on the marketplace is scoped to the requesting users' administrative domain. A non-administrative user can only access their default or current record using the /organizations/default.json or /organizations/current.json endpoints.

Default Organization

GET https://app.scientist.com/api/v2/organizations/default.json

In some cases, a token-user is associated with more than 1 organization. Use the /default.json endpoint to confirm the default organization for the user.

Current Organization

GET https://app.scientist.com/api/v2/organizations/current.json

When a token is created the user must be authenticated for a specific organization. Use the /current.json endpoint to confirm the current organization for the token.

Proposals

GET https://app.scientist.com/api/v2/proposals.json

Returns a paginated list of proposals for the token-user.

A Specific Proposal

GET https://app.scientist.com/api/v2/proposals/1.json

Returns the requested proposal, subject to the token-user authorization.

Providers

GET https://app.scientist.com/api/v2/providers.json

Query providers using the /providers.json endpoint.

The /providers.json request responds with an object containing the first page of suppliers available at provider_refs, and a facets object keyed by the search terms available to refine subsequent provider queries.

Use the facets values in the response to request relevant lists of providers. See URL Query Parameters for details on API query parameters, paging, sorting and facet filtering.

A Specific Provider

GET https://app.scientist.com/api/v2/providers/:slug.json

Each provider is indexed uniquely by the id or slug found in the response object. Use the id or slug to request details for a spcific provider. The server responds with a provider object keyed by provider.

Update A Specific Provider

PUT https://app.scientist.com/api/v2/providers/:slug.json -d"{\
    "name": "A Provider Name",\
    "year_established": "1982",\
    "number_of_employees": "1000",\
    "service_areas": ["biology", "toxicology"],
    "some_other_key": "should be ignored"
}"

Update a provider by PUT to the providers endpoint with a payload of accepted key-values. The server responds with a results hash with either Applied or Ignored if the request update parameter is not recognized or not allowed.

The webhooks PUT accepts the following parameters:

Parameter Type Description
name string Provider name.
website string Provider website.
year_established string Year established.
number_of_employees string Number of employees.
snippet string An short HTML description.
description string An short text description.
phone_number string Phone number.
service_areas array A list of service areas.
laboratories array A list of lab names.
service_areas array A list of service areas.
certifications array A list of certifications.
professional_associations array A list of professional associations.

Provider Associated Wares

GET https://app.scientist.com/api/v2/providers/:provider_id/wares.json

Return an object containing all wares for a specific provider. The wares can be found in the ware_refs property of the response. If there are no provider-ware associations, then the ware_refs is an empty array.

See also Ware Associated Providers

Provider RFI Annotations

GET https://app.scientist.com/api/v2/provider_rfi_annotations.json
GET https://app.scientist.com/api/v2/provider_rfi_annotations.csv

This endpoint retrieves all provider RFI annotations. Specify .csv suffix to return a Comma Separated Text file or .json for a standard JSON response object.

Quote Groups

GET https://app.scientist.com/api/v2/quote_groups/mine.json

Use /quote_groups.json to request the first page of quote group documents visible to the requestor.

Query quote groups using the /quote_groups.json endpoint. In addition to the basic get all and get specific requests, application developers can use facet search facilities to fetch requests. See URL Query Parameters for details on API query parameters and facet searching.

A Quote Group

GET https://app.scientist.com/api/v2/quote_groups/:quote_group_id.json

This endpoint retrieves quote groups associated with a specific quote group identifier. Each quote group is indexed uniquely by the id found in the /quote_groups.json response object. Use id to request a spcific quote group.

Create Note

Owners of quote group records can amend a quote group with a note using the POST verb to the /quote_group/:id/notes.json endpoint.

POST https://app.scientist.com/api/v2/quote_groups/:quote_group_id/notes.json
  {
      "note": {
        "title": "some title text",
        "body": "note body text",
      }
  }

Internal Messages

The API allows you to fetch arrays of documents attached to Quote Groups including Internal Messages, Compliance Manifests and Participating Providers.

GET https://app.scientist.com/api/v1/quote_groups/:quote_group_id/internal_messages.json

Internal Messages returns and array of notes attached to the Quote Group.

Compliance Manifests

GET http://app.scientist.com/api/v1/quote_groups/:quote_group_id/compliance_manifest.json

Returns and array of compliance manifests attached to the Quote Group.

Participating Provider

GET http://app.scientist.com/api/v1/quote_groups/:quote_group_id/participating_provider.json

Returns the last of provider attached presenting a proposal attached to the Quote Group.

Quoted Wares

GET https://backoffice.scientist.com/api/v2/quoted_wares.json

Returns all quoted wares associated with the requesting user. The server responds with an object containing the first page of quoted wares and a facets object. See URL Query Parameters for details on API query parameters and facet searching.

Quoted Wares can be filtered by the following facet names:

A Quoted Ware

GET https://app.scientist.com/api/v1/quoted_ware/:id.json

Each quoted ware is indexed uniquely by the id found in the response object returned by the /quoted_ware.json endpoint. Use id to request a specific quoted ware. The server responds with the quoted ware object.

Invoices

GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/invoices.json
GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/invoices/:id.json

The quoted ware collections endpoint responds with an array of the requested Invoice. Fetch individual documents by appending the the appropriate identifier to the endpoint.

Proposals

GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/proposals.json
GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/proposals/:id.json

The quoted ware collections endpoint responds with an array of the requested Proposals. Fetch individual documents by appending the the appropriate identifier to the endpoint.

Purchase Orders

GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/purchase_orders.json
GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/purchase_orders/:id.json

The quoted ware collections endpoint responds with an array of the requested Purchase Orders. Fetch individual documents by appending the the appropriate identifier to the endpoint.

Messages

{
    "supplier_name": "Grimes Group--4",
    "message_count": 0,
    "quote_group_identifier": "B8A3ED",
    "older_messages_count": null,
    "all_messages": []
}
GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/messages.json

Fetch Messages attached to Quoted Wares.

Payment Documents

GET https://app.scientist.com/api/v2/quoted_wares/:quoted_ware_id/payment_documents.json

Fetch Payment Documents attached to Quoted Wares.

Users

Users can be members of a Provider or Organization on the marketplace.

GET https://app.scientist.com/api/v2/users.json

A request to /users.json returns an object with an array of users found at user_refs and a facets object keyed by the search terms available to query for specific users.

Access to user records on the marketplace is scoped to the requesting users' administrative domain. A non-administrative user can only access his/her own user record. Administrators of a domain can download all user records for that domain.

User records can be searched by facet name/value. See URL Query Parameters for details on API query parameters and facet searching.

Users can be filtered by the following facet names:

Profile

Request details of the user account scoped to your authorization code with /users/profile.json. The server responds with an object keyed by "user".

GET https://app.scientist.com/api/v2/users/profile.json

Wares

GET https://app.scientist.com/api/v2/wares.json

Use the /wares.json endpoint to develop picklists of available services and identify search terms available for querying wares. The /wares.json request responds with an object containing the first page of wares available at ware_refs, and a facets object keyed by the search terms available to refine subsequent provider queries. See URL Query Parameters for details on API query parameters and facet searching.

Wares can be filtered by the following facet names:

GET https://app.scientist.com/api/v2/wares.json?q=peptide,antibody

The /wares.json endpoint allows facet and free text search. Search wares by query string such as ?q=search_term. For example, the term ?q=peptide returns all services relating to peptides. Specify multiple query string values by separating search terms by commas.

Detailed lists of available facet values are returned from the index endpoint /wares.json.

A Specific Ware

GET http://app.scientist.com/api/v2/wares/:id.json

Each ware is indexed uniquely by the id found in the response object. Use the id to request details for a specific ware. The server responds with a ware object keyed by ware.

Ware Associated Providers

The marketplace platform allows for many-to-many relationships between Wares and Providers. The wares-providers endpoint allows API users to query providers associated with specific wares, and wares associated to specific providers.

GET https://app.scientist.com/api/v2/wares/:ware_id/providers.json

Return an object containing all providers for a specific ware. The wares can be found in the provider_refs property of the response. If there are no ware-provider associations, then the provider_refs is an empty array.

API users with proper credentials can create and remove wareprovider associations using the POST and DELETE verbs for this endpoint.

See also Provider Associated Wares

Create Ware Provider Association

POST https://app.scientist.com/api/v2/wares/2291/providers/2074.json

Create associations between specific :ware_id and :provider_id with a POST to the /ware/:ware_id/provider/:provider_id endpoint.

Remove Ware Provider Association

DELETE https://app.scientist.com/api/v2/wares/2291/providers/2074.json

Remove associations between specific :ware_id and :provider_id with DELETE at the /ware/:ware_id/provider/:provider_id endpoint.

Webhooks

See Webhooks and Marketplace Events for a high level overview of role of webhooks in the API.

Create

PUT http://app.scientist.com/api/v2/webhook_config.json -d"{\
      "name": "My hook2.",\
      "url": "https://app.client.com/my_callback1",\
      "params": {"key":"value}"},\
      "something_else": "should be igored.",\
      "events": {"all_events": true}}"

A PUT to the /webhook_config.json endpoint creates or updates the webhook configuration. The server responds with a json object keyed by results containing the results of the operation.

The webhooks PUT accepts the following parameters:

Parameter Type Description
name string User defined name for the web hook.
url string Host URL callback accepting a POST request from the marketplace server.
content_type string Content type for the callback (default: "application/json").
active boolean Status of this webhook. If false then hook will not execute (default: true).
all_events boolean Triggers webhook callback on ANY event when true (default: true).
params json object Parameters to include in the body when the host callback occurs.
events json object A hash of boolean key/values to configure webhooks only on specific events.

Update

Updating and creating use the same endpoint, method, and parameters. Refer to Create a Webhook for details.

Delete

DELETE http://app.scientist.com/api/v2/webhook_config.json

To remove a webhook issue a DELETE request to the /webhook_config.json endpoint. Recall that the webhook configuration is bound to the access_token and associated application.

V1 API Endpoints

Categories

GET https://app.scientist.com/api/v1/categories.json

Suppliers of goods and services (aka "Providers") registering on the marketplace select from a list of categories to describe their offerings or "Wares". Applications can use this information to create picklists or otherwise search the marketplace for specific, relevant categories of suppliers.

The API V1 /category.json endpoint returns an array of top level categories, each with one or more children categories. In turn, each child can have 0 or more children in a hierarchical fashion.

Categories can have multiple sub-categories. There is no physical limit to the category nesting. Each category, regardless of its place in the hierarchy has a unique slug identifier provided in the response object.

A Specific Category

GET https://app.scientist.com/api/v1/categories/:slug.json

Use the :slug to request an individual category record.

Organizations

GET https://app.scientist.com/api/v1/organizations.json

Whereas Providers refer to suppliers of goods and survices on the marketplace, Organizations represent client organizations who request and purchase goods and services.

A non-administrative user can only access their default or current record using the /organizations/default.json or /organizations/current.json endpoints. Access to organizations records on the marketplace is scoped to the requesting users' administrative domain.

Default Organization

GET https://app.scientist.com/api/v1/organizations/default.json

In some cases, a token-user is associated with more than 1 organization. Use the /default.json endpoint to confirm the default organization for the user.

Current Organization

GET https://app.scientist.com/api/v1/organizations/current.json

When a token is created the user must be authenticated for a specific organization. Use the /current.json endpoint to confirm the current organization for the token.

Providers

GET https://app.scientist.com/api/v1/providers.json

Query providers using the /providers.json endpoint.

The /providers.json request responds with an object containing the first page of suppliers available at provider_refs, and a facets object keyed by the search terms available to refine subsequent provider queries.

Use the facets values in the response to request relevant lists of providers. See URL Query Parameters for details on API query parameters, paging, sorting and facet filtering.

A Specific Provider

GET https://app.scientist.com/api/v1/providers/:slug.json

Each provider is indexed uniquely by the id or slug found in the response object. Use the id or slug to request details for a spcific provider. The server responds with a provider object keyed by provider.

Provider Associated Wares

GET https://app.scientist.com/api/v1/providers/:provider_id/wares.json

Return an object containing all wares for a specific provider. The wares can be found in the ware_refs property of the response. If there are no provider-ware associtions, then the ware_refs is an empty array.

See also Ware Associated Providers

Quote Groups

GET https://app.scientist.com/api/v1/quote_groups/mine.json

Use /quote_grops/mine.json to request the first page quote groups associated with the requesting user. The server responds with an object containing the first page of quote groups and a facets object. See URL Query Parameters for details on API query parameters and facet searching.

Quote Groups can be filtered by the following facet names:

A Quote Group

GET https://app.scientist.com/api/v1/quote_groups/:quote_group_id.json

This endpoint retrieves quote groups associated with a specific quote group identifier. Each quote group is indexed uniquely by the id found in the /quote_groups/mine.json response object. Use id to request a spcific quote group.

Notes

Owners of quote group records can amend a quote group with a note using the POST verb to the /quote_group/:id/add_note.json endpoint.

POST https://app.scientist.com/api/v1/quote_groups/:quote_group_id/add_note.json
  {
      "note": {
        "title": "some title text",
        "body": "note body text",
      }
  }

Quoted Wares

GET https://app.scientist.com/api/v1/quoted_wares.json

Returns all quoted wares associated with the requesting user. The server responds with an object containing the first page of quoted wares and a facets object. See URL Query Parameters for details on API query parameters and facet searching.

Quoted Wares can be filtered by the following facet names:

A Quoted Ware

GET https://app.scientist.com/api/v1/quoted_ware/9.json

Each quoted ware is indexed uniquely by the id found in the response object returned by the /quoted_ware.json endpoint. Use id to request a specific quoted ware. The server responds with the quoted ware object.

Users

Users can be members of a Provider or Organization on the marketplace.

GET https://app.scientist.com/api/v1/users.json

A request to /users.json returns an object with an array of users found at user_refs and a facets object keyed by the search terms available to query for specific users.

Access to user records on the marketplace is scoped to the requesting users' administrative domain. A non-administrative user can only access his/her own user record. Administrators of a domain can download all user records for that domain.

User records can be searched by facet name/value. See URL Query Parameters for details on API query parameters and facet searching.

Users can be filtered by the following facet names:

Profile

Request details of the user account scoped to your authorization code with /users/profile.json. The server responds with an object keyed by "user".

GET https://app.scientist.com/api/v1/users/profile.json

Wares

GET https://app.scientist.com/api/v1/wares.json

Use the /wares.json endpoint to develop picklists of available services and identify search terms available for querying wares. The /wares.json request responds with an object containing the first page of wares available at ware_refs, and a facets object keyed by the search terms available to refine subsequent provider queries. See URL Query Parameters for details on API query parameters and facet searching.

Wares can be filtered by the following facet names:

GET https://app.scientist.com/api/v1/wares.json?q=peptide,antibody

The /wares.json endpoint allows facet and free text search. Search wares by query string such as ?q=search_term. For example, the term ?q=peptide returns all services relating to peptides. Specify multiple query string values by separating search terms by commas.

Detailed lists of available facet values are returned from the index endpoint /wares.json.

A Specific Ware

GET http://app.scientist.com/api/v1/wares/:id.json

Each ware is indexed uniquely by the id found in the response object. Use the id to request details for a specific ware. The server responds with a ware object keyed by ware.

Ware Associated Providers

The marketplace platform allows for many-to-many relationships between service offerings (Wares) and suppliers of goods and services (Providers). The wares-providers endpoint allows API users to query providers associated with specific wares, and wares associated to specific providers.

GET https://app.scientist.com/api/v1/wares/:ware_id/providers.json

Return an object containing all providers for a specific ware. The wares can be found in the provider_refs property of the response. If there are no ware-provider associations, then the provider_refs is an empty array.

API users with proper credentials can create and remove ware-provider associations using the POST and DELETE verbs for this endpoint.

See also Provider Associated Wares

Create Ware Provider Association

POST https://app.scientist.com/api/v1/wares/2291/providers/2074.json

Create associations between specific :ware_id and :provider_id with a POST to the /ware/:ware_id/provider/:provider_id endpoint.

Remove Ware Provider Association

DELETE https://app.scientist.com/api/v1/wares/2291/providers/2074.json

Remove associations between specific :ware_id and :provider_id with DELETE at the /ware/:ware_id/provider/:provider_id endpoint.

The server responds with the following for duplicate deletions:

{
    "message": "Provider is not published.",
    "code": "unprocessable_entity"
}

URL Query Parameters

Paging and Sorting

Certain #index endpoints for example /providers.json, /quote_groups.json provide means for pagination and search. The table below shows the paging, sorting, and form of faceted querying provided by the API.

Parameter Default Description
page 1 When there are more results than can fit on a single page, you can retrieve different pages by changing this parameter.
per_page 25 You can change the number of results returned per request by changing this parameter.
sort_by nil (relevance) You can change the order in which results are returned. This orders the entire result set, not just the current page.
sort_order 1 Change the direction of the result set.
facets nil You can refine the result set by specifying facet values. See Facet Search for more information.

An example free text search query string finds all providers with "antibody" keyword associated to their description.

GET http://app.scientist.com/api/v2/provider.json?q=antibody

Free text searches of provider records can be used to generate lists of relevant providers.

A snippet of the "facets" object returned from a providers search request:

{"facets": {
    "starts_with": {
        "doc_count": 17683,
        "doc_count_error_upper_bound": 0,
        "sum_other_doc_count": 0,
        "buckets": [
            {
                "key": "a",
                "doc_count": 1821
            },
            {
                "key": "u",
                "doc_count": 1770
            }
        ]
    },
    "type_of_company_description": {
        "doc_count": 17683,
        "doc_count_error_upper_bound": 0,
        "sum_other_doc_count": 0,
        "buckets": [
            {
                "key": "Small Business (1-10M TTM Revenue)",
                "doc_count": 11786
            },
            {
                "key": "Academic Core Facility",
                "doc_count": 3895
            },
            {
                "key": "New Startup (0-1M TTM Revenue)",
                "doc_count": 1207
            },
            {
                "key": "Mid-Sized Business (10-100M TTM Revenue)",
                "doc_count": 583
            },
            {
                "key": "Large Business (>100M TTM Revenue)",
                "doc_count": 109
            },
            {
                "key": "Consultant",
                "doc_count": 49
            }
        ]
    }
}}

If the response object for the request includes an object keyed by facets, you can use that information to inform a subsequent query. The keys for this object are the available facet names you can use to construct further queries to refine your results. Each facet key provides an object with information about the facet in the database.

The buckets property value holds an array of objects with valid facet_value strings provided in the key field. Use this string as the value argument to your faceted search queries.

Note that While the facet name/value parameters are different depending on the endpoint, the form of query and pagination parameters are consistent across endpoints.

Single Facet Filter

To find providers of type type_of_company_description=Consultant, you would use the following query string:

GET https://app.scientist.com/api/v2/providers.json?facets[type_of_company_description][]=Consultant

Use the response detail from prior requests to inform your facet search filter.

Multiple Facets Filtering

Returns all providers whose names start with "a" or "u".

GET https://app.scientist.com/api/v2/providers.json?facets[starts_with][]=a&facets[starts_with][]=u

Requests can include multiple name/value pairs.

Errors

The API uses the following error codes:

Error Code Meaning
401 Unauthorized -- Your authorization code is lacking permission.
403 Forbidden -- You are authorization code does not allow this operation.
404 Not Found -- The requested record could not be found.
422 Unprocessable Entity -- Something about the request could not be handled.
500 Internal Server Error -- We had a problem with our server. Try again later.