Bulk create export template attributes
Creates up to 500 attributes on an export template in a single request (an export template supports at most 5000 attributes in total). Each entry follows the same requirements as creating a single attribute and must carry a unique requestKey that identifies it in the response. **Duplicate names.** An entry whose fieldName already exists on the export template, or appears earlier in the same request, is not created. Names are compared case-insensitively, so `Color` and `color` are the same attribute. That entry comes back with a `message` in its `errors` and no entity id, and the other entries are still created. **Order.** An entry without an `order` is placed after the attributes the export template already has, in the order of the request: it gets the template's highest `order` plus one, the next such entry plus two, and so on. An entry with an `order` keeps it. **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`.
Productsup Keycloak JWT bearer token.
In: header
Path Parameters
Export template id.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://export-template-api.productsup.com/V1/export-templates/string/attributes/bulk-create" \ -H "Content-Type: application/json" \ -d '{ "entries": [ { "requestKey": "1", "exportField": { "fieldName": "color", "alias": "some alias", "mandatory": true, "flag": "colors", "isDefaultTrackingColumn": true, "isUniqueColumn": true, "order": 5, "deltaIgnore": true, "deltaKey": true, "automapIgnore": true, "description": "some description", "format": "String (Unicode Characters)", "examples": [ "some example" ] } }, { "requestKey": "2", "exportField": { "fieldName": "brand", "mandatory": false, "order": 2 } }, { "requestKey": "3", "exportField": { "fieldName": "size", "order": 3 } } ] }'{
"data": [
{
"errors": [],
"requestKey": "1",
"details": {
"entityId": 995308
}
},
{
"errors": [],
"requestKey": "2",
"details": {
"entityId": 995309
}
},
{
"errors": {
"message": "Attribute \"color\" already exists and cannot be added again."
},
"requestKey": "3"
}
]
}{
"errors": {
"message": "Request validation has encountered constraint violations.",
"errors": {
"entries": [
"This collection should contain 500 elements or less."
]
}
}
}{
"errors": {
"message": "Resource access denied."
}
}How is this guide?