Productsup
API referenceV1Export template

Update an export template

An export template is a resource that holds the main information of a template for creating channels. This is the main resource which is linked to all other sub-resources that comprise the full channel template. After an export template has been created, all other sub-resources can be linked to it to create an entire channel template. This endpoint allows the updating of an export template.

PATCH
/V1/export-templates/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

ProductsUp Keycloak JWT bearer token.

In: header

Path Parameters

id*string

Export template id.

Header Parameters

X-Channel-Template-Context?string

Name of channel template context to process request against.

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 PATCH "https://export-template-api.productsup.com/V1/export-templates/string" \  -H "Content-Type: application/json" \  -d '{    "name": "a new export name 2",    "encoding": "UTF-16",    "pseudo": false,    "allowXml": true,    "validDelimiter": "COMMA",    "roiOptions": "PAUSE",    "logoUrl": "https://www.image.com/image.png",    "createDelta": true,    "deltaKeyUnique": true,    "deltaNewFilename": "newFile.csv",    "deltaChangedFilename": "changedFile.csv",    "deltaDeletedFilename": "deletedFile.csv",    "deltaUnchangedFilename": "unchangedFile.csv",    "deltaSkippedFilename": "skippedFile.csv",    "deltaSingleFile": true,    "customClassName": "Blank",    "defaultFilename": "foo.csv",    "exportType": {      "type": "sub",      "mainExportId": 321    },    "context": {      "accountIds": [        1000,        2000      ],      "projectIds": [        100,        200      ],      "siteIds": [        3000      ]    }  }'
{
  "data": {
    "id": 108529,
    "name": "a new export name 2",
    "encoding": "UTF-16",
    "global": false,
    "pseudo": false,
    "allowXml": true,
    "validDelimiter": "COMMA",
    "roiOptions": "PAUSE",
    "accountId": 0,
    "projectId": 0,
    "siteId": 0,
    "logoUrl": "https://www.image.com/image.png",
    "createDelta": true,
    "deltaKeyUnique": true,
    "deltaNewFilename": "newFile.csv",
    "deltaChangedFilename": "changedFile.csv",
    "deltaDeletedFilename": "deletedFile.csv",
    "deltaUnchangedFilename": "unchangedFile.csv",
    "deltaSkippedFilename": "skippedFile.csv",
    "deltaSingleFile": true,
    "customClassName": "Blank",
    "defaultFilename": "foo.csv",
    "exportMarketing": {
      "id": 90454,
      "type": null,
      "publish": null,
      "marketingTitle": null,
      "websiteLink": null,
      "landingPageLink": null,
      "featured": null,
      "products": null,
      "description": null,
      "priority": 0,
      "helpLink": null,
      "exportCategoryIds": [
        "19"
      ],
      "exportCountryIds": [],
      "exportBrand": null
    },
    "fields": [],
    "tags": [
      {
        "id": 59319,
        "key": "main_channel_type_id",
        "value": "321"
      }
    ],
    "customFormFields": [],
    "owner": {
      "ownerId": "019804ae-4b33-7890-b5b8-9ee571a72c10"
    },
    "exportType": {
      "type": "sub",
      "mainExportId": 321
    },
    "context": {
      "accountIds": [
        1000,
        2000
      ],
      "projectIds": [
        100,
        200
      ],
      "siteIds": [
        3000
      ]
    }
  }
}
{
  "errors": {
    "message": "Request validation has encountered constraint violations.",
    "errors": {
      "name": [
        "This value should not be blank."
      ]
    }
  }
}
{
  "errors": {
    "message": "Insufficient permission when attempting to modify 'global'."
  }
}
{
  "errors": {
    "message": "Export template with id 99999 not found."
  }
}

How is this guide?