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": "cedf0b4d-e4ac-4944-aa42-35f2f1e5350d",
  "MerchantId": "66a953c4-7dce-4e53-a110-3e56505ac328",
  "AppId": "83b0556b-7f15-4ecd-88cf-6b04baadff0f",
  "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-14T18:15:31.7771734+00:00",
  "EndDate": "2018-06-14T18:15:31.7771734+00:00",
  "ExpiryDate": "2018-06-14T18:15:31.7771734+00:00",
  "Limited": true,
  "RedemptionLimit": 10,
  "Share": true,
  "Created": "2018-06-14T18:15:31.7771734+00:00",
  "Deleted": true,
  "Published": true,
  "OfferImage": "sample string 14",
  "Pause": true,
  "Private": true,
  "Merchant": {
    "$id": "2",
    "Id": "5e03e265-11d0-4750-a8ce-522238ed53ac",
    "PlanId": "05067fef-54d0-4d40-aab7-3edb466909a3",
    "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-06-14T18:15:31.7771734+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-06-14T18:15:31.7771734+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": "3c8c01f8-0ad5-41c5-affd-32b013f25173",
      "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": "7e659d00-468a-498d-bce4-969a0bcbd616",
        "MerchantId": "e9d450f3-fe9b-49b1-9f88-0920780ba360",
        "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": "2"
        },
        "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
      },
      {
        "$ref": "6"
      }
    ]
  },
  "App": {
    "$id": "7",
    "Id": "5cb806fb-7a91-4269-ad9f-8f0ad294a916",
    "MerchantId": "5a81dfdb-26ec-497e-8d3b-8746f36f5c33",
    "KeyId": "d49bf3c0-da55-40e4-848e-99cec43b6be3",
    "Name": "sample string 4",
    "Description": "sample string 5",
    "Created": "2018-06-14T18:15:31.7771734+00:00",
    "Modified": "2018-06-14T18:15:31.7771734+00:00",
    "Photo": "sample string 7",
    "Deleted": true,
    "Merchant": {
      "$ref": "2"
    },
    "Key": {
      "$id": "8",
      "Id": "99bad079-1d09-4b54-99ea-c300baf87f60",
      "MerchantId": "e98dc2df-687b-4c49-9977-679d1e15a83d",
      "Name": "sample string 3",
      "SecretKey": "sample string 4",
      "Created": "2018-06-14T18:15:31.7771734+00:00",
      "Deleted": true,
      "Assigned": true,
      "Merchant": {
        "$ref": "2"
      }
    }
  },
  "Shares": [
    {
      "$id": "9",
      "Id": "14efab91-7f87-478a-bb9b-c340ba627406",
      "FromConsumerId": "2b7afe11-079f-43cd-8afb-2fd484fca1e7",
      "ToConsumerId": "8a7b3b56-cc3a-45d1-882f-732170ec460e",
      "OfferId": "34931ca3-c2c0-4799-bdd8-1da39243a57c",
      "Redeemed": true,
      "Timestamp": "2018-06-14T18:15:31.7771734+00:00",
      "ReceiptImage": "sample string 4",
      "TotalAmount": "sample string 5",
      "RedeemedOn": "2018-06-14T18:15:31.7771734+00:00",
      "MerchantLocationId": "a123b1d3-3cfb-4807-85c2-fe78e349b1c6",
      "UserName": "sample string 6",
      "Consumer": {
        "$id": "10",
        "Id": "ed99f982-0d45-4645-835b-f05ceac562e5",
        "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": "7a534801-d301-48d9-8a07-0cbb66c2e737",
  "MerchantId": "8701103f-505e-4aaa-9504-75a6d1c30ed1",
  "AppId": "7fed077b-cd50-4028-96c6-07fb8b41b13d",
  "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-14T18:15:31.9334145+00:00",
  "EndDate": "2018-06-14T18:15:31.9334145+00:00",
  "ExpiryDate": "2018-06-14T18:15:31.9334145+00:00",
  "Limited": true,
  "RedemptionLimit": 10,
  "Share": true,
  "Created": "2018-06-14T18:15:31.9334145+00:00",
  "Deleted": true,
  "Published": true,
  "OfferImage": "sample string 14",
  "Pause": true,
  "Private": true,
  "Merchant": {
    "$id": "2",
    "Id": "ed81e589-2af0-4d10-9df1-b1476fdd502d",
    "PlanId": "9ea29e73-dbc7-4767-b8b8-f681369d505b",
    "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-06-14T18:15:31.9334145+00:00",
      "RegistrationCompleted": true,
      "LastLogin": "2018-06-14T18:15:31.9334145+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": "c2ac0b5d-cc31-4042-85d9-3c4c0f0d5248",
      "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": "a41c2f80-4a79-4804-890e-a1ae05611eac",
        "MerchantId": "457bb0e1-2c89-4fbf-aa5b-44f82c2ce495",
        "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": "2"
        },
        "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
      },
      {
        "$ref": "6"
      }
    ]
  },
  "App": {
    "$id": "7",
    "Id": "2a972729-f5b3-4d69-8441-36da5d886b1b",
    "MerchantId": "c880e961-5c52-4fcc-8345-d61dbd460e7e",
    "KeyId": "d10f6288-c3ea-45b7-9fb8-d26b66b9040e",
    "Name": "sample string 4",
    "Description": "sample string 5",
    "Created": "2018-06-14T18:15:31.9334145+00:00",
    "Modified": "2018-06-14T18:15:31.9334145+00:00",
    "Photo": "sample string 7",
    "Deleted": true,
    "Merchant": {
      "$ref": "2"
    },
    "Key": {
      "$id": "8",
      "Id": "72081bca-4739-441d-a419-b51ee2c41641",
      "MerchantId": "ca85f84a-c084-4ef7-9cba-34cc97388d2e",
      "Name": "sample string 3",
      "SecretKey": "sample string 4",
      "Created": "2018-06-14T18:15:31.9334145+00:00",
      "Deleted": true,
      "Assigned": true,
      "Merchant": {
        "$ref": "2"
      }
    }
  },
  "Shares": [
    {
      "$id": "9",
      "Id": "5db54c6a-3129-44d2-a542-989240184ef8",
      "FromConsumerId": "acc78f68-74f1-426d-8555-9449cdfc5749",
      "ToConsumerId": "29bcdd93-4f47-4a0c-bc20-9ab1ce8dd5dd",
      "OfferId": "6a778385-0232-44d0-b9fd-4403ba34b5fa",
      "Redeemed": true,
      "Timestamp": "2018-06-14T18:15:31.9334145+00:00",
      "ReceiptImage": "sample string 4",
      "TotalAmount": "sample string 5",
      "RedeemedOn": "2018-06-14T18:15:31.9334145+00:00",
      "MerchantLocationId": "f6af40af-9c87-4f62-93e4-3557c631cbb0",
      "UserName": "sample string 6",
      "Consumer": {
        "$id": "10",
        "Id": "0e1a9aa6-dcd3-4e8b-b9e7-23aa4b2aa7b9",
        "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.