Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions mintlify/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 7 additions & 11 deletions openapi/components/schemas/customers/CustomerCreateRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,19 @@ properties:
region:
type: string
description: >-
Country code (ISO 3166-1 alpha-2) representing the customer's regional identity.
This determines the regulatory jurisdiction and KYC requirements for the customer.
Required if the customer will use currencies with different KYC requirements across
regions. A customer with accounts in multiple regions should be registered as separate
customers. This field is immutable after creation.
Country code (ISO 3166-1 alpha-2) for the customer's region. Optional — send
it only when the same currency is offered in more than one of your regions,
to pick the one that applies to this customer.
Comment on lines 13 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Region semantics conflict with CLI

The updated schema describes region solely as an optional configuration-selection tiebreaker, while the customer CLI still calls it immutable after creation. This gives users conflicting guidance about whether the value becomes durable customer state.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/customers/CustomerCreateRequest.yaml
Line: 13-16

Comment:
**Region semantics conflict with CLI**

The updated schema describes `region` solely as an optional configuration-selection tiebreaker, while the customer CLI still calls it immutable after creation. This gives users conflicting guidance about whether the value becomes durable customer state.

**Knowledge Base Used:**
- [Customers and KYC](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/customers-and-kyc.md)
- [OpenAPI Spec Core: Structure, Build, and Shared Schemas](https://app.greptile.com/lightspark/-/custom-context/knowledge-base/lightsparkdev/grid-api/-/docs/openapi-spec-core.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

example: US
currencies:
type: array
items:
type: string
description: >-
List of currency codes the customer will use (ISO 4217 for fiat, e.g. "USD", "EUR";
tickers for crypto, e.g. "BTC", "USDC"). Required if the customer will use more than
one sending currency, since the correct currencies cannot always be inferred. If not
provided, currencies will be inferred from the customer's region. Some currency
combinations may require separate customers — if so, the request will be rejected
with details.
Currency codes the customer will use — ISO 4217 for fiat, tickers for crypto
(e.g. "USDC"). Optional — send them if your platform supports more than one
currency, so we know which ones this customer needs. Some combinations
require separate customers.
example:
- USD
- USDC
Expand Down
11 changes: 11 additions & 0 deletions openapi/paths/customers/customers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ post:
birthDate: '1988-05-22'
nationality: MX
phoneNumber: '+525512345678'
individualCustomerCurrenciesOnly:
summary: Create an individual customer with currencies and no region
value:
customerType: INDIVIDUAL
platformCustomerId: ind-4c2e8b15
currencies:
- BRL
fullName: Ana Oliveira
birthDate: '1992-11-03'
nationality: BR
phoneNumber: '+5511987654321'
businessCustomer:
summary: Create a business customer
value:
Expand Down
Loading