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": "5f30b4ee-6dea-453c-9767-6ef5c73ee729",
  "OfferId": "96380dea-097c-4d7f-a299-37ba0faa609c",
  "Reward": "sample string 3",
  "RewardDescription": "sample string 4",
  "Sharing": true,
  "SharingFrequency": "sample string 6",
  "Redemption": true,
  "RedemptionFrequency": "sample string 8",
  "Offer": {
    "$id": "2",
    "Id": "72294e38-aba9-47b0-a7e3-1253f997d393",
    "MerchantId": "b812da92-b196-49a4-97b6-9ec29b81b829",
    "AppId": "f583130f-3d6f-414e-a99d-f1eab1f706bc",
    "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-12-12T05:11:22.616596+00:00",
    "EndDate": "2018-12-12T05:11:22.616596+00:00",
    "ExpiryDate": "2018-12-12T05:11:22.616596+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-12-12T05:11:22.616596+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "7a3014de-c673-4ecc-a257-23a45f61f6b0",
      "PlanId": "45b5a438-d2f6-44f6-bbdf-26b5f9572569",
      "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-12-12T05:11:22.616596+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-12-12T05:11:22.616596+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": "92a026cb-07c3-4af9-9a51-292bc52c98a2",
        "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": "8346274c-0907-4923-81db-5ea5f2b02037",
          "MerchantId": "b8d6b422-46eb-4985-8f32-45861b8a0476",
          "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": "3"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "7"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "d6f993dc-9c47-406b-bb36-001b407df829",
      "MerchantId": "b6d4a4d0-5cf0-4bda-ae39-83cd5358c3df",
      "KeyId": "6c160e4b-ca6f-4b33-b3fe-fefcdca3867c",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-12-12T05:11:22.616596+00:00",
      "Modified": "2018-12-12T05:11:22.616596+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "d98b751f-8afd-44e1-a9d6-39ea05d4562e",
        "MerchantId": "10563dfd-8904-4775-a03e-6242c6c5bb68",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-12-12T05:11:22.616596+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "ef88b200-4510-48ab-8add-6c4390a779e8",
        "FromConsumerId": "9a46b0e0-825d-44e9-a99d-b5e3d2ec22eb",
        "ToConsumerId": "013df488-fe62-4323-94b8-9103d9177c90",
        "OfferId": "e217a8e3-15c6-4802-9604-928c358d9167",
        "Redeemed": true,
        "Timestamp": "2018-12-12T05:11:22.616596+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-12-12T05:11:22.616596+00:00",
        "MerchantLocationId": "724b11bc-4441-472e-b6b3-2bad7dea0f62",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "dbd7e1a8-c20a-4511-9b8b-32592e49acd4",
          "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": "c4078833-9f48-4f4d-b743-be18fb765795",
  "OfferId": "7833d8cb-20cf-4003-a648-5f9dba315a91",
  "Reward": "sample string 3",
  "RewardDescription": "sample string 4",
  "Sharing": true,
  "SharingFrequency": "sample string 6",
  "Redemption": true,
  "RedemptionFrequency": "sample string 8",
  "Offer": {
    "$id": "2",
    "Id": "6d6269c7-8a5a-402c-aabf-ef767f1e1f41",
    "MerchantId": "bfe8fb35-55f1-4764-997f-1f1d3b6bf68e",
    "AppId": "cf611bca-9eb1-430c-82f8-668fa085bb0d",
    "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-12-12T05:11:22.7729748+00:00",
    "EndDate": "2018-12-12T05:11:22.7729748+00:00",
    "ExpiryDate": "2018-12-12T05:11:22.7729748+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-12-12T05:11:22.7729748+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "54eadbfe-399f-48b6-bf99-f183246b27d3",
      "PlanId": "50042ff2-b446-4fe2-be9f-e0cbb3cda041",
      "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-12-12T05:11:22.7729748+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-12-12T05:11:22.7729748+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": "c3c58b82-c9cb-4b50-aab2-81af7be0cd85",
        "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": "0dfe3b89-f891-470a-b264-3f44d10d629b",
          "MerchantId": "9efb6bee-bfd1-412b-ba81-56da8ac1038f",
          "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": "3"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "7"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "20a97718-ae47-430c-824b-9d22b7fce23c",
      "MerchantId": "c4b570d9-a04b-4d43-b89e-7c74e64d0016",
      "KeyId": "e88f95c5-f7fa-4ba5-a262-15c4b332667e",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-12-12T05:11:22.7729748+00:00",
      "Modified": "2018-12-12T05:11:22.7729748+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "4309e13d-606b-45a3-9d33-3bc7ed2d57c1",
        "MerchantId": "fe1494cb-f164-4411-9794-481342ed33a5",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-12-12T05:11:22.7729748+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "b8c53bbb-7141-4226-964c-1c6dbba9dda1",
        "FromConsumerId": "62475503-0e90-425a-b14f-8cf0b8f47845",
        "ToConsumerId": "250e903c-9d17-4995-bb7e-816960d78fea",
        "OfferId": "2cb9dbf5-f3e4-4137-97ef-c3a8147c034a",
        "Redeemed": true,
        "Timestamp": "2018-12-12T05:11:22.7729748+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-12-12T05:11:22.7729748+00:00",
        "MerchantLocationId": "48ad0364-dfcb-43b3-b07d-cf7c338a9ae5",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "f342ddd5-2b7d-4f36-8816-84c6463e92fe",
          "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.