Integrate with a Customer's Systems: APIs, Data and Access
Connect your product to a system the customer owns. Find out how data can leave it, get the least access that works, fetch every record reliably, map it to your own shape, sync it safely and hand it over. You build a working sync against a practice API that runs on your own machine.
6 lessons 36 minNo account needed
Start lesson 1What you will learn
- Find out what you need to know about a customer's system before writing code, and record it on one page.
- Handle an access token safely and read an API's first answer for what it tells you about the data.
- Fetch every record through pages, with a timeout and retries that respect the customer's limits.
- Map the customer's fields to your own, reject records you cannot use, and leave out personal data you do not need.
- Write a sync that is safe to run twice, picks up only what changed and can be tried without writing.
- Take an integration live with least access, monitoring and a runbook the customer can use.
Before you start
- Read and write basic Python: functions, loops, dictionaries and imports.
- Run Python scripts from a terminal or command prompt, with two terminal windows open at once.
- Python 3.9 or later installed. The course uses only the standard library, so nothing else needs installing.
Lessons
- Lesson 1: Before You Write Code: What to Find Out About a Customer's SystemLearn the five things to find out about a system you do not own, why you ask for the least access that works, and how to record it all on one page.5 min
- Lesson 2: Access and the First Call: Tokens, Secrets and Reading a ResponseStart a practice copy of the customer's API, keep the access token out of your code, make one request and read the answer for what it reveals about the data.7 min
- Lesson 3: Fetch Everything Reliably: Pages, Timeouts and RetriesWrite a small client that reads every page of the customer's API, gives up on a request that hangs, and retries the failures that are worth retrying.5 min
- Lesson 4: Map Their Data to Yours: Field Mapping, Cleaning and RejectsWrite the mapping from the customer's fields to your own as a table first and as a tested function second, reject records you cannot use, and leave out personal data you do not need.6 min
- Lesson 5: Sync Safely: Run Twice, Pick Up Changes and Try Without WritingJoin the client and the mapping into a sync that can be run again at any time, fetches only what changed since the last run, and has a dry run that writes nothing.7 min
- Lesson 6: Go Live and Hand Over: Least Access, Monitoring and the RunbookMove the sync from the practice server to the customer's real system in careful steps, make sure somebody learns when it breaks, and leave a runbook the customer can follow without you.6 min