Build your own website on PartnerFlow
Your Help centre gives customers a ready-made website. If you'd rather use your own, the Website endpoints give it the same data: your services, the items you work on, the solutions and prices you offer, your collection and delivery options and your customer articles. Customers book on your site, the request arrives in PartnerFlow like any other, and you keep everything in one place.
Before you start
- An API key with View services, catalogue and request forms (
services:read), Create, edit and move jobs (service_records:write) and View jobs and requests (service_records:read). See Authentication. - At least one active service that takes customer bookings. You set up what customers can pick, the prices and the service's booking steps on the Journey map. Your Help centre doesn't need to be live.
- Your own site switched on as a source for that service: in Manage, open the service's Who does the work, select the Your own site (API) source and, under Take jobs from this source, turn on Your own site. A service with it off isn't listed and its Website endpoints answer
404. - Call the API from your server, never from the browser: the key must stay secret.
1. Show your services
curl https://api.partner-flow.com/api/v3/website/services \
-H "Authorization: Bearer $PF_KEY"
You get your company name, your brand (look: logo, colour, fonts, hero image), each service you take requests for (serviceKey, name, description, image, support phone and email) and your locations. Use these for your home page and a page per service.
2. Show items, solutions and prices
curl "https://api.partner-flow.com/api/v3/website/services/$SERVICE_KEY/catalogue" \
-H "Authorization: Bearer $PF_KEY"
The catalogue mirrors what you set up in Items, solutions and options:
| In the response | What it is |
|---|---|
brands | The brands you work on |
items | Each item: id, brand, model, name, imageUrl |
solutions | What you offer, in your customer wording, with category, imageUrl and itemIds (null means every item) |
solutions[].options | The priced choices: label, description, priceFrom, and pricesByItem for item-specific prices |
solutions[].articles | Customer articles such as FAQs and care guides, as plain text |
Filter with ?brand= or search with ?q=. Prices include VAT. If Show prices is off on the Journey map's Help centre box, prices come back empty, so your site follows the same rule as your Help centre.
The catalogue only changes when you change the service. Cache it, and refresh every few minutes or when you apply changes in Manage.
3. Build your booking page
curl "https://api.partner-flow.com/api/v3/website/services/$SERVICE_KEY/form" \
-H "Authorization: Bearer $PF_KEY"
This is your booking steps as data: the rules (one item or several, whether "my model isn't listed" or "not sure" are allowed, who pays and when), the questions to ask with their type and whether they're required, and your collection and delivery options (logistics.collection, logistics.delivery) with their prices. Ask the same questions on your site and PartnerFlow will accept the answers.
4. Take a request
If customers can add photos, get an upload link for each file first, then upload the file to it within 10 minutes:
curl -X POST "https://api.partner-flow.com/api/v3/website/services/$SERVICE_KEY/uploads" \
-H "Authorization: Bearer $PF_KEY" -H "Content-Type: application/json" \
-d '{ "files": [ { "name": "wheel.jpg", "contentType": "image/jpeg", "size": 812345 } ] }'
# then: PUT the file to the returned uploadUrl with the same Content-Type
Then send the request:
curl -X POST "https://api.partner-flow.com/api/v3/website/services/$SERVICE_KEY/requests" \
-H "Authorization: Bearer $PF_KEY" -H "Content-Type: application/json" \
-d '{
"contact": {
"firstName": "Ann", "lastName": "Lee",
"email": "ann@example.com", "phone": "07700 900123",
"address": { "line1": "1 High St", "city": "Leeds", "postcode": "LS1 1AA", "country": "GB" }
},
"items": [ { "serviceItemId": "ITEM_ID", "solutionGroupId": "SOLUTION_ID", "solutionId": "OPTION_SOLUTION_ID" } ],
"answers": { "QUESTION_FIELD_ID": "The front wheel wobbles" },
"logistics": { "collectionOptionId": "COLLECTION_OPTION_ID" },
"uploads": ["UPLOAD_KEY"]
}'
- The customer needs an email address or a phone number. PartnerFlow finds them by email (or phone) or creates them. Your site has already checked who they are, so there's no code step.
- For each item,
solutionGroupIdis the solution'sidandsolutionIdis the chosen option'ssolutionId. If the customer isn't sure what's wrong, send"notSure": truewith both set tonull. If their model isn't listed and your form allows it, send"serviceItemId": nulland"modelNotListed": { "brand": "…", "model": "…" }. - Everything is checked against your live form. A wrong pick or a missing answer gets a
400with a message you can show the customer.
Send an Idempotency-Key header (any unique string up to 200 characters, such as your own order id) so a retry doesn't create a second request: the same key within 24 hours returns the first result again with 200. Retry after you get a response, not in parallel.
Each API key can send up to 200 website requests in 24 hours. Past that you get 429 with "This API key has reached its limit of 200 website requests in 24 hours. Try again later." Uploads are also limited to 60 every 10 minutes per key. If your site needs more, contact us.
The response gives you the request's reference (such as REQ-7KQ3), a trackUrl, and a payUrl when your form takes payment up front. Send the customer to payUrl if it's there.
What happens in PartnerFlow
The request arrives in your service's Requests with Website as its source. Your intake rules accept it straight away or hold it for someone to check, exactly as for a Help centre request. If you decline it, the customer gets your Request Declined email.
5. Let customers track it
curl https://api.partner-flow.com/api/v3/website/requests/REQ-7KQ3 \
-H "Authorization: Bearer $PF_KEY"
You get the stage and the customer's step in plain words, such as "In progress", and when it last changed. This works for requests from any channel, so one "track my repair" box on your site covers them all. For more, link customers to your customer portal.
Related
- Create a job from your system, when your system already knows the whole job
- Answer “where is my repair?”
- Your Help centre, the ready-made alternative
- Sell on your own website, for how parts sales fit in