PemyStackPemyStack

POS Sync API

Sync products and orders between your POS system and PemyKonekt.

POST/api/products/sync

Bulk create or update products. Products are matched by external_id - if it exists, the product is updated; otherwise a new one is created.

Request

curl -X POST https://etims.pemystack.com/api/products/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "products": [
      {
        "external_id": "POS-001",
        "name": "Nyama Choma",
        "price": 850,
        "category": "Mains",
        "description": "Grilled meat with kachumbari"
      },
      {
        "external_id": "POS-002",
        "name": "Chai Maziwa",
        "price": 50,
        "category": "Drinks"
      }
    ]
  }'

Response

{
  "created": 1,
  "updated": 1
}

Fields

FieldTypeRequiredDescription
external_idstringYesYour POS product ID (unique per tenant)
namestringYesProduct name
pricenumberYesPrice in whole KES (converted to cents internally)
categorystringNoProduct category
descriptionstringNoProduct description
tax_typestringNoA=16% VAT (default), B=8%, C=0%, D=Exempt
is_availablebooleanNoWhether product is active (default true)
POST/api/orders/sync

Import orders from your POS system. Orders are tagged with source='pos' for tracking.

Request

curl -X POST https://etims.pemystack.com/api/orders/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "orders": [
      {
        "reference": "POS-ORD-001",
        "customer_phone": "254712345678",
        "customer_name": "John Kamau",
        "status": "paid",
        "items": [
          {
            "name": "Nyama Choma",
            "quantity": 2,
            "price": 850,
            "external_product_id": "POS-001"
          }
        ],
        "total": 1700,
        "paid_at": "2026-07-09T12:00:00Z"
      }
    ]
  }'

Response

{
  "imported": 1
}

Fields

FieldTypeRequiredDescription
referencestringNoPOS order reference (stored in notes)
customer_phonestringNoCustomer phone number
customer_namestringNoCustomer name
statusstringNo"paid" (default) or "confirmed"
itemsarrayYesOrder line items
totalnumberYesTotal in whole KES
paid_atstringNoISO 8601 payment timestamp