Import Products From CSV

circle-exclamation

API: Import Products From CSV

Endpoint: GET /api/v1/products/import_from_csv/

api_method.json
{
  "name": "Imports products from CSV, if requesting manager has access permissions to it.",
  "method": "GET",
  "url": "/api/v1/products/import_from_csv/",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "Md5Q426svR_gPyjtwRYdx",
        "language": "null",
        "code": "product_name,short_code\nProduct A,P001\nProduct B,P002",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Md5Q426svR_gPyjtwRYdx"
  },
  "results": {
    "languages": [
      {
        "id": "q_CuWfa9h1xrk4iL71xDm",
        "language": "200",
        "code": "{\n    \"job_id\": 10\n}",
        "customLabel": ""
      },
      {
        "id": "SM2P7Co9RZtZMaA1DW1-v",
        "language": "404",
        "code": "{\n  \"message\": \"Ain't no cake like that.\"\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "q_CuWfa9h1xrk4iL71xDm"
  },
  "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

  • product_name

  • short_code

Possible CSV Headers

  • product_name – String

  • short_code – String

  • active – Boolean

  • valid_duration – String

  • trial_days – Integer

  • hardware_id_required – Boolean

  • allow_trial – Boolean

  • authorization_method – String

    • values can be license-key, user

  • is_archived – Boolean

  • floating_timeout – Integer

  • is_bundle – Boolean

circle-info

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

Was this helpful?