POST api/UniqueOffers

Create UniqueOffer (Barcode will be created for you.)

Request Information

URI Parameters

None.

Body Parameters

The UniqueOffer class

UniqueOffer
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

OfferId

The OfferId for the Offer. [NULLABLE]

globally unique identifier

None.

ConsumerId

The ConsumerId for the Consumer. [NULLABLE]

globally unique identifier

None.

BarcodeId

The BarcodeId for the Barcode. [NULLABLE]

globally unique identifier

None.

Discount

The OfferReward Reward. [NULL]

string

String length: inclusive between 0 and 255

ShareDiscount

The OfferReward Reward once the share reward has been earned. [NULL]

string

None.

RedeemDiscount

The OfferReward Reward once the redemption reward has been earned. [NULL]

string

String length: inclusive between 0 and 255

Timestamp

Indicates when the UniqueOffer was created. [NULLABLE]

date

None.

Offer

Gets the Offer using OfferId.

Offer

None.

Consumer

Gets the Consumer using ConsumerId.

Consumer

None.

Barcode

Gets the Bardcode using BarcodeId.

Barcode

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "b97b37e5-8741-413d-9bba-db8c7db4a47a",
  "OfferId": "b9451063-d1e7-4cab-8c21-26a465f9ac52",
  "ConsumerId": "34e051ff-2bc8-4fc3-a161-a56160a99971",
  "BarcodeId": "906203f2-f1db-453a-9dd8-acbe02d7e07d",
  "Discount": "sample string 2",
  "ShareDiscount": "sample string 3",
  "RedeemDiscount": "sample string 4",
  "Timestamp": "2018-06-16T05:45:24.9028475+00:00",
  "Offer": {
    "$id": "2",
    "Id": "008076e4-6732-4362-9a78-d5809ae8f418",
    "MerchantId": "3cbf50cd-63b2-446c-a357-03b6fe2dbb8b",
    "AppId": "cdb20daa-03fd-4f19-8406-7e45a9db1eab",
    "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-16T05:45:24.9028475+00:00",
    "EndDate": "2018-06-16T05:45:24.9028475+00:00",
    "ExpiryDate": "2018-06-16T05:45:24.9028475+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-06-16T05:45:24.9028475+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "a1bbae9c-faa9-480b-9ca0-b066a16eb340",
      "PlanId": "c1639a32-f3d9-4cb7-af2a-6ee5b3c2ed8d",
      "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-16T05:45:24.9028475+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-16T05:45:24.9028475+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": "7abb3f74-f31b-4392-b68d-879ef813b6f1",
        "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": "9a319aaf-5481-4e84-baec-05019cc65b6b",
          "MerchantId": "5870f4b7-432c-456a-9fdb-41f9ea4c3b29",
          "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": "5733efeb-9a97-417e-970e-969b971ae470",
      "MerchantId": "7764d0df-d33c-41d9-9558-2914597a7fa1",
      "KeyId": "4f291fb8-aec3-41fd-bb65-1a557463d4d1",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-06-16T05:45:24.9028475+00:00",
      "Modified": "2018-06-16T05:45:24.9028475+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "83a101df-4ec5-4df7-8c0d-4642cc6adf9c",
        "MerchantId": "b576c0ba-6439-465a-b988-651662f159d9",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-06-16T05:45:24.9028475+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "f3bcbb4e-1780-43cf-9429-3abe961ee8ea",
        "FromConsumerId": "c7db9523-f4ca-4427-b111-68d919b9a4b2",
        "ToConsumerId": "c667dc6a-33fc-48e5-811c-c1f410f746d1",
        "OfferId": "cbcb4c88-c5e1-416d-978b-d044e6b5ad39",
        "Redeemed": true,
        "Timestamp": "2018-06-16T05:45:24.9028475+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-06-16T05:45:24.9028475+00:00",
        "MerchantLocationId": "bccf87c8-d9aa-4ac2-8f98-010899aa4c43",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "6853777f-f553-4437-9696-361b2c295fc1",
          "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"
      }
    ]
  },
  "Consumer": {
    "$ref": "11"
  },
  "Barcode": {
    "$id": "12",
    "Id": "a4f759f7-e7c2-478c-ba54-3799b2ef43ba",
    "Type": 1,
    "Code": "sample string 2",
    "Deleted": true
  }
}

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.UniqueOffer, 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.UniqueOffer, 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 'UniqueOffer'.

Response Information

Resource Description

Returns a UniqueOffer

UniqueOffer
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

OfferId

The OfferId for the Offer. [NULLABLE]

globally unique identifier

None.

ConsumerId

The ConsumerId for the Consumer. [NULLABLE]

globally unique identifier

None.

BarcodeId

The BarcodeId for the Barcode. [NULLABLE]

globally unique identifier

None.

Discount

The OfferReward Reward. [NULL]

string

String length: inclusive between 0 and 255

ShareDiscount

The OfferReward Reward once the share reward has been earned. [NULL]

string

None.

RedeemDiscount

The OfferReward Reward once the redemption reward has been earned. [NULL]

string

String length: inclusive between 0 and 255

Timestamp

Indicates when the UniqueOffer was created. [NULLABLE]

date

None.

Offer

Gets the Offer using OfferId.

Offer

None.

Consumer

Gets the Consumer using ConsumerId.

Consumer

None.

Barcode

Gets the Bardcode using BarcodeId.

Barcode

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "e5748905-d66b-478a-b7ed-8f27f189c6b8",
  "OfferId": "6a9a8293-81f6-4a02-89ee-6eda289e398e",
  "ConsumerId": "438e77d0-9cf0-4c2f-b2b6-9d2b82f79fef",
  "BarcodeId": "cc18f5f1-2ae0-4b22-b01d-7a617ac98534",
  "Discount": "sample string 2",
  "ShareDiscount": "sample string 3",
  "RedeemDiscount": "sample string 4",
  "Timestamp": "2018-06-16T05:45:25.0591068+00:00",
  "Offer": {
    "$id": "2",
    "Id": "f132590e-ac32-456e-b0f1-6162d9ac0ce0",
    "MerchantId": "88be7f2d-24b0-4277-b12e-10f598b2ea94",
    "AppId": "7d98908e-56a8-4dfc-b4f1-525dbd2b3d95",
    "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-16T05:45:25.0591068+00:00",
    "EndDate": "2018-06-16T05:45:25.0591068+00:00",
    "ExpiryDate": "2018-06-16T05:45:25.0591068+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-06-16T05:45:25.0591068+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "55e64e83-892a-46a6-b900-bcf515f2c0fa",
      "PlanId": "04731e7f-d987-4810-a50f-bb740792f096",
      "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-16T05:45:25.0591068+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-16T05:45:25.0591068+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": "6d7bcbc2-1a0d-4dae-b413-365610ca1643",
        "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": "47753a91-0537-4d58-a7ac-eb3456f615f1",
          "MerchantId": "602d5e9c-ab5c-4a0f-9efb-0cd7b5eeb13d",
          "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": "6dac3c2d-9ec5-4b1a-b77e-f0c01558b68f",
      "MerchantId": "4f2b7315-0f56-4196-a851-1e204d58658d",
      "KeyId": "2eec91d3-1bef-4418-85e5-3b6f7176c35b",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-06-16T05:45:25.0591068+00:00",
      "Modified": "2018-06-16T05:45:25.0591068+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "d5b27aef-00a1-44bc-bbe3-873803689a52",
        "MerchantId": "20f8f67d-3e6a-4e66-9fd7-f10268f20353",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-06-16T05:45:25.0591068+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "f424ef61-4493-4eb2-b10a-8a86efa79544",
        "FromConsumerId": "d613b609-1f38-421d-bdd3-f3b0c9467faf",
        "ToConsumerId": "cd564d2d-6ef0-4e25-8c73-1d3479bc31c9",
        "OfferId": "3cfd126a-4629-4b4b-a897-7c27a8c3a482",
        "Redeemed": true,
        "Timestamp": "2018-06-16T05:45:25.0591068+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-06-16T05:45:25.0591068+00:00",
        "MerchantLocationId": "49fd8da3-3507-4204-bd8a-549c4f61a86d",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "f60fd9fc-0e2e-4c08-b514-2daa51f05f23",
          "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"
      }
    ]
  },
  "Consumer": {
    "$ref": "11"
  },
  "Barcode": {
    "$id": "12",
    "Id": "29d6107d-19ad-407f-bd12-f35ce9ace8bf",
    "Type": 1,
    "Code": "sample string 2",
    "Deleted": true
  }
}

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.UniqueOffer, 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.UniqueOffer, FaceOffers.Entities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' contains cycles and cannot be serialized if reference tracking is disabled.