How to map your existing Products, Customers and Vendors with Swipe API

If you using Swipe API in a fresh account you don’t need to do any mapping. Just integrate the API’s and you are ready to rock :sign_of_the_horns:

Each product has its own Product ID, while Swipe assigns a unique Swipe Item ID for internal tracking. Product ID Mapping links these IDs for accurate integration.

In this blog, we’ll explain the difference between Product ID and Swipe Item ID, why mapping is essential, and how you can update mappings using Swipe’s API.

What is a Product ID?

A Product ID uniquely identifies a product in your system.

Example of a Product ID:

{
  "product_id": "PROD123456"
}

What is a Swipe Item ID?

A Swipe Item ID is a unique identifier generated by the Swipe platform to internally track the product. This ID is used within Swipe to manage products and prevent duplication.

Why is Product ID Mapping Important in Swipe?

  • Avoid Duplicates: Prevents creating the same product multiple times in Swipe.
  • Track Products: Ensures every product has a unique reference in Swipe. Whenever you send a Product ID, Swipe creates a Swipe Item ID and maps it to the provided Product ID
  • Seamless Integration: Provides a clear linkage between your product records and Swipe’s internal records.

How Does Product ID Mapping Work?

Here’s a simple flow:

  1. Received Product ID: When you send a Product ID, Swipe checks if it already exists.
  2. Generate a New Product in Swipe: If the Product ID doesn’t exist, Swipe creates a new product and assigns a Swipe Item ID.
  3. Map Product ID to Swipe Item ID: Swipe then links the Product ID to the Swipe Item ID.
  4. Update Mapping if Needed: New products are mapped automatically. To link a Swipe Dashboard product to a different ID, use the Product Mapping API.

Product Mapping API Payload

The following payload is used to map a Product ID to a Swipe Item ID.

Payload Example:

{
  "item_mapping": [
    {
      "item_id": "PROD123456",
      "swipe_id": "1",
      "force_update": true
    }
  ]
}

Explanation of the Payload

  • item_id: The Product ID provided by you.
  • swipe_id: The Swipe Item ID created by Swipe to internally track the product.
  • force_update: If set to true, it will update the mapping even if it already exists.

Example Scenario

Suppose you send a Product ID PROD123456 to Swipe:

  1. Swipe checks if PROD123456 already has a Swipe Item ID.
  2. If not, Swipe creates a new product and assigns a Swipe Item ID: 1.
  3. Swipe then maps PROD123456 to Swipe Item ID: 1.
  4. If you change the product information in Swipe Dashboard, the mapping can be updated using the API.