POST api/Consumers/Account

Create ConsumerAccount

Request Information

URI Parameters

None.

Body Parameters

The ConsumerAccountViewModel

ConsumerAccountViewModel
NameDescriptionTypeAdditional information
Consumer

Consumer

None.

MerchantConsumer

MerchantConsumer

None.

Request Formats

application/json, text/json

Sample:
{
  "Consumer": {
    "$id": "2",
    "Id": "99fdf987-8718-49fd-b3bf-c3c682a7075c",
    "Gender": "sample string 2",
    "Address1": "sample string 3",
    "Address2": "sample string 4",
    "City": "sample string 5",
    "State": "sample string 6",
    "ZipCode": "sample string 7",
    "Image": "sample string 8",
    "Deleted": true
  },
  "MerchantConsumer": {
    "$id": "3",
    "Id": "70946d33-5f0f-445b-89e6-f1e137c7c820",
    "ConsumerId": "cafc7e9e-3a10-405a-b99c-93dc9401eb42",
    "MerchantId": "da7189f8-c459-4af2-a9d7-0ed38c2f9959",
    "MerchantLocationId": "da6d0299-8f89-4c75-91b4-60563062f1c4",
    "Email": "sample string 5",
    "PhoneNumber": "sample string 6",
    "FirstName": "sample string 7",
    "LastName": "sample string 8",
    "Deleted": true,
    "EmailOptIn": true,
    "PhoneOptIn": true,
    "FullName": "sample string 8, sample string 7",
    "Consumer": {
      "$ref": "2"
    },
    "Merchant": {
      "$id": "4",
      "Id": "8782d114-ec4e-4dc6-a67c-fbc4d42e48fe",
      "PlanId": "bbde434c-3802-46d4-8d4b-e2353b81e58e",
      "StripeToken": "sample string 2",
      "StripeCustomerId": "sample string 3",
      "CompanyName": "sample string 4",
      "UserId": "sample string 5",
      "Active": true,
      "Deleted": true,
      "TimeZone": "sample string 8",
      "User": {
        "$id": "5",
        "Id": "sample string 1",
        "Email": "sample string 2",
        "EmailConfirmed": true,
        "UserName": "sample string 10",
        "FirstName": "sample string 11",
        "LastName": "sample string 12",
        "Address1": "sample string 13",
        "Address2": "sample string 14",
        "City": "sample string 15",
        "State": "sample string 16",
        "Country": "sample string 17",
        "ZipCode": "sample string 18",
        "DateRegistered": "2018-06-15T15:03:33.5156692+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-15T15:03:33.5156692+00:00",
        "TermsConditions": true,
        "MobileNumber": "sample string 21",
        "ProfileImage": "sample string 22",
        "FullName": "sample string 12, sample string 11",
        "Roles": [
          {
            "$id": "6",
            "Id": "sample string 1",
            "Name": "sample string 2",
            "Users": [
              {
                "$ref": "5"
              },
              {
                "$ref": "5"
              }
            ]
          },
          {
            "$ref": "6"
          }
        ]
      },
      "Plan": {
        "$id": "7",
        "Id": "368aadbb-dca5-4359-ac34-89adf214aa1a",
        "PlanName": "sample string 2",
        "Description": "sample string 3",
        "LimitedApps": true,
        "AppLimit": 1,
        "LimitedLocations": true,
        "LocationLimit": 1,
        "LimitedOffers": true,
        "OfferLimit": 1,
        "Amount": 1,
        "WithCall": true,
        "SortNo": 8,
        "Billable": true
      },
      "MerchantLocations": [
        {
          "$id": "8",
          "Id": "8ca9bab7-b487-43c7-8524-a20a783a82eb",
          "MerchantId": "db4c2994-13d0-48df-85aa-bb620a5971c2",
          "Active": true,
          "Name": "sample string 4",
          "Address1": "sample string 5",
          "Address2": "sample string 6",
          "City": "sample string 7",
          "State": "sample string 8",
          "ZipCode": "sample string 9",
          "PhoneNumber": "sample string 10",
          "Deleted": true,
          "Main": true,
          "Latitude": 1.1,
          "Longitude": 1.1,
          "GeoLocation": null,
          "Merchant": {
            "$ref": "4"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "8"
        }
      ]
    },
    "MerchantLocation": {
      "$ref": "8"
    }
  }
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[FaceOffers.Entities.MerchantConsumer, FaceOffers.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[FaceOffers.Entities.MerchantConsumer, FaceOffers.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ConsumerAccountViewModel'.

Response Information

Resource Description

Returns a MerchantConsumer

ConsumerAccountViewModel
NameDescriptionTypeAdditional information
Consumer

Consumer

None.

MerchantConsumer

MerchantConsumer

None.

Response Formats

application/json, text/json

Sample:
{
  "Consumer": {
    "$id": "2",
    "Id": "0f98fb4c-0b67-4c2a-a02b-4df5a7b9b3f3",
    "Gender": "sample string 2",
    "Address1": "sample string 3",
    "Address2": "sample string 4",
    "City": "sample string 5",
    "State": "sample string 6",
    "ZipCode": "sample string 7",
    "Image": "sample string 8",
    "Deleted": true
  },
  "MerchantConsumer": {
    "$id": "3",
    "Id": "16dca8f7-859f-4fbe-b259-69abfc7f22d4",
    "ConsumerId": "3276b42c-f5f1-4a4d-ae9d-59b49d49f4fa",
    "MerchantId": "da67739e-5857-4d20-8241-3a17470ba8cd",
    "MerchantLocationId": "517eacb9-1f74-4704-8b5f-f5d84537309f",
    "Email": "sample string 5",
    "PhoneNumber": "sample string 6",
    "FirstName": "sample string 7",
    "LastName": "sample string 8",
    "Deleted": true,
    "EmailOptIn": true,
    "PhoneOptIn": true,
    "FullName": "sample string 8, sample string 7",
    "Consumer": {
      "$ref": "2"
    },
    "Merchant": {
      "$id": "4",
      "Id": "8831771f-a366-420d-8eb2-b404882980b4",
      "PlanId": "a51c27be-8a56-4c38-bac4-f78a0a9325dd",
      "StripeToken": "sample string 2",
      "StripeCustomerId": "sample string 3",
      "CompanyName": "sample string 4",
      "UserId": "sample string 5",
      "Active": true,
      "Deleted": true,
      "TimeZone": "sample string 8",
      "User": {
        "$id": "5",
        "Id": "sample string 1",
        "Email": "sample string 2",
        "EmailConfirmed": true,
        "UserName": "sample string 10",
        "FirstName": "sample string 11",
        "LastName": "sample string 12",
        "Address1": "sample string 13",
        "Address2": "sample string 14",
        "City": "sample string 15",
        "State": "sample string 16",
        "Country": "sample string 17",
        "ZipCode": "sample string 18",
        "DateRegistered": "2018-06-15T15:03:33.6719164+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-15T15:03:33.6719164+00:00",
        "TermsConditions": true,
        "MobileNumber": "sample string 21",
        "ProfileImage": "sample string 22",
        "FullName": "sample string 12, sample string 11",
        "Roles": [
          {
            "$id": "6",
            "Id": "sample string 1",
            "Name": "sample string 2",
            "Users": [
              {
                "$ref": "5"
              },
              {
                "$ref": "5"
              }
            ]
          },
          {
            "$ref": "6"
          }
        ]
      },
      "Plan": {
        "$id": "7",
        "Id": "c23bb3b1-1400-43d2-8f5d-3167e5d821cb",
        "PlanName": "sample string 2",
        "Description": "sample string 3",
        "LimitedApps": true,
        "AppLimit": 1,
        "LimitedLocations": true,
        "LocationLimit": 1,
        "LimitedOffers": true,
        "OfferLimit": 1,
        "Amount": 1,
        "WithCall": true,
        "SortNo": 8,
        "Billable": true
      },
      "MerchantLocations": [
        {
          "$id": "8",
          "Id": "0d8959af-d18e-436e-aeed-093690c2621a",
          "MerchantId": "8a824458-b2d0-44ad-8b83-777dc6f56744",
          "Active": true,
          "Name": "sample string 4",
          "Address1": "sample string 5",
          "Address2": "sample string 6",
          "City": "sample string 7",
          "State": "sample string 8",
          "ZipCode": "sample string 9",
          "PhoneNumber": "sample string 10",
          "Deleted": true,
          "Main": true,
          "Latitude": 1.1,
          "Longitude": 1.1,
          "GeoLocation": null,
          "Merchant": {
            "$ref": "4"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "8"
        }
      ]
    },
    "MerchantLocation": {
      "$ref": "8"
    }
  }
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[FaceOffers.Entities.MerchantConsumer, FaceOffers.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Object graph for type 'System.Collections.Generic.List`1[[FaceOffers.Entities.MerchantConsumer, FaceOffers.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.