> ## Documentation Index
> Fetch the complete documentation index at: https://developers.explorium.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Bulk Enrich With Custom Enrichment

> Enrich businesses using a custom enrichment.
Returns enriched data with the results from the custom enrichment.

## Consuming Custom Enrichments with the AgentSource API

After creating your custom enrichment, you can consume it through the AgentSource API. Here's how:

### Endpoint: `POST api.explorium.ai/v1/custom_enrichments/<custom_enrichment_id>/bulk_enrich`

## Description

Consume a custom enrichment by enriching a bulk of businesses.

#### Parameters

* **data\_context**: DataFrame DICT - Rows of data that will be used for evaluation. Must include a business\_id field and can optionally include other user features.

#### Request Example

```shell cURL theme={null}
POST api.explor{
  "data_context": [
    {
      "name": "Explorium",
      "business_id": "340c8040bd50cbab9c7df718bbe51cc9"
    },
    {
      "name": "Databricks",
      "business_id": "fe4ae057b38fcbb9e0dbcef83f918c42"
    },
    {
      "name": "Microsoft Corporation",
      "business_id": "a34bacf839b923770b2c360eefa26748"
    }
  ],
  "request_context": {
    "request_id": "ds7fdjhn293hsd8f9yu"
  }  
}
ium.ai/v1/custom_signals/<custom_signal_id>/enrich`
```

#### Response Example

```json cURL expandable theme={null}
{
  "response_context": {
    "correlation_id": "7155dd3ac8294e728eacc46632977e7a",
    "request_status": "success",
    "time_took_in_seconds": 0.474
  },
  "data": [
    {
      "business_id": "340c8040bd50cbab9c7df718bbe51cc9",
      "data": {
        "name": "Explorium",
        "business_id": "340c8040bd50cbab9c7df718bbe51cc9",
        "Business Type": "B2B",
        "Reasoning": "Explorium primarily serves businesses by providing data solutions and insights to enhance their go-to-market strategies, which aligns with a B2B model. The focus on enterprise-grade data and partnerships with industry leaders further supports this classification."
      }    
    },
    {
      "business_id": "fe4ae057b38fcbb9e0dbcef83f918c42",
      "data": {
        "name": "Databricks",
        "business_id": "fe4ae057b38fcbb9e0dbcef83f918c42",
        "Business Type": "B2B",
        "Reasoning": "Databricks primarily serves businesses and organizations, including many Fortune 500 companies, by providing data and AI solutions, which classifies it as a B2B company. The focus on enterprise-level services and partnerships further supports this classification."
      }
    },
    {
      "business_id": "a34bacf839b923770b2c360eefa26748",
      "data": {
        "name": "Microsoft Corporation",
        "business_id": "a34bacf839b923770b2c360eefa26748",
        "Business Type": "B2B2C",
        "Reasoning": "Microsoft operates in both B2B and B2C markets, providing software and services to businesses while also offering products directly to consumers, such as Windows and Office software. Their diverse range of offerings, including cloud services and developer tools, supports both business clients and individual users."
      }
    }
  ]
}
```


## OpenAPI

````yaml post /v1/custom_enrichments/{enrichment_id}/bulk_enrich
openapi: 3.1.0
info:
  title: Partner Service
  version: 0.3.32
servers:
  - url: https://api.explorium.ai
    description: AgentSource Server
security: []
paths:
  /v1/custom_enrichments/{enrichment_id}/bulk_enrich:
    post:
      tags:
        - CustomEnrichments
      summary: Bulk Enrich With Custom Enrichment
      description: |-
        Enrich businesses using a custom enrichment.
        Returns enriched data with the results from the custom enrichment.
      operationId: bulk_enrich_with_custom_enrichment
      parameters:
        - required: true
          schema:
            type: string
            title: Enrichment Id
          name: enrichment_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessesBulkEnrichRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomEnrichmentEnrichResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - APIKeyHeader: []
components:
  schemas:
    BusinessesBulkEnrichRequest:
      properties:
        request_context:
          type: object
          title: Request Context
          nullable: true
          example: null
        parameters:
          type: object
          title: Parameters
          nullable: true
        business_ids:
          items:
            type: string
            pattern: ^[a-f0-9]{32}$
          type: array
          maxItems: 50
          minItems: 1
          title: Business Ids
      additionalProperties: false
      type: object
      required:
        - business_ids
      title: BusinessesBulkEnrichRequest
    CustomEnrichmentEnrichResponse:
      properties:
        response_context:
          $ref: '#/components/schemas/ResponseContext'
        data:
          items:
            $ref: '#/components/schemas/CustomEnrichmentResponseRow'
          type: array
          title: Data
        total_results:
          type: integer
          title: Total Results
      type: object
      required:
        - response_context
        - data
        - total_results
      title: CustomEnrichmentEnrichResponse
      description: Response model for enriched data from a custom enrichment.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ResponseContext:
      properties:
        correlation_id:
          type: string
          title: Correlation Id
        request_status:
          $ref: '#/components/schemas/RequestStatus'
        time_took_in_seconds:
          type: number
          title: Time Took In Seconds
      type: object
      required:
        - correlation_id
        - request_status
        - time_took_in_seconds
      title: ResponseContext
    CustomEnrichmentResponseRow:
      properties:
        business_id:
          type: string
          pattern: ^[a-f0-9]{32}$
          title: Business Id
        data:
          type: object
          title: Data
          description: The enriched data from the custom enrichment
      type: object
      required:
        - business_id
        - data
      title: CustomEnrichmentResponseRow
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    RequestStatus:
      type: string
      enum:
        - success
        - miss
        - failure
      title: RequestStatus
      description: >-
        The `RequestStatus` class is an enumeration that defines the possible
        statuses of a request.


        This enum is used to indicate whether a request was successful, missed,
        or failed. It ensures

        consistent handling of request statuses across the application.


        Attributes:
            SUCCESS: Indicates that the request was successfully processed.
            MISS: Indicates that the request did not find any matching data.
            FAILURE: Indicates that the request encountered an error or failure.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: api_key

````