Back

Unique Identifiers in APIs: Why They Matter for Affiliate Data (FMTC Guide)

X Facebook Linked In

Written by Josh Hutter

What Are Unique Identifiers?

A unique identifier (ID) is a value assigned to a specific entity—such as a product, merchant, or category—that distinguishes it from all others in a system.

FMTC manages dynamic data that changes frequently. That could be a merchant changing their name, buying another company, or possibly rebranding. In cases like this, you can’t rely on a name remaining the same for any amount of time. Unique identifiers solve this problem by ensuring you always reference the correct data, regardless of external changes. 

Why Unique Identifiers Matter in APIs

Unique identifiers play a critical role in maintaining data integrity and consistency, especially when data is shared across multiple systems or endpoints.

Here’s why they matter:

  • Prevent Data Conflicts: When each entity has a distinct identifier, systems can avoid duplication or overwriting the wrong records.
  • Enable Reliable Data Matching: Identifiers allow platforms to match the same entity across different datasets—even if names or attributes change.
  • Improve API Efficiency: Instead of relying on text-based queries, APIs can quickly retrieve records using IDs, reducing processing time and errors.
  • Support Scalable Integrations: As systems grow, unique identifiers ensure that new data integrates cleanly with existing structures.

How FMTC Uses Unique Identifiers

FMTC uses unique identifiers throughout our database. Each of these identifiers interacts between endpoints, such as categories interacting with both the deals and deal-merchant endpoints. 

Key Identifiers

id:

  • Description: This universally unique identifier is used across multiple endpoints to represent specific entities (e.g., deals, merchants). For example, in the deals endpoints the id is the FMTC unique identifier for the deal, in the deal-merchant endpoints it is the FMTC unique identifier for the merchant, etc.
  • Endpoints: Deals, deal-merchants, types, categories, networks, getProducts
  • Origin: Assigned by FMTC

merchant_id: 

  • Description: A single merchant can have multiple affiliate programs across one or more networks. Each of these programs will have a unique merchant_id. In the screenshot below, Invite Health is a single merchant but has an affiliate program on multiple networks, so there is a unique merchant_id for each.
  • Endpoints: Deals, deal-merchants, getProducts
  • Origin: Assigned by FMTC
merchant_id example

master_merchant_id: 

  • Description: This identifier shows the hierarchical relationship between a single merchant (parent) and all their programs (child); master_merchant_id is the parent field and merchant_id is the child field. Multiple merchant_id identifiers can be associated with one master_merchant_id, but only one master_merchant_id can be associated with a merchant_id. This can be seen below with Abacus Sportswear US and is only available via API.
  • Endpoints: Deals, deal-merchants
  • Origin: Assigned by FMTC
Master ID example
Master ID example

network_id: 

  • Description: This identifies the network from which FMTC sources the information. 
  • Endpoints: Deals, deal-merchants, networks
  • Origin: Assigned by FMTC

program_id: 

  • Description: This is a network-assigned identifier for a merchant’s program and is used to find a program on its host network.
  • Endpoints: Deals, deal-merchants
  • Origin: Assigned by the network

link_id: 

  • Description: This is a network-assigned identifier for a tracking link and is used to find a tracking link on its host network. 
  • Endpoints: Deals
  • Origin: Assigned by the network

Disclaimer: The network-assigned identifiers are not controlled by FMTC and are provided as it is within the network. Due to this, FMTC can’t guarantee these are unique identifiers; however, most networks treat them as unique identifiers. 

parent_id: 

  • Description: This is an identifier that shows the hierarchical relationship between categories. A value returned in the parent_id field indicates a parent-child relationship exists. For example, the “parent_id” for “Bird Supplies” returns 1; the 1 value identifies “Animals & Pet Supplies” as a parent category. Multiple child categories can be associated with one parent category. If a parent_id is 0, like it is for “Animals & Pet Supplies,” that is how you know you have a root category.
  • Endpoints: Categories
  • Origin: FMTC Assigned by FMTC
[
  {
    "id": 1,
    "parent_id": 0,
    "name": "Animals & Pet Supplies",
    "slug": "animals-pet-supplies",
    "restricted": 0
  },
  {
    "id": 5,
    "parent_id": 1,
    "name": "Bird Supplies",
    "slug": "animals-pet-supplies-bird-supplies",
    "restricted": 0
  },
  {
    "id": 12,
    "parent_id": 1,
    "name": "Cat Supplies",
    "slug": "animals-pet-supplies-cat-supplies",
    "restricted": 0
  },
  {
    "id": 13,
    "parent_id": 1,
    "name": "Dog Supplies",
    "slug": "animals-pet-supplies-dog-supplies",
    "restricted": 0
  },
  {
    "id": 368,
    "parent_id": 1,
    "name": "Horse Supplies",
    "slug": "animals-pet-supplies-horse-supplies",
    "restricted": 0
  }
]

FMTC passes IDs through the API endpoints to ensure that the data is properly aligned regardless of changes that happen outside of the data. FMTC follows these best practices for data integrity, efficient retrieval of data, and avoiding conflicts when multiple entities exist. Ensuring uniqueness is essential for maintaining smooth operations in various contexts. Whether managing databases, developing software, or organizing content, distinct identifiers prevent conflicts, streamline processes, and enhance overall efficiency.

Ready to work with more reliable, consistent data?

FMTC’s API uses unique identifiers to ensure every deal, merchant, and entity stays accurate—even when names or details change.
👉 Sign up for a subscription and start integrating today: https://www.fmtc.co/get-started/


As always, a dedicated team is here to assist you! If you have any questions or concerns, feel free to contact your account manager or email us at [email protected]

Curious about other FMTC technologies? Find more information on FMTC’s tools in Tech Corner:

Leave a Reply

Your email address will not be published. Required fields are marked *