Skip to content

Commit

Permalink
Merge pull request #867 from fedspendingtransparency/staging
Browse files Browse the repository at this point in the history
Sprint 67 Prod deploy: Staging -> Master
  • Loading branch information
kwhickey authored Aug 9, 2018
2 parents 8eab9c9 + 940b93a commit b418ab0
Show file tree
Hide file tree
Showing 68 changed files with 1,724 additions and 331 deletions.
155 changes: 116 additions & 39 deletions api_contracts/contracts/recipient/RecipientProfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,61 @@ HOST: https://api.usaspending.gov

These endpoints are used to power USAspending.gov's recipient profile pages. This data can be used to visualize the government spending that pertains to a specific recipient.

# Group Landing Page

This endpoint supports the recipient landing page, which provides a list of all recipients for which individual profile pages are available on USAspending.gov.

## List Recipients [/api/v2/recipient/duns/]

This endpoint returns a list of recipients, their level, DUNS, and amount.

+ Parameters
+ order: desc (optional, string)
The direction results are sorted by. `asc` for ascending, `desc` for descending.
+ Default: desc
+ sort: amount (optional, string)
The field results are sorted by.
+ Default: amount
+ Members
+ name
+ duns
+ amount
+ limit: 50 (optional, number)
The number of results to include per page.
+ Default: 50
+ page: 1 (optional, number)
The page of results to return based on the limit.
+ Default: 1
+ keyword: (optional, string)
The keyword results are filtered by. Searches on name and DUNS.
+ award_type: all (optional, string)
The award type results are filtered by.
+ Default: all
+ Members
+ all
+ contracts
+ grants
+ loans
+ direct_payments
+ other

### List Recipients [POST]

+ Response 200 (application/json)
+ Attributes (RecipientsListResponse)

# Group Profile Page

These endpoints support the individual Recipient Profile pages that display data for a specific DUNS.

## Recipient Overview [/api/v2/recipient/duns/{duns}/{?year}]
## Recipient Overview [/api/v2/recipient/duns/{recipient_id}/{?year}]

This endpoint returns a high-level overview of a specific recipient, given its DUNS.
This endpoint returns a high-level overview of a specific recipient, given its id.

+ Parameters
+ duns: 0123456 (required, string)
Recipient's DUNS (Data Universal Numbering System) number. A unique identifier for business entities.
+ year: 2017 (optional, string)
+ `recipient_id`: `0036a0cb-0d88-2db3-59e0-0f9af8ffef57-C` (required, string)
A unique identifier for the recipient at a specific level (parent, child, or neither).
+ year: `2017` (optional, string)
The fiscal year you would like data for. Use `all` to view all time or `latest` to view the latest 12 months.

### Get Recipient Overview [GET]
Expand All @@ -29,9 +72,9 @@ This endpoint returns a high-level overview of a specific recipient, given its D
This endpoint returns a list of child recipients belonging to the given parent recipient DUNS.

+ Parameters
+ duns: 0123456 (required, string)
Recipient's DUNS (Data Universal Numbering System) number. A unique identifier for business entities.
+ year: 2017 (optional, string)
+ duns: `001006360` (required, string)
Parent recipient's DUNS.
+ year: `2017` (optional, string)
The fiscal year you would like data for. Use `all` to view all time or `latest` to view the latest 12 months.

### Get Recipient Children [GET]
Expand All @@ -41,63 +84,97 @@ This endpoint returns a list of child recipients belonging to the given parent r

# Data Structures

## RecipientsListResponse (object)
+ page_metadata (PageMetaDataObject)
+ results (array[RecipientListing], fixed-type)

## RecipientListing (object)
+ name: The ABC Corporation (required, string, nullable)
Name of the recipient. `null` when the name is not provided.
+ duns: `001006360` (required, string, nullable)
Recipient's DUNS (Data Universal Numbering System) number. `null` when no DUNS is provided.
+ id: `0036a0cb-0d88-2db3-59e0-0f9af8ffef57-C` (required, string)
A unique identifier for the recipient at this `recipient_level`.
+ amount: 30020000000 (required, number)
The aggregate monetary value of all transactions associated with this recipient for the trailing 12 months.
+ `recipient_level`: C (required, string)
A letter representing the recipient level. `R` for neither parent nor child, `P` for Parent Recipient, or `C` for child recipient.
+ Members
+ R
+ P
+ C

## PageMetaDataObject (object)
+ page: 1 (required, number)
The page number.
+ limit: 50 (required, number)
The number of results per page.
+ total: 101 (required, number)
The total number of results (all pages).

## RecipientOverview (object)
+ name: The ABC Corporation (required, string)
Name of the recipient.
+ duns: 0123456 (required, string)
Recipient's DUNS (Data Universal Numbering System) number. A unique identifier for business entities.
+ parent_name: The XYZ Corporation (required, string, nullable)
Parent recipient's name. Null if the recipient does not have a parent recipient.
+ parent_duns: 0987654 (required, string, nullable)
Parent recipient's DUNS number. Null if the recipient does not have a parent recipient.
+ name: The ABC Corporation (required, string, nullable)
Name of the recipient. `null` when the name is not provided.
+ duns: `001006360` (required, string, nullable)
Recipient's DUNS (Data Universal Numbering System) number. `null` when no DUNS is provided.
+ `recipient_id`: `0036a0cb-0d88-2db3-59e0-0f9af8ffef57-C` (required, string)
A unique identifier for the recipient.
+ `parent_name`: The XYZ Corporation (required, string, nullable)
Parent recipient's name. `null` if the recipient does not have a parent recipient.
+ `parent_duns`: `001006361` (required, string, nullable)
Parent recipient's DUNS number. `null` if the recipient does not have a parent recipient, or the parent recipient's DUNS is not provided.
+ `parent_id`: `0036a0cb-0d88-2db3-59e0-0f9af8ffef57-P` (required, string, nullable)
A unique identifier for the parent recipient. `null` if the recipient does not have a parent recipient.
+ location: (required, RecipientLocation, fixed-type)
+ business_types: Corporate Entity, For Profit Organization (required, array[string], fixed-type)
An array of business types used to categorize recipients.
+ total_transaction_amount: 30020000000 (required, number)
+ `business_types`: `minority_owned_business`, `for_profit_organization` (required, array[string], fixed-type)
An array of business type field names used to categorize recipients.
+ `total_transaction_amount`: 30020000000 (required, number)
The aggregate monetary value of all transactions associated with this recipient for the given time period.
+ total_transactions: 327721 (required, number)
+ `total_transactions`: 327721 (required, number)
The number of transactions associated with this recipient for the given time period.
+ recipient_level: P (required, string)
+ `recipient_level`: C (required, string)
A letter representing the recipient level. `R` for neither parent nor child, `P` for Parent Recipient, or `C` for child recipient.
+ Members
+ R
+ P
+ C

## RecipientLocation (object)
+ address_line1: 123 Sesame St (required, string, nullable)
+ `address_line1`: 123 Sesame St (required, string, nullable)
The first line of the recipient's street address.
+ address_line2: (optional, string)
+ `address_line2`: (required, string, nullable)
Second line of the recipient's street address.
+ address_line3: (optional, string)
+ `address_line3`: (required, string, nullable)
Third line of the recipient's street address.
+ foreign_province: (optional, string)
+ `foreign_province`: (required, string, nullable)
Name of the province in which the recipient is located, if it is outside the United States.
+ city_name: McLean (required, string, nullable)
+ `city_name`: McLean (required, string, nullable)
Name of the city in which the recipient is located.
+ county_name: (optional, string)
+ `county_name`: (required, string, nullable)
Name of the county in which the recipient is located.
+ state_code: VA (optional, string)
+ `state_code`: VA (required, string, nullable)
Code for the state in which the recipient is located.
+ zip: 22102 (optional, string)
+ zip: `22102` (required, string, nullable)
Recipient's zip code (5 digits)
+ zip4: (optional, string)
+ zip4: (required, string, nullable)
Recipient's zip code (4 digits)
+ foreign_postal_code: (optional, string)
+ `foreign_postal_code`: (required, string, nullable)
Recipient's postal code, if it is outside the United States.
+ country_name: (required, string, nullable)
+ `country_name`: (required, string, nullable)
Name of the country in which the recipient is located.
+ country_code: USA (required, string, nullable)
+ `country_code`: USA (required, string, nullable)
Code for the country in which the recipient is located.
+ congressional_code: 05 (optional, string)
+ `congressional_code`: `05` (required, string, nullable)
Number for the recipient's congressional district.

## ChildRecipient (object)
+ name: Child of ABC Corporation (required, string)
Name of the child recipient.
+ duns: 345678 (required, string)
Child recipient's DUNS.
+ state_province: New Jersey (required, string)
+ name: Child of ABC Corporation (required, string, nullable)
Name of the child recipient. `null` if the child recipient's name is not provided.
+ duns: `001006360` (required, string, nullable)
Child recipient's DUNS. `null` if the child recipient's DUNS is not provided.
+ `recipient_id`: `0036a0cb-0d88-2db3-59e0-0f9af8ffef57-C` (required, string)
A unique identifier for the child recipient.
+ `state_province`: New Jersey (required, string, nullable)
The state or province in which the child recipient is located.
+ amount: 300200000 (required, number)
The aggregate monetary value of transactions associated with this child recipient for the selected time period.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-import": "^2.1.0",
"eslint-plugin-jasmine": "^2.2.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-jsx-a11y": "^6.1.1",
"eslint-plugin-react": "7.5.1",
"extract-text-webpack-plugin": "^2.1.2",
"file-loader": "^0.11.2",
Expand Down
1 change: 1 addition & 0 deletions src/_scss/components/_pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@include display(flex);
@include flex-direction(row);
@include justify-content(flex-end);

@include flex(1 1 auto);
list-style-type: none;
margin: 0;
Expand Down
14 changes: 14 additions & 0 deletions src/_scss/pages/bulkDownload/form/downloadForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@
@import "fyPicker";
}
}

.download-filter__content-note {
font-style: italic;
font-size: rem(14);
line-height: rem(18);

&:first-of-type {
margin-top: rem(10);
}
}

.download-filter__content-note_bold {
font-weight: 600;
}
.download-checkbox {
padding: rem(10) 0;
input {
Expand Down
Loading

0 comments on commit b418ab0

Please sign in to comment.