BizKitHub
DokumentacjaEksplorator APIOrder/api/v1/shop/order/create
postOrderPubliczne API v1

/api/v1/shop/order/create

Create a new order. After create a order, please redirect customer to links.orderPageLink.

customer is the payer; issuerCustomer (optional) is the issuer — if omitted, the issuer is the organisation.

orderpostApiV1ShopOrderCreate

Parametry

1 w query · Treść JSON

Parametry query

· 1
apiKeystringWymagane

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

PrzykładPRODPGrFxpGEtrOZfuWhnoJohUYBXuOE

Treść żądania

application/json
customerobjectWymagane

Paying customer (payer). This customer pays the order and is used as the primary billing entity. If the specified customer account does not exist, the system will automatically create a new customer and link it to the order.

emailstringWymagane

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.

namestringOpcjonalne
PrzykładJan Barášek
firstNamestringOpcjonalne
PrzykładJan
lastNamestringOpcjonalne
PrzykładBarášek
phonestringOpcjonalne

Contact phone number in international (national) format.

Preferred format: +<country_code> <local_number>

  • Leading plus sign (+) is required
  • Followed by the country calling code (e.g. 420)
  • One space after the country code
  • Full local number without spaces

Example: +420 777123456
This format ensures unambiguous storage, validation, and compatibility with SMS, calling, and third-party integrations (e.g. Twilio, WhatsApp, CRM systems).

Przykład+420 777123456
companyNamestringOpcjonalne
PrzykładBizKitHub
companyRegistrationNumberstringOpcjonalne
Przykład05103118
taxIdentificationNumberstringOpcjonalne
PrzykładCZ9609040727
streetAddressstringOpcjonalne
PrzykładR. Novotného 1505
citystringOpcjonalne
PrzykładKladno
cityPartstringOpcjonalne
PrzykładKročehlavy
stateRegionstringOpcjonalne
PrzykładStředočeský kraj
postalCodestringOpcjonalne
Przykład272 01
countrystringOpcjonalne
PrzykładyCZČeská republikaCzechiaCzech
newsletterbooleanOpcjonalne
Domyślnie: false
primaryLocalestringOpcjonalne
Przykładcs
groupsstring[]Opcjonalne
customerRealIpstringOpcjonalne

User IP address used for GEO/IP intelligence.

Accepted formats:

  • IPv4 dot-decimal, e.g. 1.1.1.1 (4 octets, 0–255, no leading zeros).
  • IPv6 as defined by RFC 4291 — full 2001:0db8:0000:0000:0000:0000:0000:0001, zero-compressed 2001:db8::1, IPv4-mapped ::ffff:1.2.3.4, or scoped literals. Both upper- and lower-case hex are accepted.

Server-side canonicalization (ipNormalize in core/src/lib/network/ipNormalize.ts):

  • Valid IPv4 is passed through verbatim.
  • Valid IPv6 is lowercased (RFC 5952 §4.3).
  • IPv4-mapped IPv6 ::ffff:X.X.X.X is unwrapped to plain IPv4 (RFC 4291 §2.5.5.2) so 1.2.3.4 and ::ffff:1.2.3.4 share one brj__geo_ip row.
  • Loopback aliases (::1, 0.0.0.0, localhost, empty string) collapse to 127.0.0.1.
  • Junk values that fail both IPv4 and IPv6 validation are silently rejected and replaced with 127.0.0.1 (loopback).

On the wire: every response returns the canonicalized form — clients can safely rely on lowercase IPv6 and the plain-IPv4 unwrap when de-duping or joining. Server-originated writers (activity log, session log, ban list) resolve the visitor IP via resolveClientIp / resolveClientIpOrNull — always native IPv6 on Vercel Edge (there is no auto-mapping to ::ffff:X.X.X.X).

Enrichment: the system resolves reverse DNS, geolocation, ASN, mobile/proxy/hosting/Tor flags via our VikiTron GEO/IP resolver for both address families. Learn more

Przykłady1.1.1.12001:4860:4860::8888
referralIdstringOpcjonalne

cuRefNo = customer reference number.

Długość: 16
Przykład1cGIHvFoQDGLAbcA
issuerCustomerobjectOpcjonalne

Order issuer. The party that issues the order (e.g. delegated purchase or invoicing). Use only when the order is issued by a specific customer. For common e-shop orders, this field should be omitted — the issuer is the organisation by default. If the specified customer does not exist, the system will automatically create one.

emailstringWymagane

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.

namestringOpcjonalne
PrzykładJan Barášek
firstNamestringOpcjonalne
PrzykładJan
lastNamestringOpcjonalne
PrzykładBarášek
phonestringOpcjonalne

Contact phone number in international (national) format.

Preferred format: +<country_code> <local_number>

  • Leading plus sign (+) is required
  • Followed by the country calling code (e.g. 420)
  • One space after the country code
  • Full local number without spaces

Example: +420 777123456
This format ensures unambiguous storage, validation, and compatibility with SMS, calling, and third-party integrations (e.g. Twilio, WhatsApp, CRM systems).

Przykład+420 777123456
companyNamestringOpcjonalne
PrzykładBizKitHub
companyRegistrationNumberstringOpcjonalne
Przykład05103118
taxIdentificationNumberstringOpcjonalne
PrzykładCZ9609040727
streetAddressstringOpcjonalne
PrzykładR. Novotného 1505
citystringOpcjonalne
PrzykładKladno
cityPartstringOpcjonalne
PrzykładKročehlavy
stateRegionstringOpcjonalne
PrzykładStředočeský kraj
postalCodestringOpcjonalne
Przykład272 01
countrystringOpcjonalne
PrzykładyCZČeská republikaCzechiaCzech
newsletterbooleanOpcjonalne
Domyślnie: false
primaryLocalestringOpcjonalne
Przykładcs
groupsstring[]Opcjonalne
customerRealIpstringOpcjonalne

User IP address used for GEO/IP intelligence.

Accepted formats:

  • IPv4 dot-decimal, e.g. 1.1.1.1 (4 octets, 0–255, no leading zeros).
  • IPv6 as defined by RFC 4291 — full 2001:0db8:0000:0000:0000:0000:0000:0001, zero-compressed 2001:db8::1, IPv4-mapped ::ffff:1.2.3.4, or scoped literals. Both upper- and lower-case hex are accepted.

Server-side canonicalization (ipNormalize in core/src/lib/network/ipNormalize.ts):

  • Valid IPv4 is passed through verbatim.
  • Valid IPv6 is lowercased (RFC 5952 §4.3).
  • IPv4-mapped IPv6 ::ffff:X.X.X.X is unwrapped to plain IPv4 (RFC 4291 §2.5.5.2) so 1.2.3.4 and ::ffff:1.2.3.4 share one brj__geo_ip row.
  • Loopback aliases (::1, 0.0.0.0, localhost, empty string) collapse to 127.0.0.1.
  • Junk values that fail both IPv4 and IPv6 validation are silently rejected and replaced with 127.0.0.1 (loopback).

On the wire: every response returns the canonicalized form — clients can safely rely on lowercase IPv6 and the plain-IPv4 unwrap when de-duping or joining. Server-originated writers (activity log, session log, ban list) resolve the visitor IP via resolveClientIp / resolveClientIpOrNull — always native IPv6 on Vercel Edge (there is no auto-mapping to ::ffff:X.X.X.X).

Enrichment: the system resolves reverse DNS, geolocation, ASN, mobile/proxy/hosting/Tor flags via our VikiTron GEO/IP resolver for both address families. Learn more

Przykłady1.1.1.12001:4860:4860::8888
referralIdstringOpcjonalne

cuRefNo = customer reference number.

Długość: 16
Przykład1cGIHvFoQDGLAbcA
copyCustomersstring[]Opcjonalne

List of alternative e-mails of customers for e-mail copy.

cartIdstringOpcjonalne
Przykładb411056d304d9y6mHe2SoMFBL2Apxfnb
itemsobject[]Wymagane
Każdy element tablicy:
labelstringWymagane

Main order items label used in order detail and as invoice line.

PrzykładCheese burger
pricenumberOpcjonalne

Absolute value in order-defined currency.

The item price can be zero. Enter the price as a real value and do not use multiplication. We also accept decimal numbers and handle them safely with a precision of up to two decimal places.

The price value is determined dynamically based on hierarchy. First, the price you set is used. If no price is set, we attempt to retrieve it from the product variant or the core product. If no price is found there either, the price will be zero.

vatnumberOpcjonalne

Percentage VAT rate.

countnumberOpcjonalne

Integer value. Quantity, count, hours, …

salenumberOpcjonalne

Absolute value in order-defined currency.

Przykład10
unitstringOpcjonalne
Przykładykshmkg
productCodestringOpcjonalne

Link order item to product when product code has been defined.

Przykładburger
variantCodestringOpcjonalne

Link order item to product variant when product code AND variant code has been defined.

Przykładcheese-burger
eventCodestringOpcjonalne

Link order item to calendar event when event code has been defined.

Przykład2WRp6X5rSqQa321EjHB2mxZz74u74H84
creditAmountnumberOpcjonalne

How many credits should be added to customer account when order will be paid?

Przykład100
specialActionsstring | string[]Opcjonalne
Jedna z 2 opcji:
Wariant 1
string
Przykładcreate-voucher:fixed:500
Wariant 2
string[]
branchstringOpcjonalne

Slug of the branch (pobočka) that processed this line item. When set, the item is bound to the branch via shop__order_item.branch_id and any credit grant/debit derived from this item is attributed to the branch (shop__contact_credit.payer_branch_id). Omit to leave the item at organisation level.

Przykładgymroom-plzen
orderGroupIdstringOpcjonalne

Organisation defined order group code.

Przykładbranch-vinohrady
kind"commerce" | "registration"Opcjonalne

Behavioral category of the order. Decides which automatic workflows apply:

  • commerce (default): standard order; invoice/receipt is auto-issued by the status rule engine when the chosen status configures it. The customer receives the standard order-status notification.
  • registration: order represents a sign-up for an event / form-style admission. No tax document is ever auto-issued (manual admin action via BFF can still issue one): the status rule engine skips create_invoice / create_receipt for this order. A status with mark_as_paid still records the payment date. Whether a zero-total registration is marked as paid right after creation follows the organisation setting order_zero_total_auto_pay (default: yes; set it to commerce to keep registrations unpaid) or the explicit preventAutoPayment flag. The customer receives a registration-confirmation email when the per-group or kind-specific notification template is configured (falls back to standard order-status template if not). Typically combined with all items priced at 0 and a dedicated organisation-defined order group for pairing.
Domyślnie: commerceWartości: commerceregistration
localestringOpcjonalne

Communication locale code — controls the language of textual data (product names, descriptions, articles, storefront UI, transactional e-mails).

Preferred format: BCP 47 language tag — language[-Script][-REGION]. Use the full tag whenever the script or region matters:

  • en-GB vs. en-US (British vs. American spelling)
  • pt-PT vs. pt-BR (European vs. Brazilian Portuguese)
  • zh-Hans vs. zh-Hant (Simplified vs. Traditional Chinese)
  • sr-Latn vs. sr-Cyrl (Latin vs. Cyrillic Serbian)

Backwards-compatible fallback: the bare two-letter ISO 639-1 code (cs, en, pl, …) is accepted indefinitely — legacy clients that only send the language subtag continue to work unchanged.

Resolution algorithm (server-side): the input is resolved against the supported locale list via the [RFC 4647 Lookup] progressive-fallback strategy — trailing subtags are stripped one by one until a supported locale is found. Example: en-GB-oxendict → en-GB → en (matched). If no subtag combination is supported, the request is rejected.

Currently supported locales: cs, en, fr, it, pl, de, sk, sv, es, zh, ja, uk, da, hu, ro, nl, pt, fi, nb, hr. Region-specific variants (e.g. en-GB, pt-BR) are accepted and resolved to their base language when the exact variant is not registered separately.

Długość: 2–35
Przykładycsenen-GBpt-BRzh-Hans
currencystringOpcjonalne

Currency code. Format: 3-letter uppercase code (e.g. CZK).
Supported values: CZK, EUR, USD.

Order currency (BIZKIT-90): explicit currency → currency of the cart (cartId) → organisation default. When cartId is in another currency than the explicit currency, the cart is re-priced into currency first (manual product / variant currency price, otherwise converted by the organisation rate and rounding). items[].price, deliveryPrice and paymentPrice are always taken as sent, in the order currency; an item without price gets its catalogue price in the order currency. Fixed-amount vouchers are defined in the organisation default currency and converted the same way. Note: items[] and cart items are both added to the order, so do not send the same products in both.

PrzykładyCZKEURUSD
salenumberOpcjonalne

Absolute value in order-defined currency.

voucherListstring[]Opcjonalne

List of voucher codes to apply to the order.

paymentMethod"credits" | "money"Opcjonalne

Payment strategy.

  • credits (default): Uses customer credits first, remaining amount is paid with money.
  • money: Forces full payment with money only; customer credits are ignored.
Domyślnie: creditsWartości: creditsmoney
deliveryPricenumberOpcjonalne

Absolute value in order-defined currency.

Przykład10
paymentPricenumberOpcjonalne

Absolute value in order-defined currency.

Przykład0
deliveryCodestringOpcjonalne

Code of the shipping method the customer chose (admin → Doprava, shop__order_delivery.code). Stored on the order so a shipment can later be created with the carrier account and service configured on that method. The delivery fee is then computed by BizKitHub (price rules, free-shipping threshold) and added as an order line; deliveryPrice is ignored. An unknown code rejects the order with 404.

Przykładzasilkovna-pickup
deliveryPointIdstringOpcjonalne

Pickup point / parcel shop id returned by the carrier widget (e.g. Zásilkovna point id). Used as the destination when the shipment is created.

Długość: 0–64
Przykład12345
paymentCodestringOpcjonalne

Code of the payment method the customer chose (admin → Platby, shop__order_payment_method.code). Stored on the order; a fee above 0 is added as an order line. An unknown or inactive code rejects the order with 404.

Przykładcomgate
expirationDatestringOpcjonalnedate-time
Przykład2024-05-01T10:00:00.000Z
dueDatestringOpcjonalnedate-time
Przykład2024-05-01T10:00:00.000Z
internalNoticestringOpcjonalne

Your internal notice for organisation members. Customer should never see this notice.

publicNoticestringOpcjonalne

Public notice defined by customer in cart. This notice can be displayed in e-mail and order detail page.

shipNotBeforestring | nullOpcjonalne

Postponed shipping ("odložené odeslání"): do not ship the order before this day. Plain day YYYY-MM-DD (Europe/Prague calendar day) or an ISO date-time (converted to its Prague day). Until the day arrives the order stays out of the fulfillment (packing) queue; on that day it returns to the queue automatically and the organisation is notified. The order status is not changed. Empty / null = ship as usual. Days more than 400 days ahead are rejected with 422.

When omitted and the organisation enabled the AI note reader (settings → Orders), BizKitHub reads publicNotice ("poslat až 10. 12.") and may set the day itself. Change or clear it later with POST /order/set-ship-not-before.

Przykład2026-12-15
tagsobjectOpcjonalne
returnUrlstringOpcjonalne

Storefront page the customer ends on. By default the payment gateway returns the customer to bizkithub.com/order, which moves a paid customer on here. With the organisation setting payment_return_to_shop the gateway returns the customer here directly for every outcome, with ?hash=<order hash>&payment=paid|cancelled|pending (payment is missing for GoPay). payment is a display hint only: confirm the real state via POST /check-payment-status and GET /detail?hash= before showing the order as paid; offer POST /create-payment to pay again while the order is not expired.

Przykładhttps://gymroom.cz/rezervace/dekujeme
notificationUrlstringOpcjonalne
formDataobjectOpcjonalne
codestringWymagane
dataobjectWymagane
forceIgnoreNegativeCreditBalancebooleanOpcjonalne

Mark the order as paid immediately. The customer can go into negative credit. Payment will not be processed.

Domyślnie: false
forceIssueInvoicebooleanOpcjonalne
Domyślnie: false
preventAutoPaymentbooleanOpcjonalne

Controls the automatic "paid" mark for orders whose total is zero or negative after creation (free items, 100 % voucher, fully covered by credit).

  • omitted (default): follows the organisation setting order_zero_total_auto_pay (default all = zero-total orders are marked as paid immediately).
  • true: the order stays unpaid (isPaid: false) in its initial status, no tax document is issued and later priced items make it a regular unpaid order. Use for inquiries / deal records whose price is filled in later.
  • false: always auto-pay a zero-total order, regardless of the organisation setting.
    Has no effect on orders with a positive total. forceIgnoreNegativeCreditBalance: true still marks the order as paid unless preventAutoPayment is true.
Przykładtrue
assigneeobjectOpcjonalne

Nominate the contact that will handle this order manually (consultation, real-estate, delegated fulfilment).

The assignee is optional and can also be set/updated later from the admin. On payment the assignee receives an internal e-mail notifying them that the order is now paid and ready to be processed.

Provide cuRefNo (16-char customer reference number) OR email. Either resolves to the same contact record — an existing e-mail is reused, an unknown e-mail creates a fresh contact. When neither identifier resolves to a valid contact the field is ignored (no error, no assignee).

cuRefNostringOpcjonalne

Customer reference number (cuRefNo) of the contact that will handle this order manually. When both cuRefNo and email are provided, cuRefNo wins. Unknown or malformed values are silently ignored.

Długość: 16
PrzykładA1b2C3d4E5f6G7h8
emailstringOpcjonalne

Contact e-mail of the manual-handling assignee. If a matching contact exists it is reused, otherwise a new contact is created for this e-mail. Invalid values are silently ignored.

parentIdstringOpcjonalne

Hash of the parent order. The parent order must belong to the same organisation.

Długość: 32
PrzykładsSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
customerRealIpstringOpcjonalne

User IP address used for GEO/IP intelligence.

Accepted formats:

  • IPv4 dot-decimal, e.g. 1.1.1.1 (4 octets, 0–255, no leading zeros).
  • IPv6 as defined by RFC 4291 — full 2001:0db8:0000:0000:0000:0000:0000:0001, zero-compressed 2001:db8::1, IPv4-mapped ::ffff:1.2.3.4, or scoped literals. Both upper- and lower-case hex are accepted.

Server-side canonicalization (ipNormalize in core/src/lib/network/ipNormalize.ts):

  • Valid IPv4 is passed through verbatim.
  • Valid IPv6 is lowercased (RFC 5952 §4.3).
  • IPv4-mapped IPv6 ::ffff:X.X.X.X is unwrapped to plain IPv4 (RFC 4291 §2.5.5.2) so 1.2.3.4 and ::ffff:1.2.3.4 share one brj__geo_ip row.
  • Loopback aliases (::1, 0.0.0.0, localhost, empty string) collapse to 127.0.0.1.
  • Junk values that fail both IPv4 and IPv6 validation are silently rejected and replaced with 127.0.0.1 (loopback).

On the wire: every response returns the canonicalized form — clients can safely rely on lowercase IPv6 and the plain-IPv4 unwrap when de-duping or joining. Server-originated writers (activity log, session log, ban list) resolve the visitor IP via resolveClientIp / resolveClientIpOrNull — always native IPv6 on Vercel Edge (there is no auto-mapping to ::ffff:X.X.X.X).

Enrichment: the system resolves reverse DNS, geolocation, ASN, mobile/proxy/hosting/Tor flags via our VikiTron GEO/IP resolver for both address families. Learn more

Przykłady1.1.1.12001:4860:4860::8888
attributionobjectOpcjonalne

Optional marketing attribution captured by the shop frontend. BizKitHub does not send it anywhere: it is stored with the order and returned as attribution by GET /order/detail, so your server can enrich its own conversion events (e.g. Meta Conversions API Purchase) after payment.

Values are not strictly validated: empty, oversized or malformed values are silently dropped (fbc/fbp must look like fb.<n>.<ms>.<id>, eventSourceUrl must be http(s)). The order is never rejected because of them.

fbcstringOpcjonalne

Meta click ID (_fbc cookie or fb.1.<ms>.<fbclid> built from the landing URL).

Przykładfb.1.1730530000000.IwAR2abc
fbpstringOpcjonalne

Meta browser ID (_fbp cookie).

Przykładfb.1.1730530000000.123456789
eventSourceUrlstringOpcjonalne

Absolute http(s) URL of the page where the order was placed.

Przykładhttps://gymroom.cz/rezervace/smichov
clientUserAgentstringOpcjonalne

Browser user agent.

PrzykładMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)

Schemat odpowiedzi

1 udokumentowany kod statusu

200Sukces
orderNumberstringWymagane
Przykład25000087
hashstringWymagane
PrzykładsSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
linksobjectWymagane
orderPageLinkstringWymagane
Przykładhttps://bizkithub.com/order?hash=sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
payLinkstringWymagane
Przykładhttps://bizkithub.com/order/pay?hash=sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S
riskScorestring | integerWymagane

Server-computed risk score for the current request, on an integer scale 0 – 100 (RISK_SCORE_MIN / RISK_SCORE_MAX in features/security/riskScore/clampScore.ts).

Direction: higher = riskier. 0 is a clean, fully trusted signal; 100 is a hard-block-worthy signal (TOR exit node, active abuse-IP feed hit, login-flood threshold breached, or the caller organisation has explicitly banned the visitor IP).

Recommended integration buckets for the calling application — these are guidance, not a contract, callers are free to pick their own thresholds:

Bucket Range What it means Suggested action
trusted 0 – 19 Green — known device / prior success / same-country / EU IP for an EU org. Proceed silently.
neutral 20 – 49 No strong signal either way (fresh IP, unknown device, no history). Proceed, log the score, optionally show a soft "verify e-mail" nudge.
suspicious 50 – 74 Multiple soft red flags stacked (foreign origin for an EU org, new IP, other-org ban, …). Require a second factor before granting sensitive actions (MFA, magic-link re-verification, CAPTCHA, ID verification).
hostile 75 – 100 Hard-block territory. Above 75 the internal enforceLoginRiskScore throws LoginRiskScoreRejectionError; 100 is reached only via a hard-block signal (TOR / active abuse-IP / own-org ban / login flood). Reject the follow-up action, force password reset / step-up auth.

How it is computed: the score is a weighted average of independent signal families (IP reputation, org-country match, EU/high-risk-country policy, per-user history), clamped to [0, 100]. Any single family may return hardBlock(...) to short-circuit the average to 100. Green signals (prior successful login from this IP, paid orders, active session, mobile carrier) subtract from the total; red signals (new IP, other-org ban, foreign continent for an EU org) add to it. Full rule table lives in features/security/riskScore/calculateIpRiskScore.ts.

Stability: the numeric value is a heuristic — the exact algorithm may evolve between releases as new signals are added. The scale, direction and the four bucket boundaries above are stable; integrate against buckets, not exact numbers.

Order-create note: the endpoint currently returns the best-case score (0) for order creation as a placeholder — the order-side risk model is being built out separately (device fingerprint, cart velocity, geo/billing mismatch, chargeback history). The field is exposed already so downstream integrations can wire their step-up logic once and pick up richer values automatically when the order-side model ships.

Jedna z 2 opcji:
Wariant 1
stringinteger
Domyślnie: 0
Wariant 2
integer

Server-computed risk score for the current request, on an integer scale 0 – 100 (RISK_SCORE_MIN / RISK_SCORE_MAX in features/security/riskScore/clampScore.ts).

Direction: higher = riskier. 0 is a clean, fully trusted signal; 100 is a hard-block-worthy signal (TOR exit node, active abuse-IP feed hit, login-flood threshold breached, or the caller organisation has explicitly banned the visitor IP).

Recommended integration buckets for the calling application — these are guidance, not a contract, callers are free to pick their own thresholds:

Bucket Range What it means Suggested action
trusted 0 – 19 Green — known device / prior success / same-country / EU IP for an EU org. Proceed silently.
neutral 20 – 49 No strong signal either way (fresh IP, unknown device, no history). Proceed, log the score, optionally show a soft "verify e-mail" nudge.
suspicious 50 – 74 Multiple soft red flags stacked (foreign origin for an EU org, new IP, other-org ban, …). Require a second factor before granting sensitive actions (MFA, magic-link re-verification, CAPTCHA, ID verification).
hostile 75 – 100 Hard-block territory. Above 75 the internal enforceLoginRiskScore throws LoginRiskScoreRejectionError; 100 is reached only via a hard-block signal (TOR / active abuse-IP / own-org ban / login flood). Reject the follow-up action, force password reset / step-up auth.

How it is computed: the score is a weighted average of independent signal families (IP reputation, org-country match, EU/high-risk-country policy, per-user history), clamped to [0, 100]. Any single family may return hardBlock(...) to short-circuit the average to 100. Green signals (prior successful login from this IP, paid orders, active session, mobile carrier) subtract from the total; red signals (new IP, other-org ban, foreign continent for an EU org) add to it. Full rule table lives in features/security/riskScore/calculateIpRiskScore.ts.

Stability: the numeric value is a heuristic — the exact algorithm may evolve between releases as new signals are added. The scale, direction and the four bucket boundaries above are stable; integrate against buckets, not exact numbers.

Order-create note: the endpoint currently returns the best-case score (0) for order creation as a placeholder — the order-side risk model is being built out separately (device fingerprint, cart velocity, geo/billing mismatch, chargeback history). The field is exposed already so downstream integrations can wire their step-up logic once and pick up richer values automatically when the order-side model ships.

Zakres: 0–100
Przykłady02560100

Przykład odpowiedzi

application/json
{
  "orderNumber": "25000087",
  "hash": "sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
  "links": {
    "orderPageLink": "https://bizkithub.com/order?hash=sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
    "payLink": "https://bizkithub.com/order/pay?hash=sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S"
  },
  "riskScore": 0
}

Przykład żądania

POST /api/v1/shop/order/create

post
curl -X POST "https://api.bizkithub.com/api/v1/shop/order/create?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "customer": {
    "email": "[email protected]",
    "name": "Jan Barášek",
    "firstName": "Jan",
    "lastName": "Barášek",
    "phone": "+420 777123456",
    "companyName": "BizKitHub",
    "companyRegistrationNumber": "05103118",
    "taxIdentificationNumber": "CZ9609040727",
    "streetAddress": "R. Novotného 1505",
    "city": "Kladno",
    "cityPart": "Kročehlavy",
    "stateRegion": "Středočeský kraj",
    "postalCode": "272 01",
    "country": "CZ",
    "newsletter": false,
    "primaryLocale": "cs",
    "groups": [
      "string"
    ],
    "customerRealIp": "1.1.1.1",
    "referralId": "1cGIHvFoQDGLAbcA"
  },
  "issuerCustomer": {
    "email": "[email protected]",
    "name": "Jan Barášek",
    "firstName": "Jan",
    "lastName": "Barášek",
    "phone": "+420 777123456",
    "companyName": "BizKitHub",
    "companyRegistrationNumber": "05103118",
    "taxIdentificationNumber": "CZ9609040727",
    "streetAddress": "R. Novotného 1505",
    "city": "Kladno",
    "cityPart": "Kročehlavy",
    "stateRegion": "Středočeský kraj",
    "postalCode": "272 01",
    "country": "CZ",
    "newsletter": false,
    "primaryLocale": "cs",
    "groups": [
      "string"
    ],
    "customerRealIp": "1.1.1.1",
    "referralId": "1cGIHvFoQDGLAbcA"
  },
  "copyCustomers": [
    "[email protected]"
  ],
  "cartId": "b411056d304d9y6mHe2SoMFBL2Apxfnb",
  "items": [
    {
      "label": "Cheese burger",
      "price": 0,
      "vat": 0,
      "count": 0,
      "sale": 10,
      "unit": "ks",
      "productCode": "burger",
      "variantCode": "cheese-burger",
      "eventCode": "2WRp6X5rSqQa321EjHB2mxZz74u74H84",
      "creditAmount": 100,
      "specialActions": "create-voucher:fixed:500;add-credit:15",
      "branch": "gymroom-plzen"
    }
  ],
  "orderGroupId": "branch-vinohrady",
  "kind": "commerce",
  "locale": "cs",
  "currency": "CZK",
  "sale": 0,
  "voucherList": [
    "SUMMER-15"
  ],
  "paymentMethod": "credits",
  "deliveryPrice": 10,
  "paymentPrice": 0,
  "deliveryCode": "zasilkovna-pickup",
  "deliveryPointId": "12345",
  "paymentCode": "comgate",
  "expirationDate": "2024-05-01T10:00:00.000Z",
  "dueDate": "2024-05-01T10:00:00.000Z",
  "internalNotice": "example_internalNotice",
  "publicNotice": "example_publicNotice",
  "tags": {},
  "returnUrl": "https://gymroom.cz/rezervace/dekujeme",
  "notificationUrl": "example_notificationUrl",
  "formData": {
    "code": "example_code",
    "data": {}
  },
  "forceIgnoreNegativeCreditBalance": false,
  "forceIssueInvoice": false,
  "preventAutoPayment": true,
  "assignee": {
    "cuRefNo": "A1b2C3d4E5f6G7h8",
    "email": "[email protected]"
  },
  "parentId": "sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
  "customerRealIp": "1.1.1.1",
  "attribution": {
    "fbc": "fb.1.1730530000000.IwAR2abc",
    "fbp": "fb.1.1730530000000.123456789",
    "eventSourceUrl": "https://gymroom.cz/rezervace/smichov",
    "clientUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
  }
}'

Potrzebujesz klucza API?

Wszystkie publiczne endpointy BizKitHub API uwierzytelniają się kluczem API.

Uzyskaj klucz API