Skip to content
ProductIndustriesDemoPricingSupport
Sign inStart
ProductIndustriesDemoPricingSupport
Sign inStart
All guidesSign in
Product guidesDeveloperWebsite map

Loading documentation search… You can browse the guides below.

Developer

  • Build with Zelikore

  • Make your first request

  • API keys and workspace access

  • Test your integration

Making requests

  • Requests, pagination, and errors

  • Writes, retries, and version conflicts

Integrations

  • Sync customers to another system

  • MCP access

  • Developer changelog

API reference

  • API reference

  • API coverage

Customers

  • List customers

  • Get a customer

  • Create a customer

  • Update a customer

  • Read customer summaries

  • Generate a customer statement

  • Read a customer statement run

  • Read customer service history

Products

  • List products and services

  • Look up catalog pricing

  • Get a product

  • Create a product or service

  • Update a product or service

  • Archive a product

Inventory locations

  • List inventory locations

  • Get an inventory location

  • Create an inventory location

  • Update an inventory location

  • Archive an inventory location

Work items

  • List work items

  • Get a work item

  • Create a work item

  • Update a work item

  • Read work scheduling

  • Search work items

Vehicle catalog

  • List vehicle makes

  • List vehicle models

  • Decode a vehicle VIN

Vendors

  • List vendors

  • Get a vendor

  • Create a vendor

  • Update a vendor

Purchasing

  • List purchase orders

  • Get a purchase order

  • Create a purchase order

  • Update a purchase order

  • Receive a purchase order

  • List purchase order receipts

  • List workspace receipts

  • List purchasing returns

  • Create a purchasing return

  • Get a purchasing return

  • Transition a purchasing return

Loading documentation search… You can browse the guides below.

Browse developer docs

Developer

  • Build with Zelikore

  • Make your first request

  • API keys and workspace access

  • Test your integration

Making requests

  • Requests, pagination, and errors

  • Writes, retries, and version conflicts

Integrations

  • Sync customers to another system

  • MCP access

  • Developer changelog

API reference

  • API reference

  • API coverage

Customers

  • List customers

  • Get a customer

  • Create a customer

  • Update a customer

  • Read customer summaries

  • Generate a customer statement

  • Read a customer statement run

  • Read customer service history

Products

  • List products and services

  • Look up catalog pricing

  • Get a product

  • Create a product or service

  • Update a product or service

  • Archive a product

Inventory locations

  • List inventory locations

  • Get an inventory location

  • Create an inventory location

  • Update an inventory location

  • Archive an inventory location

Work items

  • List work items

  • Get a work item

  • Create a work item

  • Update a work item

  • Read work scheduling

  • Search work items

Vehicle catalog

  • List vehicle makes

  • List vehicle models

  • Decode a vehicle VIN

Vendors

  • List vendors

  • Get a vendor

  • Create a vendor

  • Update a vendor

Purchasing

  • List purchase orders

  • Get a purchase order

  • Create a purchase order

  • Update a purchase order

  • Receive a purchase order

  • List purchase order receipts

  • List workspace receipts

  • List purchasing returns

  • Create a purchasing return

  • Get a purchasing return

  • Transition a purchasing return

On this page5 sections↓
  • Follow each page
  • Make the destination safe to retry
  • Extend the integration
  • Sync work items
  • Sync purchase orders and receipts
← Developer overview

Integrations

Sync customers to another system

A server-side example that follows cursor pages with a finite request budget.

2 min read

This example uses Node's built-in fetch. It prints a count rather than logging customer records. Use a dedicated integration key and keep it on your server.

Follow each page#

const apiKey = process.env.ZELIO_API_KEY;
const workspace = process.env.ZELIO_WORKSPACE;
if (!apiKey || !workspace) {
  throw new Error("Set ZELIO_API_KEY and ZELIO_WORKSPACE");
}
 
const maxPages = 10;
let pagesRead = 0;
let nextToken;
let count = 0;
const seenTokens = new Set();
 
do {
  if (pagesRead >= maxPages) {
    // Save nextToken privately with this exact query before resuming.
    throw new Error("Page budget reached; this traversal is incomplete.");
  }
  pagesRead += 1;
  const url = new URL("https://zelio-api.zelikore.com/v1/business/customers");
  url.searchParams.set("workspace", workspace);
  url.searchParams.set("limit", "100");
  if (nextToken) url.searchParams.set("nextToken", nextToken);
 
  const response = await fetch(url, {
    headers: { "x-api-key": apiKey },
    signal: AbortSignal.timeout(30000),
  });
  if (!response.ok) {
    // Let your job scheduler retry reads with bounded backoff.
    // Honor Retry-After when response.status is 429.
    throw new Error(`Zelikore returned HTTP ${response.status}`);
  }
 
  const page = await response.json();
  for (const customer of page.items) {
    // Upsert into your system using workspace + customer.customerId.
    // Store only the fields your integration needs.
    count += 1;
  }
 
  nextToken = page.nextToken;
  if (nextToken) {
    if (seenTokens.has(nextToken)) {
      throw new Error("Repeated continuation token; stop this traversal");
    }
    seenTokens.add(nextToken);
  }
} while (nextToken);
 
console.log(`Read ${count} customers`);

This run makes at most ten page requests. Set maxPages to a finite budget appropriate for your job. Reaching the budget is an incomplete traversal; the example throws instead of reporting its partial count as a completed sync. Before continuing in another bounded run, save the current nextToken in a private job checkpoint with the same workspace, page limit, and filters. Do not log continuation tokens or treat a partial run as a complete customer list.

Make the destination safe to retry#

Upsert records using a stable pair: workspace ID and customer ID. If the job restarts, processing a page twice should not create duplicate destination records.

Do not treat absence from one traversal as proof that a customer was deleted. Customer data can change while you are paging. Apply your destination's deletion policy deliberately.

Extend the integration#

Use get customer when you need resolved contacts and addresses. Use customer summaries when you already have a bounded set of IDs. Use service history to read a customer's service documents and follow-ups. Use generate statement to start an asynchronous statement run, then poll statement status until it reaches a terminal state.

Sync work items#

Work-item traversal follows the same page loop but returns results instead of items. Set activeOnly=true to exclude terminal work; keep that filter unchanged while following nextToken. Upsert by workspace plus work-item ID, and use search when you need a bounded text query instead of a full traversal. A created work item can still have a running process; read its process context before reporting completion.

Sync purchase orders and receipts#

List purchase orders with vendorId and status filters, then read receipts per order or across the workspace. Receipts record what arrived; returns record what went back. Keep all three keyed by their IDs: purchase-order ID, receipt ID, and return ID.

Previous

Writes, retries, and version conflicts

Next

MCP access

On this page

  • Follow each page
  • Make the destination safe to retry
  • Extend the integration
  • Sync work items
  • Sync purchase orders and receipts
Zelikore

Customer work, your team, and billing.
Connected in Zelikore.

Analytics: this tab only

Explore

  • Product tour
  • Pricing
  • Documentation
  • Support
  • System status

Legal & contact

  • Terms of Service
  • Privacy Policy
  • SMS Program
Email support