Skip to main content

Employee Sync

Use this API to upsert employees from an external system. The operation is idempotent by syncId, so re-sending the same employee updates the existing record instead of creating a duplicate.

At A Glance

POST/v2/employee/sync-upsert
AreaDetail
Base URLhttps://api.mulltiply.org
Content typeapplication/json
Request bodySingle employee object or array of employee objects
Upsert keysyncId
Processing modeAsynchronous background processing

How Upsert Works

  1. Every employee must include syncId, your stable external identifier.
  2. If an employee with that syncId already exists in the workspace, it is updated.
  3. If the syncId is new, a new employee is created and the syncId is stored.
  4. Re-sending the same employee data is safe and does not create duplicates.
  5. The request returns after validation; create/update work is queued in the background.

Request Fields

FieldRequiredTypeDefaultMeaning
syncIdYesstring or number-Stable external ID and upsert key.
nameYesstring-Employee full name.
phoneRecommendedstring-Login identifier; should be provided and unique.
countryCodeNostring91Dialing country code without +.
emailNostring-Employee email.
typeNostringSales_PersonEmployee role type.
cityNostring-Employee city.
employeeCodeNostring-Internal employee code; must be unique within the store.
allowOrderPlaceNobooleantrueWhether the employee can place orders for shops.
shopTagsNoarray of strings-Tags used to match employee to shops.
departmentNostring-Department name, resolved by company.
designationNostring-Designation name, resolved by company.
margEmployeeIdNostring or numbernullLegacy external ID, stored but not used for matching.
leaveBalanceNoarray[]Opening leave balances.

Do not send internal foreign keys such as workspaceRoleId, roleWeight, departmentId, designationId, or reportingManagerId. These are resolved by the API from the provided fields where possible.

Employee Types

type maps to the employee's permission and workspace role. Supported values:

  • Sales_Person
  • Delivery_Person
  • Manager
  • Employee
  • Supervisor
  • Customer_Care
  • Marketing
  • HR

If type is omitted, it defaults to Sales_Person. If the type does not resolve to a role in the workspace, the employee falls back to the workspace's default role.

Shop Tags

shopTags links employees to shops without assigning shops one by one.

  • Each tag is a free-form string such as city: Demo City or beat: South.
  • Matching is exact; city: Demo City does not match only Demo City.
  • An employee handles every shop whose tags overlap with the employee's shopTags.
  • An employee with shopTags is resolved by tag matching even if no shops match yet.
  • An employee without shopTags falls back to explicit shop assignments, if any exist.

Example Requests

Single employee, minimal
{
"syncId": "EXT-1001",
"name": "Demo Sales Employee",
"phone": "9999902001"
}

Response

The response is returned immediately after validation. Processing continues in the background.

Queued response
{
"count": 2,
"processable": 2,
"message": "Syncing employees, you will be notified once done"
}
FieldMeaning
countTotal number of rows received.
processableNumber of rows that passed validation and were queued.
messageHuman-readable status.
nonProcessableRowsPresent only when rows failed validation. Shows rejected rows and reasons.

If more than 20 rows fail, only the first 20 are returned in nonProcessableRows; the full list is recorded in the bulk upload log.

Validation Errors

Rows that fail validation are not processed. Valid rows in the same request still continue.

Validation error row
{
"row": 3,
"itemName": "Some Name or phone",
"errors": ["syncId is required and must be a non-empty value"]
}

Common validation messages:

  • name is required and must be a non-empty string
  • syncId is required and must be a non-empty value
  • shopTags must be an array
  • allowOrderPlace must be a boolean
  • margEmployeeId must be a string or number
  • leaveBalance must be an array

If every row fails validation, processable is 0, nonProcessableRows lists the failures, and nothing is queued.

Behavior Notes

BehaviorDetail
IdempotencyRe-sending the same syncId updates the employee in place.
Partial successInvalid rows are skipped and reported; valid rows still sync.
Large payloadsSupported because work is queued and processed asynchronously in chunks.
UpdatesExisting employee records are modified; a new user is not created for an existing syncId.

Implementation Checklist

  • Provide syncId for every employee.
  • Provide name for every employee.
  • Provide unique phone numbers when employees need login access.
  • Use supported type values.
  • Send shopTags as an array of exact tag strings.
  • Do not send internal role, department, designation, or reporting manager IDs.
  • Expect asynchronous processing after initial validation.