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": "80a156a4-1aab-422b-b567-2fbfe6002732",
  "OfferId": "c783a5d8-0a58-4da6-9704-bb84138f75c2",
  "Reward": "sample string 3",
  "RewardDescription": "sample string 4",
  "Sharing": true,
  "SharingFrequency": "sample string 6",
  "Redemption": true,
  "RedemptionFrequency": "sample string 8",
  "Offer": {
    "$id": "2",
    "Id": "900e1b7e-2c4f-42f2-b2b0-0e0dbe8cabd5",
    "MerchantId": "4b784496-7f44-4885-9214-0f02de8f4d46",
    "AppId": "cfa5c488-c0c2-4604-ac22-25a3223dbdda",
    "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-06-14T22:09:59.734377+00:00",
    "EndDate": "2018-06-14T22:09:59.734377+00:00",
    "ExpiryDate": "2018-06-14T22:09:59.734377+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-06-14T22:09:59.734377+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "0014421a-18e8-493c-9224-bb5a3171c1f9",
      "PlanId": "d074a854-5282-4141-8a1a-dc39f1f85a28",
      "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-06-14T22:09:59.734377+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-14T22:09:59.734377+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": "6bed9f0e-1a5a-4305-8395-e79c4bf37fb9",
        "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": "9ccd6142-e82a-46dd-8c7e-bf71b110b623",
          "MerchantId": "be9f0e18-e7de-4648-b74d-a9c3e4f354c4",
          "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": "3"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "7"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "3d2337e4-55be-4fc1-bb5c-68c45268cca5",
      "MerchantId": "d2deaa0f-a594-451d-b8e3-289a5d06a968",
      "KeyId": "5bd78428-5f26-4d38-9f6e-4267c1fa076d",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-06-14T22:09:59.734377+00:00",
      "Modified": "2018-06-14T22:09:59.734377+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "016b1162-c179-4fc7-8c4f-1410db41c6e2",
        "MerchantId": "0a8a011c-8587-412b-989e-8f39d595242d",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-06-14T22:09:59.734377+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "dedc5bc6-fdc2-410b-a018-7ffc8bd7af81",
        "FromConsumerId": "d69f7dd4-d5ad-425c-80fa-b58ea238daba",
        "ToConsumerId": "3e54917f-5986-47a9-92a6-2e2a23a31e51",
        "OfferId": "8787431c-d09e-4ecc-ae46-8b86b35f871a",
        "Redeemed": true,
        "Timestamp": "2018-06-14T22:09:59.734377+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-06-14T22:09:59.734377+00:00",
        "MerchantLocationId": "13a89472-b32d-4f05-9b5b-abe35e6d8e47",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "7776492b-1a50-44a9-a5fc-746aeb40d1c7",
          "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": "3c1907ed-f1e8-4819-80d5-4f7af4446bc7",
  "OfferId": "2e563a12-5504-46a6-aaa8-3ba515e82950",
  "Reward": "sample string 3",
  "RewardDescription": "sample string 4",
  "Sharing": true,
  "SharingFrequency": "sample string 6",
  "Redemption": true,
  "RedemptionFrequency": "sample string 8",
  "Offer": {
    "$id": "2",
    "Id": "722b0db6-5994-48ed-95ec-f6a2d5a56623",
    "MerchantId": "7904be18-a36e-4634-989d-04a2c8c3a82e",
    "AppId": "a297bbac-e701-4b64-8d8a-0d0417bbfdec",
    "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-06-14T22:09:59.9062473+00:00",
    "EndDate": "2018-06-14T22:09:59.9062473+00:00",
    "ExpiryDate": "2018-06-14T22:09:59.9062473+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-06-14T22:09:59.9062473+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "3d9602da-538f-4f1b-92b9-1eec807a8a9b",
      "PlanId": "4492709b-ea62-4bc8-be2e-08708061642d",
      "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-06-14T22:09:59.9062473+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-14T22:09:59.9062473+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": "336433c1-9227-4b29-864a-3eaec7e60472",
        "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": "077a5314-9b3d-4321-aec9-0335406d63b1",
          "MerchantId": "8d678855-33d5-4135-a55d-bd35a404c55c",
          "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": "3"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "7"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "51ffdfe1-687a-4ee1-9ff8-58b9eadffbd1",
      "MerchantId": "defa8085-3e23-49a9-8e03-40cd780683e0",
      "KeyId": "2babc1b1-3175-4173-ab55-ee49d3f4aa35",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-06-14T22:09:59.9062473+00:00",
      "Modified": "2018-06-14T22:09:59.9062473+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "9b18e1de-f412-47b5-83be-458b045d9709",
        "MerchantId": "8d1e46fd-1551-41b3-bf89-7f269716bd26",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-06-14T22:09:59.9062473+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "4df0b63a-348b-4fc3-b8e0-5102d5a1e8fa",
        "FromConsumerId": "e943b074-e8de-4411-b78c-a66556c1793e",
        "ToConsumerId": "60285437-6ebc-43e5-9f7f-447de8ff5811",
        "OfferId": "5cbb2811-dda2-4e3f-be4c-48e428466297",
        "Redeemed": true,
        "Timestamp": "2018-06-14T22:09:59.9062473+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-06-14T22:09:59.9062473+00:00",
        "MerchantLocationId": "11cca884-be4d-4f52-a25b-6f2665a44808",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "72c51f6b-46ae-4ff4-b1fb-8eea8b48d0ee",
          "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.