iotoms Docs

Create a merchant account

POST
/api/v1/merchant/creation

Creates a new merchant account and returns 202 while its workspace (default users, venue, store and register) is set up in the background. The plan defaults to FREE. Poll Get merchant provisioning status until it reports READY before signing in.

How to use it

  1. Choose a unique merchant code using only letters, digits and underscores (other characters make workspace setup fail), and send it with the business name, address, admin email and a password of 6+ characters.
  2. Optionally set planTier from List subscription plans; otherwise the merchant starts on FREE.
  3. A merchant code or email that is already registered is rejected with 400.
  4. The call returns 202 with provisioningStatus PROVISIONING while the workspace, default users, venue, store and register are set up in the background.
  5. Poll Get merchant provisioning status until it reports READY before signing in; FAILED includes the error message.

Request Body

application/json
  1. body
merchantName*string

The merchant's business name. Required.

merchantCode*string

Unique code for the new merchant; becomes its tenant identifier. Use letters, digits and underscores only, or workspace setup fails.

address*string

The merchant's business address. Required.

email*string

Valid email address for the merchant's administrator. Required and must not already be registered.

password*string

Password for the merchant's administrator account. At least 6 characters. Stored only as a hash.

Length6 <= length <= 2147483647
planTier?|

Starting plan tier, e.g. FREE, BASIC, PRO, ENTERPRISE or DISTRIBUTION (see List subscription plans). Optional; defaults to FREE.

Value in"FREE""BASIC""STANDARD""PLUS""PRO""PREMIUM""BUSINESS""ENTERPRISE""ULTIMATE""ELITE""DISTRIBUTION"null

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

The newly created merchant account, including its plan and provisioning status.

Example Request
curl -X POST 'https://beta.iotoms.com/api/v1/merchant/creation' \  -H 'Content-Type: application/json' \  -d '{  "merchantName": "string",  "merchantCode": "string",  "address": "string",  "email": "string",  "password": "string"}'
Example Response
{  "status": "string",  "message": "string",  "data": {    "merchantName": "string",    "merchantCode": "string",    "address": "string",    "email": "string",    "planTier": "FREE",    "planAssignedAt": "2019-08-24T14:15:22Z",    "provisioningStatus": "PROVISIONING",    "defaultVenueId": 0,    "defaultStoreId": 0,    "defaultRegisterId": 0  }}