POST api/MerchantLocations

Create MerchantLocation

Request Information

URI Parameters

None.

Body Parameters

The MerchantLocation class

MerchantLocation
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

MerchantId

GUID Id for Merchant. [REQUIRED]

globally unique identifier

None.

Active

Indicates whether the Location is active or not. [REQUIRED]

boolean

None.

Name

Name of the Location. [NULL]

string

None.

Address1

Address 1 for the Location. [NULL]

string

None.

Address2

Address 2 for the Location. [NULL]

string

None.

City

City of the Location [NULL]

string

None.

State

State of the Location [NULL]

string

None.

ZipCode

ZipCode for the Location [NULL]

string

None.

PhoneNumber

Phone number for the Location [NULL]

string

None.

Deleted

Indicates whether the Location has been deleted or not. [REQUIRED]

boolean

None.

Main

Indicates whether the Location is the main Location for the Merchant. [REQUIRED]

boolean

None.

Latitude

GPS Latitude coordinates for location. [NULLABLE]

decimal number

None.

Longitude

GPS Longitude coordinates for location. [NULLABLE]

decimal number

None.

GeoLocation

Latitude and Longitude combined to get geographic point on Earth [NULL]

DbGeography

None.

Merchant

Gets the Merchant using MerchantId.

Merchant

None.

CompleteAddress

Gets the complete address for the Location.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "60fd1ab9-e081-41ab-9e57-f91402060d64",
  "MerchantId": "5f5f4fd2-cc26-415b-a01c-1d9207561951",
  "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": {
    "$id": "2",
    "Id": "70b3a4d3-9aff-4c39-81b9-324d88e4427a",
    "PlanId": "19530985-b568-4a1b-b289-043870083689",
    "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": "3",
      "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-19T03:21:50.6140777+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-06-19T03:21:50.6140777+00:00",
      "TermsConditions": true,
      "MobileNumber": "sample string 21",
      "ProfileImage": "sample string 22",
      "FullName": "sample string 12, sample string 11",
      "Roles": [
        {
          "$id": "4",
          "Id": "sample string 1",
          "Name": "sample string 2",
          "Users": [
            {
              "$ref": "3"
            },
            {
              "$ref": "3"
            }
          ]
        },
        {
          "$ref": "4"
        }
      ]
    },
    "Plan": {
      "$id": "5",
      "Id": "59830406-c841-4e11-86c8-b7f870fdbd50",
      "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": [
      {
        "$ref": "1"
      },
      {
        "$ref": "1"
      }
    ]
  },
  "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
}

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

Response Information

Resource Description

Returns a MerchantLocation or an alert message/email if the MerchantLocation limit has been reached

MerchantLocation
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

MerchantId

GUID Id for Merchant. [REQUIRED]

globally unique identifier

None.

Active

Indicates whether the Location is active or not. [REQUIRED]

boolean

None.

Name

Name of the Location. [NULL]

string

None.

Address1

Address 1 for the Location. [NULL]

string

None.

Address2

Address 2 for the Location. [NULL]

string

None.

City

City of the Location [NULL]

string

None.

State

State of the Location [NULL]

string

None.

ZipCode

ZipCode for the Location [NULL]

string

None.

PhoneNumber

Phone number for the Location [NULL]

string

None.

Deleted

Indicates whether the Location has been deleted or not. [REQUIRED]

boolean

None.

Main

Indicates whether the Location is the main Location for the Merchant. [REQUIRED]

boolean

None.

Latitude

GPS Latitude coordinates for location. [NULLABLE]

decimal number

None.

Longitude

GPS Longitude coordinates for location. [NULLABLE]

decimal number

None.

GeoLocation

Latitude and Longitude combined to get geographic point on Earth [NULL]

DbGeography

None.

Merchant

Gets the Merchant using MerchantId.

Merchant

None.

CompleteAddress

Gets the complete address for the Location.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "5d4e36a0-d644-4de5-9d2c-1a65aa5bdeab",
  "MerchantId": "2b006b8c-83b6-44d2-ab41-6dd848b389df",
  "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": {
    "$id": "2",
    "Id": "5c2d96a8-ae55-4c05-84f7-26bddfaa8ee8",
    "PlanId": "4016380c-4213-48d1-9803-6c99b75cf31d",
    "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": "3",
      "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-19T03:21:50.8796903+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-06-19T03:21:50.8796903+00:00",
      "TermsConditions": true,
      "MobileNumber": "sample string 21",
      "ProfileImage": "sample string 22",
      "FullName": "sample string 12, sample string 11",
      "Roles": [
        {
          "$id": "4",
          "Id": "sample string 1",
          "Name": "sample string 2",
          "Users": [
            {
              "$ref": "3"
            },
            {
              "$ref": "3"
            }
          ]
        },
        {
          "$ref": "4"
        }
      ]
    },
    "Plan": {
      "$id": "5",
      "Id": "3179433c-d2e2-493c-82d7-59bfebdcfeab",
      "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": [
      {
        "$ref": "1"
      },
      {
        "$ref": "1"
      }
    ]
  },
  "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
}

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.