POST api/OfferRewards

Create OfferReward

Request Information

URI Parameters

None.

Body Parameters

The OfferReward class

OfferReward
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

OfferId

Guid OfferId for Offer. [REQUIRED]

globally unique identifier

None.

Reward

The amount of the OfferReward. Example: 10.00 for DollarOff, .10 for PercentageOff or BOGO for BOGO [NULL]

string

None.

RewardDescription

The descripton for the OfferReward. [NULL]

string

None.

Sharing

Indicates whether the sharing OfferReward is being used. [REQUIRED]

boolean

None.

SharingFrequency

Indicates the number of times before the sharing Reward is earned. [NULL]

string

None.

Redemption

Indicates whether the redemption OfferReward is being used. [REQUIRED]

boolean

None.

RedemptionFrequency

Indicates the numer of times before the redemption Reward is earned. [NULL]

string

None.

Offer

Gets the Offer using OfferId.

Offer

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "af23ecf5-1d93-45a9-bc76-74e3fda20859",
  "OfferId": "0f65edd0-67b3-423a-9b3f-3ee01672e0e3",
  "Reward": "sample string 3",
  "RewardDescription": "sample string 4",
  "Sharing": true,
  "SharingFrequency": "sample string 6",
  "Redemption": true,
  "RedemptionFrequency": "sample string 8",
  "Offer": {
    "$id": "2",
    "Id": "bd861f21-1080-45bb-b1ea-4d47c6921fc6",
    "MerchantId": "aae8e9ff-866c-478f-9382-3d4117425454",
    "AppId": "83473a71-f79b-4fb2-b4c4-2e315250ec3f",
    "Type": 0,
    "Reward": "sample string 4",
    "IsRewardBased": true,
    "Name": "sample string 5",
    "Description": "sample string 6",
    "TermsConditions": "sample string 7",
    "Tags": "sample string 8",
    "StartDate": "2018-09-21T18:24:19.9235566+00:00",
    "EndDate": "2018-09-21T18:24:19.9235566+00:00",
    "ExpiryDate": "2018-09-21T18:24:19.9235566+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-09-21T18:24:19.9235566+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "ceba1266-f6af-47d4-ae34-27113f42b0a0",
      "PlanId": "83daf562-316c-4b0c-8c0b-8cbc1b2f1874",
      "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-21T18:24:19.9235566+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-09-21T18:24:19.9235566+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": "8b90cb4d-ec4a-41dc-b963-56d31dbb8806",
        "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": "53a6a94d-477b-4e28-8852-80b3af74689f",
          "MerchantId": "fda9d111-07c0-433c-af73-317399a5978d",
          "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"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "fb85484b-46d1-4285-9b38-c87e0c53a35a",
      "MerchantId": "68832f42-2497-4252-9d23-ea3dbe8c3c14",
      "KeyId": "a12c5b3f-67f5-4705-af10-962f87de6e9a",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-09-21T18:24:19.9391817+00:00",
      "Modified": "2018-09-21T18:24:19.9391817+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "a1c3b442-000b-4526-a13e-3bc9073724bf",
        "MerchantId": "961e889f-bd84-454d-9615-8c6c600648fb",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-09-21T18:24:19.9391817+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "30a11743-c729-4757-9d3b-e6736bdb2f28",
        "FromConsumerId": "05882c8b-d1e4-47c5-b363-93ad4f2da95c",
        "ToConsumerId": "dd35d7c4-9970-4401-a258-d6b4b7ec3adb",
        "OfferId": "b94fefcb-b678-49b1-a991-f1244d3b566e",
        "Redeemed": true,
        "Timestamp": "2018-09-21T18:24:19.9391817+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-09-21T18:24:19.9391817+00:00",
        "MerchantLocationId": "d0e1614c-8057-4482-96a9-1d50459dd96e",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "ffef6a0b-29b8-44cd-9736-d50d1347e97b",
          "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
        },
        "Consumer1": {
          "$ref": "11"
        },
        "Offer": {
          "$ref": "2"
        }
      },
      {
        "$ref": "10"
      }
    ]
  }
}

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

Response Information

Resource Description

Returns an OfferReward

OfferReward
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

OfferId

Guid OfferId for Offer. [REQUIRED]

globally unique identifier

None.

Reward

The amount of the OfferReward. Example: 10.00 for DollarOff, .10 for PercentageOff or BOGO for BOGO [NULL]

string

None.

RewardDescription

The descripton for the OfferReward. [NULL]

string

None.

Sharing

Indicates whether the sharing OfferReward is being used. [REQUIRED]

boolean

None.

SharingFrequency

Indicates the number of times before the sharing Reward is earned. [NULL]

string

None.

Redemption

Indicates whether the redemption OfferReward is being used. [REQUIRED]

boolean

None.

RedemptionFrequency

Indicates the numer of times before the redemption Reward is earned. [NULL]

string

None.

Offer

Gets the Offer using OfferId.

Offer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "4b6869ca-df28-4615-a012-3cbfcee2836e",
  "OfferId": "409ed620-272a-4e41-ab37-c8508667db21",
  "Reward": "sample string 3",
  "RewardDescription": "sample string 4",
  "Sharing": true,
  "SharingFrequency": "sample string 6",
  "Redemption": true,
  "RedemptionFrequency": "sample string 8",
  "Offer": {
    "$id": "2",
    "Id": "30725089-ab6a-43e8-aa63-a418a5594a12",
    "MerchantId": "ec7e8781-c98f-42a7-92f7-a8f202189ca2",
    "AppId": "d414b074-65a0-4558-95c5-72d60e8fab19",
    "Type": 0,
    "Reward": "sample string 4",
    "IsRewardBased": true,
    "Name": "sample string 5",
    "Description": "sample string 6",
    "TermsConditions": "sample string 7",
    "Tags": "sample string 8",
    "StartDate": "2018-09-21T18:24:20.0491949+00:00",
    "EndDate": "2018-09-21T18:24:20.0491949+00:00",
    "ExpiryDate": "2018-09-21T18:24:20.0491949+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-09-21T18:24:20.0491949+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "d0bc0896-bf1d-429f-9f90-551c94c40a4a",
      "PlanId": "a129c256-3408-4f8f-a834-9911e5ba0457",
      "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-21T18:24:20.0491949+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-09-21T18:24:20.0491949+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": "f183014a-c679-47b7-bb98-d2010f28a216",
        "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": "d98a6d2c-cd4c-4598-a1eb-8c8ddf2e793b",
          "MerchantId": "2335a9cf-ac97-48b6-8b80-42c49abc995e",
          "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"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "ed9f21c3-cd70-4452-ac9a-e6c9165208ca",
      "MerchantId": "137132fa-937d-473e-9c6f-0180153a66bc",
      "KeyId": "84e0157b-d332-42ec-bfe8-db2638583be6",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-09-21T18:24:20.0491949+00:00",
      "Modified": "2018-09-21T18:24:20.0491949+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "743132ab-a5aa-4a30-a798-9d85f1e2df5d",
        "MerchantId": "cfd6836d-ee63-4b51-bdb9-ccd3491aaf5d",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-09-21T18:24:20.0491949+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "53961c6b-187b-4e1c-b12f-ada2c0ee3062",
        "FromConsumerId": "4dc8e704-c5e9-4c5f-a7b6-09ead4a1ec44",
        "ToConsumerId": "50f05e19-8c45-4f43-9b86-48e9c991ccdf",
        "OfferId": "6e6ec2dd-e756-4ac7-b821-b1d80e1ec685",
        "Redeemed": true,
        "Timestamp": "2018-09-21T18:24:20.0491949+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-09-21T18:24:20.0491949+00:00",
        "MerchantLocationId": "25c318cf-8f23-4586-8158-c9ad93b45eea",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "02fa3343-93e5-46c0-bbf4-ea41c4a35fcb",
          "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
        },
        "Consumer1": {
          "$ref": "11"
        },
        "Offer": {
          "$ref": "2"
        }
      },
      {
        "$ref": "10"
      }
    ]
  }
}

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.