"Legal Entity Management API skill. Use when working with Legal Entity Management for businessLines, documents, legalEntities. Covers 34 endpoints."
Resources
1Install
npx skillscat add lap-platform/claude-marketplace/legal-entity-management-api Install via the SkillsCat registry.
SKILL.md
Legal Entity Management API
API version: 3
Auth
ApiKey X-API-Key in header | Bearer basic
Base URL
https://kyc-test.adyen.com/lem/v3
Setup
- Set Authorization header with your Bearer token
- GET /themes -- verify access
- POST /businessLines -- create first businessLines
Endpoints
34 endpoints across 5 groups. See references/api-spec.lap for full details.
businessLines
| Method | Path | Description |
|---|---|---|
| POST | /businessLines | Create a business line |
| GET | /businessLines/{id} | Get a business line |
| DELETE | /businessLines/{id} | Delete a business line |
| PATCH | /businessLines/{id} | Update a business line |
documents
| Method | Path | Description |
|---|---|---|
| POST | /documents | Upload a document for verification checks |
| GET | /documents/{id} | Get a document |
| DELETE | /documents/{id} | Delete a document |
| PATCH | /documents/{id} | Update a document |
legalEntities
| Method | Path | Description |
|---|---|---|
| POST | /legalEntities | Create a legal entity |
| GET | /legalEntities/{id} | Get a legal entity |
| PATCH | /legalEntities/{id} | Update a legal entity |
| GET | /legalEntities/{id}/acceptedTermsOfServiceDocument/{termsofserviceacceptancereference} | Get accepted Terms of Service document |
| GET | /legalEntities/{id}/businessLines | Get all business lines under a legal entity |
| POST | /legalEntities/{id}/checkTaxElectronicDeliveryConsent | Check the status of consent for electronic delivery of tax forms |
| POST | /legalEntities/{id}/checkVerificationErrors | Check a legal entity's verification errors |
| POST | /legalEntities/{id}/confirmDataReview | Confirm data review |
| POST | /legalEntities/{id}/onboardingLinks | Get a link to an Adyen-hosted onboarding page |
| GET | /legalEntities/{id}/pciQuestionnaires | Get PCI questionnaire details |
| POST | /legalEntities/{id}/pciQuestionnaires/generatePciTemplates | Generate PCI questionnaire |
| POST | /legalEntities/{id}/pciQuestionnaires/signPciTemplates | Sign PCI questionnaire |
| POST | /legalEntities/{id}/pciQuestionnaires/signingRequired | Calculate PCI status of a legal entity |
| GET | /legalEntities/{id}/pciQuestionnaires/{pciid} | Get PCI questionnaire |
| POST | /legalEntities/{id}/setTaxElectronicDeliveryConsent | Set the consent status for electronic delivery of tax forms |
| POST | /legalEntities/{id}/termsOfService | Get Terms of Service document |
| PATCH | /legalEntities/{id}/termsOfService/{termsofservicedocumentid} | Accept Terms of Service |
| GET | /legalEntities/{id}/termsOfServiceAcceptanceInfos | Get Terms of Service information for a legal entity |
| GET | /legalEntities/{id}/termsOfServiceStatus | Get Terms of Service status |
| POST | /legalEntities/{id}/requestPeriodicReview | Request periodic data review. |
themes
| Method | Path | Description |
|---|---|---|
| GET | /themes | Get a list of hosted onboarding page themes |
| GET | /themes/{id} | Get an onboarding link theme |
transferInstruments
| Method | Path | Description |
|---|---|---|
| POST | /transferInstruments | Create a transfer instrument |
| GET | /transferInstruments/{id} | Get a transfer instrument |
| DELETE | /transferInstruments/{id} | Delete a transfer instrument |
| PATCH | /transferInstruments/{id} | Update a transfer instrument |
Enhanced Skill Content
Question Mapping
- "How do I create a new legal entity for an organization?" -> POST /legalEntities
- "How do I look up a legal entity by its ID?" -> GET /legalEntities/{id}
- "How do I update an individual's address or name?" -> PATCH /legalEntities/{id}
- "How do I upload a passport or ID document for KYC?" -> POST /documents
- "How do I check if a legal entity has verification errors?" -> POST /legalEntities/{id}/checkVerificationErrors
- "How do I create an onboarding link for a merchant?" -> POST /legalEntities/{id}/onboardingLinks
- "How do I add a bank account to a legal entity?" -> POST /transferInstruments
- "How do I set up a business line for payment processing?" -> POST /businessLines
- "How do I accept the terms of service for a legal entity?" -> PATCH /legalEntities/{id}/termsOfService/{termsofservicedocumentid}
- "How do I check which terms of service still need to be accepted?" -> GET /legalEntities/{id}/termsOfServiceStatus
- "How do I get all business lines for a legal entity?" -> GET /legalEntities/{id}/businessLines
- "How do I check if PCI questionnaire signing is required?" -> POST /legalEntities/{id}/pciQuestionnaires/signingRequired
- "How do I delete a document that was uploaded by mistake?" -> DELETE /documents/{id}
- "How do I retrieve a document without downloading its content?" -> GET /documents/{id} (with skipContent=true)
- "How do I list available hosted onboarding themes?" -> GET /themes
Response Tips
- Legal entities: Response includes a type-specific sub-object (
individual,organization,soleProprietorship,trust,unincorporatedPartnership) -- only the one matching the entity type is populated; ignore the rest. Checkproblemsarray for actionable verification issues.entityAssociationslinks shareholders/signatories to sub-entities. - Business lines: The
problemsarray on create/update indicates missing data blocking activation.capabilityandservicedetermine what the business line enables. Theidreturned is needed for all subsequent operations. - Documents: The
attachment.contentfield is base64-encoded binary -- omit it in read calls usingskipContent=trueto reduce payload size.owner.idandowner.typetie the document to a legal entity or transfer instrument. - Transfer instruments:
bankAccount.accountIdentificationis a polymorphicanytype -- its shape varies by country (IBAN vs. US routing/account number vs. others). Always checkproblemsfor bank account validation issues. - Terms of service:
GET .../termsOfServiceStatusreturns an array of required ToS types.POST .../termsOfServicefetches the document;PATCH .../termsOfService/{id}records acceptance. The document content is base64-encoded. - Themes:
GET /themessupports cursor-based pagination vianextandpreviousURL fields -- follow these until both are null. - Errors: All endpoints share the same error codes (400, 401, 403, 422, 500). 422 typically means validation failure with details in the response body. 403 can mean insufficient API credential scope, not just authentication failure.
Anomaly Flags
problemsarray is non-empty: Surface immediately after any create/update on legal entities, business lines, or transfer instruments. These indicate verification blockers or missing required data that will prevent activation.verificationDeadlinesapproaching: Legal entity responses include deadline dates for required verification actions. Flag any deadline within 7 days as urgent.- 422 on entity updates: Often means a required nested field is missing (e.g.,
registeredAddresson an organization). Surface the full error body -- it usually contains field-level detail. - Document expiry dates: When retrieving documents, flag any where
expiryDateis in the past or within 30 days. Expired identity documents block verification. - Missing capabilities: If
capabilitiesmap on a legal entity or transfer instrument shows any capability not inallowedstate, surface which capabilities are blocked and why. - Terms of service not accepted: If
termsOfServiceStatusreturns non-emptytermsOfServiceTypes, the entity cannot transact until these are accepted. Flag proactively after entity creation. - PCI signing required: After creating business lines with ecommerce sales channels, proactively check
signingRequired-- unresolved PCI obligations block payment processing. x-requested-verification-codeheader usage: This header triggers re-verification. Flag when it appears in requests, as it resets verification state and may cause temporary processing disruption.
Playbook
Onboard a New Organization
- Create the legal entity:
POST /legalEntitieswithtype: "organization", providinglegalName,registeredAddress, andregistrationNumberin theorganizationobject. - Note the returned
id-- this is thelegalEntityIdfor all subsequent steps. - Create entity associations for shareholders/signatories:
PATCH /legalEntities/{id}withentityAssociationslinking to individual legal entities (create those first via separatePOST /legalEntitieswithtype: "individual"). - Upload required documents:
POST /documentswithowner.idset to the legal entity ID,owner.typeset to"organization", and appropriatetype(e.g.,registrationDocument,proofOfAddress). - Create a business line:
POST /businessLineswith thelegalEntityId,industryCode, andservice. - Check for verification errors:
POST /legalEntities/{id}/checkVerificationErrorsand resolve any items in theproblemsarray. - Check terms of service status:
GET /legalEntities/{id}/termsOfServiceStatus, then for each required type, fetch withPOST /legalEntities/{id}/termsOfServiceand accept withPATCH /legalEntities/{id}/termsOfService/{docId}.
Add a Bank Account to an Existing Entity
- Retrieve the legal entity:
GET /legalEntities/{id}to confirm it exists and note its type. - Create the transfer instrument:
POST /transferInstrumentswithlegalEntityId,type: "bankAccount", and thebankAccountobject containingaccountIdentification,countryCode, andaccountType. - Check the response
problemsarray for validation issues (wrong IBAN format, unsupported country, etc.). - If problems exist, correct the data and update:
PATCH /transferInstruments/{id}. - Optionally upload a bank statement:
POST /documentswithtype: "bankStatement"andownerpointing to the transfer instrument ID.
Complete PCI Compliance
- Check if signing is required:
POST /legalEntities/{id}/pciQuestionnaires/signingRequired, optionally passingadditionalSalesChannels. - If
signingRequiredis true, generate PCI templates:POST /legalEntities/{id}/pciQuestionnaires/generatePciTemplateswith the desiredlanguage. - Note the
pciTemplateReferencesin the response -- these identify the templates to sign. - Sign the templates:
POST /legalEntities/{id}/pciQuestionnaires/signPciTemplateswith thepciTemplateReferencesarray andsignedBy(name of the signer). - Verify completion:
GET /legalEntities/{id}/pciQuestionnairesto confirm questionnaires are on file.
Generate a Hosted Onboarding Link
- Ensure the legal entity exists:
GET /legalEntities/{id}. - Optionally select a theme:
GET /themesto list available themes, note the desiredthemeId. - Generate the link:
POST /legalEntities/{id}/onboardingLinkswithredirectUrl(where the user returns after onboarding), optionallocalefor language, optionalthemeId, and anysettingsoverrides (e.g.,acceptedCountries,instantBankVerification). - Use the returned
urlto redirect the merchant to the hosted onboarding page. - After onboarding completes, confirm data review:
POST /legalEntities/{id}/confirmDataReview.
Update Entity Details and Trigger Re-verification
- Retrieve current entity state:
GET /legalEntities/{id}. - Update the entity:
PATCH /legalEntities/{id}with the changed fields. Include thex-requested-verification-codeheader if you need to trigger re-verification of already-verified data. - Check verification errors:
POST /legalEntities/{id}/checkVerificationErrorsto see if the update introduced new issues. - Upload any newly required documents flagged in the
problemsarray:POST /documents. - If needed, request a periodic review:
POST /legalEntities/{id}/requestPeriodicReview(returns 204 on success).
Response Tips
- Check response schemas in references/api-spec.lap for field details
- Create/update endpoints typically return the created/updated object
References
- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas
Generated from the official API spec by LAP