POST api/MerchantConsumers

Create MerchantConsumer

Request Information

URI Parameters

None.

Body Parameters

The MerchantConsumer class

MerchantConsumer
NameDescriptionTypeAdditional information
Id

GUID Id for MerchantConsumer. Assigned by system on Create. [REQUIRED]

globally unique identifier

None.

ConsumerId

GUID Id for Consumer. [REQUIRED]

globally unique identifier

None.

MerchantId

GUID Id for Merchant. [REQUIRED]

globally unique identifier

None.

MerchantLocationId

GUID Id for Merchant Location. [REQUIRED]

globally unique identifier

None.

Email

Email address for MerchantConsumer. [NULL]

string

None.

PhoneNumber

Phone number for MerchantConsumer. [NULL]

string

None.

FirstName

First name for MerchantConsumer. [NULL]

string

None.

LastName

Last name for MerchantConsumer. [NULL]

string

None.

Deleted

Indicates whether the MerchantConsumer has been deleted or not. Set to false on Create by system. Set to true on delete by system. [REQUIRED]

boolean

None.

EmailOptIn

Indicates whether the MerchantConsumer has opt into email communications. [REQUIRED]

boolean

None.

PhoneOptIn

Indicates whether the MerchantConsumer has opt into phone communications. [REQUIRED]

boolean

None.

FullName

Gets the full name for the MerchantConsumer

string

None.

Consumer

Gets the Consumer for the MerchantConsumer using ConsumerId.

Consumer

None.

Merchant

Gets the Merchant for the MerchantConsumer using MerchantId.

Merchant

None.

MerchantLocation

Gets the MerchantLocation for the MerchantConsumer using MerchantLocationId.

MerchantLocation

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "bd3a898d-c373-446a-9ed6-4ac883ed233f",
  "ConsumerId": "e801a34d-aafa-4830-ad16-5fbe810cf62d",
  "MerchantId": "0f0561d2-b3d0-48ed-9111-58355edbe6cf",
  "MerchantLocationId": "9c64c116-1988-4171-bc0a-507b38884a32",
  "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": {
    "$id": "2",
    "Id": "40a7b374-d958-4860-bb1b-540c0cf6db62",
    "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
  },
  "Merchant": {
    "$id": "3",
    "Id": "03ee753d-c271-4ab9-822e-1c7b8f3c5fa1",
    "PlanId": "9523c080-dbe6-4161-9aa0-de00b1cd6ac1",
    "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": "4",
      "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-09-21T20:34:49.4924427+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-09-21T20:34:49.4924427+00:00",
      "TermsConditions": true,
      "MobileNumber": "sample string 21",
      "ProfileImage": "sample string 22",
      "FullName": "sample string 12, sample string 11",
      "Roles": [
        {
          "$id": "5",
          "Id": "sample string 1",
          "Name": "sample string 2",
          "Users": [
            {
              "$ref": "4"
            },
            {
              "$ref": "4"
            }
          ]
        },
        {
          "$ref": "5"
        }
      ]
    },
    "Plan": {
      "$id": "6",
      "Id": "180b340e-c55e-4d70-8e95-4fe33d53e25e",
      "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": "7",
        "Id": "e79e50d5-9ff1-4eaa-8989-3c21d8dddebd",
        "MerchantId": "f13dfdfe-7e8d-42e1-b79a-8746a2b51344",
        "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,
        "GeoSpot": true,
        "Merchant": {
          "$ref": "3"
        },
        "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
      },
      {
        "$ref": "7"
      }
    ]
  },
  "MerchantLocation": {
    "$ref": "7"
  }
}

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 'MerchantConsumer'.

Response Information

Resource Description

Returns a MerchantConsumer

MerchantConsumer
NameDescriptionTypeAdditional information
Id

GUID Id for MerchantConsumer. Assigned by system on Create. [REQUIRED]

globally unique identifier

None.

ConsumerId

GUID Id for Consumer. [REQUIRED]

globally unique identifier

None.

MerchantId

GUID Id for Merchant. [REQUIRED]

globally unique identifier

None.

MerchantLocationId

GUID Id for Merchant Location. [REQUIRED]

globally unique identifier

None.

Email

Email address for MerchantConsumer. [NULL]

string

None.

PhoneNumber

Phone number for MerchantConsumer. [NULL]

string

None.

FirstName

First name for MerchantConsumer. [NULL]

string

None.

LastName

Last name for MerchantConsumer. [NULL]

string

None.

Deleted

Indicates whether the MerchantConsumer has been deleted or not. Set to false on Create by system. Set to true on delete by system. [REQUIRED]

boolean

None.

EmailOptIn

Indicates whether the MerchantConsumer has opt into email communications. [REQUIRED]

boolean

None.

PhoneOptIn

Indicates whether the MerchantConsumer has opt into phone communications. [REQUIRED]

boolean

None.

FullName

Gets the full name for the MerchantConsumer

string

None.

Consumer

Gets the Consumer for the MerchantConsumer using ConsumerId.

Consumer

None.

Merchant

Gets the Merchant for the MerchantConsumer using MerchantId.

Merchant

None.

MerchantLocation

Gets the MerchantLocation for the MerchantConsumer using MerchantLocationId.

MerchantLocation

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "c9fd8682-5aad-421d-a118-0aeffdb47306",
  "ConsumerId": "d079373b-29d7-4b6b-b40f-f58b53c6fbda",
  "MerchantId": "d58f95f0-59dd-4674-9bb6-23164ce438f1",
  "MerchantLocationId": "b8cb53c5-92ad-4da0-b225-62e3c9c4faa6",
  "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": {
    "$id": "2",
    "Id": "0539ca3f-5368-4588-b079-c44198e8e552",
    "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
  },
  "Merchant": {
    "$id": "3",
    "Id": "9d1625ad-afb9-4838-9103-b86a0520f9f8",
    "PlanId": "b915ecac-3d4a-4739-9123-35133aee2e5d",
    "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": "4",
      "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-09-21T20:34:49.6336011+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-09-21T20:34:49.6336011+00:00",
      "TermsConditions": true,
      "MobileNumber": "sample string 21",
      "ProfileImage": "sample string 22",
      "FullName": "sample string 12, sample string 11",
      "Roles": [
        {
          "$id": "5",
          "Id": "sample string 1",
          "Name": "sample string 2",
          "Users": [
            {
              "$ref": "4"
            },
            {
              "$ref": "4"
            }
          ]
        },
        {
          "$ref": "5"
        }
      ]
    },
    "Plan": {
      "$id": "6",
      "Id": "2bd971da-5480-4d68-a0dd-ccd86e06a643",
      "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": "7",
        "Id": "cab7769f-31a7-49f9-8cd2-cd89c950c8d9",
        "MerchantId": "a1e206ad-8057-4aa2-9e22-4fa7c11059ae",
        "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,
        "GeoSpot": true,
        "Merchant": {
          "$ref": "3"
        },
        "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
      },
      {
        "$ref": "7"
      }
    ]
  },
  "MerchantLocation": {
    "$ref": "7"
  }
}

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.