Functions

Update a Function

PUT
/v2/functions/{functionName}
x-api-key<token>

Authenticate using API Key in request header

In: header

Path Parameters

functionNamestring
functionName?string

Name of function. Must be UNIQUE on a per-environment basis.

displayName?string

Display name of function. Human-readable name to help you identify the function.

tags?array<string>

Array of tags to categorize and organize functions.

outputSchemaName?string

Name of output schema object.

outputSchema?object

Desired output structure defined in standard JSON Schema convention.

Empty Object

independentDocumentProcessingEnabled?boolean

Whether independent transformations is enabled. For PDFs sent through the pipeline, this enables independent transformations for each individual page. For CSVs, this enables transforming chunks of rows in the CSV.

complexTabularTransformEnabled?boolean

Whether complex tabular transforms are enabled on the pipeline. This enables the pipeline to parse CSVs with multiple tables in the same file, and to transpose CSVs that can't be parsed row-wise.

functionName?string

Name of function. Must be UNIQUE on a per-environment basis.

displayName?string

Display name of function. Human-readable name to help you identify the function.

tags?array<string>

Array of tags to categorize and organize functions.

outputSchemaName?string

Name of output schema object.

outputSchema?object

Desired output structure defined in standard JSON Schema convention.

Empty Object

functionName?string

Name of function. Must be UNIQUE on a per-environment basis.

displayName?string

Display name of function. Human-readable name to help you identify the function.

tags?array<string>

Array of tags to categorize and organize functions.

description?string

Description of router. Can be used to provide additional context on router's purpose and expected inputs.

routes?RouteList

List of routes.

functionName?string

Name of function. Must be UNIQUE on a per-environment basis.

displayName?string

Display name of function. Human-readable name to help you identify the function.

tags?array<string>

Array of tags to categorize and organize functions.

splitType?string
Value in"print_page" | "semantic_page"
printPageSplitConfig?object
semanticPageSplitConfig?object
functionName?string

Name of function. Must be UNIQUE on a per-environment basis.

displayName?string

Display name of function. Human-readable name to help you identify the function.

tags?array<string>

Array of tags to categorize and organize functions.

description?string

Description of join function.

joinType?string

The type of join to perform.

Value in"standard"
outputSchemaName?string

Name of output schema object.

outputSchema?object

Desired output structure defined in standard JSON Schema convention.

Empty Object

Response Body

curl -X PUT "https://api.bem.ai/v2/functions/string" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "functionID": "string",
  "functionName": "string",
  "versionNum": 0,
  "type": "transform",
  "displayName": "string",
  "tags": [
    "billing",
    "finance",
    "automated"
  ],
  "outputSchemaName": "Freight Load Schema",
  "outputSchema": {
    "type": "object",
    "required": [
      "tenders"
    ],
    "properties": {
      "tenders": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "loadReference",
            "origin",
            "destination",
            "weightTons",
            "loadType",
            "desiredDeliveryDate",
            "bidSubmissionDeadline",
            "submitter"
          ],
          "properties": {
            "origin": {
              "type": "string",
              "description": "The starting point of the shipment."
            },
            "loadType": {
              "type": "string",
              "description": "The type of goods being shipped."
            },
            "submitter": {
              "type": "object",
              "required": [
                "name",
                "position",
                "contactInfo"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Name of the person submitting the tender."
                },
                "position": {
                  "type": "string",
                  "description": "Position of the submitter within their company."
                },
                "contactInfo": {
                  "type": "object",
                  "required": [
                    "email"
                  ],
                  "properties": {
                    "email": {
                      "type": "string",
                      "format": "email",
                      "description": "Email address of the submitter."
                    },
                    "phone": {
                      "type": "string",
                      "description": "Phone number of the submitter."
                    }
                  }
                }
              }
            },
            "weightTons": {
              "type": "number",
              "description": "The weight of the load in tons."
            },
            "destination": {
              "type": "string",
              "description": "The endpoint of the shipment."
            },
            "loadReference": {
              "type": "string",
              "description": "Unique identifier for the load tender."
            },
            "desiredDeliveryDate": {
              "type": "string",
              "format": "date",
              "description": "The preferred date for the shipment to be delivered."
            },
            "bidSubmissionDeadline": {
              "type": "string",
              "format": "date",
              "description": "The deadline for submitting bids."
            }
          }
        }
      }
    }
  },
  "emailAddress": "eml_2c9AXFXHwiaL4vPXDTOS171OJ8T@pipeline.bem.ai",
  "independentDocumentProcessingEnabled": false,
  "complexTabularTransformEnabled": true
}