BizKitHub
DokumentacePrůzkumník APICustomer/api/v1/customer/sync-password-hash
postCustomerVeřejné API v1

/api/v1/customer/sync-password-hash

Overwrite the password hash of an existing customer (looked up by e-mail, case-insensitively) with a bcrypt hash computed by a legacy system, so password changes made there keep working until the cutover. Never creates a customer and sends no e-mail; active customer sessions are revoked. Disabled unless the organisation sets the configuration key customer_password_hash_sync_enabled to true.

List of error codes:

Code Message
E001 Password hash sync failed.
E002 Password hash sync is not enabled for this organisation.
E003 Password hash must be a bcrypt hash ($2a$, $2b$ or $2y$).
E004 Customer account does not exist.
E005 changedAt must be an ISO 8601 date-time that is not in the future.
customerpostApiV1CustomerSync-password-hash

Parametry

1 v query · JSON tělo

Parametry v query

· 1
apiKeystringPovinné

Your BizKitHub API key (passed as GET parameter).

Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more

PříkladPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Tělo požadavku

application/json
emailstringPovinné

Contact email address.

The system validates the input as a standard email address and automatically applies normalization and canonicalization.

All API responses return the normalized form, and each email address is unique per organisation within the system.

Phone-only contacts: Since 2026-06-10 a contact may exist without an e-mail when it was registered only by phone (e.g. imports of phone-only records). Responses that expose such contacts use API_EMAIL_NULLABLE instead, where this field can be null. Endpoints that accept e-mail as input still require a valid value here — phone-only creation goes through admin-only import / BFF flows.

passwordHashstringPovinné

bcrypt hash ($2a$, $2b$ or $2y$) computed by the source system. Never send a plaintext password.

Příklad$2y$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy
changedAtstringVolitelné

When the password was changed in the source system. If BKH already has a newer password, the hash is ignored (result "stale").

Příklad2026-11-02T14:30:00Z

Schéma odpovědi

1 zdokumentovaný stavový kód

200Úspěch
object | object
Jedna z 2 možností:
Varianta 1
success"true"Povinné
result"updated" | "unchanged" | "stale"Povinné
Varianta 2
success"false"Povinné
errorCodestringPovinné
PříkladyE001E002E003E004E005
messagestringPovinné
PříkladyPassword hash sync failed.Password hash sync is not enabled for this organisation.Password hash must be a bcrypt hash ($2a$, $2b$ or $2y$).Customer account does not exist.changedAt must be an ISO 8601 date-time that is not in the future.

Ukázka odpovědi

application/json
{
  "success": true
}

Ukázka požadavku

POST /api/v1/customer/sync-password-hash

post
curl -X POST "https://api.bizkithub.com/api/v1/customer/sync-password-hash?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "email": "[email protected]",
  "passwordHash": "$2y$10$N9qo8uLOickgx2ZMRZoMyeIjZAgcfl7p92ldGxad68LJZdL17lhWy",
  "changedAt": "2026-11-02T14:30:00Z"
}'

Potřebujete API klíč?

Všechny veřejné endpointy BizKitHub API se ověřují API klíčem.

Získat API klíč