Follow

Create Consumer Email Registration

The Create Email Registration service is provided for registration of new consumers while requiring a valid email address. Calling the Create Email Registration creates a new Consumer in the system, logs the consumer in and then returns true or false. 

Attributes 

Attribute

Value

HTTP Codes

·        200 - OK

·        400 - Bad Request

·        409 - Conflict.  Email Address has already been registered before and cannot be used again.

·        500 - Internal Server Error

Path

/v3/consumers/emailRegistrations

HTTP Method

POST

Support Formats

JSON, XML

Rate Limited

No

Cache Timeout

TBC

Secure

No

 

Request

The following table contains the details of a typical HTTP request for this service:

Type

Value

Header

POST /v3/consumers/emailRegistrations HTTP/1.1

Host: merchant.api.vmob.co

Content-Type: application/json

Accept-Language: en-US

x-vmob-authorization: dm1vYi53aW5kb3dzLjE6

Body

{

    "grant_type"        : "password",

    "username"          : "joebloggs@gmail.com",

    "password"          : "p@ssw0rd1",     "emailRegistration" :

    {

        "emailAddress"      : "jowbloggs@gmail.com",

        "password"          : "p@ssw0rd1",

        "firstName"         : "Joe",

        "lastName"          : "Bloggs",

        "fullName"          : "Joe Bloggs",

        "gender"            : "m",

        "dateOfBirth"       : "1982-04-27",

        "homeCity"       : 2,

"extendedData"          : "Extended Data goes here"

    }

}

Required Fields

All fields are required except firstName + lastName OR fullName is to be provided.

If first and last names are not supplied, the VMob system will NOT try and split the full name into different components. The first and last name fields will be empty.

 

Notes:

  • The email address must be a valid email format 
  • Password should have a minimum of 6 characters
  • Either First and Lastname OR the full name
  • The gender must be either 'm' or 'f'
  • The dateOfBirth must be in YYYY-MM-DD format
  • Home City is a new property, if not implemented on the client application yet, please specify as '2'

 

Successful Response

The following table contains the details of a typical successful HTTP request for this service.

Type

Value

Header

HTTP/1.1 200 OK

Content-Type: application/json

Cache-Control: no-store

Pragma: no-cache

Body

true

Unsuccessful Response

The following table contains the details of a typical unsuccessful HTTP Request for this service.

Type

Value

Header

HTTP/1.1 400 Bad Request

Content-Type: application/json

Cache-Control: no-store

Pragma: no-cache

Body

{

    "error"       : "invalid_request",

    "error_description"  : "The authorization grant type is not supported by the authorization server.",

    "systemInformation" :

    {

        "exception"      :
{

        "type"       : "VMob.Api.OAuth.GrantTypeNotSupportException",

        "message"    : "The grant type 'p@ssword' is invalid. Only grant type 'password' is supported by the Api.",

        "stackTrace" : "..."

        }

    }

}

Notes:
  • The error and error_description elements are defined and implemented in accordance with Section 5.2 of the OAuth specification for detailed error information.
  • The systemInformation element will contain detailed debug internal server information about the failure but will only appear if the server is configured to produce this information on failure.
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.