test(corpus): add acme catalog core fixtures

Add the first sanitized ACME catalog modules used for multi-file real-world corpus coverage.
This commit is contained in:
Mihaela Mihaljevic 2026-06-06 08:03:27 +02:00
parent 6f76f31c88
commit 8184470cd6
97 changed files with 4740 additions and 0 deletions

View File

@ -0,0 +1,11 @@
summary: API approved
value:
{
"id": "356a192b7913b04c54574d18c28d46e6395428ab",
"leadUuid": "39afdb4a-ef26-42ed-a313-e28288f95099",
"leadCreatedAt": "2019-10-10T20:42:06Z",
"eventType": "apiApproved",
"eventCreatedAt": "2019-10-10T20:44:28Z",
"financialInstitutionUuid": "da14e06b-0866-4f02-a3b2-9443501b25b9",
"financialInstitutionName": "LendingClub"
}

View File

@ -0,0 +1,13 @@
summary: offer clicked
value:
{
"id": "da4b9237bacccdf19c0760cab7aec4a8359010b0",
"leadUuid": "4bbb25a6-6fcf-4ed3-88f9-6daacb0f8b33",
"leadCreatedAt": "2019-09-21T11:24:45Z",
"eventType": "offerClicked",
"eventCreatedAt": "2019-09-22T17:44:22Z",
"financialInstitutionUuid": "da14e06b-0866-4f02-a3b2-9443501b25b9",
"financialInstitutionName": "OpenSky®",
"offerUuid": "5243140e-0a98-4301-9b6b-1283a52b857b",
"offerName": "OpenSky® Secured Visa® Credit Card"
}

View File

@ -0,0 +1,24 @@
summary: Aggregated monthly revenue summary
value:
[
{
"leadCreatedAtMin": "2020-01-01",
"leadCreatedAtMax": "2020-02-01",
"leadCount": 500,
"submittedApplicatonCount": 500,
"preApprovedApplicationCount": 300,
"offerClickCount": 100,
"fundedCount": 90,
"totalAttributedRevenue": 3000
},
{
"leadCreatedAtMin": "2020-02-01",
"leadCreatedAtMax": "2020-03-01",
"leadCount": 600,
"submittedApplicatonCount": 400,
"preApprovedApplicationCount": 200,
"offerClickCount": 100,
"fundedCount": 70,
"totalAttributedRevenue": 2000
}
]

View File

@ -0,0 +1,13 @@
type: string
enum:
- leadCreated
- appSubmitted
- apiApproved
- apiRejected
- offerClicked
- applied
- approved
- listed
- opened
- funded
- conversion

View File

@ -0,0 +1,78 @@
type: object
required:
- id
- leadUuid
- leadCreatedAt
- eventType
- eventCreatedAt
properties:
id:
type: string
description: >
A unique identifier for the event.
leadUuid:
type: string
format: uuid
description: >
A unique identifier for the associated lead.
leadCreatedAt:
type: string
format: date-time
description: >
The time that the associated lead was created.
eventType:
$ref: ./eventType.yml
eventCreatedAt:
type: string
format: date-time
description: >
The time that the event occurred.
eventPayout:
type: integer
format: int32
description: >
The payout associated with the event, in cents. Only present for some
events.
eventDollarAmount:
type: integer
format: int32
description: >
The dollar amount associated with event, in cents. Only present for some
events.
financialInstitutionUuid:
type: string
format: uuid
description: >
A unique identifier for the associated financial institution. Only present
for event types associated with financial institutions.
financialInstitutionName:
type: string
description: >
The name of the associated financial institution. This value is subject to
change, so `financialInstitutionUuid` should be used for grouping. Only
present for event types associated with financial institutions.
rateTableUuid:
type: string
format: uuid
description: >
A unique identifier for the associated rate table. Only present for event
types associated with offers.
offerUuid:
type: string
format: uuid
description: >
A unique identifier for the associated offer. Only present for event types
associated with offers.
offerName:
type: string
description: >
A unique identifier for the associated offer. This value is subject to
change, so `offerUuid` should be used for grouping. Only present for event
types associated with offers.
offerProductType:
$ref: ./offerProductType.yml
description: >
The product type for the associated offer. Only present for event
types associated with offers.
offerFirmness:
$ref: ./offerFirmness.yml

View File

@ -0,0 +1,8 @@
type: string
description: >
The firmness of the associated offer. Only present for event types
associated with offers.
enum:
- preSelected
- preQualified
- preApproved

View File

@ -0,0 +1,6 @@
type: string
enum:
- loan
- savings
- creditCard
- special

View File

@ -0,0 +1,108 @@
type: object
required:
- leadCreatedAtMin
- leadCreatedAtMax
- leadCount
- submittedApplicationCount
- preApprovedApplicationCount
- offerClickCount
- fundedCount
properties:
leadCreatedAtMin:
title: Date
type: string
format: date
description: >
The beginning day of the bucket, in the UTC timezone. If data is aggregated by week,
this defaults to the Monday of each week. If aggregated by month, instead this defaults to the
first of each month.
leadCreatedAtMax:
title: Date
type: string
format: date
description: >
The beginning day of the subsequent bucket. By default, this is the day after the leadCreatedAtMin.
If data was requested to be aggregated by week, instead this is 7 days after the leadCreatedAtMin.
If instead by month, this is the first day of the next month of this bucket.
clientTagValue:
title: Client Tag Value
type: string
description: >
The actual value of a client tag key-value pair, used for aggregation.
Only present if a client tag is specified in the query.
creditRating:
title: Credit Rating
type: string
description: >
One of (Fair, Poor, Good, Excellent).
Only present if credit rating is specified as a group by clause
loanPurpose:
title: Loan Purpose
type: string
description: >
Self-reported purpose for a lead for applying to this loan, e.g. taxes, student loan refinancing.
Only present if loan purpose is specified as a group by clause.
referralUrl:
description: >
Url from which a lead was referred. This has only the host, as other url parameters such as utm
will be stripped out.
Only present if referral Url is requested as a group by clause.
leadCount:
title: Leads
type: integer
format: int32
description: >
Sum of all leads for the queried partner and time period, for the loan vertical.
If booked revenue was requested, instead this column indicates the number of leads paid out to the queried partner.
submittedApplicationCount:
title: Submitted Applications
type: integer
format: int32
description: >
Number of leads from the queried partner that submitted an application.
If booked revenue was requested, this number is restricted to just leads that were paid out for.
preApprovedApplicationCount:
title: Approved Count
type: integer
format: int32
description: >
Number of pre-approved applications from the queried partner.
If booked revenue was requested, this number is restricted to just leads that were paid out for.
offerClickCount:
title: Offer Click Count
type: integer
format: int32
description: >
Number of leads that clicked on at least one offer, after pre-approval.
If booked revenue was requested, this number is restricted to just leads that were paid out for.
fundedCount:
title: Funded Count
type: integer
format: int32
description: >
Number of leads funded by an external loan provider.
If booked revenue was requested, this number is restricted to just leads that were paid out for.
totalBookedRevenue:
title: Total Booked Revenue
type: integer
format: int32
description: >
Total revenue to the supply partner in cents (i.e. $1.23 is reported as 123) for a particular bucket.
Booked revenue is considered to be revenue that has actually been paid out.
This column is only present in the response if booked revenue was requested.
totalAttributedRevenue:
title: Total Attributed Revenue
type: integer
format: int32
description: >
Total revenue to the supply partner in cents (i.e. $1.23 is reported as 123) for a particular bucket.
Attributed revenue is considered to be revenue that is projected based on a conversion event,
but may not necessarily have been paid out.
totalUnattributedRevenue:
title: Total Unattributed Revenue
type: integer
format: int32
description: >
Total booked revenue to the supply partner in cents (i.e. $1.23 is reported as 123) for a particular bucket.
Unattributed revenue is revenue that is paid out but can not be attributed to any lead, and therefore funnel
statistics on unattributed revenue behavior would not apply.

View File

@ -0,0 +1,8 @@
type: string
enum:
- day
- week
- month
- creditRating
- loanPurpose
- referralUrl

View File

@ -0,0 +1,4 @@
type: string
enum:
- attributed
- booked

View File

@ -0,0 +1,36 @@
type: object
required:
- offerId
- staticOfferId
- offerClickCount
- loanRevenue
- savingsRevenue
- creditCardRevenue
- otherRevenue
- revenue
properties:
offerId:
type: integer
format: int32
staticOfferId:
type: integer
format: int32
offerClickCount:
type: integer
format: int32
loanRevenue:
type: integer
format: int64
savingsRevenue:
type: integer
format: int64
creditCardRevenue:
type: integer
format: int64
otherRevenue:
type: integer
format: int64
revenue:
type: integer
format: int64
description: Total revenue attributed to the given static offer

View File

@ -0,0 +1,8 @@
type: object
properties:
staticOfferIds:
title: Static Offer IDs
type: array
items:
type: integer
format: int32

View File

@ -0,0 +1,84 @@
openapi: 3.0.3
info:
title: analytics
description: |
Querying for data and making sense of it
version: 1.0.0
contact:
name: Knowledge Team
url: >-
https://example.com/docs/api-team
servers:
- url: 'https://api.example.com/analytics'
description: Prod
- url: 'https://dev-api.example.com/analytics'
description: Dev
components:
x-lint-skip:
- inline-schema-is-scalar
securitySchemes:
oauth:
type: oauth2
flows:
clientCredentials:
tokenUrl: /auth/accessTokens
scopes:
'analytics:report:read': Allows read access to analytics reporting resources
'analytics:report:readAll': Allows read access to all analytics reporting resources
'analytics:revenue:read': Allows read access to analytics revenue resources
'analytics:revenue:readAll': Allows read access to all analytics revenue resources
schemas:
ApiError:
$ref: ../core/schemas/apiError.yml
EventType:
$ref: ./schemas/eventType.yml
LeadEvent:
$ref: ./schemas/leadEvent.yml
OfferProductType:
$ref: ./schemas/offerProductType.yml
RevenueSummary:
$ref: ./schemas/revenueSummary.yml
StaticOfferAttributionSummary:
$ref: ./schemas/staticOfferAttributionSummary.yml
StaticOfferAttributionSummaryRequest:
$ref: ./schemas/staticOfferAttributionSummaryRequest.yml
tags:
- name: Analytics
paths:
/staticOfferAttributionSummaries:
post:
summary: Retrieve attribution summaries for a list of unique static offers
tags:
- Analytics
operationId: StaticOfferAttributionSummariesController.getViaPost
requestBody:
content:
application/json:
schema:
$ref: ./schemas/staticOfferAttributionSummaryRequest.yml
responses:
'200':
description: Attribution summaries retrieved successfully
content:
application/json:
schema:
$ref: ./schemas/staticOfferAttributionSummary.yml
'400':
description: Bad Request
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'401':
description: Not authorized
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
examples:
missingAccessToken:
$ref: ../core/examples/error/missingAccessToken.yml

View File

@ -0,0 +1,86 @@
type: object
required:
- uuid
- productType
- identityHash
- result
- createdAt
- createdBy
properties:
uuid:
type: string
format: uuid
readOnly: true
description: |
A unique identifier for the caclulation.
productType:
type: string
description: |
The product type for the calculation.
identityHash:
type: string
writeOnly: true
description: |
A SHA-256 hash that is unique to the user, based upon PII. The input data
to the hash much be one of the following:
- SSN, email
- SSN, phone number
- SSN, email, phone number
To make the hash, concatenate these attributes together produce the
SHA-256 hash. E.g.:
```
sha256(concat(user.ssn, user.email, user.phoneNumber))
```
If any attribute is missing, or the attributes are not in the specified
order, any potential offer match will fail.
state:
$ref: ../../core/schemas/state-lead.yml
providedCreditRating:
$ref: ../../lead/schemas/providedCreditRating.yml
annualIncome:
type: integer
format: int32
minimum: 0
employmentStatus:
$ref: ../../lead/schemas/employmentStatus.yml
result:
readOnly: true
allOf:
- $ref: ./result.yml
approvalProbability:
type: integer
format: int32
minimum: 1
maximum: 100
readOnly: true
description: |
The likelihood of the specified identity being pre-approved for an offer
for the specified `productType`, expressed as a percentage.
A value of `100` indicates that pre-approved offers exist. In this case,
`rateTableUuid` will be defined.
If the `result` is `inconclusive`, then this will not be
specified.
rateTableUuid:
type: string
format: uuid
readOnly: true
description: |
The UUID of a rate table with existing pre-approved offers
for the specifed identity. Available if and only if the
value of `approvalProbability` is `100`.
createdAt:
type: string
format: date-time
readOnly: true
description: |
When the calculation was performed.
createdBy:
type: string
format: uuid
readOnly: true
description: |
The UUID of the access token that was used to request the calculation.

View File

@ -0,0 +1,87 @@
type: object
required:
- id
- leadUuid
- leadUpdatedAt
- createdAt
- createdBy
properties:
id:
type: integer
format: int64
readOnly: true
description: |
A unique, internal identifier for this resource.
leadUuid:
type: string
format: uuid
email:
type: string
writeOnly: true
ssn:
type: string
writeOnly: true
phone:
type: string
writeOnly: true
dateOfBirth:
type: string
format: date
writeOnly: true
ssnEmailHash:
type: string
readOnly: true
ssnPhoneHash:
type: string
readOnly: true
ssnPhoneEmailHash:
type: string
readOnly: true
lastFourSsnEmailHash:
type: string
readOnly: true
lastFourSsnPhoneHash:
type: string
readOnly: true
lastFourSsnPhoneEmailHash:
type: string
readOnly: true
phoneEmailHash:
type: string
readOnly: true
phoneDobHash:
type: string
readOnly: true
phoneEmailDobHash:
type: string
readOnly: true
emailHash:
type: string
readOnly: true
leadUpdatedAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
readOnly: true
description: |
When the resource was created.
createdBy:
type: string
format: uuid
readOnly: true
description: |
The UUID of the access token that was used to create this resource.
deletedAt:
type: string
format: date-time
readOnly: true
description: |
When the resource was deleted.
deletedBy:
type: string
format: uuid
readOnly: true
description: |
The UUID of the access token that was used to delete this resource.

View File

@ -0,0 +1,10 @@
type: string
enum:
- successful
- inconclusive
description: |
The result of the calculation.
If this value is `successful`, then `approvalProbability` will be
specified. If `inconclusive` then we didn't have enough data to
perform the calculation, and `approvalProbability` will not be specified.

View File

@ -0,0 +1,307 @@
openapi: 3.0.3
info:
title: approval-probability
description: |
Predicts the probability of pre-approval for a user based upon an identity
hash
version: 1.0.0
contact:
name: API Team
url: >-
https://example.com/docs/api-team
servers:
- url: 'https://api.example.com/approvalProbability'
description: Prod
- url: 'https://dev-api.example.com/approvalProbability'
description: Dev
components:
securitySchemes:
oauth:
type: oauth2
flows:
clientCredentials:
tokenUrl: /auth/accessTokens
scopes:
'approval-probability:read': Allows read access to approval-probability resources
'approval-probability:write': Allows write access to approval-probability svc-finance resources
schemas:
ApprovalProbabilityCalculation:
$ref: ./schemas/approvalProbabilityCalculation.yml
EmploymentStatus:
$ref: ../lead/schemas/employmentStatus.yml
ApiError:
$ref: ../core/schemas/apiError.yml
ProvidedCreditRating:
$ref: ../lead/schemas/providedCreditRating.yml
Result:
$ref: ./schemas/result.yml
State:
$ref: ../core/schemas/state-lead.yml
IdentityHash:
$ref: ./schemas/identityHash.yml
tags:
- name: Approval Probability
paths:
/approvalProbabilityCalculations:
post:
summary: Calculate approval probability for a user
description: |
Caclulate the probability of a user getting a pre-approved offer for a
particular product type.
Caclulations are based upon either an irreversible, PII-based identity
hash or non-PII data about the user, or both. As a result, user consent
is not required to run the calculation.
If an identity hash is specified, it's possible that the approval
probability will be calculated to be 100%. This indicates that there are
active offers for the user, for specified product type. If this is the
case, a UUID for a rate table containing those offers will be returned.
tags:
- Approval Probability
operationId: createApprovalProbabilityCalculation
requestBody:
content:
application/json:
schema:
$ref: ./schemas/approvalProbabilityCalculation.yml
responses:
'201':
description: Approval probability calculated successfully
content:
application/json:
schema:
$ref: ./schemas/approvalProbabilityCalculation.yml
'401':
description: Not authorized
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
examples:
missingAccessToken:
$ref: ../core/examples/error/missingAccessToken.yml
'422':
description: Invalid request
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
examples:
invalidProductType:
summary: The specified product type is invalid
value:
- attribute: productType
type: notInEnum
message: >
productType must be one of 'credit_card', 'insurance',
'life_insurance', 'loan', 'mortgage', 'savings',
'other',
but is 'invalid_product_type'
details:
specified: invalid_product_type
enum:
- credit_card
- insurance
- life_insurance
- loan
- mortgage
- savings
- other
- unknown
/identityHashes:
get:
summary: Get identity hashes
description: Return identity hashes based upon request parameters
operationId: getIdentityHashes
security:
- oauth:
- 'approval-probability:read'
tags:
- Identity Hash
parameters:
- name: id
in: query
schema:
type: array
items:
type: integer
format: int64
- name: leadUuid
in: query
schema:
type: array
items:
type: string
format: uuid
- name: leadUpdatedAtMin
in: query
schema:
type: string
format: date-time
- name: leadUpdatedAtMax
in: query
schema:
type: string
format: date-time
- name: createdAtMin
in: query
schema:
type: string
format: date-time
- name: createdAtMax
in: query
schema:
type: string
format: date-time
- name: createdBy
in: query
schema:
type: array
items:
type: string
format: uuid
- name: deletedAtMin
in: query
schema:
type: string
format: date-time
- name: deletedAtMax
in: query
schema:
type: string
format: date-time
- name: isDeleted
in: query
schema:
type: boolean
- name: deletedBy
in: query
schema:
type: array
items:
type: string
format: uuid
- name: offset
in: query
description: >
The number of resources to skip before the first resource in the
results.
schema:
type: integer
format: int64
- name: limit
in: query
required: true
description: |
The maximum number of resources to include in the results.
schema:
type: integer
format: int32
minimum: 1
- name: sortBy
in: query
description: |
The attribute with which to sort the resources.
schema:
type: string
- name: order
in: query
description: |
The direction to use for ordering resources.
schema:
type: string
responses:
'200':
description: Identity hashes matching the query parameters
content:
application/json:
schema:
type: array
items:
$ref: ./schemas/identityHash.yml
'400':
description: Invalid request provided
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'422':
description: Invalid request
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
post:
summary: Create a identity hash
description: Create a identity hash
operationId: createIdentityHash
security:
- oauth:
- 'approval-probability:write'
tags:
- Identity Hash
requestBody:
content:
application/json:
schema:
$ref: ./schemas/identityHash.yml
responses:
'201':
description: The identity hash was created successfully
content:
application/json:
schema:
$ref: ./schemas/identityHash.yml
'400':
description: Invalid request provided
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'422':
description: Invalid request
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'/identityHashes/{id}':
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
delete:
summary: Delete a identity hash
description: Delete a identity hash
operationId: deleteIdentityHash
security:
- oauth:
- 'approval-probability:write'
tags:
- Identity Hash
responses:
'200':
description: The identity hash was successfully deleted.
content:
application/json:
schema:
$ref: ./schemas/identityHash.yml
'404':
description: No identity hash exists for the specified ID

View File

@ -0,0 +1,21 @@
type: object
required:
- uuid
- resourceOwnerUuid
- scopes
properties:
uuid:
type: string
format: uuid
description: |
A unique identifier for the access token.
resourceOwnerUuid:
type: string
format: uuid
clientUuid:
type: string
format: uuid
scopes:
type: array
items:
type: string

View File

@ -0,0 +1,17 @@
type: object
required:
- resourceOwnerUuid
properties:
resourceOwnerUuid:
type: string
format: uuid
clientUuid:
type: string
format: uuid
scopes:
type: array
items:
type: string
expiresIn:
type: integer
format: int64

View File

@ -0,0 +1,31 @@
type: object
required:
- uuid
- secret
- resourceOwnerUuid
- scopes
properties:
uuid:
type: string
format: uuid
description: |
A unique identifier for this resource.
secret:
type: string
format: uuid
description: |
The secret UUID used to form the bearer token for this access token.
Cannot be retrieved after this point.
resourceOwnerUuid:
type: string
format: uuid
clientUuid:
type: string
format: uuid
scopes:
type: array
items:
type: string
expiresAt:
type: string
format: date-time

View File

@ -0,0 +1,40 @@
type: object
required:
- id
- uuid
- roles
- createdAt
- createdById
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this resource.
uuid:
type: string
format: uuid
description: |
A unique identifier for this resource.
roles:
type: string
createdAt:
type: string
format: date-time
description: |
When the account was created.
createdById:
type: string
format: uuid
description: |
The ID of the access token that was used to create this account.
deletedAt:
type: string
format: date-time
description: |
When the account was deleted.
deletedById:
type: string
format: uuid
description: |
The ID of the access token that was used to delete this account.

View File

@ -0,0 +1,8 @@
type: object
required:
- roles
properties:
roles:
type: array
items:
type: string

View File

@ -0,0 +1,14 @@
type: object
required:
- uuid
- roles
properties:
uuid:
type: string
format: uuid
description: |
The UUID of the account to update.
roles:
type: array
items:
type: string

View File

@ -0,0 +1,41 @@
type: object
required:
- id
- uuid
- name
- accountId
- companyUuid
- createdById
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this resource.
uuid:
type: string
format: uuid
description: |
A unique identifier for this resource.
name:
type: string
accountId:
type: integer
format: int64
description: |
The UUID of the company that this application belongs to
companyUuid:
type: string
format: uuid
description: |
A unique identifier for this resource.
createdById:
type: integer
format: int64
description: |
The ID of the access token that was used to create this resource.
deletedById:
type: integer
format: int64
description: |
The ID of the access token that was used to create this resource.

View File

@ -0,0 +1,12 @@
type: object
required:
- name
- accountId
properties:
name:
type: string
companyUuid:
type: string
format: uuid
description: |
The UUID of the company that this application belongs to

View File

@ -0,0 +1,9 @@
type: object
required:
- access_token
properties:
access_token:
type: string
description: |
The bearer token to authenticate, which must be the corresponding access
token UUID and access token secret concatenated together with an underscore.

View File

@ -0,0 +1,34 @@
type: object
required:
- uuid
- name
- address1
- city
- state
- zipCode
- phoneNumber
- roles
properties:
uuid:
type: string
format: uuid
description: |
A unique identifier for this resource.
name:
type: string
address1:
type: string
address2:
type: string
city:
type: string
state:
type: string
zipCode:
type: string
phoneNumber:
type: string
roles:
type: array
items:
type: string

View File

@ -0,0 +1,28 @@
type: object
required:
- name
- address1
- city
- state
- zipCode
- phoneNumber
- roles
properties:
name:
type: string
address1:
type: string
address2:
type: string
city:
type: string
state:
type: string
zipCode:
type: string
phoneNumber:
type: string
roles:
type: array
items:
type: string

View File

@ -0,0 +1,34 @@
type: object
required:
- uuid
- name
- address1
- city
- state
- zipCode
- phoneNumber
- roles
properties:
uuid:
type: string
format: uuid
description: |
The UUID to update
name:
type: string
address1:
type: string
address2:
type: string
city:
type: string
state:
type: string
zipCode:
type: string
phoneNumber:
type: string
roles:
type: array
items:
type: string

View File

@ -0,0 +1,55 @@
type: object
required:
- id
- uuid
- resourceOwnerId
- createdAt
- createdById
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this resource.
uuid:
type: string
format: uuid
description: |
A unique identifier for this resource.
resourceOwnerId:
type: integer
format: int64
description: |
The account to whom any actions performed with this access token will be
attributed.
clientId:
type: integer
format: int64
description: |
An option account (usually an application) that is performing actions
on behalf of the resource owner.
expiresAt:
type: string
format: date-time
description: |
When the resource expires.
createdAt:
type: string
format: date-time
description: |
When the resource was created.
createdById:
type: integer
format: int64
description: |
The ID of the access token that was used to create this resource.
deletedAt:
type: string
format: date-time
description: |
When the resource was deleted.
deletedById:
type: integer
format: int64
description: |
The ID of the access token that was used to delete this resource.

View File

@ -0,0 +1,15 @@
type: object
required:
- newAccessToken
- user
properties:
newAccessToken:
description: |
A new access token for the user
allOf:
- $ref: ./accessTokenWithSecret.yml
user:
description: |
The user associated with the login
allOf:
- $ref: ./user.yml

View File

@ -0,0 +1,13 @@
type: object
required:
- email
- password
properties:
email:
type: string
description: |
The email of the user for whom to create a login.
password:
type: string
description: |
The password of the specified user.

View File

@ -0,0 +1,18 @@
type: object
required:
- emailAddress
- currentPassword
- newPassword
properties:
emailAddress:
type: string
description: |
The email of the user for whom to set a new password.
currentPassword:
type: string
description: |
The existing password of the specified user.
newPassword:
type: string
description: |
The new password for the specified user.

View File

@ -0,0 +1,13 @@
type: object
required:
- token
- newPassword
properties:
token:
type: string
description: |
The password reset request token received by email.
newPassword:
type: string
description: |
The new password to set for the user corresponding to the token.

View File

@ -0,0 +1,8 @@
type: object
required:
- emailAddress
properties:
emailAddress:
type: string
description: |
The email of the user for whom to create a password reset.

View File

@ -0,0 +1,17 @@
type: object
required:
- uuid
- scopes
- richAccount
properties:
uuid:
type: string
format: uuid
description: |
A unique identifier for the access token.
scopes:
type: array
items:
type: string
richAccount:
$ref: ./richAccount.yml

View File

@ -0,0 +1,32 @@
type: object
required:
- id
- uuid
- roles
- createdAt
- createdById
properties:
account:
$ref: ./account.yml
company:
description: |
The company that this account belongs to
allOf:
- $ref: ./company.yml
application:
description: |
The application that decorates this account, if any.
allOf:
- $ref: ./application.yml
user:
description: |
The user that decorates this account, if any.
allOf:
- $ref: ./user.yml
service:
description: |
The service that decorates this account, if any. The service concept is
deprecated and will ultimately be removed.
deprecated: true
allOf:
- $ref: ./service.yml

View File

@ -0,0 +1,46 @@
type: object
required:
- id
- key
- description
- scopes
- createdAt
- createdById
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this role.
key:
type: string
description: |
A unique, human-readable identifier for this role.
description:
type: string
scopes:
type: array
description: |
The scopes that belong to this role
items:
type: string
createdAt:
type: string
format: date-time
description: |
When the role was created.
createdById:
type: integer
format: int64
description: |
The ID of the access token that was used to create this role.
deletedAt:
type: string
format: date-time
description: |
When the resource was deleted.
deletedById:
type: integer
format: int64
description: |
The ID of the access token that was used to delete this role.

View File

@ -0,0 +1,18 @@
type: object
required:
- key
- description
- scopes
properties:
key:
type: string
description: |
A unique, human-readable identifier for this role.
description:
type: string
scopes:
type: array
description: |
Scopes to add to this role
items:
type: string

View File

@ -0,0 +1,10 @@
type: object
required:
- scopes
properties:
scopes:
type: array
description: |
Scopes to add to this role
items:
type: string

View File

@ -0,0 +1,39 @@
type: object
required:
- id
- key
- description
- createdAt
- createdById
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this scope.
key:
type: string
description: |
A unique, human-readable identifier for this role.
description:
type: string
createdAt:
type: string
format: date-time
description: |
When the resource was created.
createdById:
type: integer
format: int64
description: |
The ID of the access token that was used to create this resource.
deletedAt:
type: string
format: date-time
description: |
When the resource was deleted.
deletedById:
type: integer
format: int64
description: |
The ID of the access token that was used to delete this resource.

View File

@ -0,0 +1,18 @@
type: object
required:
- key
- description
- roles
properties:
key:
type: string
description: |
A unique, human-readable identifier for this role.
description:
type: string
roles:
type: array
description: |
The roles that this scope should belong to
items:
type: string

View File

@ -0,0 +1,18 @@
type: object
required:
- uuid
- accountUuid
- companyUuid
- name
properties:
uuid:
type: string
format: uuid
accountUuid:
type: string
format: uuid
companyUuid:
type: string
format: uuid
name:
type: string

View File

@ -0,0 +1,94 @@
type: object
required:
- id
- uuid
- accountId
- accountUuid
- companyUuid
- emailAddress
- firstName
- lastName
- createdAt
- createdById
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this user.
uuid:
type: string
format: uuid
description: |
A unique identifier for this user.
accountId:
type: integer
format: int64
description: |
The ID of the account resource for this user
accountUuid:
type: string
format: uuid
description: |
The UUID of the account resource for this user
companyUuid:
type: string
format: uuid
description: |
The UUID of the company that this user belongs to
emailAddress:
type: string
description: |
The user's email address.
firstName:
type: string
description: |
The user's email address.
lastName:
type: string
description: |
The user's email address.
title:
type: string
description: |
The user's email address.
createdAt:
type: string
format: date-time
description: |
When the user was created.
createdById:
type: integer
format: int64
description: |
The ID of the access token that was used to create this user.
updatedAt:
type: string
format: date-time
description: |
When the user was last updated.
updatedById:
type: integer
format: int64
description: |
The ID of the access token that was used to last update this user.
deactivatedAt:
type: string
format: date-time
description: |
When the user was deactivated.
deactivatedBy:
type: string
format: uuid
description: |
The UUID of the access token that was used to deactivate this resource.
deletedAt:
type: string
format: date-time
description: |
When the user was deleted.
deletedById:
type: integer
format: int64
description: |
The ID of the access token that was used to delete this user.

View File

@ -0,0 +1,43 @@
type: object
required:
- companyUuid
- emailAddress
- firstName
- lastName
- roles
properties:
companyUuid:
type: string
format: uuid
description: |
The UUID of the company that this user belongs to
emailAddress:
type: string
description: |
The user's email address.
firstName:
type: string
description: |
The user's email address.
lastName:
type: string
description: |
The user's email address.
title:
type: string
description: |
The user's email address.
roles:
type: array
description: |
The roles that this user should belong to.
items:
type: string
password:
type: string
description: |
The user's password, used to create access tokens for this user.
expiresImmediately:
type: boolean
description: |
Whether the user's password expires immediately. Defaults to false.

View File

@ -0,0 +1,41 @@
type: object
required:
- id
- userId
- createdAt
- createdBy
properties:
id:
type: integer
format: int64
description: |
A unique, internal identifier for this resource.
userId:
type: integer
format: int64
description: |
An identifier for the user that is deactivated.
deactivationReason:
type: string
description: |
Reason why the user was deactivated.
createdAt:
type: string
format: date-time
description: |
When the resource was created.
createdBy:
type: string
format: uuid
description: |
The UUID of the access token that was used to create this resource.
deletedAt:
type: string
format: date-time
description: |
When the resource was deleted.
deletedBy:
type: string
format: uuid
description: |
The UUID of the access token that was used to delete this resource.

View File

@ -0,0 +1,15 @@
type: object
required:
- userIds
properties:
userIds:
type: array
items:
type: integer
format: int64
description: |
The IDs of the users to be deactivated.
deactivationReason:
type: string
description: |
Reason why the users were deactivated.

View File

@ -0,0 +1,49 @@
type: object
required:
- uuid
- companyUuid
- emailAddress
- firstName
- lastName
- roles
properties:
uuid:
type: string
format: uuid
description: |
The UUID of the user to update
companyUuid:
type: string
format: uuid
description: |
The UUID of the company that this user belongs to
emailAddress:
type: string
description: |
The user's email address.
firstName:
type: string
description: |
The user's email address.
lastName:
type: string
description: |
The user's email address.
title:
type: string
description: |
The user's email address.
roles:
type: array
description: |
The roles that this user should belong to.
items:
type: string
password:
type: string
description: |
The user's password, used to create access tokens for this user.
expiresImmediately:
type: boolean
description: |
Whether the user's password expires immediately. Defaults to false.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
type: object
description: A benefit
properties:
text:
type: string
description: The name of the benefit
detail:
type: string
description: Additional text of the benefit
uuid:
type: string
format: uuid

View File

@ -0,0 +1,15 @@
type: object
description: a group of cards that share branding, like the chase sapphire perferrec and reserve.
properties:
uuid:
type: string
format: uuid
name:
type: string
issuer:
$ref: ./issuer.yml
cards:
type: array
items:
type: string

View File

@ -0,0 +1,16 @@
type: object
description: A mapping of an aggregator's credit card account and a atlas credit card
properties:
subAccountId:
description: The Atlas SubAccount id (this is also a Plaid account id, or a finicity account id)
type: string
cardUuid:
description: The card associated with this account
type: string
format: uuid
nullable: true
openDate:
description: The date the account was opened
type: string
format: date
nullable: true

View File

@ -0,0 +1,15 @@
type: object
description: A Category
properties:
uuid:
type: string
format: uuid
name:
type: string
description: A detailed name for the category
displayName:
type: string
description: A more user friendly name for the category
phrase:
type: string
description: Sentence friendly

View File

@ -0,0 +1,11 @@
type: object
description: The root credit card object with all descriminators
properties:
uuid:
type: string
format: uuid
type:
$ref: ./creditCardRepresentations.yml
personlizationLevel:
$ref: ../personalizationLevels.yml

View File

@ -0,0 +1,43 @@
type: object
description: Limited information about a credit card
allOf:
- $ref: ./baseCreditCard.yml
- type: object
properties:
names:
description: Legal name, nickname, shortname, ext
type: array
items:
$ref: ../structures/name.yml
images:
description: full card image, square image, etc, other assets.
type: array
items:
$ref: ../structures/image.yml
issuer:
$ref: ../issuer.yml
network:
$ref: ../network.yml
family:
$ref: ../cardFamily.yml
links:
description: Apply and terms links
type: array
items:
$ref: ../structures/link.yml
source:
type: object
description: Explains where the credit card offer details were found, and how recently
properties:
integration:
type: string
description: Describes the mechanics of how card data is gathered
connection:
type: string
description: id of connector
lastModified:
type: string
description: the last time this record was changed
lastValidated:
type: string
description: the last time this record checked for compliance

View File

@ -0,0 +1,6 @@
title: CreditCardRepresentation
type: string
description: Descriminator for how detailed the Credit Card response is
enum:
- compact
- full

View File

@ -0,0 +1,41 @@
type: object
description: A Atlas Representation of a Credit Card
allOf:
- $ref: ./compactCreditCard.yml
- type: object
properties:
restrictions:
type: object
description: what stops you from getting it
properties:
student:
type: boolean
description: Denotes whether this card is only offered to students
military:
type: boolean
description: Denotes whether this card is only offered to active duty military personel
minCreditScore:
type: integer
maxCreditScore:
type: integer
rates:
$ref: ../rate.yml
fees:
description: annual, foreign transaction fees, late fees, etc.
type: array
items:
$ref: ../fee.yml
benefits:
type: array
items:
$ref: ../benefit.yml
description: Additional Benefits you recieve with this card
earningProgram:
$ref: ../earning-program/earningProgram.yml
ratings:
$ref: ../rating.yml
additionalDetails:
description: Additional Marketing Bullets
type: array
items:
type: string

View File

@ -0,0 +1,10 @@
type: object
description: Personalized values calculated for a specific bonus, such as a Sign On Bonus
properties:
minimumSpendMet:
type: boolean
description: Were the conditions of the bonus met
qualifyingSpend:
type: string
description: The amount of spend the user had within the time period of the bounus

View File

@ -0,0 +1,9 @@
type: object
description: An association of an earn rate and a category
allOf:
- $ref: ./earningItem.yml
- type: object
properties:
category:
$ref: ../category.yml
description: The category of the item

View File

@ -0,0 +1,29 @@
type: object
description: An earning event which is based on spend or is over time
required:
- type
- name
- bonus
- redemptionValue
- requirement
properties:
type:
type: string
enum:
- One Time
- Recurring
name:
type: string
enum:
- Sign-Up Bonus
- Anniversary Bonus
- Annual Bonus
- Usage Bouns
bonus:
type: string
redemptionValue:
type: string
requirement:
type: string
personalization:
$ref: ./bonusPersonalization.yml

View File

@ -0,0 +1,29 @@
type: object
description: A context around a nuumber of earning groups, such as caps, tiers, etc
required:
- groups
- type
properties:
type:
description: The type of context this is. Basic contexts have no details.
type: string
enum:
- basic
- calculation
- introductory
- rotating
- capped
groups:
description: The earning groups relevent in this context
type: array
items:
$ref: ./earningGroup.yml
detail:
description: A phrase describing the context around the earning groups
type: string
explaination:
description: A full sentence describing the context around the earning groups
type: string
personalization:
$ref: ./earningItemPersonalization.yml

View File

@ -0,0 +1,26 @@
type: object
description: A group of qualifiers which share the same default earn rate
required:
- earnRate
- earnRateText
- items
properties:
earnRate:
type: number
description: Numerical representation of the earn rate for this group
earnRateText:
type: string
description: Display text for what the group earns
items:
type: array
items:
oneOf:
- $ref: ./categoryEarningItem.yml
- $ref: ./merchantEarningItem.yml
discriminator:
propertyName: type
mapping:
category: './categoryEarningItem.yml'
merchant: './merchantEarningItem.yml'
personalization:
$ref: ./earningItemPersonalization.yml

View File

@ -0,0 +1,18 @@
type: object
description: An association of an earn rate and a qualifier, like a category or merchant
required:
- type
properties:
type:
description: Refers to the type (and schema) of the item
type: string
enum:
- category
- merchant
- ebp
- paymentMethod
earnRate:
type: number
description: Numerical representation of the default earn rate per dollar spent of the item
personalization:
$ref: ./earningItemPersonalization.yml

View File

@ -0,0 +1,12 @@
type: object
description: Personalized values calculated for a specific item, such as an earning group or bonus
properties:
totalSpent:
type: number
description: The amount the user spent in dollars within a calendar year
totalEarned:
type: number
description: The amount of points/miles/dollars the user would have received within a calendar year
totalValue:
type: number
description: The value in USD of the totalEarned amount based on the user's custom point valuation

View File

@ -0,0 +1,30 @@
type: object
description: Reward earning data for the card
required:
- transactionLevelEarningScheme
- cardLevelEarningScheme
properties:
transactionLevelEarningScheme:
description: Grouped by earn rate, the rules that earn multipliers on each transaction
type: array
items:
$ref: ./earningContext.yml
cardLevelEarningScheme:
description: Card level bonuses, such as sign-on and anniversary bonuses
type: array
items:
$ref: ./earningBonus.yml
personalization:
description: Annual value of this card for the user, only returned in a simulation
type: object
properties:
totalSpent:
type: number
description: The amount the user spent in dollars within a calendar year
totalEarned:
type: number
description: The amount of points/miles/dollars the user would have received within a calendar year
totalValue:
type: number
description: The value in USD of the totalEarned amount based on the user's custom point valuation, minus fees

View File

@ -0,0 +1,9 @@
type: object
description: An association of an earn rate and a merchant
allOf:
- $ref: ./earningItem.yml
- type: object
properties:
merchant:
$ref: ../merchant.yml
description: the merchant of the item

View File

@ -0,0 +1,22 @@
type: object
description: A Fee
properties:
type:
$ref: ./feesEnum.yml
dollarValue:
type: number
percentageValue:
type: number
additive:
description: If true, the sum of dollar and percentage, else, the greater of the two
type: boolean
waivedInitially:
description: Is this waived when the card is opened
type: boolean
waivedMonths:
description: How long is it waived
type: number
description:
description: Additional Details
type: string

View File

@ -0,0 +1,7 @@
type: string
enum:
- Annual Fee
- Foreign Transaction Fee
- Late Fee
- Other Fee
- Balance Transfer Fee

View File

@ -0,0 +1,29 @@
type: object
description: Private API will expose issuers (thats how we map to aggregators), this will return issuer name, logo and stuff, as well as rest reference to issuer API + UUID
properties:
uuid:
type: string
format: uuid
name:
type: string
image:
$ref: ./structures/image.yml
additionalDetails:
description: Internal values that may be helpful
type: object
properties:
popular:
type: boolean
description: Whether an institution is common
nickname:
type: string
description: What some users refer to the bank as instead of the full name
externalIdentifiers:
type: object
properties:
plaidId:
type: string
description: Plaid's identifier for this institution
finicityId:
type: integer
description: Finicity's identifier for this institution

View File

@ -0,0 +1,14 @@
type: object
description: A business or store that is affiliated with a credit card earning program
properties:
uuid:
type: string
format: uuid
name:
description: The merchant's name
type: string
logo:
type: string
description: Logo URL
category:
$ref: ./category.yml

View File

@ -0,0 +1,28 @@
type: object
description: The payment network a card operates on
required:
- uuid
- type
- network
properties:
uuid:
type: string
format: uuid
type:
type: string
enum:
- store
- credit
level:
type: string
description: The level or package of the card on the network, such as world elite
image:
type: string
format: url
network:
description: The network or store lines providing credit
type: string
merchant:
$ref: ./merchant.yml

View File

@ -0,0 +1,7 @@
title: PersonalizationLevel
type: string
description: discriminator for If the card contains personalized details
enum:
- generic
- stale
- transactions

View File

@ -0,0 +1,17 @@
type: object
description: An Interest Rate
properties:
minRate:
type: number
maxRate:
type: number
introRate:
description: Initial Rate
type: number
introLengthMonths:
description: How long is it low
type: number
description:
description: Additional Details
type: string

View File

@ -0,0 +1,18 @@
type: object
description: Overall rating of the card, with sub categories
properties:
overallRating:
description: Overall rating of the card, out of 5
type: number
ratingComponents:
description: individual ratings of the card
type: array
items:
type: object
properties:
name:
description: Component Name
type: string
rating:
description: Component Rating, out of 5
type: number

View File

@ -0,0 +1,20 @@
type: object
description: Defines an image
properties:
baseUrl:
type: string
format: url
originalFormat:
type: object
properties:
width:
type: number
height:
type: number
format:
type: string
primary:
type: boolean
supportsManipulation:
type: boolean

View File

@ -0,0 +1,25 @@
type: object
description: A hyperlink
properties:
url:
type: string
format: url
description: The tracked redirect link flow
directUrl:
type: string
format: url
description: The raw url
type:
description: Where the link goes
type: string
enum:
- application
- terms
- profile
description:
description: More detail
type: string
primary:
description: Is this the converion link
type: boolean

View File

@ -0,0 +1,12 @@
type: object
description: A name, when multiple variations or aliases exist
properties:
value:
type: string
description: The value to display
primary:
type: boolean
description: Whether this is this primary name
details:
type: string
description: More Details

View File

@ -0,0 +1,14 @@
type: object
description: A representation of an amount of time
properties:
length:
description: How long is the period in units
type: integer
unit:
type: string
enum:
- day
- week
- month
- quarter
- year

View File

@ -0,0 +1,88 @@
openapi: 3.0.3
info:
title: atlas-model
description: >-
Provide an interface for all credit card and redemption program model
related data
version: 0.1.0
contact:
name: Alex Whiteside
email: alex.whiteside@example.com
servers:
- url: 'https://api.onbirch.com/model'
description: Production
- url: 'https://dev.api.onbirch.com/model'
description: Development
components:
x-lint-skip:
- inline-schema-is-scalar
schemas:
CompactCreditCard:
$ref: ../atlas-core/schemas/credit-card/compactCreditCard.yml
CreditCard:
oneOf:
- $ref: ../atlas-core/schemas/credit-card/fullCreditCard.yml
- $ref: ../atlas-core/schemas/credit-card/compactCreditCard.yml
CreditCardRepresentation:
$ref: ../atlas-core/schemas/credit-card/creditCardRepresentations.yml
FullCreditCard:
$ref: ../atlas-core/schemas/credit-card/fullCreditCard.yml
tags:
- name: Credit Card
paths:
/cards:
get:
x-lint-skip:
- index-endpoint-has-limit
operationId: getAllCards
tags:
- Credit Card
summary: Get cards supported by Atlas
description: 'Returns Card and its metadata, additional details'
parameters:
- name: uuid
in: query
required: false
description: The UUID of the card(s) you want
schema:
type: string
format: uuid
- name: format
description: The level of detail you want (compact or full)
in: query
required: true
schema:
$ref: ../atlas-core/schemas/credit-card/creditCardRepresentations.yml
responses:
'200':
description: A compact array of cards available
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CreditCard'
'/cards/{uuid}':
get:
tags:
- Credit Card
operationId: getCardsById
summary: Get a specific credit card
description: Get a specific credit card
parameters:
- name: uuid
in: path
required: true
description: The UUID of the card you want
schema:
type: string
format: uuid
responses:
'200':
description: A credit card object
content:
application/json:
schema:
$ref: ../atlas-core/schemas/credit-card/fullCreditCard.yml
'404':
description: '`Card` with the given UUID does not exist'

View File

@ -0,0 +1,23 @@
type: object
description: A representation of a user's spending, aggregated over a period of time
properties:
aggregates:
type: array
items:
type: object
description: Individual spending groups
properties:
uuid:
description: A category, merchant or other spending group's uuid
type: string
format: uuid
amount:
description: A representation of how much (in value or relative) the user spent in this group
type: number
format: float
unit:
description: The unit of the values in spend aggregates
type: string
enum:
- usd
- none

View File

@ -0,0 +1,10 @@
type: object
description: Result of an isolated card simulation
properties:
uuid:
type: string
format: uuid
cards:
type: array
items:
$ref: ../../atlas-core/schemas/credit-card/fullCreditCard.yml

View File

@ -0,0 +1,26 @@
type: object
description: A request to get data about a simululation
required:
- cardUuids
properties:
cardUuids:
description: The card uuids to simulate - or null for all cards
type: array
items:
type: string
format: uuid
redemptionPreferences:
description: A user's indicated preferences about the rewards they would like to receive
type: array
items:
$ref: ./redemptionPreference.yml
aggregatedSpending:
$ref: ./aggregatedSpending.yml
allowTransferPartners:
description: Designates whether the user is willing to leverage transfer partners for higher redemption values
type: boolean
userProfile:
$ref: ./userProfile.yml
plaidAssetReportToken:
description: A Plaid Asset Report Token
type: string

View File

@ -0,0 +1,38 @@
type: object
description: Information about an asset report
required:
- dateGenerated
- dateReceived
- personalizationLevel
properties:
userUuid:
description: The uuid of a user to connect this token to
type: string
format: uuid
nullable: true
cardMatch:
type: array
items:
$ref: ../../atlas-core/schemas/cardMatch.yml
status:
description: The current status of the asset report within Atlas
readOnly: true
type: string
enum:
- syncing
- error
- ready
dateGenerated:
description: The date the asset report was created with Plaid
type: string
format: date
readOnly: true
dateReceived:
description: The date the asset report was submitted to Atlas
type: string
format: date
readOnly: true
personalizationLevel:
description: The personlization level acheived by this access token
readOnly: true
$ref: ../../atlas-core/schemas/personalizationLevels.yml

View File

@ -0,0 +1,14 @@
type: object
description: How a user feels about a particular way to redeem rewards
properties:
redemptionTypeUuid:
description: The UUID of a redemption type
type: string
format: uuid
weight:
description: The user's weight of the preference. >
-1 indicates the user would value this type of redemption at $0
0 indicates the user doesnt have a preference
Positive integers indicate a preference, which is normalized against other preferences
type: integer
format: int32

View File

@ -0,0 +1,19 @@
type: object
description: Basic information about a user required for simulation
properties:
student:
type: boolean
description: Is the user a student?
military:
type: boolean
description: Is the user active duty military or an affiliate?
creditScore:
description: The user's credit score (or high end of a range)
type: integer
minimum: 400
maximum: 850
primaryAirport:
description: The user's primary airport or region, using IATA station codes
type: string
minLength: 3
maxLength: 3

View File

@ -0,0 +1,108 @@
openapi: 3.0.3
info:
title: atlas-simulator
description: Provide an interface for all credit card model related data
version: 1.0.0
contact:
name: Alex Whiteside
email: alex.whiteside@example.com
servers:
- url: 'https://api.onbirch.com/simulator'
description: Production
- url: 'https://dev.api.onbirch.com/simulator'
description: Development
components:
x-lint-skip:
- inline-schema-is-scalar
schemas:
IsolatedCardSimulationResponse:
$ref: ./schemas/isolatedCardSimulationResponse.yml
IsolatedSimulationRequest:
$ref: ./schemas/isolatedSimulationRequest.yml
PlaidAssetReportDetail:
$ref: ./schemas/plaidAssetReportDetail.yml
tags:
- name: Plaid
- name: Simulation
paths:
/isolatedCardSimulations:
post:
summary: Simulate a card or group of cards in isolation from each other
tags:
- Credit Card
operationId: performAnIsolatedSimulation
requestBody:
content:
application/json:
schema:
$ref: ./schemas/isolatedSimulationRequest.yml
responses:
'200':
description: A simulation result containing simulations of the requested cards
content:
application/json:
schema:
$ref: ./schemas/isolatedCardSimulationResponse.yml
'400':
description: There was an error creating a simuluation from the request
'/data/plaidAssetReportTokens/{plaid_asset_report_token}':
parameters:
- name: plaid_asset_report_token
description: 'A Plaid Asset Report Token (plaid.com/docs/#assets)'
in: path
required: true
schema:
type: string
put:
summary: Ingests and processes a Plaid Asset Report Token
tags:
- Plaid
operationId: putPlaidAssetReportToken
requestBody:
content:
application/json:
schema:
$ref: ./schemas/plaidAssetReportDetail.yml
responses:
'200':
description: Token Updated
content:
application/json:
schema:
$ref: ./schemas/plaidAssetReportDetail.yml
'201':
description: Plaid Asset Report Token Accepted
content:
application/json:
schema:
$ref: ./schemas/plaidAssetReportDetail.yml
'400':
description: Request could not be processed
'404':
description: Token not found
get:
summary: Returns details about a Plaid Asset Report Token
tags:
- Plaid
operationId: getPlaidAssetReportToken
responses:
'200':
description: Returns details about the token
content:
application/json:
schema:
$ref: ./schemas/plaidAssetReportDetail.yml
'404':
description: Token not found
delete:
summary: >-
Deletes the Asset Report Token and all linked data, simulations, and
history. Cannot be undone.
tags:
- Plaid
operationId: deletePlaidAssetReportToken
responses:
'200':
description: Token Deleted
'404':
description: Token not found

View File

@ -0,0 +1,8 @@
type: object
description: A request to add new plaid bank
required:
- publicToken
properties:
publicToken:
description: User account (item) token received from Plaid
type: string

View File

@ -0,0 +1,12 @@
type: object
description: Mobile request to add new plaid bank
required:
- publicToken
- token
properties:
publicToken:
description: User account (item) token received from Plaid
type: string
token:
description: Mobile User Token
type: string

View File

@ -0,0 +1,12 @@
type: object
description: Added account info
properties:
bankId:
description: Added BankAccount ID
type: string
accountIds:
description: Array of accountIDs
type: array
items:
type: string
description: Array of accountIDs

View File

@ -0,0 +1,10 @@
type: object
required:
- message
properties:
message:
type: string
example: A server error occurred
details:
type: string
example: The server encountered an unexpected condition that prevented it from fulfilling the request.

View File

@ -0,0 +1,6 @@
type: object
description: Added account info
properties:
status:
description: Status of adding Bank Account
type: string

View File

@ -0,0 +1,13 @@
type: object
required:
- productType
properties:
productType:
type: string
enum:
- credit_card
- loan
- savings
description: |
Type of Lead to return RateTable for.

View File

@ -0,0 +1,182 @@
openapi: 3.0.3
info:
title: atlas-web
description: Atlas Web Application
version: 1.0.0
servers:
- url: 'https://birchfinance.com/api'
components:
x-lint-skip:
- inline-schema-is-scalar
schemas:
AddBankResponse:
$ref: ./schemas/addBankResponse.yml
AddBankResponseMobile:
$ref: ./schemas/addBankResponseMobile.yml
AddBankRequest:
$ref: ./schemas/addBankRequest.yml
AddBankRequestMobile:
$ref: ./schemas/addBankRequestMobile.yml
GetRateTable:
$ref: ../originator/schemas/rateTablePublic.yml
GetRateTableRequest:
$ref: ./schemas/getRateTableRequest.yml
LeadRequestJson:
$ref: ../lead/schemas/leadRequestJson.yml
ApiError:
$ref: ../core/schemas/apiError.yml
tags:
- name: Plaid
- name: Bank
paths:
/plaid/addBanks:
post:
description: Add new Plaid bank connection
operationId: addBanks
tags:
- Plaid
requestBody:
content:
application/json:
schema:
$ref: ./schemas/addBankRequest.yml
responses:
'200':
description: Response containing sub accounts and user id
content:
application/json:
schema:
$ref: ./schemas/addBankResponse.yml
'400':
description: Bad Request
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'500':
description: Internal server error
content:
application/json:
schema:
$ref: ../core/schemas/apiError.yml
example:
summary: An internal server error
description: An unknown error occured
value:
message: Internal Error
details: Something went wrong..
/mobile/plaid/addBanks:
post:
description: Add new Plaid bank connection from Mobile
operationId: addBanksMobile
tags:
- Plaid
requestBody:
content:
application/json:
schema:
$ref: ./schemas/addBankRequestMobile.yml
responses:
'200':
description: Response containing status of adding Bank Account
content:
application/json:
schema:
$ref: ./schemas/addBankResponseMobile.yml
'400':
description: Bad Request
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'401':
description: Not authorized
content:
application/json:
schema:
type: array
items:
$ref: ../core/schemas/apiError.yml
'500':
description: Internal server error
content:
application/json:
schema:
$ref: ../core/schemas/apiError.yml
example:
summary: An internal server error
description: An unknown error occured
value:
message: Internal Error
details: Something went wrong..
/even/getRateTables:
post:
tags:
- Even
summary: getRateTables
description: getRateTables
operationId: getRateTables
requestBody:
description: Get `RateTable` for User by `productType`
content:
application/json:
schema:
$ref: ./schemas/getRateTableRequest.yml
required: true
responses:
'200':
description: >-
Returns `RateTable` for specified `productType` if table exists
within 30 days
content:
application/json:
schema:
$ref: ../originator/schemas/rateTablePublic.yml
'500':
description: Internal server error
content:
application/json:
schema:
$ref: ../core/schemas/apiError.yml
example:
summary: An internal server error
description: An unknown error occured
value:
message: Internal Error
details: Something went wrong...
/even/createUpdateLeadAndGetRateTables:
post:
tags:
- Even
summary: createUpdateLeadAndGetRateTables
operationId: createUpdateLeadAndGetRateTables
requestBody:
description: Create `Lead` and get `RateTable`
content:
application/json:
schema:
$ref: ../lead/schemas/leadRequestJson.yml
required: true
responses:
'200':
description: Return `RateTable` for newly created lead
content:
application/json:
schema:
$ref: ../originator/schemas/rateTablePublic.yml
'500':
description: Internal server error
content:
application/json:
schema:
$ref: ../core/schemas/apiError.yml
example:
summary: An internal server error
description: An unknown error occured
value:
message: Internal Error
details: Something went wrong..

View File

@ -0,0 +1,77 @@
openapi: 3.0.3
info:
title: ACME Zephyr Data
description: >-
Synthetic bundled OpenAPI fixture representing the output of a downstream
Stitcher-style reference resolver.
version: 2.7.3-rc.0
servers:
- url: "https://api.example.com/zephyr-data"
paths:
/activeZorplexFeatures:
get:
summary: Get active zorplex features
operationId: getActiveZorplexFeatures
responses:
"200":
description: Active features found
content:
application/json:
schema:
type: array
items:
type: object
required:
- id
- uuid
- subAccountId
- feature
properties:
id:
type: integer
format: int64
uuid:
type: string
format: uuid
subAccountId:
type: integer
format: int64
feature:
type: string
enum:
- QUANTUM_FLURBINATION
- GRIBBLE_ENHANCEMENT
- BLARF_OPTIMIZATION
components:
schemas:
ActiveZorplexFeature:
type: object
required:
- id
- uuid
- subAccountId
- feature
- createdAt
- createdBy
properties:
id:
type: integer
format: int64
uuid:
type: string
format: uuid
subAccountId:
type: integer
format: int64
feature:
type: string
enum:
- QUANTUM_FLURBINATION
- GRIBBLE_ENHANCEMENT
- BLARF_OPTIMIZATION
- FNORD_ACCELERATION
- QUASAR_MATRIX_V2
deletedAt:
type: string
format: date-time
nullable: true

View File

@ -0,0 +1,40 @@
type: object
description: Represents an active blixnart feature on a zorplex entity
required:
- id
- uuid
- subAccountId
- feature
- createdAt
- createdBy
properties:
id:
type: integer
format: int64
description: Unique flurbinator identifier
example: 42
uuid:
type: string
format: uuid
description: Universal gribble identifier
example: 550e8400-e29b-41d4-a716-446655440000
subAccountId:
type: integer
format: int64
description: Associated zorplex sub-account
example: 1337
feature:
$ref: ./zorplexFeature.yml
createdAt:
type: string
format: date-time
description: When the quasar was fnordicated
createdBy:
type: string
format: uuid
description: Who performed the blarf activation
deletedAt:
type: string
format: date-time
description: When the flurbination was terminated
nullable: true

View File

@ -0,0 +1,8 @@
type: string
description: Available synthetic features for a zorplex entity
enum:
- QUANTUM_FLURBINATION
- GRIBBLE_ENHANCEMENT
- BLARF_OPTIMIZATION
- FNORD_ACCELERATION
- QUASAR_MATRIX_V2

View File

@ -0,0 +1,61 @@
openapi: 3.0.3
info:
title: ACME Zephyr Data
description: >-
Synthetic multi-file OpenAPI fixture modeled after downstream Stitcher
inputs with folded text, relative references, and nested schemas.
version: 2.7.3-rc.0
contact:
name: Quasar Team
url: >-
https://example.com/docs/zorplex-fnordication
servers:
- url: "https://api.example.com/zephyr-data"
description: Prod
- url: "https://dev-api.example.com/zephyr-data"
description: Dev
tags:
- name: Active Zorplex Features
description: |
Features currently active for a zorplex account.
components:
securitySchemes:
internal:
type: http
scheme: bearer
schemas:
ActiveZorplexFeature:
$ref: ./schemas/activeZorplexFeature.yml
ZorplexFeature:
$ref: ./schemas/zorplexFeature.yml
security:
- internal: []
paths:
/activeZorplexFeatures:
get:
summary: Get active zorplex features
operationId: getActiveZorplexFeatures
tags:
- Active Zorplex Features
parameters:
- name: zorplexSubAccountId
in: query
required: true
description: A comma separated list of zorplex sub-account ids
schema:
type: array
items:
type: integer
format: int64
minimum: 1
style: form
explode: false
responses:
"200":
description: Active features found
content:
application/json:
schema:
type: array
items:
$ref: ./schemas/activeZorplexFeature.yml