Bán hàng

Đơn hàng

16 endpoint · https://pos.pages.fm/api/v1

Xem Markdown

Danh sách đơn hàng

GET/shops/{SHOP_ID}/orders

Lấy danh sách đơn hàng thông tin từng đơn hàng cụ thể

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Tham số truy vấn

page_sizeinteger

Kích thước trang

Mặc định: 30 · Ví dụ: 30
page_numberinteger

Số trang

Mặc định: 1 · Ví dụ: 1
searchstring

Số điện thoại, tên khách hàng, ghi chú, ...

Ví dụ: "0999999999"
filter_status[]array<integer>

Trạng thái đơn hàng

include_removedinteger

Bao gồm đơn đã xóa

Ví dụ: 0
updateStatusstring

Lọc đơn hàng theo thời gian

Giá trị"inserted_at"Thời điểm tạo đơn"updated_at"Thời điểm cập nhật cuối"partner_inserted_at"Thời điểm gửi đơn vị vận chuyển"paid_at"Thời điểm đối soát"estimate_delivery_date"Thời gian giao hàng dự kiến"picked_up_at"Thời điểm đơn vị vận chuyển lấy hàng"first_delivery_at"Thời điểm giao hàng lần đầu"transfer_proof"Chứng từ chuyển khoản"time_assign_seller"Thời điểm phân công người bán"time_assign_care"Thời điểm phân công chăm sóc"time_assign_marketer"Thời điểm phân công marketer"-1"Cập nhật trạng thái cuối"0"Mới"11"Chờ hàng"20"Đã đặt hàng"1"Đã xác nhận"12"Chờ in"13"Đã in"8"Đang đóng hàng"9"Chờ chuyển hàng"2"Đã gửi hàng"3"Đã nhận"16"Đã thu tiền"4"Đang hoàn"15"Hoàn một phần"5"Đã hoàn
Mặc định: "inserted_at" · Ví dụ: "inserted_at"
startDateTimeinteger · int64

Ngày bắt đầu

Ví dụ: 0
endDateTimeinteger · int64

Ngày kết thúc

Ví dụ: 0
option_sortstring

Thứ tự đơn hàng

Giá trị"inserted_at_desc"Thời điểm tạo đơn giảm dần"inserted_at_asc"Thời điểm tạo đơn tăng dần"last_updated_order_desc"Cập nhật đơn hàng cuối giảm dần"last_updated_order_asc"Cập nhật đơn hàng cuối tăng dần"last_update_status_at_desc"Cập nhật trạng thái cuối giảm dần"last_update_status_at_asc"Cập nhật trạng thái cuối tăng dần"order_valuation_desc"Giá trị đơn hàng giảm dần"order_valuation_asc"Giá trị đơn hàng tăng dần"product_quantity_desc"Số lượng sản phẩm giảm dần"product_quantity_asc"Số lượng sản phẩm tăng dần"product_name_desc"Tên sản phẩm giảm dần"product_name_asc"Tên sản phẩm tăng dần"sub_status_sort_desc"Cập nhật chậm giao hàng giảm dần"sub_status_sort_asc"Cập nhật chậm giao hàng tăng dần"first_undeliverable_at_desc"Lần đầu không giao được giảm dần"first_undeliverable_at_asc"Lần đầu không giao được tăng dần"customer_sort_desc"Tên khách hàng giảm dần"customer_sort_asc"Tên khách hàng tăng dần"estimate_delivery_date_desc"Ngày giao hàng dự kiến giảm dần"estimate_delivery_date_asc"Ngày giao hàng dự kiến tăng dần"order_source_desc"Nguồn đơn hàng giảm dần"order_source_asc"Nguồn đơn hàng tăng dần
Mặc định: "inserted_at_desc" · Ví dụ: "inserted_at_desc"
fields[]array<string>

Các trường trả về

partner_id[]array<integer>

ID đơn vị vận chuyển trên hệ thống Pancake

shop_partner_accountinteger

Lọc theo mã tài khoản vận chuyển đã kết nối với shop

customer_idstring

Mã khách hàng

order_sources[]array<array<string>>

Nguồn đơn hàng. Định dạng: [[mã_nguồn_đơn, mã_tài_khoản], ...] Ví dụ: [["-1", "314"], ["-3"]]

is_filter_exclude_sourceboolean

Loại trừ nguồn đơn hàng

Mặc định: false
ad_ids[]array<string>

Mã quảng cáo

project_idsinteger

Mã dự án

extra_fields[]array<string>

Các trường bổ sung

Giá trị"return_rate"Tỉ lệ đổi hàng"conversation_note"Ghi chú trao đổi

Phản hồi

object
dataarray<object>

Danh sách đơn hàng

page_numberinteger

Số trang

page_sizeinteger

Kích thước trang

successboolean

Trạng thái thành công

total_entriesinteger

Tổng số bản ghi

total_pagesinteger

Tổng số trang

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders?api_key=API_KEY"
Phản hồi 200
{
  "data": [
    {
      "id": 1418,
      "system_id": 1,
      "shop_id": 4,
      "inserted_at": "2020-05-12T04:51:42",
      "updated_at": "2020-05-12T04:51:54",
      "status": 0,
      "status_name": "new",
      "bill_full_name": "Hoang Anh",
      "bill_phone_number": "0999999999",
      "bill_email": "customer@example.com",
      "conversation_id": "117967746266487_9306266852780716",
      "page_id": "256469571178082",
      "post_id": "185187094667903_477083092110915",
      "ad_id": "23851252560290199",
      "shipping_fee": 0,
      "cod": 0,
      "cash": 0,
      "account": 1,
      "total_discount": 0,
      "note": "",
      "note_print": null,
      "received_at_shop": false,
      "is_free_shipping": false,
      "is_locked": false,
      "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "creator": {
        "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "fb_id": "2042723249341651",
        "name": "Hoang Anh",
        "avatar_url": null
      },
      "items": [],
      "partner": {
        "partner_id": 1,
        "cod": 0,
        "extend_code": "S58824.MB25.C3.500020713",
        "total_fee": 0,
        "updated_at": "2020-05-12T05:18:16",
        "delivery_name": null,
        "delivery_tel": null,
        "picked_up_at": null,
        "sort_code": null,
        "paid_at": null,
        "system_created": true,
        "partner_status": "request_received",
        "partner_name": "Shopee Xpress",
        "first_delivery_at": null,
        "first_undeliverable_at": "2025-06-30T06:41:44",
        "count_of_delivery": 1,
        "order_number_vtp": null,
        "printed_form": null,
        "extend_update": [
          {
            "key": "status",
            "status": "delivered",
            "tracking_id": "S58824.MB25.C3.500020713",
            "note": "",
            "update_at": "2020-05-12T05:18:16",
            "webhook_params": null
          }
        ]
      },
      "shipping_address": {
        "full_name": "Hoang Anh",
        "phone_number": "0999999999",
        "address": "90 Cầu Giấy",
        "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
        "province_id": "101",
        "district_id": "10113",
        "commune_id": "1011309"
      },
      "additional_info": {
        "service_partner": "instant"
      },
      "invoice_info_list": [
        {
          "error": "",
          "invoice_detail": {
            "company_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình",
            "company_address_breakdown": {
              "company_additional_info": "",
              "company_barangay": "",
              "company_city": "",
              "company_detailed_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình",
              "company_district": "Phường Nam Định",
              "company_full_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình",
              "company_postcode": "",
              "company_province": "",
              "company_region": "VietNam",
              "company_state": "Ninh Bình",
              "company_town": "Phường Nam Định"
            },
            "company_email": "acb@gmail.com",
            "company_name": "Công ty cổ phần tư vấn xây dựng điện Hoàng Phát",
            "company_tax_id": "0601043840"
          },
          "invoice_type": "company",
          "is_requested": true,
          "order_sn": "251121BVGU6RVE"
        }
      ],
      "reports_by_phone": {
        "+639175706297": {
          "order_fail": 29,
          "order_success": 20,
          "warning": 0
        }
      },
      "p_utm_source": "fb",
      "p_utm_medium": "paid",
      "p_utm_campaign": "120236828168640593",
      "p_utm_term": "120236828168790593",
      "p_utm_content": "120236828168960593",
      "link": "https://www.myfahathai.com/doc?fbclid=IwZXh0bgNhZW0BMABhZGlkAasqwhnoX"
    }
  ],
  "page_number": 1,
  "page_size": 100,
  "success": true,
  "total_entries": 1418,
  "total_pages": 15
}

Tạo đơn hàng

POST/shops/{SHOP_ID}/orders

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Nội dung yêu cầu

Thông tin đơn hàng cần tạo

object
shop_idintegerbắt buộc

Mã cửa hàng

idinteger

Mã đơn hàng

system_idinteger

Mã hệ thống

inserted_atstring · date-time

Thời điểm tạo đơn

updated_atstring · date-time

Thời điểm cập nhật đơn

statusinteger

Trạng thái đơn hàng

Giá trị0Mới17Chờ xác nhận11Chờ hàng12Chờ in13Đã in20Đã đặt hàng1Đã xác nhận8Đang đóng hàng9Chờ chuyển hàng2Đã gửi hàng3Đã nhận16Đã thu tiền4Đang hoàn15Hoàn một phần5Đã hoàn6Đã hủy7Đã xóa
status_namestring

Tên trạng thái đơn hàng

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

bill_emailstring

Email khách hàng

conversation_idstring

Mã hội thoại

page_idstring

Mã Facebook page

Phản hồi

object
idinteger

Mã đơn hàng

system_idinteger

Mã hệ thống

shop_idinteger

Mã cửa hàng

inserted_atstring · date-time

Thời điểm tạo đơn

updated_atstring · date-time

Thời điểm cập nhật đơn

statusinteger

Trạng thái đơn hàng

Giá trị0Mới17Chờ xác nhận11Chờ hàng12Chờ in13Đã in20Đã đặt hàng1Đã xác nhận8Đang đóng hàng9Chờ chuyển hàng2Đã gửi hàng3Đã nhận16Đã thu tiền4Đang hoàn15Hoàn một phần5Đã hoàn6Đã hủy7Đã xóa
status_namestring

Tên trạng thái đơn hàng

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

bill_emailstring

Email khách hàng

conversation_idstring

Mã hội thoại

page_idstring

Mã Facebook page

Yêu cầu
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "is_abandoned_order": true,
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "conversation_id": "117967746266487_9306266852780716",
  "is_free_shipping": false,
  "received_at_shop": false,
  "page_id": "256469571178082",
  "account": 4,
  "account_name": "facebook321",
  "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
  "items": [
    {
      "discount_each_product": 0,
      "is_bonus_product": false,
      "is_discount_percent": false,
      "is_wholesale": false,
      "one_time_product": false,
      "quantity": 1,
      "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
      "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
      "variation_info": {
        "detail": null,
        "fields": null,
        "display_id": null,
        "name": "aaaaaa",
        "product_display_id": null,
        "retail_price": 100000,
        "weight": 100
      }
    }
  ],
  "note": "",
  "note_print": null,
  "merge_order": false,
  "returned_reason": 1,
  "warehouse_id": "630744ef-4614-4a70-988c-52e6d78c953c",
  "shipping_address": {
    "address": "aaaaa",
    "commune_id": "2210941",
    "country_code": null,
    "district_id": "22109",
    "full_address": "aaaaa, Xã Bắc Lý, Huyện Hiệp Hòa, Bắc Giang",
    "full_name": "hoang anh",
    "phone_number": "0999999999",
    "post_code": null,
    "province_id": "221"
  },
  "shipping_fee": 0,
  "shop_id": 4,
  "total_discount": 0,
  "warehouse_info": {
    "district_id": "10111",
    "full_address": "kakakaka, Phường Khương Trung, Quận Thanh Xuân, Hà Nội",
    "name": "snappy",
    "phone_number": "0999999999",
    "province_id": "101"
  },
  "custom_id": "Ma0001",
  "activated_promotion_advances": [
    {
      "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121",
      "is_activated": true
    }
  ],
  "invoice_info_list": [
    {
      "invoice_type": "personal",
      "is_requested": true,
      "invoice_detail": {
        "name": "Hoang Anh",
        "phone_number": "0934283743",
        "identity_code": "029374382740",
        "tax_id": "",
        "email": ""
      }
    }
  ],
  "status": 0,
  "cash": 0
}'
Phản hồi 200
{
  "id": 1418,
  "system_id": 1,
  "shop_id": 4,
  "inserted_at": "2020-05-12T04:51:42",
  "updated_at": "2020-05-12T04:51:54",
  "status": 0,
  "status_name": "new",
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "bill_email": "customer@example.com",
  "page_id": "256469571178082",
  "post_id": "185187094667903_477083092110915",
  "ad_id": "23851252560290199",
  "shipping_fee": 0,
  "cod": 0,
  "cash": 0,
  "account": 1,
  "total_discount": 0,
  "note": "",
  "note_print": null,
  "received_at_shop": false,
  "is_free_shipping": false,
  "is_locked": false,
  "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "creator": {
    "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "fb_id": "2042723249341651",
    "name": "Hoang Anh",
    "avatar_url": null
  },
  "items": [],
  "partner": {
    "partner_id": 1,
    "cod": 0,
    "extend_code": "S58824.MB25.C3.500020713",
    "total_fee": 0,
    "updated_at": "2020-05-12T05:18:16"
  },
  "shipping_address": {
    "full_name": "Hoang Anh",
    "phone_number": "0999999999",
    "address": "90 Cầu Giấy",
    "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
    "province_id": "101",
    "district_id": "10113",
    "commune_id": "1011309"
  }
}

Lấy thông tin 1 đơn hàng

GET/shops/{SHOP_ID}/orders/{ORDER_ID}

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4
ORDER_IDstringbắt buộc

Mã đơn hàng

Ví dụ: "1418"

Phản hồi

object
idinteger

Mã đơn hàng

system_idinteger

Mã hệ thống

shop_idinteger

Mã cửa hàng

inserted_atstring · date-time

Thời điểm tạo đơn

updated_atstring · date-time

Thời điểm cập nhật đơn

statusinteger

Trạng thái đơn hàng

Giá trị0Mới17Chờ xác nhận11Chờ hàng12Chờ in13Đã in20Đã đặt hàng1Đã xác nhận8Đang đóng hàng9Chờ chuyển hàng2Đã gửi hàng3Đã nhận16Đã thu tiền4Đang hoàn15Hoàn một phần5Đã hoàn6Đã hủy7Đã xóa
status_namestring

Tên trạng thái đơn hàng

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

bill_emailstring

Email khách hàng

conversation_idstring

Mã hội thoại

page_idstring

Mã Facebook page

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/{ORDER_ID}?api_key=API_KEY"
Phản hồi 200
{
  "id": 1,
  "system_id": 1,
  "shop_id": 1,
  "inserted_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "status": 1,
  "status_name": "Đã xác nhận",
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "bill_email": "hoang@example.com",
  "page_id": "104438181227821",
  "post_id": "185187094667903_477083092110915",
  "ad_id": "23851252560290199",
  "shipping_fee": 1,
  "partner_fee": 1,
  "fee_marketplace": 1,
  "customer_pay_fee": true,
  "is_free_shipping": true,
  "is_livestream": true,
  "is_live_shopping": true,
  "is_smc": true,
  "received_at_shop": true,
  "total_discount": 1,
  "note": "",
  "note_print": null,
  "returned_reason": 1,
  "returned_reason_name": "Do khách hàng",
  "sub_status": 1,
  "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8",
  "warehouse_info": {
    "name": "kho test ecod",
    "phone_number": "0999999999",
    "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu",
    "address": "hâhhha",
    "province_id": "717",
    "district_id": "71705",
    "commune_id": "7170510",
    "affiliate_id": null,
    "ffm_id": null,
    "has_snappy_service": true,
    "custom_id": null
  },
  "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "creator": {
    "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "fb_id": "2042723249341651",
    "name": "Hoang Anh",
    "avatar_url": null
  },
  "items": [
    {
      "id": 1,
      "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
      "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
      "quantity": 1,
      "returned_count": 1,
      "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
      "quantity_by_combo_products": [],
      "discount_each_product": 1,
      "is_bonus_product": true,
      "is_discount_percent": true,
      "is_wholesale": true,
      "is_composite": true,
      "one_time_product": true,
      "note": "",
      "note_product": "",
      "inserted_at": "2024-01-01T00:00:00Z",
      "measure_group_id": 1,
      "variation_info": {
        "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
        "name": "Ao so mi nam",
        "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
        "retail_price": 140000,
        "detail": "",
        "images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "fields": [
          {
            "id": "field-id-1",
            "name": "Màu",
            "value": "Trắng",
            "keyValue": "Màu"
          }
        ],
        "barcode": "BARCODE123",
        "brand_id": null,
        "category_ids": [
          1290021044
        ],
        "display_id": "13109",
        "product_display_id": "a131092025",
        "is_upsale_product": true,
        "last_imported_price": 30000,
        "weight": 0,
        "measure_info": {
          "measure_id": 1,
          "exchange_value": 1
        },
        "avg_price": 30000
      },
      "components": [
        {
          "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
          "quantity": 1,
          "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7"
        }
      ]
    }
  ],
  "partner": {
    "partner_id": 1,
    "cod": 0,
    "extend_code": "S58824.MB25.C3.500020713",
    "total_fee": 0,
    "updated_at": "2020-05-12T05:18:16",
    "delivery_name": null,
    "delivery_tel": null,
    "picked_up_at": null,
    "sort_code": null,
    "paid_at": null,
    "system_created": true,
    "partner_status": "request_received",
    "partner_name": "Shopee Xpress",
    "first_delivery_at": null,
    "first_undeliverable_at": "2025-06-30T06:41:44",
    "count_of_delivery": 1,
    "order_number_vtp": null,
    "printed_form": null,
    "extend_update": [
      {
        "key": "status",
        "status": "delivered",
        "tracking_id": "S58824.MB25.C3.500020713",
        "note": "",
        "update_at": "2020-05-12T05:18:16"
      }
    ]
  },
  "shipping_address": {
    "full_name": "Hoang Anh",
    "phone_number": "0999999999",
    "address": "90 Cầu Giấy",
    "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
    "province_id": "101",
    "district_id": "10113",
    "commune_id": "1011309",
    "commnue_name": "Phường Dịch Vọng",
    "district_name": "Quận Cầu Giấy",
    "province_name": "Hà Nội",
    "country_code": "84",
    "post_code": null
  },
  "payment_purchase_histories": [
    {
      "amount": 1800000,
      "type": "cash",
      "inserted_at": "2024-01-01T00:00:00Z",
      "result_code": "00",
      "ipn_reply": true,
      "voucher_amount": 0,
      "tags": [
        "payment"
      ]
    }
  ],
  "tags": [
    {
      "id": 75,
      "name": "thẻ 4"
    }
  ],
  "marketer": {
    "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "name": "Marketer Name",
    "email": "marketer@example.com",
    "phone_number": "0999999999",
    "fb_id": "2042723249341651",
    "avatar_url": null
  },
  "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097",
  "activated_combo_products": {
    "combo_product_id": 1,
    "quantity_combo_activated": 1
  },
  "activated_promotion_advances": [
    {
      "id": 1,
      "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121"
    }
  ],
  "tracking_link": "https://tracking.example.com",
  "payment_link": "https://payment.example.com",
  "ads_source": null,
  "shopify_order_id": null,
  "shopify_abandon_checkout_id": 1,
  "is_abandoned_order": true,
  "cod": 0,
  "cash": 0,
  "account": 1,
  "account_name": "facebook321",
  "advanced_platform_fee": {
    "ads_top_up": 1,
    "affiliate_commission": 1,
    "diff_shipping_fee": 1,
    "marketplace_voucher": 1,
    "payment_fee": 1,
    "platform_commission": 1,
    "seller_transaction_fee": 1,
    "service_fee": 1,
    "sfp_service_fee": 1
  },
  "printing_count": 1,
  "marketplace_id": "-3",
  "money_to_collect": 1,
  "total_price": 1,
  "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
  "customer": {
    "fb_id": null,
    "id": "96a8e283-3fba-492e-a35a-970f72a30a02",
    "name": "Trần Văn Hoàng",
    "page_id": "104438181227821"
  },
  "total_quantity": 1,
  "time_assign_marketer": "2024-01-01T00:00:00Z",
  "status_history": [
    {
      "avatar_url": null,
      "editor_fb": "2042723249341651",
      "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "name": "Hoang Anh",
      "old_status": 0,
      "status": 1,
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "duplicated_phone": true,
  "order_currency": "VND",
  "charged_by_vnpay": 1,
  "charged_by_qrpay": 1,
  "custom_id": null,
  "last_editor": {
    "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "fb_id": "2042723249341651",
    "name": "Hoang Anh",
    "email": "hoang@example.com",
    "avatar_url": null,
    "phone_number": "0999999999"
  },
  "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "charged_by_momo": 1,
  "bank_transfer_images": [
    "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
  ],
  "transfer_money": 1,
  "transfer_proofs": [
    {
      "id": 1,
      "order_id": 1,
      "shop_id": 1,
      "payment_id": "64e130e4-012a-45b1-bd88-51811f23ead8",
      "amount": 1,
      "images": [
        "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
      ],
      "note": null,
      "is_income": true,
      "is_verify": true,
      "verify_at": "2024-01-01T00:00:00Z",
      "verifier": {
        "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "fb_id": "2042723249341651",
        "name": "Hoang Anh",
        "avatar_url": null
      },
      "creator": {
        "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "fb_id": "2042723249341651",
        "name": "Hoang Anh",
        "avatar_url": null
      },
      "last_editor": {
        "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "fb_id": "2042723249341651",
        "name": "Hoang Anh",
        "avatar_url": null
      },
      "order_info": null,
      "inserted_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "lock_order_by_user": null,
  "assigning_care": {
    "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "fb_id": "2042723249341651",
    "name": "Care Name",
    "email": "care@example.com",
    "avatar_url": null,
    "phone_number": "0999999999"
  },
  "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
  "time_assign_care": "2024-01-01T00:00:00Z",
  "assigning_seller": {
    "id": "340644fc-314d-450e-a45f-33343678cab6",
    "fb_id": "2042723249341651",
    "name": "Seller Name",
    "email": "seller@example.com",
    "avatar_url": null,
    "phone_number": "0999999999"
  },
  "einvoices": [],
  "charged_by_card": 1,
  "estimate_delivery_date": "2024-01-01T00:00:00Z",
  "order_sources": "-1",
  "charged_by_fundiin": 1,
  "surcharge": 1,
  "is_linked_partner": true,
  "call_laters": [],
  "last_update_status_at": "2024-01-01T00:00:00Z",
  "discount_by_customer_level": 1,
  "viewing": [],
  "order_returned_ids": null,
  "cost_surcharge": 1,
  "time_send_partner": "2024-01-01T00:00:00Z",
  "charged_by_kredivo": 1,
  "discount": 1,
  "histories": [],
  "duplicated_customer": true,
  "tax": 1,
  "is_from_ecommerce": true,
  "note_image": [
    "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
  ],
  "shopify_draft_order_id": null,
  "display_id": 1,
  "shop_partner_id": 1,
  "is_locked": true,
  "additional_info": {
    "service_partner": "instant"
  },
  "invoice_info_list": [
    {
      "error": "",
      "invoice_detail": {
        "company_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình",
        "company_address_breakdown": {
          "company_additional_info": "",
          "company_barangay": "",
          "company_city": "",
          "company_detailed_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình",
          "company_district": "Phường Nam Định",
          "company_full_address": "85 lê quý đôn, phường nam định, tỉnh Ninh Bình",
          "company_postcode": "",
          "company_province": "",
          "company_region": "VietNam",
          "company_state": "Ninh Bình",
          "company_town": "Phường Nam Định",
          "company_email": "acb@gmail.com",
          "company_name": "Công ty cổ phần tư vấn xây dựng điện Hoàng Phát",
          "company_tax_id": "0601043840"
        }
      },
      "invoice_type": "company",
      "is_requested": true,
      "order_sn": "251121BVGU6RVE"
    }
  ],
  "reports_by_phone": {
    "+639175706297": {
      "order_fail": 29,
      "order_success": 20,
      "warning": 0
    }
  },
  "p_utm_source": "fb",
  "p_utm_medium": "paid",
  "p_utm_campaign": "120236828168640593",
  "p_utm_term": "120236828168790593",
  "p_utm_content": "120236828168960593",
  "link": "https://www.myfahathai.com/doc?fbclid=IwZXh0bgNhZW0BMABhZGlkAasqwhnoX"
}

Cập nhật đơn hàng

PUT/shops/{SHOP_ID}/orders/{ORDER_ID}

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4
ORDER_IDstringbắt buộc

Mã đơn hàng

Ví dụ: "1418"

Nội dung yêu cầu

Thông tin đơn hàng cần cập nhật

object
idinteger

Mã đơn hàng

system_idinteger

Mã hệ thống

shop_idinteger

Mã cửa hàng

inserted_atstring · date-time

Thời điểm tạo đơn

updated_atstring · date-time

Thời điểm cập nhật đơn

statusinteger

Trạng thái đơn hàng

Giá trị0Mới17Chờ xác nhận11Chờ hàng12Chờ in13Đã in20Đã đặt hàng1Đã xác nhận8Đang đóng hàng9Chờ chuyển hàng2Đã gửi hàng3Đã nhận16Đã thu tiền4Đang hoàn15Hoàn một phần5Đã hoàn6Đã hủy7Đã xóa
status_namestring

Tên trạng thái đơn hàng

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

bill_emailstring

Email khách hàng

conversation_idstring

Mã hội thoại

page_idstring

Mã Facebook page

Phản hồi

object
idinteger

Mã đơn hàng

system_idinteger

Mã hệ thống

shop_idinteger

Mã cửa hàng

inserted_atstring · date-time

Thời điểm tạo đơn

updated_atstring · date-time

Thời điểm cập nhật đơn

statusinteger

Trạng thái đơn hàng

Giá trị0Mới17Chờ xác nhận11Chờ hàng12Chờ in13Đã in20Đã đặt hàng1Đã xác nhận8Đang đóng hàng9Chờ chuyển hàng2Đã gửi hàng3Đã nhận16Đã thu tiền4Đang hoàn15Hoàn một phần5Đã hoàn6Đã hủy7Đã xóa
status_namestring

Tên trạng thái đơn hàng

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

bill_emailstring

Email khách hàng

conversation_idstring

Mã hội thoại

page_idstring

Mã Facebook page

Yêu cầu
curl -X PUT "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/{ORDER_ID}?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "is_abandoned_order": true,
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "partner": {
    "partner_id": 1,
    "extend_code": "S58824.MB25.C3.500020713",
    "count_of_delivery": 2
  },
  "is_free_shipping": false,
  "received_at_shop": false,
  "page_id": "256469571178082",
  "account": 4,
  "account_name": "facebook321",
  "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
  "items": [
    {
      "discount_each_product": 0,
      "is_bonus_product": false,
      "is_discount_percent": false,
      "is_wholesale": false,
      "one_time_product": false,
      "quantity": 1,
      "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
      "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
      "variation_info": {
        "detail": null,
        "fields": null,
        "display_id": null,
        "name": "aaaaaa",
        "product_display_id": null,
        "is_upsale_product": true,
        "retail_price": 100000,
        "weight": 100
      }
    }
  ],
  "note": "",
  "note_print": null,
  "returned_reason": 1,
  "warehouse_id": "630744ef-4614-4a70-988c-52e6d78c953c",
  "shipping_address": {
    "address": "aaaaa",
    "commune_id": "2210941",
    "country_code": null,
    "district_id": "22109",
    "full_address": "aaaaa, Xã Bắc Lý, Huyện Hiệp Hòa, Bắc Giang",
    "full_name": "hoang anh",
    "phone_number": "0999999999",
    "post_code": null,
    "province_id": "221"
  },
  "shipping_fee": 0,
  "shop_id": 4,
  "total_discount": 0,
  "warehouse_info": {
    "district_id": "10111",
    "full_address": "kakakaka, Phường Khương Trung, Quận Thanh Xuân, Hà Nội",
    "name": "snappy",
    "phone_number": "0999999999",
    "province_id": "101"
  },
  "custom_id": "Ma0001",
  "activated_promotion_advances": [
    {
      "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121",
      "is_activated": true
    }
  ],
  "invoice_info_list": [
    {
      "invoice_type": "personal",
      "is_requested": true,
      "invoice_detail": {
        "name": "Hoang Anh",
        "phone_number": "0934283743",
        "identity_code": "029374382740",
        "tax_id": "",
        "email": ""
      }
    }
  ],
  "status": 0,
  "cash": 0
}'
Phản hồi 200
{
  "id": 1,
  "system_id": 1,
  "shop_id": 1,
  "inserted_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "status": 1,
  "status_name": "Đã xác nhận",
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "bill_email": "hoang@example.com",
  "page_id": "104438181227821",
  "post_id": "185187094667903_477083092110915",
  "ad_id": "23851252560290199",
  "shipping_fee": 1,
  "partner_fee": 1,
  "fee_marketplace": 1,
  "customer_pay_fee": true,
  "is_free_shipping": true,
  "is_livestream": true,
  "is_live_shopping": true,
  "is_smc": true,
  "received_at_shop": true,
  "total_discount": 1,
  "note": "",
  "note_print": null,
  "returned_reason": 1,
  "returned_reason_name": "Do khách hàng",
  "sub_status": 1,
  "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8",
  "warehouse_info": {
    "name": "kho test ecod",
    "phone_number": "0999999999",
    "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu",
    "address": "hâhhha",
    "province_id": "717",
    "district_id": "71705",
    "commune_id": "7170510",
    "affiliate_id": null,
    "ffm_id": null,
    "has_snappy_service": true,
    "custom_id": null
  },
  "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "creator": {
    "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "fb_id": "2042723249341651",
    "name": "Hoang Anh",
    "avatar_url": null
  },
  "items": [
    {
      "id": 1,
      "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
      "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
      "quantity": 1,
      "returned_count": 1,
      "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
      "quantity_by_combo_products": [],
      "discount_each_product": 1,
      "is_bonus_product": true,
      "is_discount_percent": true,
      "is_wholesale": true,
      "is_composite": true,
      "one_time_product": true,
      "note": "",
      "note_product": "",
      "inserted_at": "2024-01-01T00:00:00Z",
      "measure_group_id": 1,
      "variation_info": {
        "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
        "name": "Ao so mi nam",
        "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
        "retail_price": 140000,
        "detail": "",
        "images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "fields": [
          {
            "id": "field-id-1",
            "name": "Màu",
            "value": "Trắng",
            "keyValue": "Màu"
          }
        ],
        "barcode": "BARCODE123",
        "brand_id": null,
        "category_ids": [
          1290021044
        ],
        "display_id": "13109",
        "product_display_id": "a131092025",
        "is_upsale_product": true,
        "last_imported_price": 30000,
        "weight": 0,
        "measure_info": {
          "measure_id": 1,
          "exchange_value": 1
        },
        "avg_price": 30000
      },
      "components": [
        {
          "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
          "quantity": 1,
          "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7"
        }
      ]
    }
  ],
  "partner": {
    "partner_id": 1,
    "cod": 0,
    "extend_code": "S58824.MB25.C3.500020713",
    "total_fee": 0,
    "updated_at": "2020-05-12T05:18:16",
    "delivery_name": null,
    "delivery_tel": null,
    "picked_up_at": null,
    "sort_code": null,
    "paid_at": null,
    "system_created": true,
    "extend_update": [
      {
        "key": "status",
        "status": "delivered",
        "tracking_id": "S58824.MB25.C3.500020713",
        "note": "",
        "update_at": "2020-05-12T05:18:16"
      }
    ]
  },
  "shipping_address": {
    "full_name": "Hoang Anh",
    "phone_number": "0999999999",
    "address": "90 Cầu Giấy",
    "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
    "province_id": "101",
    "district_id": "10113",
    "commune_id": "1011309",
    "commnue_name": "Phường Dịch Vọng",
    "district_name": "Quận Cầu Giấy",
    "province_name": "Hà Nội",
    "country_code": "84",
    "post_code": null
  },
  "payment_purchase_histories": [
    {
      "amount": 1800000,
      "type": "cash",
      "inserted_at": "2024-01-01T00:00:00Z",
      "result_code": "00",
      "ipn_reply": true,
      "voucher_amount": 0,
      "tags": [
        "payment"
      ]
    }
  ],
  "tags": [
    {
      "id": 75,
      "name": "thẻ 4"
    }
  ],
  "marketer": {
    "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "name": "Marketer Name",
    "email": "marketer@example.com",
    "phone_number": "0999999999",
    "fb_id": "2042723249341651",
    "avatar_url": null
  },
  "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097",
  "activated_combo_products": {
    "combo_product_id": 1,
    "quantity_combo_activated": 1
  },
  "activated_promotion_advances": [
    {
      "id": 1,
      "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121"
    }
  ],
  "tracking_link": "https://tracking.example.com",
  "payment_link": "https://payment.example.com",
  "ads_source": null,
  "shopify_order_id": null,
  "shopify_abandon_checkout_id": 1,
  "is_abandoned_order": true,
  "cod": 0,
  "cash": 0,
  "account": 1,
  "account_name": "facebook321",
  "advanced_platform_fee": {
    "ads_top_up": 1,
    "affiliate_commission": 1,
    "diff_shipping_fee": 1,
    "marketplace_voucher": 1,
    "payment_fee": 1,
    "platform_commission": 1,
    "seller_transaction_fee": 1,
    "service_fee": 1,
    "sfp_service_fee": 1
  },
  "printing_count": 1,
  "money_to_collect": 1,
  "total_price": 1,
  "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
  "customer": {
    "fb_id": null,
    "id": "96a8e283-3fba-492e-a35a-970f72a30a02",
    "name": "Trần Văn Hoàng",
    "page_id": "104438181227821"
  },
  "total_quantity": 1,
  "time_assign_marketer": "2024-01-01T00:00:00Z",
  "status_history": [
    {
      "avatar_url": null,
      "editor_fb": "2042723249341651",
      "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "name": "Hoang Anh",
      "old_status": 0,
      "status": 1,
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "duplicated_phone": true,
  "order_currency": "VND",
  "charged_by_vnpay": 1,
  "charged_by_qrpay": 1,
  "custom_id": null,
  "last_editor": {
    "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "fb_id": "2042723249341651",
    "name": "Hoang Anh",
    "email": "hoang@example.com",
    "avatar_url": null,
    "phone_number": "0999999999"
  },
  "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "charged_by_momo": 1,
  "bank_transfer_images": [
    "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
  ],
  "transfer_money": 1,
  "lock_order_by_user": null,
  "assigning_care": {
    "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "fb_id": "2042723249341651",
    "name": "Care Name",
    "email": "care@example.com",
    "avatar_url": null,
    "phone_number": "0999999999"
  },
  "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
  "time_assign_care": "2024-01-01T00:00:00Z",
  "assigning_seller": {
    "id": "340644fc-314d-450e-a45f-33343678cab6",
    "fb_id": "2042723249341651",
    "name": "Seller Name",
    "email": "seller@example.com",
    "avatar_url": null,
    "phone_number": "0999999999"
  },
  "einvoices": [],
  "charged_by_card": 1,
  "estimate_delivery_date": "2024-01-01T00:00:00Z",
  "order_sources": "-1",
  "charged_by_fundiin": 1,
  "surcharge": 1,
  "is_linked_partner": true,
  "call_laters": [],
  "last_update_status_at": "2024-01-01T00:00:00Z",
  "discount_by_customer_level": 1,
  "viewing": [],
  "order_returned_ids": null,
  "cost_surcharge": 1,
  "time_send_partner": "2024-01-01T00:00:00Z",
  "charged_by_kredivo": 1,
  "discount": 1,
  "histories": [],
  "duplicated_customer": true,
  "tax": 1,
  "is_from_ecommerce": true,
  "note_image": [
    "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
  ],
  "shopify_draft_order_id": null,
  "display_id": 1,
  "shop_partner_id": 1,
  "is_locked": true
}

Lấy tin nhắn hội thoại của đơn hàng

GET/shops/{SHOP_ID}/orders/{ORDER_ID}/messages

Xác định hội thoại gắn với đơn hàng và trả về tin nhắn của toàn bộ hội thoại. Tin nhắn trong mỗi phản hồi được sắp xếp theo thứ tự thời gian từ cũ đến mới.

Phân trang theo cơ chế hiện tại của ứng dụng Pancake web:

  • Bỏ qua current_count hoặc đặt bằng 0 để tải tối đa 25 bản ghi mới nhất, được hiển thị theo thứ tự thời gian.
  • Để tải các bản ghi cũ hơn, đặt current_count bằng tổng số tin nhắn đã tải. Sau phản hồi đầu tiên dùng 25; nếu phản hồi tiếp theo có 30 tin nhắn thì dùng 55, và tiếp tục tương tự.
  • Các lần gọi có current_count lớn hơn 0 trả về tối đa 30 tin nhắn cũ hơn.

Đơn hàng hợp lệ nhưng không có hội thoại liên kết trả về {"success":true,"data":[]}.

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4
ORDER_IDstringbắt buộc

Mã đơn hàng

Ví dụ: "SOICUN-12943-02"

Tham số truy vấn

current_countinteger

Số tin nhắn đã tải. Đây là số lượng dùng làm độ lệch, không phải con trỏ.

Mặc định: 0 · Ví dụ: 25
fields[]array<string>

Các trường cấp cao nhất cần trả về trong mỗi tin nhắn. Lặp lại tham số query để chọn nhiều trường, ví dụ fields[]=id&fields[]=message. Bỏ qua để trả về tất cả các trường.

Phản hồi

any
Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/{ORDER_ID}/messages?api_key=API_KEY"
Phản hồi 200
{
  "success": true,
  "data": [
    {
      "id": "m_hULhobwR0nAa0NzuQaVc3O",
      "type": "INBOX",
      "message": "<div>Xin chào, shop còn size M không?</div>",
      "original_message": "Xin chào, shop còn size M không?",
      "message_tags": [],
      "from": {
        "id": "9306266852780716",
        "name": "Nguyễn Văn A"
      },
      "seen": true,
      "can_like": false,
      "user_likes": false,
      "like_count": null,
      "can_comment": false,
      "comment_count": null,
      "can_remove": false,
      "is_removed": false,
      "is_hidden": false,
      "can_hide": false,
      "can_reply_privately": false,
      "private_reply_conversation": null,
      "attachments": [],
      "has_phone": false,
      "phone_info": [],
      "is_parent": false,
      "inserted_at": "2026-06-25T02:00:38.675576",
      "page_id": "117967746266487",
      "show_info": true,
      "parent_id": null,
      "is_parent_hidden": false,
      "edit_history": null,
      "removed_by": null,
      "rich_message": null,
      "conversation_id": "117967746266487_9306266852780716",
      "is_livestream_order": null
    }
  ]
}

In đơn hàng ra PDF

GET/shops/{SHOP_ID}/orders/{ORDER_ID}/print

Điền dữ liệu đơn hàng vào một mẫu in của shop và trả về file PDF, giống khi in đơn trên POS web.

Khi không truyền label_id, mẫu in được chọn theo thứ tự: Mẫu in theo ĐVVC của đơn vị vận chuyển của đơn, mẫu mặc định của shop, rồi mẫu đầu tiên của shop. Shop chưa có mẫu in thì dùng mẫu hệ thống. Cấu hình In đơn 2 lần và Mẫu in kèm theo của mẫu đã chọn cũng được áp dụng.

  • Khổ trang theo khổ giấy của mẫu in. Giấy cuộn (K80, K58...) trả về một trang có chiều cao vừa nội dung.
  • In qua API này không tăng số lần in của đơn.
  • Chưa hỗ trợ: biến CRM, dữ liệu hoá đơn điện tử nháp, link theo dõi đơn và link yêu cầu xuất hoá đơn, sản phẩm cấu thành, mẫu in theo nguồn đơn hoặc cho đơn hoàn, và phiếu in do đơn vị vận chuyển cung cấp.

File PDF có thể khác nhẹ so với khi in trên trình duyệt: font chỉ có trên máy người dùng (Segoe UI, Tahoma, Verdana...) được thay thế, và mẫu có nội dung dài hoặc rộng hơn khổ giấy có thể ngắt trang khác. Ảnh do máy chủ tải về: ảnh trên host không công khai, lớn hơn 5 MB, tải quá 5 giây, vượt tổng 15 MB, ngoài 30 URL ảnh đầu tiên của tài liệu, hoặc lặp lại vượt 20 MB dữ liệu ảnh nhúng sẽ để trống. Chỉ ảnh trong <img> (src/srcset) và CSS url() được tải; tài nguyên ngoài khác (stylesheet <link>, @import, SVG <image href>, thuộc tính background) không được tải.

Lỗi trả về dạng JSON. Với lỗi 404 của đơn hàng và mẫu in và lỗi 503, message theo ngôn ngữ của shop.

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4
ORDER_IDstringbắt buộc

Mã đơn hàng, mã hệ thống hoặc mã đơn tùy chỉnh

Ví dụ: "1418"

Tham số truy vấn

label_idinteger

Mã mẫu in của shop. Bỏ trống để tự chọn mẫu in.

Ví dụ: 922009896

Phản hồi

ErrorResponsePhản hồi lỗi nghiệp vụ hoặc lỗi yêu cầu
successbooleanbắt buộc

Trạng thái thành công

Giá trịfalse
messagestring

Thông báo lỗi dễ đọc

errorstring

Tên lỗi ổn định dành cho máy xử lý, nếu có

error_codeinteger

Mã lỗi dành cho máy xử lý, nếu có

message_codeinteger

Mã thông báo nghiệp vụ POS, nếu có

permissionstring

Quyền bắt buộc khi truy cập bị từ chối

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/{ORDER_ID}/print?api_key=API_KEY"
Phản hồi 200
{
  "success": false,
  "message": "Missing access_token",
  "error_code": 101
}

Danh sách nguồn đơn hàng

GET/shops/{SHOP_ID}/order_source

Lấy danh sách nguồn đơn hàng

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Phản hồi

object
dataarray<object>

Danh sách nguồn đơn hàng

successboolean

Trạng thái thành công

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/order_source?api_key=API_KEY"
Phản hồi 200
{
  "data": [
    {
      "id": -3,
      "inserted_at": "2020-06-10T11:50:07",
      "name": "Shopee",
      "shop_id": 7,
      "updated_at": "2020-06-10T11:50:07"
    },
    {
      "id": 4,
      "inserted_at": "2020-06-17T08:41:54",
      "name": "40999897",
      "parent_id": -3,
      "shop_id": 7,
      "updated_at": "2020-06-17T08:41:54"
    },
    {
      "id": "1471242102982974",
      "inserted_at": "2021-04-22T08:33:15",
      "name": "Pancake.vn",
      "parent_id": -1,
      "shop_id": 20,
      "updated_at": "2024-04-08T03:11:25"
    },
    {
      "id": "987654",
      "inserted_at": "2024-05-01T08:00:00",
      "link": "https://landing.example.com/source-abc",
      "name": "Landing ABC",
      "parent_id": -7,
      "shop_id": 20,
      "updated_at": "2024-05-01T08:00:00"
    }
  ],
  "success": true
}

Lấy liên kết in đơn

POST/shops/{SHOP_ID}/products/get_logistics_shipping_document

Lấy liên kết in nhãn vận chuyển và phiếu đóng gói

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Tham số truy vấn

document_typestring

Loại in

Giá trị"SL_PL"Nhãn vận chuyển + Phiếu đóng gói"SHIPPING_LABEL"Nhãn vận chuyển"PICK_LIST"Phiếu đóng gói
Ví dụ: "SL_PL"

Nội dung yêu cầu

Thông tin yêu cầu chứa danh sách mã đơn hàng cần in nhãn

object
paramsarray<object>bắt buộc

Danh sách mã đơn hàng

Phản hồi

object
dataarray<string · uri>

Danh sách URL in nhãn

successboolean

Trạng thái thành công

Yêu cầu
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/products/get_logistics_shipping_document?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": [
    {
      "order_id": "576551803772635228"
    }
  ]
}'
Phản hồi 200
{
  "data": [
    "https://content.pancake.vn/2-25/2025/3/28/071edc2cc6c728f6c3fa493a2cb033e8f61fb11e.071edc2cc6c728f6c3fa493a2cb033e8f61fb11e"
  ],
  "success": true
}

Lấy liên kết xác nhận đơn hàng

POST/shops/{SHOP_ID}/orders/get_tracking_url

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Nội dung yêu cầu

Thông tin yêu cầu chứa mã hệ thống để lấy URL theo dõi

object
system_idintegerbắt buộc

Mã hệ thống

Phản hồi

object
urlstring · uri

Liên kết xác nhận đơn hàng

successboolean

Trạng thái thành công

Yêu cầu
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/get_tracking_url?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "system_id": 862
}'
Phản hồi 200
{
  "url": "https://pke.gg/99gjy3r",
  "success": true
}

Chuẩn bị hàng đơn sàn

POST/shops/{SHOP_ID}/orders/arrange_shipment

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Nội dung yêu cầu

Thông tin yêu cầu chứa danh sách mã đơn hàng cần chuẩn bị hàng

object
order_idstringbắt buộc

Mã đơn hàng

pickup_shiftstring

Ca nhận hàng. Bắt buộc cho sàn Shopee.

Giá trị"closest"Ca gần nhất"farthest"Ca xa nhất
Ví dụ: "closest"
pickup_methodstring

Phương thức nhận hàng. Bắt buộc cho sàn Shopee và TikTok.

Giá trị"pick_up"ĐVVC lấy hàng"drop_off"Mang hàng ra bưu cục
Ví dụ: "pick_up"

Phản hồi

object
messagestring

Thông báo phản hồi

successboolean

Trạng thái thành công

Yêu cầu
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/arrange_shipment?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order_id": "34123423498237",
  "pickup_shift": "closest",
  "pickup_method": "pick_up"
}'
Phản hồi 200
{
  "message": "Arrange shipment successfully",
  "success": true
}

Danh sách khuyến mại nâng cao của đơn

POST/shops/{SHOP_ID}/orders/get_promotion_advance_active

Lấy danh sách khuyến mại nâng cao có thể áp dụng cho đơn hàng

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Nội dung yêu cầu

Thông tin yêu cầu chứa thông tin đơn hàng (mã đơn hàng đã tồn tại hoặc chi tiết đơn hàng mới) để lấy khuyến mại đang hoạt động

any

Phản hồi

object
idinteger

Mã đơn hàng

system_idinteger

Mã hệ thống

shop_idinteger

Mã cửa hàng

inserted_atstring · date-time

Thời điểm tạo đơn

updated_atstring · date-time

Thời điểm cập nhật đơn

statusinteger

Trạng thái đơn hàng

Giá trị0Mới17Chờ xác nhận11Chờ hàng12Chờ in13Đã in20Đã đặt hàng1Đã xác nhận8Đang đóng hàng9Chờ chuyển hàng2Đã gửi hàng3Đã nhận16Đã thu tiền4Đang hoàn15Hoàn một phần5Đã hoàn6Đã hủy7Đã xóa
status_namestring

Tên trạng thái đơn hàng

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

bill_emailstring

Email khách hàng

conversation_idstring

Mã hội thoại

page_idstring

Mã Facebook page

Yêu cầu
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders/get_promotion_advance_active?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d 'null'
Phản hồi 200
{
  "id": 1418,
  "system_id": 1,
  "shop_id": 4,
  "inserted_at": "2020-05-12T04:51:42",
  "updated_at": "2020-05-12T04:51:54",
  "status": 0,
  "status_name": "new",
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "bill_email": "customer@example.com",
  "page_id": "256469571178082",
  "post_id": "185187094667903_477083092110915",
  "ad_id": "23851252560290199",
  "shipping_fee": 0,
  "cod": 0,
  "cash": 0,
  "account": 1,
  "total_discount": 0,
  "note": "",
  "note_print": null,
  "received_at_shop": false,
  "is_free_shipping": false,
  "is_locked": false,
  "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "creator": {
    "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "fb_id": "2042723249341651",
    "name": "Hoang Anh",
    "avatar_url": null
  },
  "items": [],
  "partner": {
    "partner_id": 1,
    "cod": 0,
    "extend_code": "S58824.MB25.C3.500020713",
    "total_fee": 0,
    "updated_at": "2020-05-12T05:18:16"
  },
  "shipping_address": {
    "full_name": "Hoang Anh",
    "phone_number": "0999999999",
    "address": "90 Cầu Giấy",
    "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
    "province_id": "101",
    "district_id": "10113",
    "commune_id": "1011309"
  }
}

Danh sách phương thức thanh toán

GET/shops/{SHOP_ID}/bank_payments

Lấy danh sách phương thức thanh toán

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Phản hồi

object
dataarray<object>

Danh sách phương thức thanh toán

successboolean

Trạng thái thành công

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/bank_payments?api_key=API_KEY"
Phản hồi 200
{
  "data": [
    {
      "id": "e01fed02-8680-4102-bdf4-343a7e1a00f5",
      "creator_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
      "name": "Tiền cọc",
      "shop_id": 224,
      "inserted_at": "2025-08-19T02:25:37",
      "updated_at": "2025-08-19T02:25:37"
    }
  ],
  "success": true
}

Danh sách đơn hàng đổi trả

GET/shops/{SHOP_ID}/orders_returned

Lấy danh sách đơn hàng đổi trả

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Tham số truy vấn

pageinteger

Số trang

Mặc định: 1 · Ví dụ: 1
page_sizeinteger

Kích thước trang

Mặc định: 30 · Ví dụ: 30
statusinteger

Trạng thái đơn hàng

Mặc định: -1 · Ví dụ: -1
update_statusstring

Lọc đơn hàng theo thời gian

Giá trị"inserted_at"Thời điểm tạo đơn"updated_at"Thời điểm cập nhật cuối"0"Mới"2"Đã gửi hàng"1"Đã nhận"4"Đã hủy
Mặc định: "inserted_at" · Ví dụ: "inserted_at"
start_timeinteger

Ngày bắt đầu (unix timestamp)

end_timeinteger

Ngày kết thúc (unix timestamp)

Phản hồi

object
dataarray<ReturnOrder>

Danh sách đơn hàng đổi trả

page_numberinteger

Số trang

page_sizeinteger

Kích thước trang

successboolean

Trạng thái thành công

total_entriesinteger

Tổng số bản ghi

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders_returned?api_key=API_KEY"
Phản hồi 200
{
  "success": true,
  "data": [
    {
      "id": 1,
      "display_id": 1,
      "bill_full_name": "Hoang Anh",
      "bill_phone_number": "0999999999",
      "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "custom_id": null,
      "discount": 1,
      "discount_from_order_to_returned": 1,
      "inserted_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z",
      "order_id": 1,
      "order_id_to_returned": 1,
      "order": {
        "id": 1,
        "system_id": 1,
        "shop_id": 1,
        "inserted_at": "2024-01-01T00:00:00Z",
        "updated_at": "2024-01-01T00:00:00Z",
        "status": 1,
        "status_name": "Đã xác nhận",
        "bill_full_name": "Hoang Anh",
        "bill_phone_number": "0999999999",
        "bill_email": "hoang@example.com",
        "page_id": "104438181227821",
        "post_id": "185187094667903_477083092110915",
        "ad_id": "23851252560290199",
        "shipping_fee": 1,
        "partner_fee": 1,
        "fee_marketplace": 1,
        "customer_pay_fee": true,
        "is_free_shipping": true,
        "is_livestream": true,
        "is_live_shopping": true,
        "is_smc": true,
        "received_at_shop": true,
        "total_discount": 1,
        "note": "",
        "note_print": null,
        "returned_reason": 1,
        "returned_reason_name": "Do khách hàng",
        "sub_status": 1,
        "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8",
        "warehouse_info": {
          "name": "kho test ecod",
          "phone_number": "0999999999",
          "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu",
          "address": "hâhhha",
          "province_id": "717",
          "district_id": "71705",
          "commune_id": "7170510",
          "affiliate_id": null,
          "ffm_id": null,
          "has_snappy_service": true,
          "custom_id": null
        },
        "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "creator": {
          "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
          "fb_id": "2042723249341651",
          "name": "Hoang Anh",
          "avatar_url": null
        },
        "items": [
          {
            "id": 1,
            "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
            "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
            "quantity": 1,
            "returned_count": 1,
            "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
            "quantity_by_combo_products": [],
            "discount_each_product": 1,
            "is_bonus_product": true,
            "is_discount_percent": true,
            "is_wholesale": true,
            "is_composite": true,
            "one_time_product": true,
            "note": "",
            "note_product": "",
            "inserted_at": "2024-01-01T00:00:00Z",
            "measure_group_id": 1,
            "variation_info": {
              "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
              "name": "Ao so mi nam",
              "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
              "retail_price": 140000,
              "detail": "",
              "images": [
                "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
              ],
              "fields": [
                {
                  "id": "field-id-1",
                  "name": "Màu",
                  "value": "Trắng",
                  "keyValue": "Màu"
                }
              ],
              "barcode": "BARCODE123",
              "brand_id": null,
              "category_ids": [
                1290021044
              ],
              "display_id": "13109",
              "product_display_id": "a131092025",
              "last_imported_price": 30000,
              "weight": 0,
              "measure_info": {
                "measure_id": 1,
                "exchange_value": 1
              },
              "avg_price": 30000
            },
            "components": [
              {
                "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
                "quantity": 1,
                "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7"
              }
            ]
          }
        ],
        "partner": {
          "partner_id": 1,
          "cod": 0,
          "extend_code": "S58824.MB25.C3.500020713",
          "total_fee": 0,
          "updated_at": "2020-05-12T05:18:16",
          "delivery_name": null,
          "delivery_tel": null,
          "picked_up_at": null,
          "sort_code": null,
          "paid_at": null,
          "system_created": true,
          "extend_update": [
            {
              "key": "status",
              "status": "delivered",
              "tracking_id": "S58824.MB25.C3.500020713",
              "note": "",
              "update_at": "2020-05-12T05:18:16"
            }
          ]
        },
        "shipping_address": {
          "full_name": "Hoang Anh",
          "phone_number": "0999999999",
          "address": "90 Cầu Giấy",
          "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
          "province_id": "101",
          "district_id": "10113",
          "commune_id": "1011309",
          "commnue_name": "Phường Dịch Vọng",
          "district_name": "Quận Cầu Giấy",
          "province_name": "Hà Nội",
          "country_code": "84",
          "post_code": null
        },
        "payment_purchase_histories": [
          {
            "amount": 1800000,
            "type": "cash",
            "inserted_at": "2024-01-01T00:00:00Z",
            "result_code": "00",
            "ipn_reply": true,
            "voucher_amount": 0,
            "tags": [
              "payment"
            ]
          }
        ],
        "tags": [
          {
            "id": 75,
            "name": "thẻ 4"
          }
        ],
        "marketer": {
          "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
          "name": "Marketer Name",
          "email": "marketer@example.com",
          "phone_number": "0999999999",
          "fb_id": "2042723249341651",
          "avatar_url": null
        },
        "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097",
        "activated_combo_products": {
          "combo_product_id": 1,
          "quantity_combo_activated": 1
        },
        "activated_promotion_advances": [
          {
            "id": 1,
            "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121"
          }
        ],
        "tracking_link": "https://tracking.example.com",
        "payment_link": "https://payment.example.com",
        "ads_source": null,
        "shopify_order_id": null,
        "shopify_abandon_checkout_id": 1,
        "is_abandoned_order": true,
        "cod": 0,
        "cash": 0,
        "account": 1,
        "account_name": "facebook321",
        "advanced_platform_fee": {
          "ads_top_up": 1,
          "affiliate_commission": 1,
          "diff_shipping_fee": 1,
          "marketplace_voucher": 1,
          "payment_fee": 1,
          "platform_commission": 1,
          "seller_transaction_fee": 1,
          "service_fee": 1,
          "sfp_service_fee": 1
        },
        "printing_count": 1,
        "money_to_collect": 1,
        "total_price": 1,
        "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
        "customer": {
          "fb_id": null,
          "id": "96a8e283-3fba-492e-a35a-970f72a30a02",
          "name": "Trần Văn Hoàng",
          "page_id": "104438181227821"
        },
        "total_quantity": 1,
        "time_assign_marketer": "2024-01-01T00:00:00Z",
        "status_history": [
          {
            "avatar_url": null,
            "editor_fb": "2042723249341651",
            "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
            "name": "Hoang Anh",
            "old_status": 0,
            "status": 1,
            "updated_at": "2024-01-01T00:00:00Z"
          }
        ],
        "duplicated_phone": true,
        "order_currency": "VND",
        "charged_by_vnpay": 1,
        "charged_by_qrpay": 1,
        "custom_id": null,
        "last_editor": {
          "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
          "fb_id": "2042723249341651",
          "name": "Hoang Anh",
          "email": "hoang@example.com",
          "avatar_url": null,
          "phone_number": "0999999999"
        },
        "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "charged_by_momo": 1,
        "bank_transfer_images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "transfer_money": 1,
        "lock_order_by_user": null,
        "assigning_care": {
          "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
          "fb_id": "2042723249341651",
          "name": "Care Name",
          "email": "care@example.com",
          "avatar_url": null,
          "phone_number": "0999999999"
        },
        "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
        "time_assign_care": "2024-01-01T00:00:00Z",
        "assigning_seller": {
          "id": "340644fc-314d-450e-a45f-33343678cab6",
          "fb_id": "2042723249341651",
          "name": "Seller Name",
          "email": "seller@example.com",
          "avatar_url": null,
          "phone_number": "0999999999"
        },
        "einvoices": [],
        "charged_by_card": 1,
        "estimate_delivery_date": "2024-01-01T00:00:00Z",
        "order_sources": "-1",
        "charged_by_fundiin": 1,
        "surcharge": 1,
        "is_linked_partner": true,
        "call_laters": [],
        "last_update_status_at": "2024-01-01T00:00:00Z",
        "discount_by_customer_level": 1,
        "viewing": [],
        "order_returned_ids": null,
        "cost_surcharge": 1,
        "time_send_partner": "2024-01-01T00:00:00Z",
        "charged_by_kredivo": 1,
        "discount": 1,
        "histories": [],
        "duplicated_customer": true,
        "tax": 1,
        "is_from_ecommerce": true,
        "note_image": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "shopify_draft_order_id": null,
        "display_id": 1,
        "shop_partner_id": 1,
        "is_locked": true
      },
      "order_to_returned": {
        "id": 1,
        "system_id": 1,
        "shop_id": 1,
        "inserted_at": "2024-01-01T00:00:00Z",
        "updated_at": "2024-01-01T00:00:00Z",
        "status": 1,
        "status_name": "Đã xác nhận",
        "bill_full_name": "Hoang Anh",
        "bill_phone_number": "0999999999",
        "bill_email": "hoang@example.com",
        "page_id": "104438181227821",
        "post_id": "185187094667903_477083092110915",
        "ad_id": "23851252560290199",
        "shipping_fee": 1,
        "partner_fee": 1,
        "fee_marketplace": 1,
        "customer_pay_fee": true,
        "is_free_shipping": true,
        "is_livestream": true,
        "is_live_shopping": true,
        "is_smc": true,
        "received_at_shop": true,
        "total_discount": 1,
        "note": "",
        "note_print": null,
        "returned_reason": 1,
        "returned_reason_name": "Do khách hàng",
        "sub_status": 1,
        "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8",
        "warehouse_info": {
          "name": "kho test ecod",
          "phone_number": "0999999999",
          "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu",
          "address": "hâhhha",
          "province_id": "717",
          "district_id": "71705",
          "commune_id": "7170510",
          "affiliate_id": null,
          "ffm_id": null,
          "has_snappy_service": true,
          "custom_id": null
        },
        "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "creator": {
          "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
          "fb_id": "2042723249341651",
          "name": "Hoang Anh",
          "avatar_url": null
        },
        "items": [
          {
            "id": 1,
            "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
            "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
            "quantity": 1,
            "returned_count": 1,
            "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
            "quantity_by_combo_products": [],
            "discount_each_product": 1,
            "is_bonus_product": true,
            "is_discount_percent": true,
            "is_wholesale": true,
            "is_composite": true,
            "one_time_product": true,
            "note": "",
            "note_product": "",
            "inserted_at": "2024-01-01T00:00:00Z",
            "measure_group_id": 1,
            "variation_info": {
              "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
              "name": "Ao so mi nam",
              "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
              "retail_price": 140000,
              "detail": "",
              "images": [
                "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
              ],
              "fields": [
                {
                  "id": "field-id-1",
                  "name": "Màu",
                  "value": "Trắng",
                  "keyValue": "Màu"
                }
              ],
              "barcode": "BARCODE123",
              "brand_id": null,
              "category_ids": [
                1290021044
              ],
              "display_id": "13109",
              "product_display_id": "a131092025",
              "last_imported_price": 30000,
              "weight": 0,
              "measure_info": {
                "measure_id": 1,
                "exchange_value": 1
              },
              "avg_price": 30000
            },
            "components": [
              {
                "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
                "quantity": 1,
                "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7"
              }
            ]
          }
        ],
        "partner": {
          "partner_id": 1,
          "cod": 0,
          "extend_code": "S58824.MB25.C3.500020713",
          "total_fee": 0,
          "updated_at": "2020-05-12T05:18:16",
          "delivery_name": null,
          "delivery_tel": null,
          "picked_up_at": null,
          "sort_code": null,
          "paid_at": null,
          "system_created": true,
          "extend_update": [
            {
              "key": "status",
              "status": "delivered",
              "tracking_id": "S58824.MB25.C3.500020713",
              "note": "",
              "update_at": "2020-05-12T05:18:16"
            }
          ]
        },
        "shipping_address": {
          "full_name": "Hoang Anh",
          "phone_number": "0999999999",
          "address": "90 Cầu Giấy",
          "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
          "province_id": "101",
          "district_id": "10113",
          "commune_id": "1011309",
          "commnue_name": "Phường Dịch Vọng",
          "district_name": "Quận Cầu Giấy",
          "province_name": "Hà Nội",
          "country_code": "84",
          "post_code": null
        },
        "payment_purchase_histories": [
          {
            "amount": 1800000,
            "type": "cash",
            "inserted_at": "2024-01-01T00:00:00Z",
            "result_code": "00",
            "ipn_reply": true,
            "voucher_amount": 0,
            "tags": [
              "payment"
            ]
          }
        ],
        "tags": [
          {
            "id": 75,
            "name": "thẻ 4"
          }
        ],
        "marketer": {
          "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
          "name": "Marketer Name",
          "email": "marketer@example.com",
          "phone_number": "0999999999",
          "fb_id": "2042723249341651",
          "avatar_url": null
        },
        "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097",
        "activated_combo_products": {
          "combo_product_id": 1,
          "quantity_combo_activated": 1
        },
        "activated_promotion_advances": [
          {
            "id": 1,
            "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121"
          }
        ],
        "tracking_link": "https://tracking.example.com",
        "payment_link": "https://payment.example.com",
        "ads_source": null,
        "shopify_order_id": null,
        "shopify_abandon_checkout_id": 1,
        "is_abandoned_order": true,
        "cod": 0,
        "cash": 0,
        "account": 1,
        "account_name": "facebook321",
        "advanced_platform_fee": {
          "ads_top_up": 1,
          "affiliate_commission": 1,
          "diff_shipping_fee": 1,
          "marketplace_voucher": 1,
          "payment_fee": 1,
          "platform_commission": 1,
          "seller_transaction_fee": 1,
          "service_fee": 1,
          "sfp_service_fee": 1
        },
        "printing_count": 1,
        "money_to_collect": 1,
        "total_price": 1,
        "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
        "customer": {
          "fb_id": null,
          "id": "96a8e283-3fba-492e-a35a-970f72a30a02",
          "name": "Trần Văn Hoàng",
          "page_id": "104438181227821"
        },
        "total_quantity": 1,
        "time_assign_marketer": "2024-01-01T00:00:00Z",
        "status_history": [
          {
            "avatar_url": null,
            "editor_fb": "2042723249341651",
            "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
            "name": "Hoang Anh",
            "old_status": 0,
            "status": 1,
            "updated_at": "2024-01-01T00:00:00Z"
          }
        ],
        "duplicated_phone": true,
        "order_currency": "VND",
        "charged_by_vnpay": 1,
        "charged_by_qrpay": 1,
        "custom_id": null,
        "last_editor": {
          "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
          "fb_id": "2042723249341651",
          "name": "Hoang Anh",
          "email": "hoang@example.com",
          "avatar_url": null,
          "phone_number": "0999999999"
        },
        "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "charged_by_momo": 1,
        "bank_transfer_images": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "transfer_money": 1,
        "lock_order_by_user": null,
        "assigning_care": {
          "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
          "fb_id": "2042723249341651",
          "name": "Care Name",
          "email": "care@example.com",
          "avatar_url": null,
          "phone_number": "0999999999"
        },
        "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
        "time_assign_care": "2024-01-01T00:00:00Z",
        "assigning_seller": {
          "id": "340644fc-314d-450e-a45f-33343678cab6",
          "fb_id": "2042723249341651",
          "name": "Seller Name",
          "email": "seller@example.com",
          "avatar_url": null,
          "phone_number": "0999999999"
        },
        "einvoices": [],
        "charged_by_card": 1,
        "estimate_delivery_date": "2024-01-01T00:00:00Z",
        "order_sources": "-1",
        "charged_by_fundiin": 1,
        "surcharge": 1,
        "is_linked_partner": true,
        "call_laters": [],
        "last_update_status_at": "2024-01-01T00:00:00Z",
        "discount_by_customer_level": 1,
        "viewing": [],
        "order_returned_ids": null,
        "cost_surcharge": 1,
        "time_send_partner": "2024-01-01T00:00:00Z",
        "charged_by_kredivo": 1,
        "discount": 1,
        "histories": [],
        "duplicated_customer": true,
        "tax": 1,
        "is_from_ecommerce": true,
        "note_image": [
          "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
        ],
        "shopify_draft_order_id": null,
        "display_id": 1,
        "shop_partner_id": 1,
        "is_locked": true
      },
      "returned_items": [
        {
          "id": 1,
          "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
          "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
          "returned_quantity": 1,
          "discount_each_product": 1,
          "is_discount_percent": true
        }
      ],
      "returned_fee": 1,
      "shop_customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02",
      "shop_id": 1,
      "status": 1,
      "status_histories": [
        {
          "id": 1,
          "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
          "old_status": 0,
          "status": 1,
          "inserted_at": "2024-01-01T00:00:00Z",
          "updated_at": "2024-01-01T00:00:00Z"
        }
      ],
      "tags": [
        1
      ],
      "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8"
    }
  ]
}

Tạo đơn đổi trả

POST/shops/{SHOP_ID}/orders_returned

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Nội dung yêu cầu

Thông tin yêu cầu chứa thông tin đơn đổi trả

object
order_additionalobjectbắt buộc

Thông tin đơn đổi

returned_itemsarray<object>bắt buộc

Danh sách sản phẩm trong đơn trả

statusintegerbắt buộc

Trạng thái đơn hàng

warehouse_idstringbắt buộc

Mã kho hàng

discount_from_order_to_returnedinteger

Giảm giá từ đơn hàng đến đơn đổi trả

Mặc định: 0
order_to_returnedobject

Đơn hàng cần trả

shop_customer_idstring

Mã khách hàng

Phản hồi

ReturnOrderThông tin đơn hàng đổi trả
idinteger

Mã đơn hàng đổi trả

display_idinteger

Mã hiển thị

bill_full_namestring

Tên khách hàng

bill_phone_numberstring

SĐT khách hàng

creator_idstring

Mã người tạo

custom_idstring

Mã tùy chỉnh

discountinteger

Tổng giảm giá

discount_from_order_to_returnedinteger

Giảm giá từ đơn hàng gốc

inserted_atstring · date-time

Thời điểm tạo

updated_atstring · date-time

Thời điểm cập nhật

order_idinteger

Mã đơn hàng

order_id_to_returnedinteger

Mã đơn hàng cần trả

Yêu cầu
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/orders_returned?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "discount_from_order_to_returned": 50000,
  "order_additional": {
    "bill_email": "",
    "bill_full_name": "Lê Văn Tám",
    "bill_phone_number": "0384596873",
    "cash": 1,
    "discount": 20000,
    "items": [
      {
        "discount_each_product": 0,
        "product_id": "db7cb77a-64c4-4572-9cca-86e846c0897c",
        "quantity": 1,
        "returned_quantity": 1,
        "variation_id": "749f52be-2bd0-4e76-b9fd-a4914c53192a",
        "variation_info": {
          "detail": "size: XL, color: blue",
          "fields": [
            {
              "id": "25698fb6-158e-472f-a8a7-fa48250337ae",
              "keyValue": "XL",
              "name": "size",
              "value": "XL"
            },
            {
              "id": "c414ff3c-cba7-497c-a6f8-13355605b391",
              "keyValue": "BLUE",
              "name": "color",
              "value": "blue"
            }
          ],
          "images": [
            "https://content.pancake.vn/2/2022/1/19/18c4500c320cb2e993b3ff4b3be81165df64d3ba.png"
          ],
          "name": "Sao chép Áo nam thời trang Pari",
          "retail_price": 500000,
          "weight": 100
        }
      }
    ],
    "note": "đơn trả hàng",
    "note_print": "đơn trả hàng",
    "order_currency": "VND",
    "payment_from_customers_exchange_order": 150000,
    "prepaid": 123,
    "received_at_shop": false,
    "shipping_address": {
      "address": "BT2-12 ngõ 178910",
      "commune_id": "1012129",
      "country_code": "84",
      "district_id": "10121",
      "full_address": "BT2-12 ngõ 178, Phường Đại Mỗ, Quận Nam Từ Liêm, Hà Nội",
      "full_name": "Nguyễn Hải Nhạn",
      "new_full_address": "BT2-12 ngõ 178, Hà Nội",
      "phone_number": "0384596873",
      "province_id": "101",
      "render_type": "old"
    },
    "shipping_fee": 0,
    "shop_customer_id": "ef9fc5ef-b4b5-4682-a1b9-b7ea259ae353",
    "surcharge": 0,
    "warehouse_id": "4051d111-a6b6-44fb-aca1-61fb954298cb"
  },
  "order_to_returned": {
    "id": "123157"
  },
  "returned_items": [
    {
      "product_id": "6c998441-146b-4daa-b8e0-313a2a543623",
      "returned_quantity": 1,
      "variation_id": "efac90c8-0ba7-4aa0-bef6-8f4be3c0c6e6",
      "variation_info": {
        "name": "[HỎA TỐC] Phồng Tôm Cà Mau VITOT Bánh Phồng Tôm Loại Cao Cấp Với Tỉ Lệ Tôm 48%, Đậm Đà Vị Tôm",
        "retail_price": 200000,
        "images": [
          "https://content.pancake.vn/user-content-dev2.pancake.vn/2024/12/31/a549582c91f1bee856f8a4383408de4f10585fac.jpg"
        ],
        "fields": [
          {
            "id": "995a0b6d-4e08-493e-b776-0afb2138e8a7",
            "name": "PHÂN LOẠI",
            "value": "1 HỘP CÀ MAU"
          }
        ],
        "detail": "PHÂN LOẠI: 1 HỘP CÀ MAU"
      }
    }
  ],
  "shop_customer_id": "ef9fc5ef-b4b5-4682-a1b9-b7ea259ae353",
  "status": 2,
  "warehouse_id": "4051d111-a6b6-44fb-aca1-61fb954298cb"
}'
Phản hồi 200
{
  "id": 1,
  "display_id": 1,
  "bill_full_name": "Hoang Anh",
  "bill_phone_number": "0999999999",
  "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
  "custom_id": null,
  "discount": 1,
  "discount_from_order_to_returned": 1,
  "inserted_at": "2024-01-01T00:00:00Z",
  "updated_at": "2024-01-01T00:00:00Z",
  "order_id": 1,
  "order_id_to_returned": 1,
  "order": {
    "id": 1,
    "system_id": 1,
    "shop_id": 1,
    "inserted_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "status": 1,
    "status_name": "Đã xác nhận",
    "bill_full_name": "Hoang Anh",
    "bill_phone_number": "0999999999",
    "bill_email": "hoang@example.com",
    "page_id": "104438181227821",
    "post_id": "185187094667903_477083092110915",
    "ad_id": "23851252560290199",
    "shipping_fee": 1,
    "partner_fee": 1,
    "fee_marketplace": 1,
    "customer_pay_fee": true,
    "is_free_shipping": true,
    "is_livestream": true,
    "is_live_shopping": true,
    "is_smc": true,
    "received_at_shop": true,
    "total_discount": 1,
    "note": "",
    "note_print": null,
    "returned_reason": 1,
    "returned_reason_name": "Do khách hàng",
    "sub_status": 1,
    "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8",
    "warehouse_info": {
      "name": "kho test ecod",
      "phone_number": "0999999999",
      "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu",
      "address": "hâhhha",
      "province_id": "717",
      "district_id": "71705",
      "commune_id": "7170510",
      "affiliate_id": null,
      "ffm_id": null,
      "has_snappy_service": true,
      "custom_id": null
    },
    "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "creator": {
      "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "fb_id": "2042723249341651",
      "name": "Hoang Anh",
      "avatar_url": null
    },
    "items": [
      {
        "id": 1,
        "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
        "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
        "quantity": 1,
        "returned_count": 1,
        "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
        "quantity_by_combo_products": [],
        "discount_each_product": 1,
        "is_bonus_product": true,
        "is_discount_percent": true,
        "is_wholesale": true,
        "is_composite": true,
        "one_time_product": true,
        "note": "",
        "note_product": "",
        "inserted_at": "2024-01-01T00:00:00Z",
        "measure_group_id": 1,
        "variation_info": {
          "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
          "name": "Ao so mi nam",
          "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
          "retail_price": 140000,
          "detail": "",
          "images": [
            "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
          ],
          "fields": [
            {
              "id": "field-id-1",
              "name": "Màu",
              "value": "Trắng",
              "keyValue": "Màu"
            }
          ],
          "barcode": "BARCODE123",
          "brand_id": null,
          "category_ids": [
            1290021044
          ],
          "display_id": "13109",
          "product_display_id": "a131092025",
          "last_imported_price": 30000,
          "weight": 0,
          "measure_info": {
            "measure_id": 1,
            "exchange_value": 1
          },
          "avg_price": 30000
        },
        "components": [
          {
            "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
            "quantity": 1,
            "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7"
          }
        ]
      }
    ],
    "partner": {
      "partner_id": 1,
      "cod": 0,
      "extend_code": "S58824.MB25.C3.500020713",
      "total_fee": 0,
      "updated_at": "2020-05-12T05:18:16",
      "delivery_name": null,
      "delivery_tel": null,
      "picked_up_at": null,
      "sort_code": null,
      "paid_at": null,
      "system_created": true,
      "extend_update": [
        {
          "key": "status",
          "status": "delivered",
          "tracking_id": "S58824.MB25.C3.500020713",
          "note": "",
          "update_at": "2020-05-12T05:18:16"
        }
      ]
    },
    "shipping_address": {
      "full_name": "Hoang Anh",
      "phone_number": "0999999999",
      "address": "90 Cầu Giấy",
      "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
      "province_id": "101",
      "district_id": "10113",
      "commune_id": "1011309",
      "commnue_name": "Phường Dịch Vọng",
      "district_name": "Quận Cầu Giấy",
      "province_name": "Hà Nội",
      "country_code": "84",
      "post_code": null
    },
    "payment_purchase_histories": [
      {
        "amount": 1800000,
        "type": "cash",
        "inserted_at": "2024-01-01T00:00:00Z",
        "result_code": "00",
        "ipn_reply": true,
        "voucher_amount": 0,
        "tags": [
          "payment"
        ]
      }
    ],
    "tags": [
      {
        "id": 75,
        "name": "thẻ 4"
      }
    ],
    "marketer": {
      "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
      "name": "Marketer Name",
      "email": "marketer@example.com",
      "phone_number": "0999999999",
      "fb_id": "2042723249341651",
      "avatar_url": null
    },
    "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "activated_combo_products": {
      "combo_product_id": 1,
      "quantity_combo_activated": 1
    },
    "activated_promotion_advances": [
      {
        "id": 1,
        "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121"
      }
    ],
    "tracking_link": "https://tracking.example.com",
    "payment_link": "https://payment.example.com",
    "ads_source": null,
    "shopify_order_id": null,
    "shopify_abandon_checkout_id": 1,
    "is_abandoned_order": true,
    "cod": 0,
    "cash": 0,
    "account": 1,
    "account_name": "facebook321",
    "advanced_platform_fee": {
      "ads_top_up": 1,
      "affiliate_commission": 1,
      "diff_shipping_fee": 1,
      "marketplace_voucher": 1,
      "payment_fee": 1,
      "platform_commission": 1,
      "seller_transaction_fee": 1,
      "service_fee": 1,
      "sfp_service_fee": 1
    },
    "printing_count": 1,
    "money_to_collect": 1,
    "total_price": 1,
    "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
    "customer": {
      "fb_id": null,
      "id": "96a8e283-3fba-492e-a35a-970f72a30a02",
      "name": "Trần Văn Hoàng",
      "page_id": "104438181227821"
    },
    "total_quantity": 1,
    "time_assign_marketer": "2024-01-01T00:00:00Z",
    "status_history": [
      {
        "avatar_url": null,
        "editor_fb": "2042723249341651",
        "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "name": "Hoang Anh",
        "old_status": 0,
        "status": 1,
        "updated_at": "2024-01-01T00:00:00Z"
      }
    ],
    "duplicated_phone": true,
    "order_currency": "VND",
    "charged_by_vnpay": 1,
    "charged_by_qrpay": 1,
    "custom_id": null,
    "last_editor": {
      "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "fb_id": "2042723249341651",
      "name": "Hoang Anh",
      "email": "hoang@example.com",
      "avatar_url": null,
      "phone_number": "0999999999"
    },
    "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "charged_by_momo": 1,
    "bank_transfer_images": [
      "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
    ],
    "transfer_money": 1,
    "lock_order_by_user": null,
    "assigning_care": {
      "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
      "fb_id": "2042723249341651",
      "name": "Care Name",
      "email": "care@example.com",
      "avatar_url": null,
      "phone_number": "0999999999"
    },
    "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "time_assign_care": "2024-01-01T00:00:00Z",
    "assigning_seller": {
      "id": "340644fc-314d-450e-a45f-33343678cab6",
      "fb_id": "2042723249341651",
      "name": "Seller Name",
      "email": "seller@example.com",
      "avatar_url": null,
      "phone_number": "0999999999"
    },
    "einvoices": [],
    "charged_by_card": 1,
    "estimate_delivery_date": "2024-01-01T00:00:00Z",
    "order_sources": "-1",
    "charged_by_fundiin": 1,
    "surcharge": 1,
    "is_linked_partner": true,
    "call_laters": [],
    "last_update_status_at": "2024-01-01T00:00:00Z",
    "discount_by_customer_level": 1,
    "viewing": [],
    "order_returned_ids": null,
    "cost_surcharge": 1,
    "time_send_partner": "2024-01-01T00:00:00Z",
    "charged_by_kredivo": 1,
    "discount": 1,
    "histories": [],
    "duplicated_customer": true,
    "tax": 1,
    "is_from_ecommerce": true,
    "note_image": [
      "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
    ],
    "shopify_draft_order_id": null,
    "display_id": 1,
    "shop_partner_id": 1,
    "is_locked": true
  },
  "order_to_returned": {
    "id": 1,
    "system_id": 1,
    "shop_id": 1,
    "inserted_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "status": 1,
    "status_name": "Đã xác nhận",
    "bill_full_name": "Hoang Anh",
    "bill_phone_number": "0999999999",
    "bill_email": "hoang@example.com",
    "page_id": "104438181227821",
    "post_id": "185187094667903_477083092110915",
    "ad_id": "23851252560290199",
    "shipping_fee": 1,
    "partner_fee": 1,
    "fee_marketplace": 1,
    "customer_pay_fee": true,
    "is_free_shipping": true,
    "is_livestream": true,
    "is_live_shopping": true,
    "is_smc": true,
    "received_at_shop": true,
    "total_discount": 1,
    "note": "",
    "note_print": null,
    "returned_reason": 1,
    "returned_reason_name": "Do khách hàng",
    "sub_status": 1,
    "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8",
    "warehouse_info": {
      "name": "kho test ecod",
      "phone_number": "0999999999",
      "full_address": "hâhhha, Xã Bình Trung, Huyện Châu Đức, Bà Rịa-Vũng Tàu",
      "address": "hâhhha",
      "province_id": "717",
      "district_id": "71705",
      "commune_id": "7170510",
      "affiliate_id": null,
      "ffm_id": null,
      "has_snappy_service": true,
      "custom_id": null
    },
    "creator_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "creator": {
      "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "fb_id": "2042723249341651",
      "name": "Hoang Anh",
      "avatar_url": null
    },
    "items": [
      {
        "id": 1,
        "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
        "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
        "quantity": 1,
        "returned_count": 1,
        "assigning_seller_id": "340644fc-314d-450e-a45f-33343678cab6",
        "quantity_by_combo_products": [],
        "discount_each_product": 1,
        "is_bonus_product": true,
        "is_discount_percent": true,
        "is_wholesale": true,
        "is_composite": true,
        "one_time_product": true,
        "note": "",
        "note_product": "",
        "inserted_at": "2024-01-01T00:00:00Z",
        "measure_group_id": 1,
        "variation_info": {
          "id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
          "name": "Ao so mi nam",
          "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
          "retail_price": 140000,
          "detail": "",
          "images": [
            "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
          ],
          "fields": [
            {
              "id": "field-id-1",
              "name": "Màu",
              "value": "Trắng",
              "keyValue": "Màu"
            }
          ],
          "barcode": "BARCODE123",
          "brand_id": null,
          "category_ids": [
            1290021044
          ],
          "display_id": "13109",
          "product_display_id": "a131092025",
          "last_imported_price": 30000,
          "weight": 0,
          "measure_info": {
            "measure_id": 1,
            "exchange_value": 1
          },
          "avg_price": 30000
        },
        "components": [
          {
            "component_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
            "quantity": 1,
            "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7"
          }
        ]
      }
    ],
    "partner": {
      "partner_id": 1,
      "cod": 0,
      "extend_code": "S58824.MB25.C3.500020713",
      "total_fee": 0,
      "updated_at": "2020-05-12T05:18:16",
      "delivery_name": null,
      "delivery_tel": null,
      "picked_up_at": null,
      "sort_code": null,
      "paid_at": null,
      "system_created": true,
      "extend_update": [
        {
          "key": "status",
          "status": "delivered",
          "tracking_id": "S58824.MB25.C3.500020713",
          "note": "",
          "update_at": "2020-05-12T05:18:16"
        }
      ]
    },
    "shipping_address": {
      "full_name": "Hoang Anh",
      "phone_number": "0999999999",
      "address": "90 Cầu Giấy",
      "full_address": "90 Cầu Giấy, Phường Dịch Vọng, Quận Cầu Giấy, Hà Nội",
      "province_id": "101",
      "district_id": "10113",
      "commune_id": "1011309",
      "commnue_name": "Phường Dịch Vọng",
      "district_name": "Quận Cầu Giấy",
      "province_name": "Hà Nội",
      "country_code": "84",
      "post_code": null
    },
    "payment_purchase_histories": [
      {
        "amount": 1800000,
        "type": "cash",
        "inserted_at": "2024-01-01T00:00:00Z",
        "result_code": "00",
        "ipn_reply": true,
        "voucher_amount": 0,
        "tags": [
          "payment"
        ]
      }
    ],
    "tags": [
      {
        "id": 75,
        "name": "thẻ 4"
      }
    ],
    "marketer": {
      "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
      "name": "Marketer Name",
      "email": "marketer@example.com",
      "phone_number": "0999999999",
      "fb_id": "2042723249341651",
      "avatar_url": null
    },
    "pke_mkter": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "activated_combo_products": {
      "combo_product_id": 1,
      "quantity_combo_activated": 1
    },
    "activated_promotion_advances": [
      {
        "id": 1,
        "promotion_advance_id": "fb056b32-9cf6-4c5a-92de-0eb94db71121"
      }
    ],
    "tracking_link": "https://tracking.example.com",
    "payment_link": "https://payment.example.com",
    "ads_source": null,
    "shopify_order_id": null,
    "shopify_abandon_checkout_id": 1,
    "is_abandoned_order": true,
    "cod": 0,
    "cash": 0,
    "account": 1,
    "account_name": "facebook321",
    "advanced_platform_fee": {
      "ads_top_up": 1,
      "affiliate_commission": 1,
      "diff_shipping_fee": 1,
      "marketplace_voucher": 1,
      "payment_fee": 1,
      "platform_commission": 1,
      "seller_transaction_fee": 1,
      "service_fee": 1,
      "sfp_service_fee": 1
    },
    "printing_count": 1,
    "money_to_collect": 1,
    "total_price": 1,
    "shop_customer_address_id": "0fefd213-7d0c-4d5b-bdbf-35694da80857",
    "customer": {
      "fb_id": null,
      "id": "96a8e283-3fba-492e-a35a-970f72a30a02",
      "name": "Trần Văn Hoàng",
      "page_id": "104438181227821"
    },
    "total_quantity": 1,
    "time_assign_marketer": "2024-01-01T00:00:00Z",
    "status_history": [
      {
        "avatar_url": null,
        "editor_fb": "2042723249341651",
        "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
        "name": "Hoang Anh",
        "old_status": 0,
        "status": 1,
        "updated_at": "2024-01-01T00:00:00Z"
      }
    ],
    "duplicated_phone": true,
    "order_currency": "VND",
    "charged_by_vnpay": 1,
    "charged_by_qrpay": 1,
    "custom_id": null,
    "last_editor": {
      "id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "fb_id": "2042723249341651",
      "name": "Hoang Anh",
      "email": "hoang@example.com",
      "avatar_url": null,
      "phone_number": "0999999999"
    },
    "last_editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
    "charged_by_momo": 1,
    "bank_transfer_images": [
      "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
    ],
    "transfer_money": 1,
    "lock_order_by_user": null,
    "assigning_care": {
      "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
      "fb_id": "2042723249341651",
      "name": "Care Name",
      "email": "care@example.com",
      "avatar_url": null,
      "phone_number": "0999999999"
    },
    "assigning_care_id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
    "time_assign_care": "2024-01-01T00:00:00Z",
    "assigning_seller": {
      "id": "340644fc-314d-450e-a45f-33343678cab6",
      "fb_id": "2042723249341651",
      "name": "Seller Name",
      "email": "seller@example.com",
      "avatar_url": null,
      "phone_number": "0999999999"
    },
    "einvoices": [],
    "charged_by_card": 1,
    "estimate_delivery_date": "2024-01-01T00:00:00Z",
    "order_sources": "-1",
    "charged_by_fundiin": 1,
    "surcharge": 1,
    "is_linked_partner": true,
    "call_laters": [],
    "last_update_status_at": "2024-01-01T00:00:00Z",
    "discount_by_customer_level": 1,
    "viewing": [],
    "order_returned_ids": null,
    "cost_surcharge": 1,
    "time_send_partner": "2024-01-01T00:00:00Z",
    "charged_by_kredivo": 1,
    "discount": 1,
    "histories": [],
    "duplicated_customer": true,
    "tax": 1,
    "is_from_ecommerce": true,
    "note_image": [
      "https://statics.pancake.vn/user-content.pancake.vn/2021/8/5/fccd6.jpg"
    ],
    "shopify_draft_order_id": null,
    "display_id": 1,
    "shop_partner_id": 1,
    "is_locked": true
  },
  "returned_items": [
    {
      "id": 1,
      "product_id": "3487e126-b0d9-4dae-89a9-ee60bef2f4e9",
      "variation_id": "415040f4-ab63-465e-8699-e9ebfff4c6c7",
      "returned_quantity": 1,
      "discount_each_product": 1,
      "is_discount_percent": true
    }
  ],
  "returned_fee": 1,
  "shop_customer_id": "96a8e283-3fba-492e-a35a-970f72a30a02",
  "shop_id": 1,
  "status": 1,
  "status_histories": [
    {
      "id": 1,
      "editor_id": "8fbe2a6f-b0b2-4227-a698-19d18c43f7c8",
      "old_status": 0,
      "status": 1,
      "inserted_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "tags": [
    1
  ],
  "warehouse_id": "b4cb5897-6e56-4581-96cc-2f12677c7bd8"
}

Danh sách đối tác

GET/shops/{SHOP_ID}/partners

Lấy danh sách đối tác vận chuyển

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Phản hồi

object
dataarray<object>

Danh sách đối tác

successboolean

Trạng thái thành công

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/partners?api_key=API_KEY"
Phản hồi 200
{
  "data": [
    {
      "id": 1,
      "name": "Giao hàng tiết kiệm",
      "country_code": "84",
      "accounts": [
        {
          "id": 46036,
          "name": "sonvu8910-224"
        }
      ]
    },
    {
      "id": 2,
      "name": "EMS",
      "country_code": "84",
      "accounts": []
    },
    {
      "id": 3,
      "name": "VTP",
      "country_code": "84",
      "accounts": [
        {
          "id": 10932,
          "name": "hà an"
        }
      ]
    },
    {
      "id": 4,
      "name": "247 Express",
      "country_code": "84",
      "accounts": []
    }
  ],
  "success": true
}

Danh sách dự án

GET/shops/{SHOP_ID}/projects

Lấy danh sách dự án

Tham số đường dẫn

SHOP_IDintegerbắt buộc

Mã shop

Ví dụ: 4

Phản hồi

ProjectThông tin dự án
idinteger

Mã dự án

imagestring · uricó thể null

URL hình ảnh dự án

inserted_atstring · date-time

Thời điểm tạo

namestring

Tên dự án

nodesarray<ProjectNode>

Danh sách nguồn đơn hàng thuộc dự án

shop_idinteger

Mã shop

updated_atstring · date-time

Thời điểm cập nhật

Yêu cầu
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/projects?api_key=API_KEY"
Phản hồi 200
{
  "data": [
    {
      "id": 19,
      "image": null,
      "inserted_at": "2025-12-13T10:01:51",
      "name": "Project 1",
      "nodes": [
        {
          "custom_id": null,
          "id": 292,
          "image": null,
          "inserted_at": "2024-03-28T04:52:28",
          "link_source_id": null,
          "name": "Source order 1",
          "nodes": [
            {
              "custom_id": null,
              "id": 366,
              "image": null,
              "inserted_at": "2024-11-08T02:18:52",
              "link_source_id": null,
              "name": "Source order 2",
              "nodes": [],
              "parent_id": 292,
              "project_id": null,
              "shop_id": 20,
              "updated_at": "2025-07-02T02:52:14"
            }
          ],
          "parent_id": null,
          "project_id": 19,
          "shop_id": 20,
          "updated_at": "2025-12-13T10:02:02"
        }
      ],
      "shop_id": 20,
      "updated_at": "2025-12-13T10:01:51"
    }
  ],
  "success": true
}