Skip to content

Import Engine: API Examples

1. Create Import Definition

Endpoint

POST /imports

Request Body

{
  "name": "Item Master CAD Integration",
  "resource": "ITEM_SPECS",
  "mode": "OVERWRITE",
  "options": {
    "matchDuplicates": "ERROR",
    "removeValue": "[Remove Value]",
    "stripWhiteSpace": "STRIP",
    "mapping": [
      { "resource": "ITEM_SPECS", "apiName": "name", "sourceName": "Name" },
      { "resource": "ITEM_SPECS", "apiName": "number", "sourceName": "Number" }
    ]
  }
}

Response Highlights

Returns a guid for the definition (e.g., XFZINDEENUUXGZI1K3W). You need this for the next step.


2. Run Import

Endpoint

POST /imports/{definitionGuid}/runs

Request (Form Data)

  • commit: false (Recommended for initial check)
  • submitWorksheetName: "Item Master" (If using Excel)
  • submitContent: Binary file data

Response

{
  "status": "CREATED",
  "guid": "YG0JOEFFOVVXGZI1K3I1",
  "commit": false,
  "totalCount": 9,
  "successCount": 0
}

3. Check Status

Endpoint

GET /imports/{definitionGuid}/runs/{runGuid}

Wait until status is COMPLETE.

Response

{
  "status": "COMPLETE",
  "totalCount": 9,
  "successCount": 8,
  "errorCount": 1
}

4. Get Error Details

Endpoint

GET /imports/{definitionGuid}/runs/{runGuid}/errorContent

Sample CSV Output

Row Number Number Status Error Code Error Message
4 120-003-21 Error 8012 Name is required.

5. Commit Import

Endpoint

PUT /imports/{definitionGuid}/runs/{runGuid}

Request

{
  "commit": true
}