Productsup

Create an export template attribute

Creates an attribute on an export template. The attribute is added to every channel created from the template in the ProductsUp platform. **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-templates/{id}/attributes

Authorization

bearerAuth
AuthorizationBearer <token>

ProductsUp Keycloak JWT bearer token.

In: header

Path Parameters

id*string

Export template id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://export-template-api.productsup.com/V1/export-templates/string/attributes" \  -H "Content-Type: application/json" \  -d '{    "fieldName": "color",    "alias": "some alias",    "mandatory": true,    "type": "optional",    "conditions": [],    "flag": "colors",    "isDefaultTrackingColumn": true,    "isUniqueColumn": true,    "order": 5,    "deltaIgnore": true,    "deltaKey": true,    "automapIgnore": true,    "description": "some description",    "format": "String (Unicode Characters)",    "examples": [      "some example"    ]  }'
{
  "data": {
    "id": 995842,
    "alias": "",
    "mandatory": false,
    "type": "optional",
    "conditions": [],
    "flag": "",
    "isDefaultTrackingColumn": false,
    "isUniqueColumn": false,
    "order": 0,
    "deltaIgnore": false,
    "deltaKey": false,
    "automapIgnore": false,
    "description": "",
    "format": null,
    "export": {
      "id": 58902,
      "unpublishedChanges": true
    },
    "fieldname": "color",
    "examples": [
      null
    ]
  }
}
{
  "errors": {
    "message": "Request validation has encountered constraint violations.",
    "errors": {
      "fieldName": [
        "This value should not be blank."
      ]
    }
  }
}
{
  "errors": {
    "message": "Resource access denied."
  }
}
{
  "errors": {
    "message": "An Export Template Attribute with the same field name already exists."
  }
}