Description
As part of the canned response import, this API support adding multiple categories from a CSV file.
URI
/api/account/{accountId}/configuration/le-categories/import?v=2.0
HTTP Methods
POST
Response Codes
200 OK
400 Bad Request
401 Not Authorized
403 Forbidden
500 Internal server error
Formats
JSON
Path Parameters
Parameter | Description | Notes |
accountId | LP site id | Validation fail error code: 400 Type: String |
Query Parameters
Parameter | Description | Notes |
v | api version | Positive full double, current only 1.0 is supported |
fileType | Type of the file (parrent ac type) | CANNED_RESPONSE — canned response file type |
Request Headers
Header | Description |
Authorization | Contains token string to allow request authentication and authorization. See the doc for more details. |
Request Body
The request payload contain the CSV content as string and a structure for containing the validation errors in that CSV:
{ "csvContent":””, “errorsData”:{ “rows”:[ {“index”:1, “columns”:[“name”:”language”, “value”: “fake”], “errors”: [{“columnName”: “language”, “error” : “invalid language value”}]} ] } } |
Response Headers
Header | Description |
ac-revision | This parameter specifies the version of the data object retrieved. You can use the If-Match parameter in the request to retrieve a specifc version using this parameter's value. after the operation |
Response Body
The response contain all account categories (both existing and new categories from this import request)
[{ "id": 1, "deleted": false, "name": "iPhone4", "order": 1, "proposed": true }, { "id": 2, "deleted": false, "name": "Nexus5", "order": 2, "proposed": true }, { "id": 3, "deleted": false, "name": "Nexus6", "order": 3, "proposed": true }] |