Understanding the flow

flow chart explaining the customer syncing progress

flow chart explaining the customer syncing progress

Endpoints requirements for customer syncing:

DescriptionMETHOD
Fetch customer information by IdGET
Search for customer by either name, phoneGET
Add a new customerPOST
Update current customer by IdPUT

Payload Requirements

  1. Customer Id
  2. Full Name
  3. Email
  4. National Phone number (Example: 557331312)
  5. Country Code (Example: For Saudi Arabia 966)

The payload for the customer request payload can vary between POS system, however, a good example of customer request/response payload can be taken from foodics POS

{
  "house_account_balance": 0,
  "loyalty_balance": 0,
  "tags": [
    {
      "id": "fhhsd8r5"
    }
  ],
  "id": "8d831",
  "name": "James Lapda",
  "dial_code": 966,
  "phone": "565445254",
  "email": "[email protected]",
  "gender": 1,
  "birth_date": "1986-09-17",
  "is_blacklisted": false,
  "is_house_account_enabled": true,
  "house_account_limit": 1000,
  "is_loyalty_enabled": 1,
  "created_at": "2019-04-22 14:18:54",
  "updated_at": "2019-05-02 10:14:49",
  "deleted_at": null,
  "last_order_at": "2019-11-27 09:40:35",
  "order_count": 3,
  "addresses": [
    {
      "id": "8d92cc27",
      "delivery_zone": {
        "id": "8d86ac81"
      }
    }
  ]
}