POST api/Keys

Create Key

Request Information

URI Parameters

None.

Body Parameters

The Key class

Key
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

MerchantId

Guid MerchantId for Key. [REQUIRED]

globally unique identifier

None.

Name

Name of API Key. [NULL]

string

None.

SecretKey

The API Key for the Key. Generated by client. [NULL]

string

None.

Created

Date Key was created. Assigned by system on Create. [REQUIRED]

date

None.

Deleted

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

boolean

None.

Assigned

Indicates whether the Key has been assigned to an App. [REQUIRED]

boolean

None.

Merchant

Gets the Merchant using MerchantId.

Merchant

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "7078cec6-00ef-4a77-97e6-e793cf63eae4",
  "MerchantId": "7799676a-bc46-477f-bdfa-15297e967aff",
  "Name": "sample string 3",
  "SecretKey": "sample string 4",
  "Created": "2018-12-12T06:20:52.5343546+00:00",
  "Deleted": true,
  "Assigned": true,
  "Merchant": {
    "$id": "2",
    "Id": "3238ee17-047b-4c41-a354-56c96f476db9",
    "PlanId": "42039ba5-d7d9-4736-9bee-854cd940fc50",
    "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-12-12T06:20:52.5343546+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-12-12T06:20:52.5343546+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": "ca61ccca-62dc-4115-b24e-2100a31ebe8a",
      "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": "6",
        "Id": "270696d6-cd1b-4a47-9a2f-9522a48d8320",
        "MerchantId": "e4c37e71-eeb1-4be0-b5cd-8a83338e7578",
        "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,
        "StoreLocationId": "sample string 14",
        "Merchant": {
          "$ref": "2"
        },
        "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
      },
      {
        "$ref": "6"
      }
    ]
  }
}

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

Response Information

Resource Description

Returns a Key

Key
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

MerchantId

Guid MerchantId for Key. [REQUIRED]

globally unique identifier

None.

Name

Name of API Key. [NULL]

string

None.

SecretKey

The API Key for the Key. Generated by client. [NULL]

string

None.

Created

Date Key was created. Assigned by system on Create. [REQUIRED]

date

None.

Deleted

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

boolean

None.

Assigned

Indicates whether the Key has been assigned to an App. [REQUIRED]

boolean

None.

Merchant

Gets the Merchant using MerchantId.

Merchant

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "f8aa91c7-4285-4e28-9b46-7ad96f43cd71",
  "MerchantId": "64a30533-f372-485d-8367-1bb8f166dc29",
  "Name": "sample string 3",
  "SecretKey": "sample string 4",
  "Created": "2018-12-12T06:20:52.6933504+00:00",
  "Deleted": true,
  "Assigned": true,
  "Merchant": {
    "$id": "2",
    "Id": "ef0d90b9-488c-4e8d-9e5b-7400140c6c93",
    "PlanId": "5348ead9-48d2-4408-bc6a-dd0fbb99c0e1",
    "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-12-12T06:20:52.6933504+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-12-12T06:20:52.6933504+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": "992d23ca-d244-4608-9645-7299cb9813d8",
      "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": "6",
        "Id": "4fc61522-569b-4217-bb25-caed9484cc73",
        "MerchantId": "cbc95dcc-02bd-43a6-86f2-f8b7e60419d9",
        "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,
        "StoreLocationId": "sample string 14",
        "Merchant": {
          "$ref": "2"
        },
        "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
      },
      {
        "$ref": "6"
      }
    ]
  }
}

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.