arazzo: 1.0.1 info: title: D&B Manage Portfolio Membership summary: Match a candidate, remove its D-U-N-S Number from a monitoring registration, and confirm remaining notifications. description: >- A portfolio-maintenance flow for retiring a monitored company. The workflow resolves a candidate record to a D-U-N-S Number, removes that D-U-N-S Number from an existing monitoring registration's portfolio, and pulls remaining notifications to confirm the registration is still active. Each step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: dnbDirectPlusApi url: ../openapi/dnb-direct-plus-openapi-original.yml type: openapi workflows: - workflowId: manage-portfolio-membership summary: Match, remove a D-U-N-S Number from a registration, then pull remaining notifications. description: >- Resolves a candidate to its top D-U-N-S Number, removes that D-U-N-S Number from the supplied monitoring registration's portfolio, and pulls remaining notifications for the registration. inputs: type: object required: - accessToken - name - countryISOAlpha2Code - registrationReference properties: accessToken: type: string description: A valid Direct+ OAuth 2.0 bearer access token. name: type: string description: Business name to resolve. countryISOAlpha2Code: type: string description: ISO 3166-1 alpha-2 country code of the candidate. registrationReference: type: string description: Reference of the monitoring registration to modify. maximumQuantity: type: integer description: Maximum number of remaining notifications to pull. default: 100 steps: - stepId: matchCompany description: >- Resolve the candidate record to ranked D-U-N-S match candidates. operationId: cleanseMatch parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: name in: query value: $inputs.name - name: countryISOAlpha2Code in: query value: $inputs.countryISOAlpha2Code successCriteria: - condition: $statusCode == 200 outputs: topDuns: $response.body#/matchCandidates/0/organization/duns - stepId: removeDuns description: >- Remove the resolved D-U-N-S Number from the monitoring registration's portfolio. operationId: removeDunsFromRegistration parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: registrationReference in: path value: $inputs.registrationReference requestBody: contentType: application/json payload: dunsList: - $steps.matchCompany.outputs.topDuns successCriteria: - condition: $statusCode == 200 outputs: removedQuantity: $response.body#/removedQuantity - stepId: pullRemaining description: >- Pull remaining change notifications to confirm the registration is still active after the removal. operationId: pullMonitoringNotifications parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: registrationReference in: path value: $inputs.registrationReference - name: maximumQuantity in: query value: $inputs.maximumQuantity successCriteria: - condition: $statusCode == 200 outputs: notifications: $response.body#/notifications outputs: removedDuns: $steps.matchCompany.outputs.topDuns removedQuantity: $steps.removeDuns.outputs.removedQuantity remainingNotifications: $steps.pullRemaining.outputs.notifications