SCO 666, Sector 70, Mohali, Punjab +91 9217885758
Work  /  Custom API & system integrations
Custom API & system integrations

Supplier API product import with markup and category mapping

For a European web agency, we built a standalone script that pulls products, prices and images from a Bulgarian supplier's API into an online store, applying a percentage markup and mapping supplier categories to store categories.

Results

  • Standalone import script delivered that creates and updates store products from the supplier's API
  • Admin field added so each store category can be linked to a supplier category
  • Usage instructions handed over to the agency for running the import

The challenge

A European web agency was supporting a Bulgarian online retailer that sources stock from a wholesale supplier. The supplier publishes its catalogue through an API, but keeping the retailer's store in line with it by hand meant re-entering products, prices and images whenever the supplier changed anything.

The retailer's store ran on an older platform release, and the agency wanted a separate PHP script it could run independently of the store's own code, which would create new products, update existing ones, apply the retailer's margin and place every item in the right store category, all with Bulgarian-language content.

What we did

  • API product import. We wrote a standalone script that fetches the supplier's products and images and creates or updates the matching products in the store.
  • Automatic pricing. The script applies a configurable percentage markup to the supplier's price, so the retailer's margin is built in on every import.
  • Category mapping. We added an admin field where each store category can be linked to a supplier category ID, so imported products land in the correct place.
  • Category import. Supplier categories can also be imported to speed up the initial set-up.
  • Localised content. Product data is written in Bulgarian to match the storefront.
  • Testing and hand-over. We built and tested the script on a demo store running the same platform version, then explained to the agency how to run it and configure the category links.

Tech stack

PHP, MySQL, OpenCart 1.5.4, supplier XML API

Project facts

Industry
Online retail
Client
a Bulgarian online retailer, delivered for a European web agency
Country
Bulgaria
Year
2019
Engagement
Through a partner agency

Services

API integrationCustom developmentData import

Technologies

PHPMySQLOpenCart 1.5.4

Integrations

Supplier product API

Planning something similar?

Tell us what you're building. We'll share how we'd approach it and what it would take.