মূল কনটেন্টে যান
১৪ দিনের ফ্রি ট্রায়াল, কার্ড লাগবে না৯টি ভাষা১৭৬টি ব্যবসার ধরন · ৫০টি অ্যাপ
BN· USD
লাইভ ডেমো চালিয়ে দেখুনফ্রি ট্রায়াল শুরু করুন

API v1 রেফারেন্স

REST API-র প্রতিটি এন্ডপয়েন্ট তার মেথড, পাথ ও প্রয়োজনীয় স্কোপসহ, API যে OpenAPI ডকুমেন্ট দেয় সেখান থেকেই তৈরি।

GET https://<workspace>.zmle.com/api/v1/me

দ্রুত শুরু

  1. একটি তাৎক্ষণিক ডেমো খুলুন: নমুনা ডেটাসহ একটি ওয়ার্কস্পেস
  2. ডেমোতে Admin → Integrations & API-তে গিয়ে একটি কী তৈরি করুন
  3. কী দিয়ে GET /api/v1/me কল করুন (নিচে) — দেখবেন কী-টি কোন ওয়ার্কস্পেস আর কোন মানুষের
  4. একটি ওয়েবহুক এন্ডপয়েন্ট যোগ করে ইভেন্ট বেছে নিন; ডেমোতে ডেলিভারি লগে থাকে কিন্তু পাঠানো হয় না

OpenAPI ডকুমেন্ট

পুরো স্পেসিফিকেশন পাবলিক; পড়তে কোনো কী লাগে না: https://zmle.com/api/v1/openapi.json

curl https://<your-demo>.zmle.com/api/v1/me \
  -H "Authorization: Bearer $ZMLE_API_KEY"

মূল ঠিকানা

প্রতিটি ওয়ার্কস্পেস নিজের ঠিকানায় উত্তর দেয়: https://<workspace>.zmle.com/api/v1 (বা নিজের ডোমেইন)। API হোস্ট https://api.zmle.com/v1 কী থেকে ওয়ার্কস্পেস খুঁজে নেয়।

অথেন্টিকেশন

কী পাঠান Authorization: Bearer <key> (বা X-Api-Key) হিসেবে। নেটিভ ও সংযুক্ত অ্যাপ PKCE সহ OAuth 2.1 আর স্বল্পমেয়াদি অ্যাপ টোকেন ব্যবহার করে।

তালিকা ও পেজিং

তালিকা page ও per (১–১০০, ডিফল্ট ২৫), খোঁজার জন্য q আর একটি তারিখের পরের পরিবর্তনের জন্য since নেয়। উত্তরে total ও pages থাকে, সাথে Link ও X-Total-Count হেডার।

ত্রুটি

ত্রুটি JSON-এ আসে: { error: { code, message } } HTTP স্ট্যাটাসসহ। প্রতিটি উত্তরে X-Request-Id থাকে। POST অনুরোধ Idempotency-Key হেডার নেয়। প্রতিটি কী-র 300টি অনুরোধের একটি বাকেট আছে, প্রতি সেকেন্ডে 5টি করে ভরে; X-RateLimit-Remaining বাকি দেখায়, আর 429 আসে Retry-After সহ।

ভার্সন ও ডিপ্রিকেশন

v1 শুধু বাড়ে: নতুন রুট ও ফিল্ড যোগ হয়, v1-এর ভেতরে কিছু মুছে ফেলা বা নাম বদলানো হয় না। যে রুট উঠে যাবে, বন্ধ হওয়ার অন্তত 12 মাস আগে সেটিকে deprecated চিহ্নিত করা হয়; ততদিন সেটি আগের মতোই চলে এবং Deprecation ও Sunset হেডার পাঠায়।

TypeScript ক্লায়েন্ট

OpenAPI ডকুমেন্ট থেকে তৈরি একটি অফিশিয়াল TypeScript ক্লায়েন্ট প্রস্তুত হচ্ছে (টাইপড মেথড, Retry-After মেনে রিট্রাই, idempotency key, পেজিং)। প্রকাশিত হওয়া পর্যন্ত যেকোনো OpenAPI জেনারেটর openapi.json দিয়ে কাজ করে।

এরর কোড

স্ট্যাটাসকোডমানে
400invalid_jsonবডি বৈধ JSON নয়
401unauthenticatedকোনো কী বা টোকেন পাঠানো হয়নি
401invalid_keyকী অজানা, বাতিল বা মেয়াদোত্তীর্ণ, অথবা REST API-তে MCP টোকেন ব্যবহার করা হয়েছে
401token_expiredঅ্যাপ টোকেনের মেয়াদ শেষ: রিফ্রেশ করুন
403insufficient_scopeএই রুটের জন্য দরকারি স্কোপ কী-তে নেই
403forbiddenকী-এর মানুষটি এই অংশ বা রেকর্ড খুলতে পারেন না
403origin_not_allowedএমন সাইট থেকে ব্রাউজার কল, যা ওয়ার্কস্পেসের অনুমোদিত অরিজিনে নেই
403ip_not_allowedকী-এর অনুমোদিত IP তালিকায় এই ঠিকানা নেই
403test_mode_read_onlyএকটি টেস্ট কী ডেটা বদলাতে চেয়েছে: টেস্ট কী শুধু পড়তে পারে
404not_foundএই ওয়ার্কস্পেসে এমন রেকর্ড বা রুট নেই
409conflictরিকোয়েস্ট বর্তমান অবস্থার সাথে সাংঘর্ষিক, যেমন ডুপ্লিকেট
422validation_failedফিল্ড যাচাইয়ে ব্যর্থ; উত্তরে প্রতিটি ফিল্ডের সমস্যা লেখা থাকে
429rate_limitedঅনেক বেশি রিকোয়েস্ট: Retry-After-এ লেখা সেকেন্ড অপেক্ষা করুন
500internal_errorআমাদের দিকে কিছু ব্যর্থ হয়েছে: পরে আবার চেষ্টা করুন, যোগাযোগ করলে X-Request-Id জানান

নিচের রেফারেন্স OpenAPI ডকুমেন্টের মতোই ইংরেজিতে।

Customers

মেথডপাথস্কোপকী করে
GET/api/v1/customerscustomers:readList customers
GET/api/v1/customers/{id}customers:readRead a customer
POST/api/v1/customerscustomers:writeCreate a customer (an existing e-mail / phone returns that customer)
PATCH/api/v1/customers/{id}customers:writeUpdate a customer's contact details

Leads

মেথডপাথস্কোপকী করে
GET/api/v1/inquiriesinquiries:readList leads
GET/api/v1/inquiries/{id}inquiries:readRead a lead
POST/api/v1/inquiriesinquiries:writeCreate a lead (contact, quote request, booking request, call-back) — notifies the team like the website form

Quotations

মেথডপাথস্কোপকী করে
GET/api/v1/quotationsquotations:readList quotations
GET/api/v1/quotations/{id}quotations:readRead a quotation with its lines
POST/api/v1/quotationsquotations:writeCreate a DRAFT quotation (tax computed by the workspace's rules)

Invoices

মেথডপাথস্কোপকী করে
GET/api/v1/invoicesinvoices:readList invoices
GET/api/v1/invoices/{id}invoices:readRead an invoice with lines and payments
POST/api/v1/invoicesinvoices:writeCreate a DRAFT invoice (numbered when issued in the back office)
GET/api/v1/paymentspayments:readList invoice payments (invoice=<id> to filter)
GET/api/v1/payments/{id}payments:readRead a payment

Orders

মেথডপাথস্কোপকী করে
GET/api/v1/ordersorders:readList shop orders
GET/api/v1/orders/{id}orders:readRead a shop order

Catalog

মেথডপাথস্কোপকী করে
GET/api/v1/productsproducts:readList products with price and stock (catalog:read also allows it)
GET/api/v1/products/{id}products:readRead a product
GET/api/v1/categoriescatalog:readList categories (type=product|service|post|project, locale=…) (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/servicescatalog:readList published services (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/services/{id}catalog:readRead a service (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/products/lookupproducts:readExact barcode / SKU match (GTIN, SKU or an extra product barcode) — for scanners

Bookings

মেথডপাথস্কোপকী করে
GET/api/v1/booking-servicescatalog:readList bookable services (online booking on) (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/booking-services/{id}catalog:readRead a bookable service (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/bookings/slotsbookings:readFree start times of a bookable service on a date (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/bookingsbookings:readList appointments (হোস্টেড ওয়ার্কস্পেস)
GET/api/v1/bookings/{id}bookings:readRead an appointment (হোস্টেড ওয়ার্কস্পেস)
POST/api/v1/bookingsbookings:writeBook an appointment at a free time (409 when it was taken) (হোস্টেড ওয়ার্কস্পেস)

Webhooks

মেথডপাথস্কোপকী করে
GET/api/v1/eventswebhooks:readThe webhook event catalog
GET/api/v1/deliverieswebhooks:readWebhook delivery log
GET/api/v1/deliveries/{id}webhooks:readOne delivery with its payload
GET/api/v1/webhookswebhooks:readList webhook endpoints (no secrets) (হোস্টেড ওয়ার্কস্পেস)
POST/api/v1/webhookswebhooks:writeCreate a webhook endpoint — the signing secret is returned once (হোস্টেড ওয়ার্কস্পেস)
DELETE/api/v1/webhooks/{id}webhooks:writeDelete a webhook endpoint (হোস্টেড ওয়ার্কস্পেস)

Account

মেথডপাথস্কোপকী করে
GET/api/v1/me(any)Who is calling: the API key, or the person signed in to the app, with the workspace and the scopes

Stock

মেথডপাথস্কোপকী করে
GET/api/v1/warehousesstock:readActive stock locations
GET/api/v1/stockstock:readStock levels per location (product=<id> for one product, all its rows)
POST/api/v1/stock/adjustmentsstock:writeAdd or remove stock (same rules as the admin: write-off reasons only remove)

Appointments

মেথডপাথস্কোপকী করে
GET/api/v1/appointmentsappointments:readList appointments (from / to filter the start time)
GET/api/v1/appointments/{id}appointments:readRead an appointment

Point of sale

মেথডপাথস্কোপকী করে
GET/api/v1/pos-salespos:readList till sales and refunds (since = created since)
GET/api/v1/pos-sales/{id}pos:readRead a till sale with its lines and payments

Tasks

মেথডপাথস্কোপকী করে
GET/api/v1/taskstasks:readList tasks (app sign-in without tasks.manage: only my tasks)
GET/api/v1/tasks/{id}tasks:readRead a task
POST/api/v1/taskstasks:writeCreate a task (assigned to the signed-in person by default)
PATCH/api/v1/tasks/{id}tasks:writeUpdate a task or change its status (DONE closes it; recurring tasks schedule the next one)

Files

মেথডপাথস্কোপকী করে
POST/api/v1/attachmentsattachments:writeUpload a photo or PDF (multipart: file, taskId?, folder?) — images are re-encoded, metadata such as GPS removed
GET/api/v1/attachments/{id}attachments:writeRead an uploaded file's record

Apps

মেথডপাথস্কোপকী করে
POST/api/v1/session/handoff(app)One-time URL (60 s) that signs the app's web view in to the workspace and opens `next` (শুধু অ্যাপ টোকেন)
GET/api/v1/devices(app)My app installations (শুধু অ্যাপ টোকেন)
POST/api/v1/devices(app)Register an app installation for push (FCM / APNs / Huawei Push Kit token; the same token again returns the same id) (শুধু অ্যাপ টোকেন)
DELETE/api/v1/devices/{id}(app)Remove an app installation (শুধু অ্যাপ টোকেন)
GET/api/v1/devices/{id}(app)One app installation with the alert categories it does not get pushes for (শুধু অ্যাপ টোকেন)
PATCH/api/v1/devices/{id}(app)Alert categories this installation does not get pushes for (tasks, sales, bookings, messages, stock, system) — they still appear in /notifications (শুধু অ্যাপ টোকেন)
GET/api/v1/account/deletion(app)Delete account (apps): which path applies — workspace owner closes the workspace, staff ask the administrators, customers use the website — with links and a pending request (শুধু অ্যাপ টোকেন)
POST/api/v1/account/deletion(app)Delete account (apps): mode request = ask the administrators to delete the staff account and remove the app data; mode app-data = only end every app sign-in and web session and remove devices / push tokens (শুধু অ্যাপ টোকেন)
POST/api/v1/session/sign-out-all(app)Sign out of all devices: ends every app sign-in and web session of the person and removes their app installations (শুধু অ্যাপ টোকেন)
GET/api/v1/rider/today(app)Rider mode: which duties I may start (rider = parcels.ride, tech = field.work, driver = fleet.drive), my duty, today's runs, delivery stops and pickups (শুধু অ্যাপ টোকেন)
POST/api/v1/rider/duty(app)Start duty (returns a duty token that can only post positions / end the duty) or end it; the workspace's live-location setting must be on (শুধু অ্যাপ টোকেন)
POST/api/v1/rider/positions(app)Post a batch of positions while on duty (app token or the duty token fx_dt_…); only the newest valid point is kept (latest position, no trail) and feeds the recipient ETA and the runs map; a driver's batch also moves their vehicle and, when the workspace keeps one, its short trail (শুধু অ্যাপ টোকেন)
GET/api/v1/apps(app)Home screen of the apps: the app grid I may open (name, area, icon as SVG nodes, waiting count), the workspace brand and unread alerts (শুধু অ্যাপ টোকেন)
GET/api/v1/search(app)Search records I may open (customers, invoices, orders, products …), grouped like the admin header search; also suggestion (did you mean), quick (prefilled create links such as a new invoice for a customer) and intent (শুধু অ্যাপ টোকেন)
GET/api/v1/notifications(app)Alerts for me since a time (the desktop app polls this) (শুধু অ্যাপ টোকেন)

Sensors

মেথডপাথস্কোপকী করে
POST/api/v1/sensors/readingssensors:writeUpload sensor readings (temperature, humidity, fuel_level, value) — up to 500 per request; the device is the key's own device or the serial in `device`; re-sent readings are skipped; send an Idempotency-Key

পরের: ওয়েবহুক

ব্যবসায়িক ঘটনা আপনার HTTPS এন্ডপয়েন্টে পাঠানো হয়, সাইন করা, আবার চেষ্টা করা ও লগ করা।

ওয়েবহুক