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": "95c576e8-70b9-4677-8166-91e1d99a2abe",
  "OfferId": "e6539c31-50c4-4cbe-8ea5-d5469a74155c",
  "MerchantLocationId": "88811d37-7440-4780-9378-c7f60ff19ea3",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "53c5c6fe-6026-4ffa-aeba-6e6600867d18",
    "MerchantId": "71db95d0-d98a-4119-8d03-6e9c3ff2f8a1",
    "AppId": "e1d47f93-871b-48cb-88a3-6bc11608e884",
    "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:56:11.3395712+00:00",
    "EndDate": "2018-12-12T05:56:11.3395712+00:00",
    "ExpiryDate": "2018-12-12T05:56:11.3395712+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-12-12T05:56:11.3395712+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "7e34ecf8-d0d1-4bcd-865c-12e7cf801ac2",
      "PlanId": "1107f97c-8c8d-461f-bab3-372ce6da58d9",
      "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-12-12T05:56:11.3395712+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-12-12T05:56:11.3395712+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": "1c727271-4c12-4279-9ce7-41e4720d6b10",
        "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": "89289bd5-7e2e-4a4f-b8ad-547ad37d157f",
          "MerchantId": "2a942608-f649-4c33-ba85-8194f8fe47ee",
          "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": "3"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "7"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "038ae582-ab6b-41c3-aade-cc7388c5d91a",
      "MerchantId": "0f6516ba-2eda-4b2e-a940-c1a2d929b376",
      "KeyId": "fd181d4d-6830-4675-9427-a20609a3f53f",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-12-12T05:56:11.3395712+00:00",
      "Modified": "2018-12-12T05:56:11.3395712+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "ec36c64c-ba1c-4a51-91bc-83ad9e466ac1",
        "MerchantId": "cd120459-5722-45b3-a1a6-464ce9ba89dc",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-12-12T05:56:11.3395712+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "806648e9-4922-4c8b-9108-ae614059e6d7",
        "FromConsumerId": "c45d6647-a2ff-4919-9a1d-6d76873b521e",
        "ToConsumerId": "048e0ef9-43cb-4fbd-a682-bd1cd4386452",
        "OfferId": "79b1cf27-f223-47b8-afba-dd2e72a68105",
        "Redeemed": true,
        "Timestamp": "2018-12-12T05:56:11.3395712+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-12-12T05:56:11.3395712+00:00",
        "MerchantLocationId": "2f19c704-9fc4-4c7f-9482-1619f5225f55",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "5fa70f2d-2826-42a8-bbf9-4ce847043c33",
          "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": "99d823af-11cd-46f2-b674-03aaa6acf57a",
  "OfferId": "3aa9b571-7558-4ca8-be8f-aacfad8530b3",
  "MerchantLocationId": "e9d522a8-1dfa-43e5-bfc1-985f586de7c9",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "c7fe5c47-2d9a-412d-ae89-a56cd5d7c572",
    "MerchantId": "0f28dfbc-6b69-443f-ac78-4af179c5351d",
    "AppId": "d306d4fa-37ab-4ea6-8f88-707467bc2676",
    "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:56:11.4803523+00:00",
    "EndDate": "2018-12-12T05:56:11.4803523+00:00",
    "ExpiryDate": "2018-12-12T05:56:11.4803523+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-12-12T05:56:11.4803523+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "dabcbc44-1f4f-4f44-87a5-bf74967c3f3a",
      "PlanId": "be72dfa5-4f0b-4f5c-8239-782c7d1fd33a",
      "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-12-12T05:56:11.4803523+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-12-12T05:56:11.4803523+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": "9c253130-08bd-4cb5-bab2-f74d7f78ae2f",
        "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": "335cef39-c533-4ab1-837e-a35d006922e8",
          "MerchantId": "d1328a8b-2a96-4613-928a-a1a82c446300",
          "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": "3"
          },
          "CompleteAddress": "sample string 5, sample string 6, sample string 7, sample string 8, sample string 9"
        },
        {
          "$ref": "7"
        }
      ]
    },
    "App": {
      "$id": "8",
      "Id": "d941d541-24f2-47df-b6b5-7f78dd535346",
      "MerchantId": "cd797f30-3040-45ab-b647-6b780e5c3cd4",
      "KeyId": "3938be48-6585-4bbd-8d3b-ac8a9587211a",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-12-12T05:56:11.4803523+00:00",
      "Modified": "2018-12-12T05:56:11.4803523+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "bd1e979b-801a-4a13-8b7a-a2108974fc34",
        "MerchantId": "020df1d5-7d76-4ed0-94cb-aa567684f233",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-12-12T05:56:11.4803523+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "6542c40c-81bb-4b12-a24b-99508b9277f4",
        "FromConsumerId": "75191848-c29c-4dcf-b49d-9fd885be8f9f",
        "ToConsumerId": "2dd1702c-c192-415a-9c3c-a7fabbe19805",
        "OfferId": "640acce3-6090-44dc-8ea0-e9efdb35c356",
        "Redeemed": true,
        "Timestamp": "2018-12-12T05:56:11.4803523+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-12-12T05:56:11.4803523+00:00",
        "MerchantLocationId": "6b549434-2739-42da-abcb-c49b4134c43b",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "9356581e-4160-444f-a27c-d995600dd5d7",
          "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.