POST api/OfferLocations

Create OfferLocation

Request Information

URI Parameters

None.

Body Parameters

The OfferLocation class

OfferLocation
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

OfferId

Guid OfferId for OfferLocation. [NULLABLE]

globally unique identifier

None.

MerchantLocationId

Guid MerchantLocationId for OfferLocation. [NULLABLE]

globally unique identifier

None.

Deleted

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

boolean

None.

Offer

Gets the Offer using OfferId.

Offer

None.

MerchantLocation

Gets the MerchantLocation using MerchantLocationId.

MerchantLocation

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "5c668170-7554-4ba3-aa03-d86598f7045b",
  "OfferId": "22b49b8d-b432-4a80-9252-fe4afb647cb7",
  "MerchantLocationId": "75fae0e1-de2c-4b8b-9168-9de7800b7754",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "8051f3d5-2862-4b1c-9b7e-1284b7c77966",
    "MerchantId": "9c02553e-3614-424f-9884-e5640003e8a6",
    "AppId": "05346d84-7d13-4c3d-ab9e-ecc2d5b02d31",
    "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-19T03:21:59.1322212+00:00",
    "EndDate": "2018-06-19T03:21:59.1322212+00:00",
    "ExpiryDate": "2018-06-19T03:21:59.1322212+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-06-19T03:21:59.1322212+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "5e4e0d33-8404-4a36-9b64-f93c32145eb0",
      "PlanId": "bb3336b6-a10b-4891-a068-278e2df51d8f",
      "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-19T03:21:59.1322212+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-19T03:21:59.1322212+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": "55db037c-c9f8-49a0-95fa-5cc1ea1424e1",
        "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": "f41c813e-de9e-443f-88ed-5ed75b871428",
          "MerchantId": "d32a62fb-74ad-4320-8c23-713a17819b7f",
          "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": "907d097e-7be3-4ba0-a22e-b628f7f3abaf",
      "MerchantId": "2f39cf29-94ac-45d3-a614-03e80a59801a",
      "KeyId": "021096a2-dfc8-4c3d-b963-4eeaf50f50cc",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-06-19T03:21:59.1322212+00:00",
      "Modified": "2018-06-19T03:21:59.1322212+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "ad293688-b858-43c0-8ddf-ab3f691b8dc8",
        "MerchantId": "2d3e8a75-9391-4169-aff8-4ab034025bb2",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-06-19T03:21:59.1322212+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "82e989c6-abdf-43a6-ba22-b0b35fcfab7e",
        "FromConsumerId": "e0f779f2-c511-4ff6-891b-26bd2fee489e",
        "ToConsumerId": "7b6fe2af-be54-4817-b58b-e62166716fae",
        "OfferId": "83876944-1d8b-4b82-8502-18c0d74aada6",
        "Redeemed": true,
        "Timestamp": "2018-06-19T03:21:59.1322212+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-06-19T03:21:59.1322212+00:00",
        "MerchantLocationId": "aa16d310-4e63-4658-b6a0-83e46da93066",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "f00e5e9f-d6fd-48c4-86c6-f043b73c753f",
          "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"
      }
    ]
  },
  "MerchantLocation": {
    "$ref": "7"
  }
}

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.Consumer' 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.Consumer' 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 'OfferLocation'.

Response Information

Resource Description

Returns an OfferLocation

OfferLocation
NameDescriptionTypeAdditional information
Id

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

globally unique identifier

None.

OfferId

Guid OfferId for OfferLocation. [NULLABLE]

globally unique identifier

None.

MerchantLocationId

Guid MerchantLocationId for OfferLocation. [NULLABLE]

globally unique identifier

None.

Deleted

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

boolean

None.

Offer

Gets the Offer using OfferId.

Offer

None.

MerchantLocation

Gets the MerchantLocation using MerchantLocationId.

MerchantLocation

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": "22070ea2-bd13-41f8-80c8-0de3d5763426",
  "OfferId": "fcf2f52e-00fa-462c-87ef-ad38ed02f8b3",
  "MerchantLocationId": "3d9f1995-8781-49fc-9996-00b0066d3115",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "852cff78-593a-4a1b-b0b1-c5bcf2122f7e",
    "MerchantId": "2c14c030-3e0c-4c59-8a6e-885041e637e9",
    "AppId": "095e174b-3834-4523-9e6f-8081bd545f38",
    "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-19T03:21:59.2884728+00:00",
    "EndDate": "2018-06-19T03:21:59.2884728+00:00",
    "ExpiryDate": "2018-06-19T03:21:59.2884728+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-06-19T03:21:59.2884728+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "ed129aca-7222-47da-8503-0000899c55f0",
      "PlanId": "6a8d5c2e-3d6a-4cb6-8c07-ea71ab82a4bc",
      "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-19T03:21:59.2884728+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-06-19T03:21:59.2884728+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": "42d13b4f-538c-4821-b6de-063b516693b5",
        "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": "4029e79d-e5d1-4c1f-bf81-0561d8b2e7af",
          "MerchantId": "d317f351-98b2-49b3-a322-249f4a3f6b0e",
          "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": "c9eaf766-b863-40af-ab31-6469339c03a2",
      "MerchantId": "6ffd167a-febe-4f63-af01-d5e552f198e1",
      "KeyId": "a178b78d-ec4b-4db1-a9be-657213c4d5f3",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-06-19T03:21:59.2884728+00:00",
      "Modified": "2018-06-19T03:21:59.2884728+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "a0fe820d-87b1-4d51-b1f2-c06243ba3674",
        "MerchantId": "4188aef2-655d-4b48-b9bf-0109fce5f298",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-06-19T03:21:59.2884728+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "d30412c8-ac9e-439c-92cc-6f84f000e831",
        "FromConsumerId": "837e2422-2fe8-429a-b4f2-57dec8237d6a",
        "ToConsumerId": "0a210ed7-ed05-466b-b79b-8efa8cff34ad",
        "OfferId": "f8c068d8-2d8f-425f-a9bb-7f20827b2a44",
        "Redeemed": true,
        "Timestamp": "2018-06-19T03:21:59.2884728+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-06-19T03:21:59.2884728+00:00",
        "MerchantLocationId": "8675c451-43d8-4cb7-b051-f90f5ca3db47",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "d39c1da3-0ff1-43a9-acb4-133b42c2ff69",
          "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"
      }
    ]
  },
  "MerchantLocation": {
    "$ref": "7"
  }
}

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