Productsup

Create an export custom form field

Creates a custom form field on an export template. The field appears in the site channel settings in the Productsup platform for channels created from the template. **Publishing required.** This request stores a draft. The change becomes available in the Productsup platform only after you publish the export template with `POST /V1/export-templates/{id}/commit`.

POST
/V1/export/{exportId}/export-custom-form-field
AuthorizationBearer <token>

Productsup Keycloak JWT bearer token.

In: header

Path Parameters

exportId*string

Export id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://export-template-api.productsup.com/V1/export/string/export-custom-form-field" \  -H "Content-Type: application/json" \  -d '{    "name": "type",    "caption": "Type",    "type": "select",    "placeholder": "example type",    "data": "{\'options\':[{\'value\':\'yes\',\'caption\':\'yes\'},{\'value\':\'no\',\'caption\':\'no\'}]}",    "trigger": "ADD_NAME_HEADER",    "order": 1  }'
{
  "data": {
    "id": 2587,
    "name": "type",
    "caption": "Type",
    "type": "select",
    "placeholder": "example type",
    "data": "{'options':[{'value':'yes','caption':'yes'},{'value':'no','caption':'no'}]}",
    "trigger": "ADD_NAME_HEADER",
    "order": 1,
    "export": {
      "id": 58786
    }
  }
}
{
  "errors": {
    "message": "Request validation has encountered constraint violations.",
    "errors": {
      "name": [
        "This field is missing."
      ],
      "caption": [
        "This field is missing."
      ],
      "type": [
        "This field is missing."
      ]
    }
  }
}
{
  "errors": {
    "message": "Resource access denied."
  }
}
{
  "errors": {
    "message": "Export with id 123 not found."
  }
}
{
  "errors": {
    "message": "An Export Custom Form Field with the same name already exists."
  }
}