Validate order contact data

Validate contact fields before order creation. This endpoint is intentionally public because checkout can run before an account exists. It returns HTTP 200 for both valid and invalid verdicts; branch on valid and warnings[]. Transport or body-shape failures return Problem Details.

Billing & Orders Orders

Authentication

No authentication required.

Context

Headers

Accept Example
Content-Type Example

Body

required
application/json
firstName string required · Example: Anna
lastName string required · Example: Svensson
companyName stringnull required · Example: null
registrationIdentifier objectstringnull required · Example: null

Organisation number or personal identity number in the same public shape used by order `clientData.registrationIdentifier`. Organisation accounts should send `{ "value": "559290-1325", "countryCode": "SE" }`; private accounts may send null.

accountType string · enum required · Example: private
private
organisation
countryCode string required · Example: SE

Responses

200 Validation verdict. `valid: false` is still a successful validation response.
valid boolean required · Example: true
warnings array<object> required
warnings[].field string · enum required · Example: companyName
firstName
lastName
companyName
registrationIdentifier
accountType
countryCode
warnings[].code string · enum required · Example: duplicates_org_number
too_short
too_long
invalid_characters
invalid_format
missing_required
unsupported_country
looks_like_email
looks_like_org_number
duplicates_org_number
warnings[].reason string required · Example: Organisation name and organisation number contain the same value. Organisation name sho...
400 Invalid request. The response body is an RFC 7807 Problem Details document.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
404 Not found. The resource does not exist or is not owned by the caller.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
429 Rate limited. Retry after the limit resets. 429 responses include `Retry-After` seconds plus `X-RateLimit-*` headers.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
500 Internal error. Retry later or contact support if the issue persists.
type string · Example: https://developer.hostup.se/errors/invalid_request
title string · Example: Validation failed
status integer · Example: 400
detail string · Example: The request body failed validation.
code string · Example: invalid_request

Stable machine-readable code. Branch on this field, not on `detail`.

instance string · Example: /api/v2/orders
requestId string · Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3
timestamp string · Example: 2026-04-27T12:34:56.000Z
errors array<object>

Field-level validation errors when `code` is `invalid_request`.

errors[].pointer string required · Example: /items/0/eppCode
errors[].detail string required · Example: `eppCode` is required for this transfer.
errors[].code string required · Example: missing_required
extensions object
POST https://cloud.hostup.se/api/v2/orders/validate-contact
For AI assistants
View as Markdown
cURL
curl -X POST "https://cloud.hostup.se/api/v2/orders/validate-contact" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Anna",
    "lastName": "Svensson",
    "companyName": null,
    "registrationIdentifier": null,
    "accountType": "private",
    "countryCode": "SE"
  }'
Response
{
  "valid": true,
  "warnings": []
}
Request Body Private contact
{
  "firstName": "Anna",
  "lastName": "Svensson",
  "companyName": null,
  "registrationIdentifier": null,
  "accountType": "private",
  "countryCode": "SE"
}