PUT api/Offers

Update Offer

Request Information

URI Parameters

None.

Body Parameters

The Offer class

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.

Request Formats

application/json, text/json

Sample:
{
  "Id": "f168890d-5a57-4fbb-bcad-78efa2779d34",
  "MerchantId": "50fcab2d-d473-4a3d-a9d5-45f7384a2fbd",
  "AppId": "d07cd203-8b8c-4780-8f0a-49a26f6befaa",
  "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:50:36.148399+00:00",
  "EndDate": "2018-12-12T05:50:36.148399+00:00",
  "ExpiryDate": "2018-12-12T05:50:36.148399+00:00",
  "Limited": true,
  "RedemptionLimit": 10,
  "Share": true,
  "Created": "2018-12-12T05:50:36.148399+00:00",
  "Deleted": true,
  "Published": true,
  "OfferImage": "sample string 14",
  "Pause": true,
  "Private": true,
  "Merchant": {
    "$id": "2",
    "Id": "6eedab51-7039-4f7d-bf13-22d0c185a0f8",
    "PlanId": "48417e76-482f-4f4b-93a3-51f424241160",
    "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:50:36.148399+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-12-12T05:50:36.148399+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": "38e8d175-aad7-4b03-814b-80b13044c054",
      "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": "b7c5e49a-ad0d-4960-9e48-1dc57895350e",
        "MerchantId": "5c54ae99-4ca5-49e1-a502-c31adca85986",
        "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": "ecb26e49-24ef-4246-b71f-b0a819773123",
    "MerchantId": "513443c2-63be-4790-93ff-b57906c08617",
    "KeyId": "87c16c70-d68d-4b96-b2e1-58483ebbe318",
    "Name": "sample string 4",
    "Description": "sample string 5",
    "Created": "2018-12-12T05:50:36.148399+00:00",
    "Modified": "2018-12-12T05:50:36.148399+00:00",
    "Photo": "sample string 7",
    "Deleted": true,
    "Merchant": {
      "$ref": "2"
    },
    "Key": {
      "$id": "8",
      "Id": "b20de84d-8cd9-4f0e-ac88-c50f3eb8407c",
      "MerchantId": "111ee1d6-bba7-47a7-80bc-c2d2c1abc3f5",
      "Name": "sample string 3",
      "SecretKey": "sample string 4",
      "Created": "2018-12-12T05:50:36.148399+00:00",
      "Deleted": true,
      "Assigned": true,
      "Merchant": {
        "$ref": "2"
      }
    }
  },
  "Shares": [
    {
      "$id": "9",
      "Id": "5d0d5b4c-e7e7-4ccf-a863-88c922fd6a3f",
      "FromConsumerId": "a5e72b09-ecde-446d-9731-3ef07b3b61dc",
      "ToConsumerId": "7d7f2bef-f193-43f6-8b34-bde38088aacf",
      "OfferId": "d1d21231-e616-4670-81ef-24450857405e",
      "Redeemed": true,
      "Timestamp": "2018-12-12T05:50:36.148399+00:00",
      "ReceiptImage": "sample string 4",
      "TotalAmount": "sample string 5",
      "RedeemedOn": "2018-12-12T05:50:36.148399+00:00",
      "MerchantLocationId": "431e3a84-e6cb-4379-883a-15694ba7818a",
      "UserName": "sample string 6",
      "Consumer": {
        "$id": "10",
        "Id": "29e9b5c8-c7c6-4a2d-ae98-21059ebe3012",
        "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.

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

Response Information

Resource Description

Returns an Offer

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": "975f304d-a028-4d5d-9f8d-a03e06313814",
  "MerchantId": "1b89cf72-2b0d-46b1-9be5-8eebdf934ff1",
  "AppId": "a84185e1-ab27-481c-8fd1-6df4fe5ed56d",
  "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:50:36.2890297+00:00",
  "EndDate": "2018-12-12T05:50:36.2890297+00:00",
  "ExpiryDate": "2018-12-12T05:50:36.2890297+00:00",
  "Limited": true,
  "RedemptionLimit": 10,
  "Share": true,
  "Created": "2018-12-12T05:50:36.2890297+00:00",
  "Deleted": true,
  "Published": true,
  "OfferImage": "sample string 14",
  "Pause": true,
  "Private": true,
  "Merchant": {
    "$id": "2",
    "Id": "08d63e34-d5f4-4899-b962-ce061e3e72f4",
    "PlanId": "441c33b7-7fa4-4138-8f50-b896b9876988",
    "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:50:36.2890297+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-12-12T05:50:36.2890297+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": "4341378b-273a-4e49-96ca-ba0d3fc92bc0",
      "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": "8f04177f-2bdc-4933-ba92-212327b7102b",
        "MerchantId": "63dbf2ec-6f48-402d-8448-39a9867a351d",
        "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": "3ffe1545-94cb-49d9-a7c8-9f74892ba685",
    "MerchantId": "efa3772f-43e7-4efe-9cee-f42ecbdd4181",
    "KeyId": "5f7b1c6e-13f0-4b7d-9cb8-3489a86e8c17",
    "Name": "sample string 4",
    "Description": "sample string 5",
    "Created": "2018-12-12T05:50:36.2890297+00:00",
    "Modified": "2018-12-12T05:50:36.2890297+00:00",
    "Photo": "sample string 7",
    "Deleted": true,
    "Merchant": {
      "$ref": "2"
    },
    "Key": {
      "$id": "8",
      "Id": "04b1acd3-0acb-4e8c-9871-abe856756ac4",
      "MerchantId": "6edf0d48-d32c-4a7a-9d8a-3a64d31dfce7",
      "Name": "sample string 3",
      "SecretKey": "sample string 4",
      "Created": "2018-12-12T05:50:36.2890297+00:00",
      "Deleted": true,
      "Assigned": true,
      "Merchant": {
        "$ref": "2"
      }
    }
  },
  "Shares": [
    {
      "$id": "9",
      "Id": "df3c0d96-8e14-4781-b4c2-f138c4774a56",
      "FromConsumerId": "9bc8a3c5-3939-4edd-a591-2e88965b1800",
      "ToConsumerId": "a87956b2-5ae0-4720-8220-28fcc9b542d0",
      "OfferId": "2a38cefe-a1ba-4a7d-af05-8aceb9bfaa7e",
      "Redeemed": true,
      "Timestamp": "2018-12-12T05:50:36.2890297+00:00",
      "ReceiptImage": "sample string 4",
      "TotalAmount": "sample string 5",
      "RedeemedOn": "2018-12-12T05:50:36.2890297+00:00",
      "MerchantLocationId": "936f4f08-4ac6-471d-b36a-8d639d3c0106",
      "UserName": "sample string 6",
      "Consumer": {
        "$id": "10",
        "Id": "3149d75a-0468-4751-8ec2-150f12356925",
        "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.