Skip to main content

Sapo Web

Elton lấy dữ liệu cửa hàng Sapo Web (website bán hàng của Sapo, địa chỉ dạng abc.mysapo.net) qua Sapo Admin REST API: đơn hàng, đơn trả hàng, sản phẩm, khách hàng, tồn kho, chi nhánh và nhà cung cấp. Elton chỉ gọi API đọc (GET), không tạo hay sửa dữ liệu trên Sapo.

Sapo Web khác Sapo POS (abc.mysapogo.com, xem trang Sapo POS) và Sapo Invoice (hoá đơn điện tử, xem trang Sapo Invoice): mỗi sản phẩm của Sapo là một source riêng, với cách kết nối riêng. Sapo Web dùng API Key và Secret key của một app trên Sapo, không cần bấm Authorize.

1. Lấy API Key và Secret key trên Sapo​

Form tạo source Sapo Web có dòng "Làm theo hướng dẫn ở bước 1 để lấy thông tin", dẫn tới hướng dẫn của Sapo. Theo bước 1 của hướng dẫn đó ("Lấy chứng chỉ (credentials) của Client"):

  1. Tạo app trên Sapo (nếu chưa có).
  2. Mở trang danh sách Apps trong màn hình quản lý của Partner.
  3. Bấm vào tên app để xem chi tiết. Trang chi tiết hiện API Key và Secret Key.
  4. Sao chép hai giá trị này.

Bạn cũng cần Store name: lấy từ địa chỉ trang quản trị của cửa hàng. Với địa chỉ https://abc.mysapo.net/admin, Store name là abc.mysapo.net.

Elton dùng API Key và Secret key để gọi API của cửa hàng. Nếu app bị xoá, hoặc Secret Key bị tạo lại trên Sapo, các lần chạy sẽ lỗi cho đến khi bạn cập nhật data source.

2. Tạo data source​

  1. Vào Data Sources → Create data source, ở ô Type chọn Sapo Web.
  2. Điền form:
TrườngGiá trị
NameTên hiển thị của source
DescriptionMô tả, không bắt buộc
Store nameBắt buộc. Tên miền cửa hàng, ví dụ abc.mysapo.net. Chỉ nhập tên miền: không nhập https:// hay /admin, vì Elton ghép thẳng thành https://<Store name>/admin/...
VersionPhiên bản API: v3 (mặc định) hoặc v2. Xem bên dưới
API KeyBắt buộc. API Key ở bước 1
Secret keyBắt buộc. Secret Key ở bước 1
  1. Bấm Create data source.

Khi sửa data source, ô Secret key hiện dạng **********. Để nguyên thì Elton dùng mã đã lưu.

Chọn Version:

  • v3 (mặc định): lấy được 8 loại dữ liệu (xem mục 4). Elton gọi API bằng API Key và Secret key (Basic auth, dạng https://<API Key>:<Secret key>@<Store name>/admin/...).
  • v2: phiên bản cũ, chỉ có 3 loại dữ liệu: Order, Product, Customer (xem mục 5).
warning

Version quyết định tên bảng ở destination (xem mục 4 và mục 5). Đổi Version của một source đã chạy thì các lần chạy sau ghi vào bảng mới; dữ liệu đã lấy vẫn nằm ở bảng cũ. Đổi Store name cũng vậy.

3. Tạo connection​

Khi tạo connection với source là Sapo Web:

  • Select 1 or many type of data: chọn loại dữ liệu cần lấy. Danh sách tuỳ theo Version của source: v3 có 8 loại, v2 có 3 loại. Mỗi loại là một bảng ở destination.
  • First run loads from (bắt buộc): ngày bắt đầu lấy đơn hàng (Order) và đơn trả hàng (Order Return) ở lần chạy đầu tiên, theo ngày cập nhật (modified_on). Các loại còn lại không dùng ngày này: lần chạy đầu luôn lấy toàn bộ.
  • Later runs rescan: các lần chạy sau, Elton lấy bản ghi có modified_on từ ngày của lần chạy thành công trước, lùi lại số ngày này: Last 1 day, Last 3 days, Last 7 days, Last 30 days, Last 60 days hoặc Last 90 days. Để trống thì lùi 1 ngày. Nhờ vậy đơn đã đổi trạng thái (huỷ, hoàn tiền, giao xong) vẫn được cập nhật.

Với kiểu ghi Merge, bản ghi được cập nhật theo khoá của bảng: lấy lại cùng một bản ghi thì dòng cũ được thay, không bị nhân đôi.

4. Sapo Web v3: dữ liệu được đồng bộ​

Bảng có tên dạng sapo_<loại>_<store>, với <store> là Store name bỏ đuôi .mysapo.net, đổi sang chữ thường, dấu . và - thành _. Ví dụ Store name abc.mysapo.net → bảng sapo_order_abc.

Loại dữ liệuBảngKhoáCách lấyPhân vùng (partition) theo ngày
Ordersapo_order_<store>idLần đầu từ First run loads from, sau đó theo Later runs rescan, lọc theo modified_oncreated_on
Order Returnsapo_order_return_<store>idLần đầu từ First run loads from, sau đó theo Later runs rescan, lọc theo modified_oncreated_on
Productsapo_product_<store>idToàn bộ ở lần đầu, sau đó theo Later runs rescan (modified_on)created_on
Customersapo_customer_<store>idToàn bộ ở lần đầu, sau đó theo Later runs rescan (modified_on)created_on
Suppliersapo_supplier_<store>idToàn bộ ở lần đầu, sau đó theo Later runs rescan (modified_on)created_on
Inventory Itemsapo_inventory_item_<store>idToàn bộ mỗi lần chạycreated_on
Inventory Levelsapo_inventory_level_<store>inventory_item_id, location_idToàn bộ mỗi lần chạymodified_on
Locationsapo_location_<store>idToàn bộ mỗi lần chạycreated_on

"Toàn bộ ở lần đầu" nghĩa là lần chạy đầu tiên (và khi reload) lấy mọi bản ghi, bất kể First run loads from.

Lưu ý chung cho các bảng Sapo Web:

  • Thời gian (created_on, modified_on…) là giờ UTC. Để tính theo ngày Việt Nam, dùng DATE(created_on, 'Asia/Ho_Chi_Minh').
  • Các cột dạng danh sách (ví dụ line_items, variants) là mảng chuỗi (ARRAY<STRING> trên BigQuery): mỗi phần tử là một chuỗi JSON. Dùng UNNEST rồi JSON_VALUE để đọc. Các cột object (ví dụ customer, shipping_address) là một chuỗi JSON.
  • Cột elton_created_at (thời điểm Elton lấy bản ghi) chỉ được ghi vào BigQuery khi connection dùng kiểu ghi Append. Với Merge (cập nhật theo khoá) và Overwrite, bảng ở BigQuery không có cột này.
  • Elton tự giới hạn tốc độ gọi API v3 để không vượt hạn mức của Sapo (mỗi app và cửa hàng một "xô" 40 lần gọi, vơi 2 lần mỗi giây). Nếu Sapo vẫn trả lỗi 429 (quá giới hạn) hoặc lỗi 5xx, Elton đợi 30 giây rồi thử lại, tối đa 6 lần.

Order (v3)​

Mỗi dòng là một đơn hàng. Elton lấy đơn có modified_on trong khoảng lấy, nên đơn cũ đổi trạng thái vẫn được cập nhật nếu nằm trong khoảng Later runs rescan. Khi một khoảng có quá nhiều đơn, Elton tự chia nhỏ khoảng thời gian, vì Sapo chỉ cho đọc tối đa 30.000 bản ghi mỗi lần lọc.

CộtÝ nghĩa
idMã đơn dùng trong API (khác order_number)
name, order_numberTên đơn hiển thị cho cửa hàng và khách (ví dụ #1001, gồm tiền tố/hậu tố cửa hàng cài đặt) và số đơn (đếm từ 1001)
numberThứ tự của đơn trong danh sách đơn của cửa hàng, bắt đầu từ 1
created_on, modified_on, processed_onThời điểm tạo, cập nhật, xử lý đơn (processed_on dùng cho báo cáo; có thể là ngày trong quá khứ với đơn nhập từ hệ thống khác)
statusTrạng thái đơn: open, closed (đã lưu trữ), cancelled
financial_statusTrạng thái thanh toán: pending, authorized, partially_paid, paid, partially_refunded, refunded, voided
fulfillment_statusTrạng thái giao hàng: fulfilled (giao đủ), partial (giao một phần), trống khi chưa giao dòng nào; có thể là restocked, not_eligible
cancelled_on, cancel_reason, closed_onThời điểm huỷ, lý do huỷ (customer, fraud, inventory, other), thời điểm lưu trữ. cancelled_on và closed_on là chuỗi thời gian UTC dạng ISO 8601 (STRING, không phải TIMESTAMP); trống nếu đơn chưa huỷ / chưa lưu trữ
total_priceTổng tiền đơn, gồm thuế và phí vận chuyển, chưa trừ hàng trả lại
subtotal_price, total_line_items_price, total_discounts, total_tax, total_weight, currencyTiền sau giảm giá trước phí vận chuyển và thuế, tổng tiền hàng trước giảm giá, tổng giảm giá, thuế, tổng khối lượng (gram), tiền tệ. Đều chưa trừ hàng trả lại
source_nameKênh tạo đơn: web, pos, iphone, android (kênh của Sapo), api, hoặc giá trị do app / kênh bán hàng đặt
testĐơn thử nghiệm (không tính vào báo cáo bán hàng)
location_idChi nhánh tạo đơn, ghi lúc tạo và không đổi (chuỗi; nối với sapo_location_<store>.id)
user_id, user, assignee_id, assigneeNhân viên tạo đơn và nhân viên được giao xử lý đơn (user, assignee là JSON có id, first_name, last_name). Elton không có bảng nhân viên cho Sapo Web
customer, emailKhách đặt đơn (JSON có id, email, phone, tên, ngày sinh, giới tính, địa chỉ mặc định…; trống khi đơn không có khách) và email khách
billing_address, shipping_addressĐịa chỉ thanh toán, giao hàng (JSON)
line_itemsSản phẩm trong đơn. Mỗi phần tử có id, product_id, variant_id, inventory_item_id, sku, name, variant_title, quantity, price, total_discount, discounted_total, fulfillment_status…
fulfillmentsCác lần giao hàng: location_id, status, shipment_status, tracking_company, tracking_number, delivered_on…
refundsCác lần hoàn tiền: return_id, refund_line_items, transactions, total_refunded…
invoicesHoá đơn điện tử của đơn: series, no, tax_agency_code, reference_code, status…
discount_codes, tax_lines, shipping_linesMã giảm giá (code, amount, type), dòng thuế, phương thức và phí vận chuyển
gateway, payment_gateway_names, processing_methodPhương thức thanh toán khách chọn ban đầu, tên mọi cổng thanh toán đã dùng (mỗi phần tử là tên cổng trong dấu ngoặc kép; dùng JSON_VALUE(x, '$') để bỏ), cách xử lý thanh toán
tags, noteNhãn (cách nhau bằng dấu phẩy) và ghi chú đơn

Các cột confirmed, cart_token, total_price_usd, device_id, landing_site_ref, note_attributes, checkout_id, contact_email, payment_details thường trống.

Tất cả cột của sapo_order_<store>: id, email, closed_on, created_on, modified_on, number, note, token, gateway, test, total_price, subtotal_price, total_weight, total_tax, taxes_included, currency, financial_status, confirmed, total_discounts, total_line_items_price, cart_token, buyer_accepts_marketing, name, referring_site, landing_site, cancelled_on, cancel_reason, total_price_usd, checkout_token, reference, user_id, location_id, source_identifier, source_url, processed_on, device_id, browser_ip, landing_site_ref, order_number, discount_codes, note_attributes, payment_gateway_names, processing_method, checkout_id, source_name, status, fulfillment_status, tax_lines, tags, contact_email, line_items, shipping_lines, billing_address, shipping_address, fulfillments, client_details, refunds, payment_details, customer, assignee_id, user, assignee, invoices, elton_created_at

Order Return (v3)​

Mỗi dòng là một đơn trả hàng (hoàn tiền, nhập lại kho), gắn với đơn gốc qua order_id.

CộtÝ nghĩa
id, nameMã và tên đơn trả: tên đơn gốc thêm hậu tố -R và số thứ tự, ví dụ #48091-R1
order_id, orderĐơn gốc (nối với sapo_order_<store>.id), và tóm tắt đơn gốc (JSON)
customer_id, customerKhách hàng
return_location_id, location_idsChi nhánh nhận hàng trả
status, original_statusTrạng thái đơn trả
refund_status, restock_status, shipment_status, stock_status, handover_statusTrạng thái hoàn tiền, nhập lại kho, vận chuyển chiều về, kho, bàn giao
return_typeLoại trả, ví dụ return_and_refund
total_quantity, total_price, total_amount, discounted_total, total_cart_discount_amountSố lượng và các khoản tiền của đơn trả
created_on, modified_on, approved_on, completed_on, returned_on, cancelled_onCác mốc thời gian
line_itemsSản phẩm trả. Mỗi phần tử có line_item_id (dòng của đơn gốc, nối với id trong line_items của sapo_order_<store>), sku, quantity, price
reverse_fulfillment_ordersPhiếu nhận hàng trả (JSON)

Cột exchange và support_actions thường trống.

Tất cả cột của sapo_order_return_<store>: id, order_id, customer_id, return_location_id, user_id, shipment_id, handed_user_id, name, note, order_source, tags, fulfillment_by_marketplace, source_url, status, original_status, refund_status, restock_status, return_type, shipment_status, stock_status, handover_status, total_quantity, total_amount, total_price, total_cart_discount_amount, discounted_total, cancelable, feature_version, created_on, modified_on, processed_on, approved_on, confirmed_on, completed_on, closed_on, returned_on, cancelled_on, return_picked_up_on, handover_received_on, line_items, reverse_fulfillment_orders, location_ids, restocked_ons, restocked_user_ids, refunded_user_ids, customer, order, exchange, support_actions, elton_created_at

Product (v3)​

Mỗi dòng là một sản phẩm. Các phiên bản (màu, size…) nằm trong cột variants.

CộtÝ nghĩa
id, name, aliasMã, tên, đường dẫn URL (alias, sinh từ tên) của sản phẩm
product_type, vendor, tagsLoại sản phẩm, nhà sản xuất/nhà cung cấp, nhãn (cách nhau bằng dấu phẩy)
content, summaryMô tả chi tiết và mô tả ngắn (HTML)
created_on, modified_on, published_onThời điểm tạo, cập nhật, đăng bán (published_on trống: sản phẩm đang ẩn)
variantsPhiên bản. Mỗi phần tử có id, product_id, inventory_item_id, sku, barcode, title, price, compare_at_price, option1–option3, inventory_quantity, weight, unit…
optionsThuộc tính phân loại (name, values)
images, imageẢnh sản phẩm và ảnh đại diện (src, alt, kích thước, variant_ids…)

Tất cả cột của sapo_product_<store>: id, name, alias, content, summary, vendor, product_type, created_on, modified_on, published_on, tags, variants, options, images, image, elton_created_at

Customer (v3)​

Mỗi dòng là một khách hàng.

CộtÝ nghĩa
id, first_name, last_name, emailMã, tên, email
orders_count, total_spentSố đơn đã mua, tổng tiền đã chi
last_order_id, last_order_nameĐơn gần nhất (nối với sapo_order_<store>.id)
state, accepts_marketing, verified_emailTrạng thái tài khoản khách trên cửa hàng (disabled cho đến khi khách nhận lời mời tạo tài khoản, rồi enabled), đồng ý nhận email quảng cáo, email đã xác minh
default_address, addressesĐịa chỉ mặc định (JSON) và danh sách địa chỉ
tags, noteNhãn, ghi chú

Bảng này không có cột số điện thoại riêng. Số điện thoại nằm trong địa chỉ, ví dụ JSON_VALUE(default_address, '$.phone'), hoặc trong cột customer của bảng đơn hàng.

Sapo chỉ trả tối đa 300.000 khách hàng cho mỗi lần lọc; Elton tự chia nhỏ khoảng thời gian để lấy đủ.

Tất cả cột của sapo_customer_<store>: id, email, accepts_marketing, created_on, modified_on, first_name, last_name, orders_count, state, total_spent, last_order_id, last_order_name, note, verified_email, tags, default_address, addresses, elton_created_at

Supplier (v3)​

Nhà cung cấp: id, code, name, liên hệ (email, phone, website), địa chỉ (address, ward, district, city, province, country, zip_code), tax_id (mã số thuế), status, note. Elton không lấy đơn nhập hàng của Sapo Web, nên bảng này không nối được với bảng nào khác.

Tất cả cột của sapo_supplier_<store>: id, name, code, email, phone, address, city, district, ward, province, country, zip_code, website, note, status, tax_id, created_on, modified_on, elton_created_at

Inventory Item và Inventory Level (v3)​

  • Inventory Item (sapo_inventory_item_<store>): mỗi dòng là một mặt hàng tồn kho, ứng với một phiên bản sản phẩm (inventory_item_id trong variants của sapo_product_<store>). Cột chính: id, sku, cost (giá vốn, dạng chuỗi), tracked (có theo dõi tồn kho), requires_shipping. created_on và modified_on có thể trống.
  • Inventory Level (sapo_inventory_level_<store>): số lượng tồn của một mặt hàng tại một chi nhánh. Mỗi dòng có inventory_item_id, location_id, available, modified_on. available là số có thể bán: tồn thực tế trừ hàng đã đặt, hàng không bán được và hàng đã đóng gói; âm khi bán vượt tồn.

Hai loại này được lấy toàn bộ mỗi lần chạy, không theo First run loads from và Later runs rescan, vì thay đổi tồn kho không luôn cập nhật ngày sửa. Bảng giữ trạng thái tồn kho mới nhất, không lưu lịch sử theo ngày.

Tất cả cột của sapo_inventory_item_<store>: id, sku, cost, tracked, requires_shipping, country_code_of_origin, province_code_of_origin, harmonized_system_code, country_harmonized_system_codes, created_on, modified_on, elton_created_at

Tất cả cột của sapo_inventory_level_<store>: inventory_item_id, location_id, available, modified_on, elton_created_at

Location (v3)​

Chi nhánh/kho của cửa hàng, lấy toàn bộ mỗi lần chạy: id, name, active (đang hoạt động), địa chỉ (address1, address2, city, province, country, zip), phone, legacy.

Tất cả cột của sapo_location_<store>: id, name, active, address1, address2, city, province, province_code, country, country_code, country_name, zip, phone, legacy, created_on, modified_on, localized_country_name, localized_province_name, elton_created_at

5. Sapo Web v2: dữ liệu được đồng bộ​

Source có Version là v2 chỉ lấy được Order, Product, Customer. Bảng có tên dạng sapo_<loại>_<store name>, với cả Store name (kể cả đuôi .mysapo.net) được đổi sang chữ thường, dấu . và - thành _. Ví dụ Store name abc.mysapo.net → bảng sapo_order_abc_mysapo_net.

Loại dữ liệuBảngKhoáCách lấyPhân vùng theo ngày
Ordersapo_order_<store name>idLần đầu từ First run loads from, sau đó theo Later runs rescan, lọc theo modified_oncreated_on
Productsapo_product_<store name>idToàn bộ ở lần đầu, sau đó theo Later runs rescancreated_on
Customersapo_customer_<store name>idToàn bộ ở lần đầu, sau đó theo Later runs rescancreated_on

Ý nghĩa các cột giống bảng v3 cùng tên (Order, Product, Customer). Bảng đơn hàng v2 không có các cột status, assignee_id, user, assignee, invoices.

Tất cả cột của sapo_order_<store name> (v2): id, email, closed_on, created_on, modified_on, number, note, token, gateway, test, total_price, subtotal_price, total_weight, total_tax, taxes_included, currency, financial_status, confirmed, total_discounts, total_line_items_price, cart_token, buyer_accepts_marketing, name, referring_site, landing_site, cancelled_on, cancel_reason, total_price_usd, checkout_token, reference, user_id, location_id, source_identifier, source_url, processed_on, device_id, browser_ip, landing_site_ref, order_number, discount_codes, note_attributes, payment_gateway_names, processing_method, checkout_id, source_name, fulfillment_status, tax_lines, tags, contact_email, line_items, shipping_lines, billing_address, shipping_address, fulfillments, client_details, refunds, payment_details, customer, elton_created_at

Tất cả cột của sapo_product_<store name> (v2): id, name, alias, content, summary, vendor, product_type, created_on, modified_on, published_on, tags, variants, options, images, image, elton_created_at

Tất cả cột của sapo_customer_<store name> (v2): id, email, accepts_marketing, created_on, modified_on, first_name, last_name, orders_count, state, total_spent, last_order_id, last_order_name, note, verified_email, tags, default_address, addresses, elton_created_at

6. Quan hệ giữa các bảng​

Các bảng Sapo Web nối với nhau qua mã đơn, mã sản phẩm, mã mặt hàng tồn kho và mã chi nhánh. Ví dụ dùng bảng v3 với Store name abc.mysapo.net (hậu tố abc); với v2, thay hậu tố bằng abc_mysapo_net. Các bảng cần nối phải cùng một source (cùng hậu tố).

BảngNối với bảngĐiều kiện nốiQuan hệ
sapo_order_<store>sapo_order_return_<store>id = order_id1 đơn – nhiều đơn trả
sapo_order_<store>sapo_customer_<store>JSON_VALUE(customer, '$.id') = id (ép kiểu INT64)nhiều đơn – 1 khách
sapo_order_<store>sapo_product_<store>line_items[].product_id = id (tách mảng line_items)nhiều sản phẩm trong 1 đơn
sapo_order_<store>sapo_inventory_item_<store>line_items[].inventory_item_id = iddòng hàng – mặt hàng tồn kho
sapo_order_<store>sapo_location_<store>CAST(location_id AS INT64) = id (location_id của đơn là chuỗi)nhiều đơn – 1 chi nhánh
sapo_order_return_<store>sapo_order_<store>line_items[].line_item_id = line_items[].id của đơn gốcdòng trả – dòng đơn gốc
sapo_order_return_<store>sapo_customer_<store>customer_id = idnhiều đơn trả – 1 khách
sapo_order_return_<store>sapo_location_<store>return_location_id = idnhiều đơn trả – 1 chi nhánh
sapo_customer_<store>sapo_order_<store>last_order_id = idđơn gần nhất của khách
sapo_product_<store>sapo_inventory_item_<store>variants[].inventory_item_id = id (tách mảng variants)1 phiên bản – 1 mặt hàng tồn kho
sapo_inventory_item_<store>sapo_inventory_level_<store>id = inventory_item_id1 mặt hàng – 1 dòng mỗi chi nhánh
sapo_location_<store>sapo_inventory_level_<store>id = location_id1 chi nhánh – nhiều mặt hàng

sapo_supplier_<store> không có cột nối với các bảng khác.

Sapo Web và Sapo POS: hai source có mã đơn, sản phẩm, khách hàng riêng; Elton không có cột nào nối bảng Sapo Web với bảng Sapo POS. Lưu ý tên bảng của hai source có thể trùng: Sapo Web v3 với Store name abc.mysapo.net và Sapo POS với Store Name abc.mysapogo.com đều ghi vào sapo_order_abc, sapo_product_abc, sapo_customer_abc, sapo_location_abc. Nếu dùng cả hai, hãy cho chúng ghi vào hai dataset (schema) khác nhau ở destination.

Ví dụ trên BigQuery, số lượng bán và doanh thu theo sản phẩm, đơn tạo từ ngày 01/11/2026 (giờ Việt Nam), bỏ đơn đã huỷ:

SELECT
CAST(JSON_VALUE(li, '$.product_id') AS INT64) AS product_id,
p.name AS product_name,
SUM(CAST(JSON_VALUE(li, '$.quantity') AS FLOAT64)) AS quantity,
SUM(CAST(JSON_VALUE(li, '$.price') AS FLOAT64)
* CAST(JSON_VALUE(li, '$.quantity') AS FLOAT64)) AS gross_amount
FROM `dataset.sapo_order_abc` o
CROSS JOIN UNNEST(o.line_items) AS li
LEFT JOIN `dataset.sapo_product_abc` p
ON p.id = CAST(JSON_VALUE(li, '$.product_id') AS INT64)
WHERE o.cancelled_on IS NULL
AND DATE(o.created_on, 'Asia/Ho_Chi_Minh') >= '2026-11-01'
GROUP BY product_id, product_name
ORDER BY gross_amount DESC;

Tồn kho hiện tại theo SKU và chi nhánh:

SELECT ii.sku, l.name AS location_name, il.available
FROM `dataset.sapo_inventory_level_abc` il
JOIN `dataset.sapo_inventory_item_abc` ii ON ii.id = il.inventory_item_id
JOIN `dataset.sapo_location_abc` l ON l.id = il.location_id
ORDER BY ii.sku, location_name;

7. Lỗi thường gặp​

Lỗi từ Sapo có dạng <mã HTTP>: <nội dung Sapo trả về>.

LỗiNguyên nhân và cách xử lý
401: ...Sapo từ chối API Key / Secret key: sai, app đã bị xoá hoặc Secret Key đã được tạo lại. Kiểm tra lại ở bước 1 và cập nhật data source
403: ...App trên Sapo không có quyền đọc loại dữ liệu này. Kiểm tra quyền của app trên Sapo, hoặc bỏ loại dữ liệu đó khỏi connection
404: ... hoặc lỗi không kết nối được tới https://<Store name>/admin/...Store name sai. Nhập đúng dạng abc.mysapo.net, không có https:// hay /admin
429: ...Quá giới hạn gọi API của Sapo, Elton đã đợi và thử lại 6 lần. Thường do app khác dùng cùng API Key gọi nhiều cùng lúc. Chạy lại sau ít phút
This datasource has not been authorized yet! Please go to the datasource and authorize before continuing.Source thiếu Secret key. Sửa source và nhập Secret key
... records modified in {...} exceed the 20000 that one Sapo query can page throughQuá nhiều đơn hàng (hoặc khách hàng, giới hạn 200000) được sửa trong cùng một khoảnh khắc nên Sapo không cho đọc hết. Liên hệ Elton
Sapo counted ... but only ... after splitting at ...Sapo đếm số bản ghi không khớp khi Elton chia nhỏ khoảng thời gian. Chạy lại; nếu vẫn lỗi, liên hệ Elton
Không thấy đơn hàng / đơn trả cũĐơn có ngày cập nhật cũ hơn First run loads from không được lấy ở lần chạy đầu. Đặt lại ngày và reload connection
Danh sách loại dữ liệu chỉ có Order, Product, CustomerSource đang dùng Version v2. Xem bước 2
Bảng mới xuất hiện, dữ liệu mới không vào bảng cũVersion hoặc Store name của source đã đổi. Xem bước 2
Bảng sapo_order_<store> lẫn dữ liệu Sapo POS, hoặc lỗi khi loadSource Sapo POS và Sapo Web cùng ghi vào một dataset với tên bảng trùng. Xem mục 6

Cách tính Billable Pipeline​

Cách tính phí theo số pipeline của từng loại source xem ở đây.