Sales

Call Later

2 endpoints · https://pos.pages.fm/api/v1

View Markdown

List of call later and remind

GET/shops/{SHOP_ID}/order_call_laters

Get list of call later and remind

Path parameters

SHOP_IDintegerrequired

Shop ID

Example: 4

Query parameters

page_numberinteger

Page number

Default: 1
page_sizeinteger

Page size

Default: 30
keystring

Quick filter: today (scheduled today), upcoming (scheduled after today), overdue (scheduled before now), completed (successfully processed). Omit this parameter to filter only by the time range. If provided, it is combined with the time filters (AND).

Values"today""upcoming""overdue""completed"
filter_by_timestring

Time filter as a JSON-encoded object. Send as a single query parameter (URL-encode the JSON), not nested query parameters.

  • type: inserted_at (creation time, default), called_at (processed time; excludes unprocessed reminders), or appointment_time (scheduled call time, field needs_call_at).
  • start_time, end_time: integer Unix timestamps in seconds (UTC), both required for the filter to apply. Both bounds are inclusive. Convert the desired local date range to Unix timestamps before sending.
  • editor_ids: array of user IDs, required when filtering by time. Use ["-1"] for all staff. Filters by the last editor for called_at, otherwise by the creator. Examples below cover October 15, 2026, 00:00:00–23:59:59 in UTC+7.
start_needs_callinteger · int64

Inclusive start of the scheduled call time range (needs_call_at), as a Unix timestamp in seconds. Must be sent with end_needs_call. Combined with other filters (AND).

end_needs_callinteger · int64

Inclusive end of the scheduled call time range (needs_call_at), as a Unix timestamp in seconds. Must be sent with start_needs_call.

statusinteger

Status

Values-1All status0No process3Calling / Processing1Processed2Not listening / Unsuccessful7Removed
Default: -1 · Example: -1

Responses

object
dataarray<CallLater>

List of call later and remind

keystring

Key

page_numberinteger

Page number

page_sizeinteger

Page size

successboolean

Success status

total_entriesinteger

Total entries

total_pagesinteger

Total pages

Request
curl "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/order_call_laters?api_key=API_KEY"
Response 200
{
  "success": true,
  "data": [
    {
      "called_at": "2024-01-30T01:54:17",
      "creator": {
        "avatar_url": null,
        "email": "vuson897654@gmail.com",
        "fb_id": "377936050731194",
        "id": "cee3c05e-5f85-43c4-b27e-889b99c50097",
        "name": "Vũ Sơn",
        "phone_number": null
      },
      "display_id": 70,
      "id": "1885d8d4-e210-4e56-bb32-683988a032f5",
      "need_notify_users": [
        "cee3c05e-5f85-43c4-b27e-889b99c50097"
      ],
      "needs_call_at": "2024-01-30T02:20:48",
      "notice_created": "Gọi lại cho khách",
      "order_display_id": "SOICUN-12943-02",
      "order_id": 106703,
      "status": 1,
      "type": "call"
    }
  ],
  "key": "today",
  "page_number": 1,
  "page_size": 30,
  "total_entries": 3,
  "total_pages": 1
}

Create call later and remind

POST/shops/{SHOP_ID}/order_call_laters

Path parameters

SHOP_IDintegerrequired

Shop ID

Example: 4

Request body

Request body containing call later and remind information

object
order_call_laterobjectrequired

Responses

object
successboolean

Success status

Request
curl -X POST "https://pos.pages.fm/api/v1/shops/{SHOP_ID}/order_call_laters?api_key=API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "order_call_later": {
    "status": 0,
    "need_notify_users": [
      "cee3c05e-5f85-43c4-b27e-889b99c50097"
    ],
    "notice_created": "Gọi lại xác nhận",
    "needs_call_at": "2024-08-29T05:50:31.700Z",
    "phone_number": "0929911922",
    "order_ids": [
      "106703"
    ]
  }
}'
Response 200
{
  "success": true
}