-
Notifications
You must be signed in to change notification settings - Fork 5
docs: describe new company matching endpoint #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
kivra-fabber
wants to merge
5
commits into
master
Choose a base branch
from
k4b-3632-add-new-companymatch
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5175c7e
docs: describe new company matching endpoint
kivra-fabber 11afab6
Apply suggestion from @kivra-ponern
kivra-fabber 7bb91e8
Apply suggestion from @kivra-ponern
kivra-fabber 04ee561
Apply suggestion from @kivra-fabber
kivra-fabber 885f59a
add note on use case for new endpoint
kivra-fabber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1609,15 +1609,7 @@ paths: | |
| content: | ||
| application/json: | ||
| schema: | ||
| required: | ||
| - list | ||
| type: object | ||
| properties: | ||
| list: | ||
| description: List of VAT numbers to match. | ||
| type: array | ||
| items: | ||
| $ref: "#/components/schemas/VatNumber" | ||
| $ref: "#/components/schemas/CompanyMatchSet" | ||
| example: | ||
| list: ["SE559408724801", "SE556917354401", "SE556840226601"] | ||
| required: true | ||
|
|
@@ -1630,17 +1622,63 @@ paths: | |
| content: | ||
| application/json: | ||
| schema: | ||
| required: | ||
| - list | ||
| type: object | ||
| properties: | ||
| list: | ||
| description: List of VAT numbers which are eligible Recipients of the Tenant. | ||
| type: array | ||
| minItems: 0 | ||
| maxItems: length(input-list) | ||
| items: | ||
| $ref: "#/components/schemas/VatNumber" | ||
| $ref: "#/components/schemas/CompanyMatchSet" | ||
| example: | ||
| list: ["SE556840226601", "SE559408724801"] | ||
| 413: | ||
| description: Payload exceeded 10MB — try splitting into multiple calls instead. | ||
|
|
||
| /v2/tenant/{tenantKey}/companymatch/vatnr_with_active_partner_integration: | ||
| post: | ||
| tags: | ||
| - "Tenant API - Content" | ||
| summary: Match a list of VAT numbers to recipients that have an active partner integration for a specific tenant. | ||
| operationId: Match Companies With PAPI VatNr | ||
| description: | | ||
| This resource is used to match a list of Companies to check that they | ||
| have an active integration with a partner fetching from their company inbox | ||
| and are eligible for receiving Content from a specific Tenant. | ||
|
|
||
| **Note:** | ||
| This is only for specific use cases, and will not give you all eligible recipients. | ||
| You most likely want to use [the regular company match](#tag/Tenant-API-Content/operation/Match%20Companies%20VatNr%20v2). | ||
|
|
||
| The request contains a list of VAT numbers to be matched, and | ||
| the response is a filtered subset of said list containing only | ||
| those VAT numbers matching a Company Recipient for which the Tenant | ||
| is eligible to send Content to, and have an active partner integration. | ||
|
|
||
| <aside class="notice"> | ||
| If none of the provided VAT numbers match a Recipient eligible to receive content from the given Tenant, an empty list will be returned. | ||
| </aside> | ||
| parameters: | ||
| - name: tenantKey | ||
| in: path | ||
| description: The Tenant key that the matching should be done on behalf of. | ||
| required: true | ||
| schema: | ||
| type: string | ||
| format: hexadecimal | ||
| requestBody: | ||
| description: | | ||
| List of VAT numbers to be matched. The payload can be up to 10MB in size, corresponding to about 500.000 VAT numbers. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/CompanyMatchSet" | ||
| example: | ||
| list: ["SE559408724801", "SE556917354401", "SE556840226601"] | ||
| required: true | ||
| security: | ||
| - oAuth2Client: | ||
| - "post:kivra.v2.tenant.{tenantKey}.companymatch.vatnr_with_active_partner_integration" | ||
| responses: | ||
| 200: | ||
| description: Filtered list of VAT numbers that matched. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "#/components/schemas/CompanyMatchSet" | ||
| example: | ||
| list: ["SE556840226601", "SE559408724801"] | ||
| 413: | ||
|
|
@@ -5050,14 +5088,14 @@ components: | |
| - "[email protected]" | ||
|
|
||
| # ############################################## | ||
| # SCHEMA CompanyMatch | ||
| # SCHEMA CompanyMatchSet | ||
| # ############################################## | ||
| CompanyMatch: | ||
| CompanyMatchSet: | ||
| required: | ||
| - vat_numbers | ||
| - list | ||
| type: object | ||
| properties: | ||
| vat_numbers: | ||
| list: | ||
| type: array | ||
| items: | ||
| type: string | ||
|
|
@@ -5067,7 +5105,7 @@ components: | |
| - "SE25555555552" | ||
| description: list of VAT Numbers | ||
| example: | ||
| vat_numbers: | ||
| list: | ||
| - "SE25555555550" | ||
| - "SE25555555551" | ||
| - "SE25555555552" | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should refer to regular match here, along the lines of "You most likely want <regular matching functionality>. This is only for specific use cases, and will not give you all eligible recipients."