PUT api/Keys

Update 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": "4a69c4f6-a2d7-4062-bfc6-a9eca6ded741",
  "MerchantId": "4f583cb9-2a81-48cb-ab03-46cf8c998d8b",
  "Name": "sample string 3",
  "SecretKey": "sample string 4",
  "Created": "2018-06-19T03:23:00.1418333+00:00",
  "Deleted": true,
  "Assigned": true,
  "Merchant": {
    "$id": "2",
    "Id": "04110471-aedf-4335-9070-0f1584030032",
    "PlanId": "564c12b1-4ffd-49e0-a17e-51695702d4b2",
    "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:23:00.1418333+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-06-19T03:23:00.1418333+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": "5531bedc-3fe2-4db5-bd90-80585ec2c1b2",
      "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": "87584593-baa4-4bdb-a349-fc6dd4bc1ff4",
        "MerchantId": "07095a5d-dad2-4cf3-87ac-467dc5047c9f",
        "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": "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": "26dd14d1-e6b2-4198-b5ba-31e3a832f44f",
  "MerchantId": "d9a2b31f-cfbb-4aff-a86d-69d40f48cd66",
  "Name": "sample string 3",
  "SecretKey": "sample string 4",
  "Created": "2018-06-19T03:23:00.297818+00:00",
  "Deleted": true,
  "Assigned": true,
  "Merchant": {
    "$id": "2",
    "Id": "48fe7d3b-87ca-4a54-a13f-3198a02ccf75",
    "PlanId": "1c10e8aa-31b6-46d6-aab4-4bbb617900df",
    "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:23:00.297818+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-06-19T03:23:00.297818+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": "4140b5ce-4ada-437c-94b4-6ec90ad680e4",
      "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": "7841f4b1-3fd3-4d34-aa18-6cab6e0de942",
        "MerchantId": "20957eee-5b48-41f0-8528-d383504584c4",
        "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": "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.