PUT api/Redeem/ByUser

Redeem SharedOffer by User

Request Information

URI Parameters

None.

Body Parameters

The SharedOffer class. Pass in the Id, MerchantLocationId and UserName.

SharedOffer
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

FromConsumerId

The ConsumerId for the sharing Consumer. [NULLABLE]

globally unique identifier

None.

ToConsumerId

The ConsumerId for the Consumer being shared with. [NULLABLE]

globally unique identifier

None.

OfferId

The OfferId for the offer being shared. [REQUIRED]

globally unique identifier

None.

Redeemed

Indicates whether the SharedOffer has been redemeed. [NULLABLE]

boolean

None.

Timestamp

Indicates when the SharedOffer was created. [NULL]

date

None.

ReceiptImage

Image of the receipt or proof of the transaction. [NULL]

string

None.

TotalAmount

The total amount of the transaction. [NULL]

string

String length: inclusive between 0 and 50

RedeemedOn

The DateTime when the SharedOffer was redeemed. Assigned by system on redeem. [NULL]

date

None.

MerchantLocationId

The MerchantLocation where the SharedOffer was redeemed. Used by redemption process. [NULL]

globally unique identifier

None.

UserName

The user who redeemed the SharedOffer. Used by redemption process. [NULL]

string

String length: inclusive between 0 and 256

Consumer

Gets the sharing Consumer using ConsumerId.

Consumer

None.

Consumer1

Gets the Consumer being shared with using ConsumerId.

Consumer

None.

Offer

Gets the Offer being shared using OfferId.

Offer

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "ed8e1e96-2112-44bd-bc9b-2fb206a5f0b2",
  "FromConsumerId": "3612afd4-7005-47a4-992f-a6beaa56bc1e",
  "ToConsumerId": "40ee6397-5985-44a9-907b-da6f692fd3ad",
  "OfferId": "aa992331-250b-43b1-8160-bdb9a6fd3ea5",
  "Redeemed": true,
  "Timestamp": "2018-12-12T05:13:39.699049+00:00",
  "ReceiptImage": "sample string 4",
  "TotalAmount": "sample string 5",
  "RedeemedOn": "2018-12-12T05:13:39.699049+00:00",
  "MerchantLocationId": "b70e0216-de92-48b9-bb4a-c40523e64967",
  "UserName": "sample string 6",
  "Consumer": {
    "$id": "2",
    "Id": "aaff7b13-7c1c-4d72-8259-d34bb291209f",
    "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": "2"
  },
  "Offer": {
    "$id": "3",
    "Id": "04f7b195-3250-43e2-8c51-718de37161d2",
    "MerchantId": "ed2cc12f-ddfd-415f-b6c7-b3e59dd6cd9d",
    "AppId": "476c4da0-c4f2-4f71-a6df-5e8ced015710",
    "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:13:39.699049+00:00",
    "EndDate": "2018-12-12T05:13:39.699049+00:00",
    "ExpiryDate": "2018-12-12T05:13:39.699049+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-12-12T05:13:39.699049+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "4",
      "Id": "c2cad4a3-7443-4b08-b0ad-1327c99b0aed",
      "PlanId": "4781422e-358e-412e-b9b7-a7b706d8fffc",
      "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": "5",
        "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:13:39.699049+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-12-12T05:13:39.699049+00:00",
        "TermsConditions": true,
        "MobileNumber": "sample string 21",
        "ProfileImage": "sample string 22",
        "FullName": "sample string 12, sample string 11",
        "Roles": [
          {
            "$id": "6",
            "Id": "sample string 1",
            "Name": "sample string 2",
            "Users": [
              {
                "$ref": "5"
              },
              {
                "$ref": "5"
              }
            ]
          },
          {
            "$ref": "6"
          }
        ]
      },
      "Plan": {
        "$id": "7",
        "Id": "dd42c5ac-8160-4f28-ae91-4d093ea6b2b4",
        "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": "8",
          "Id": "9c9fa8ce-a31e-47f5-957c-deb878960914",
          "MerchantId": "75e2e5d8-8224-48d8-a1d9-c2ddd061bf8b",
          "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": "4"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "8"
        }
      ]
    },
    "App": {
      "$id": "9",
      "Id": "8f471db1-ee83-4b5d-b59a-2a4898a7e445",
      "MerchantId": "32bef968-af2e-4f40-8498-9305958aac0b",
      "KeyId": "873a5205-5682-48b8-bf24-5afa055cf7e0",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-12-12T05:13:39.699049+00:00",
      "Modified": "2018-12-12T05:13:39.699049+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "4"
      },
      "Key": {
        "$id": "10",
        "Id": "9d90f4b9-9ee9-40e7-85b3-019dcb33aa41",
        "MerchantId": "f1accfe4-41fd-4d55-aa17-89cb079ee32a",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-12-12T05:13:39.699049+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "4"
        }
      }
    },
    "Shares": [
      {
        "$ref": "1"
      },
      {
        "$ref": "1"
      }
    ]
  }
}

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

Response Information

Resource Description

Returns an Offer or a limit/alert message if certain criteria have been met

Offer
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

MerchantId

Guid MerchantId for Merchant. [REQUIRED]

globally unique identifier

None.

AppId

GUID AppId for App. [REQUIRED]

globally unique identifier

None.

Type

The type of Offer. [REQUIRED]

OfferType

None.

Reward

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

string

None.

IsRewardBased

Indicates whether the Offer is a rewards-based offer. This is used for the BOGO Offer type. [NULLABLE]

boolean

None.

Name

The name or title of the Offer. [NULL]

string

None.

Description

The description for the Offer. [NULL]

string

None.

TermsConditions

The terms and conditions for the Offer. [NULL]

string

None.

Tags

Tags associated with an Offer. [NULL]

string

None.

StartDate

The start date of the Offer. [NULLABLE]

date

None.

EndDate

The end date of the Offer. [NULLABLE]

date

None.

ExpiryDate

The redemption expiration date of the Offer. [NULLABLE]

date

None.

Limited

Indicates whether the Offer has a redemption limit. [REQUIRED]

boolean

None.

RedemptionLimit

The redemption limit for the Offer. [REQUIRED]

integer

None.

Share

Indicates whether the Offer should be shared. [NULLABLE]

boolean

None.

Created

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

date

None.

Deleted

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

boolean

None.

Published

Indicates whether Offer has been published. [REQUIRED]

boolean

None.

OfferImage

Picture of the Offer. [NULL]

string

None.

Pause

Indicates whether the Offer is in a pause status. [REQUIRED]

boolean

None.

Private

Indicates whether the Offer is private. [REQUIRED]

boolean

None.

Merchant

Gets the Merchant using MerchantId.

Merchant

None.

App

Gets the App using AppId.

App

None.

Shares

Collection of SharedOffer

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "33163f55-ba4e-4d3d-9a83-e4c0fb880cb9",
  "MerchantId": "561f7180-ece2-45d9-9875-1dbb18cf8448",
  "AppId": "bdd26414-1b15-449d-9699-445946c612cd",
  "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:13:39.8396894+00:00",
  "EndDate": "2018-12-12T05:13:39.8396894+00:00",
  "ExpiryDate": "2018-12-12T05:13:39.8396894+00:00",
  "Limited": true,
  "RedemptionLimit": 10,
  "Share": true,
  "Created": "2018-12-12T05:13:39.8396894+00:00",
  "Deleted": true,
  "Published": true,
  "OfferImage": "sample string 14",
  "Pause": true,
  "Private": true,
  "Merchant": {
    "$id": "2",
    "Id": "b9250526-5d72-46b9-9761-b2cb5c218835",
    "PlanId": "fc915021-0b2d-4014-85a9-4a8f3ec9cc02",
    "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-12T05:13:39.8396894+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-12-12T05:13:39.8396894+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": "b7019006-450a-4dee-a504-7ba10ab40351",
      "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": "9d81fbdc-1656-430b-95ba-523efa7212b7",
        "MerchantId": "5674be0c-70af-48c6-a2f7-055aab8b01e7",
        "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"
      }
    ]
  },
  "App": {
    "$id": "7",
    "Id": "03f48410-99b2-4188-9bcd-59982660378f",
    "MerchantId": "6270c549-56e0-48c5-a123-379d1ec3a1bd",
    "KeyId": "faf32594-ea65-4608-beb5-2547c6cabe0c",
    "Name": "sample string 4",
    "Description": "sample string 5",
    "Created": "2018-12-12T05:13:39.8396894+00:00",
    "Modified": "2018-12-12T05:13:39.8396894+00:00",
    "Photo": "sample string 7",
    "Deleted": true,
    "Merchant": {
      "$ref": "2"
    },
    "Key": {
      "$id": "8",
      "Id": "470be450-f7db-4678-bdbb-f6064e3693f1",
      "MerchantId": "4555d9d9-6717-487a-8e12-b3acfc54aca2",
      "Name": "sample string 3",
      "SecretKey": "sample string 4",
      "Created": "2018-12-12T05:13:39.8396894+00:00",
      "Deleted": true,
      "Assigned": true,
      "Merchant": {
        "$ref": "2"
      }
    }
  },
  "Shares": [
    {
      "$id": "9",
      "Id": "74fc3f23-319b-454e-94cd-331e55916047",
      "FromConsumerId": "d3f96830-12dd-4098-9b58-b62974ce5de1",
      "ToConsumerId": "3dc40f8a-b28e-47ef-8579-375a7a0487c1",
      "OfferId": "822aff98-fc55-4c0f-9a69-9abb3e34acea",
      "Redeemed": true,
      "Timestamp": "2018-12-12T05:13:39.8396894+00:00",
      "ReceiptImage": "sample string 4",
      "TotalAmount": "sample string 5",
      "RedeemedOn": "2018-12-12T05:13:39.8396894+00:00",
      "MerchantLocationId": "c0355ce9-dd2a-43c0-be64-e25db6816321",
      "UserName": "sample string 6",
      "Consumer": {
        "$id": "10",
        "Id": "dbb1164e-e06d-4e65-ade5-00a91732015d",
        "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": "10"
      },
      "Offer": {
        "$ref": "1"
      }
    },
    {
      "$ref": "9"
    }
  ]
}

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 'FaceOffers.Entities.MerchantConsumer' 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 'FaceOffers.Entities.MerchantConsumer' contains cycles and cannot be serialized if reference tracking is disabled.