Written by Josh Hutter
Welcome to the latest edition of FMTC’s Tech Corner. Today we are exploring unique identifiers used within the FMTC platform (and API). A unique identifier is a distinct value assigned to an entity to differentiate it from others in the system. Understanding these identifiers will enhance your comprehension of FMTC endpoints and their interactions.
Purpose
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.
Implementation
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
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
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.
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: