Skip to content

Commit

Permalink
Merge pull request #392 from GSA/apidocs-systemsintegration-05312019
Browse files Browse the repository at this point in the history
Merging to production at team request.
  • Loading branch information
Ryan Day authored Oct 31, 2019
2 parents b714e4c + fbb0c4e commit c38c260
Show file tree
Hide file tree
Showing 5 changed files with 780 additions and 1,069 deletions.
53 changes: 44 additions & 9 deletions _apidocs/get-opportunities-public-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ banner-heading: Beta.SAM.Gov Get Opportunities Public API

## Overview

Get Opportunities API provides all the published opportunity details based on the request parameters. This API supports pagination as needed. If pagination is requested, then the response will be provided to users synchronously else the call will be asynchronous.
Get Opportunities API provides all the published opportunity details based on the request parameters. This API supports pagination as needed. If pagination is requested, then the response will be provided to users synchronously, else the call will be asynchronous.

**This API only provides the latest active version of the opportunity. To view all version of the opportunity, please visit Data Services Section of Beta.Sam.Gov. All active notices in Beta.Sam.Gov are updated daily and all archived notices are updated on a weekly basis.**

Active Opportunities: https://beta.sam.gov/data-services?domain=Contract%20Opportunities%2Fdatagov

Archived Opportunities: https://beta.sam.gov/data-services?domain=Contract%20Opportunities%2FArchived%20Data

**API Version: v1.0**

Expand Down Expand Up @@ -34,11 +40,10 @@ Request Parameters that API accepts | Description | Mandatory?| Data Type
api_key | Public Key of users | Yes| String
ptype | Procurement Type. Below are the available Procurement Types: <br> u= Justification (J&A) <br>p = Pre solicitation <br>a = Award Notice <br>r = Sources Sought <br>s = Special Notice <br>g = Sale of Surplus Property <br>k = Combined Synopsis/Solicitation <br>i = Intent to Bundle Requirements (DoD-Funded) <br><br> Note: Below services are now retired:<br>f = Foreign Government Standard <br>l = Fair Opportunity / Limited Sources <br> <br>Use Justification (u) instead of fair Opportunity |No |String
solnum| Solicitation Number| No| String
noticeid| Notice ID | No | String
title| Title| No |String
description| Description| No| String
postedFrom | Posted date From <br>Format must be MM/dd/yyyy <br> Note: Date range between Posted Date From and To is 1 year |Yes| String
postedTo| Posted date To Format must be MM/dd/yyyy <br> Note: Date range between Posted Date From and To is 1 year |Yes |String
status | Status of record. Must be one of Active/Inactive/Both <br> Default status: Active |No| String
deptname | Department Name (L1) |No| String
subtier| Agency Name (L2)| No| String
state| Place of Performance (State)| No |String
Expand Down Expand Up @@ -81,12 +86,41 @@ award| Award Information (If Available): <br> Award amount <br>Awardee <br> Awar
pointofContact| Point of Contact Information. It can have below fields if available: <br> Fax <br>Type<br> Email <br>Phone<br> Title<br> Full name |JSON
description| A link to an opportunity description. <br>Note: To download the description, user should append the public API Key. If no description is available then, user is shown an error message “ Description not found”| String
organizationType| Type of an organization – department/sub-tier/office| String
officeAddress| Office Mailing Address| String
placeOfPerformance| Place of performance information. It can have below fields if available:<br>Street Address<br>City (City code & Name)<br> State (State Code Only)<br>Country (Country Code Only)<br>Zip| JSON
officeAddress| Office Address Information. It can have below fields if available: <br> City<br> State<br>Zip| String
placeOfPerformance| Place of performance information. It can have below fields if available: Street<br> City<br> State<br>Zip| JSON
additionalInfoLink| Any additional info link if available for the opportunity |String
uiLink |Direct UI link to the opportunity. To view the opportunity on UI, user must have either a contracting officer or a Contracting Specialist role. If user hits the link without logging in, user is directed to 404 not found page | String
links |Every record in a response has this links array consisting of: <br> rel: self<br>href: link to the specific opportunity itself. User should provide an API key to access the opportunity directly<br><br>Also, every response has a master links array consisting of:<br> rel: self<br>href: link to the actual request. User should provide an API key to access the request| Array

### Set-Aside Values
Several methods pertaining to submitting Contract Opportunities involve the Set-Aside Type field. Use the Set-Aside codes to submit notices.

Only one Set-Aside value is accepted in the field at this time

Refer below table for valid Set-Aside values:

Code | SetAside Values
-----|-----------------
SBA | Total Small Business Set-Aside (FAR 19.5)
SBP | Partial Small Business Set-Aside (FAR 19.5)
8A | 8(a) Set-Aside (FAR 19.8)
8AN | 8(a) Sole Source (FAR 19.8)
HZC | Historically Underutilized Business (HUBZone) Set-Aside (FAR 19.13)
HZS | Historically Underutilized Business (HUBZone) Sole Source (FAR 19.13)
SDVOSBC | Service-Disabled Veteran-Owned Small Business (SDVOSB) Set-Aside (FAR 19.14)
SDVOSBS | Service-Disabled Veteran-Owned Small Business (SDVOSB) Sole Source (FAR 19.14)
WOSB | Women-Owned Small Business (WOSB) Program Set-Aside (FAR 19.15)
WOSBSS | Women-Owned Small Business (WOSB) Program Sole Source (FAR 19.15)
EDWOSB | Economically Disadvantaged WOSB (EDWOSB) Program Set-Aside (FAR 19.15)
EDWOSBSS | Economically Disadvantaged WOSB (EDWOSB) Program Sole Source (FAR 19.15)
LAS | Local Area Set-Aside (FAR 26.2)
IEE | Indian Economic Enterprise (IEE) Set-Aside (specific to Department of Interior)
ISBEE | Indian Small Business Economic Enterprise (ISBEE) Set-Aside (specific to Department of Interior)
BICiv | Buy Indian Set-Aside (specific to Department of Health and Human Services, Indian Health Services)
VSA | Veteran-Owned Small Business Set-Aside (specific to Department of Veterans Affairs)
VSS | Veteran-Owned Small Business Sole source (specific to Department of Veterans Affairs)


## Examples

### Example 1: Search opportunities for the given date
Expand Down Expand Up @@ -375,13 +409,11 @@ Since Opportunities data volume is huge, API works as follows:

Scenario | Error Messages
------| ------
For status, user provides a value apart from Both or Active or InActive.| Invalid Status value. Allowed values are any of Both/Active/InActive
For limit, user provides range beyond 1000.| Limit valid range is 0-1000. Please provide valid input.
For limit or offset, user inputs characters/special characters.| limit/offset must be a positive number.
For postedFrom, postedTo, rdlfrom, rdlto user enters an invalid date format. | Invalid Date Entered. Expected date format is MM/dd/yyyy
User does not provide postedFrom and postedTo values. |PostedFrom and PostedTo are mandatory
User provides more than 1 year of date range for postedFrom and postedTo <br>OR<br>User provides more than 1 year of date range for rdlfrom and rdlto |Date range must be 1 year(s) apart
User provides more than 25 characters for description field. | Description length is limited to 25 characters
User provides invalid API Key| An invalid api_key was supplied
User does not provide any API key |No api_key was supplied
User clicks on the description link available in the response and description content is not available |Description Not Found
Expand All @@ -398,7 +430,10 @@ User clicks on the description link available in the response and description co

Date | Version | Description
------|---------------|---------
5/20 | v1.0 | Base Version
8/6 | v1.1| Format updated
5/20/19 | v1.0 | Base Version
8/6/19 | v1.1| Format Updated
10/17/19 | v1.2| Added Set-Aside Code
10/23/19 | v1.3| Set-Aside Values Updated
10/24/19| v1.4| Office Address Description Updated

<p><small><a href="#">Back to top</a></small></p>
2 changes: 1 addition & 1 deletion _apidocs/opportunities-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3336,4 +3336,4 @@ Date | Version | Description
10/10/2019 | v0.8 | Updated the Set-Aside values with the latest codes


<p><small><a href="#">Back to top</a></small></p>
<p><small><a href="#">Back to top</a></small></p>
Loading

0 comments on commit c38c260

Please sign in to comment.