Import Product Features From CSV

circle-exclamation

API: Import Product Features From CSV

POST /api/v1/product-features/import_from_csv/

Request example (body is a multipart/form-data with a single key file containing the CSV):

request-example.json
{
  "name": "Imports product features from CSV, if requesting manager has access permissions to it.",
  "method": "POST",
  "url": "/api/v1/product-features/import_from_csv/",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "cVkBNeTSjCHH3I0NWdIuK",
        "language": "null",
        "code": "product__short_code,code,name\nLKP1,C123,A\nLKP1,C456,B",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "cVkBNeTSjCHH3I0NWdIuK"
  },
  "results": {
    "languages": [
      {
        "id": "8w1J4_HXTeLrmpu6Oqixt",
        "language": "200",
        "code": "{\n    \"job_id\": 10\n}",
        "customLabel": ""
      },
      {
        "id": "zScCpvwnk5k1zKlkOXi1z",
        "language": "404",
        "code": "{\n  \"message\": \"Ain't no cake like that.\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "8w1J4_HXTeLrmpu6Oqixt"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "hasTryItOut": false
}

Content-Type

  • Required Content-Type is multipart/form-data with the following single key value pair:

    • Key: file

    • Value: {csv file from which to import}

Required CSV Headers

  • name

  • code

Possible CSV Headers

  • code – String

  • product__short_code – String

  • feature_type – String

    • Choices: activation, consumption

  • max_consumption – Integer

  • allow_overages – Boolean

  • max_overages – Integer

  • reset_consumption – Boolean

  • consumption_period – String

    • Choices: daily, weekly, monthly, annually

  • is_floating – Boolean

  • is_floating_cloud – Boolean

  • floating_users – Integer

  • floating_timeout – Integer

circle-info

job_id from response can be used to query the import result.

Was this helpful?