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": "045be6ad-e765-4053-83cc-a1944cc3fa5e",
  "OfferId": "304b05fe-7478-4698-bdec-2eb7e52abb17",
  "MerchantLocationId": "a460232c-70db-4d9d-a77a-bbe581cdd1e1",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "6e2e79ee-fef6-406d-8585-a0359fed2f29",
    "MerchantId": "1d858fdd-5a08-414b-a6d7-8682e76d6e5e",
    "AppId": "85cd6aa7-f79b-4498-a17d-2fbf027bab5d",
    "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": "2019-03-21T01:55:26.8794073+00:00",
    "EndDate": "2019-03-21T01:55:26.8794073+00:00",
    "ExpiryDate": "2019-03-21T01:55:26.8794073+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2019-03-21T01:55:26.8794073+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "7d4e0f5e-0652-43b3-811b-81b50fa2abbf",
      "PlanId": "caddd0bb-e851-4799-88d2-ef9a87de3419",
      "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": "2019-03-21T01:55:26.8794073+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2019-03-21T01:55:26.8794073+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": "f1776876-35d4-4d2f-9f56-1eb392b51b38",
        "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": "30f63697-fb6e-41e4-afc6-b5d566df20d0",
          "MerchantId": "ed574af6-c245-4ab7-9ea1-0a0cc8944a34",
          "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": "e2f0ae7b-a2a5-4013-8213-55214e66f1c3",
      "MerchantId": "d78ebe29-0cf2-4490-af6e-dd4494a12f4f",
      "KeyId": "e3f79167-1b80-4d72-b5bd-ff461ff6d7de",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2019-03-21T01:55:26.8794073+00:00",
      "Modified": "2019-03-21T01:55:26.8794073+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "e349227f-2cbf-49b3-ae41-37b4b467df86",
        "MerchantId": "1efe8c39-f90c-42ee-85ea-5603b1cdaa6f",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2019-03-21T01:55:26.8794073+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "5c0b3af1-9dfc-4d70-aa4f-b16d9b1749d8",
        "FromConsumerId": "71eb71b1-36a7-4ba4-816b-7cb40f2e36bf",
        "ToConsumerId": "106db156-e275-47ac-a685-5a8b8c3cbd14",
        "OfferId": "398c068b-a5b2-4ca3-b252-627c18195807",
        "Redeemed": true,
        "Timestamp": "2019-03-21T01:55:26.8794073+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2019-03-21T01:55:26.8794073+00:00",
        "MerchantLocationId": "73e5ca22-b158-408a-9fd0-d2c59081ca59",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "cd13a585-d340-4efe-a7cb-278049f03a89",
          "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": "2ad472e2-e909-4f00-b8dd-916b0b86346c",
  "OfferId": "0b07a080-6120-43f8-a1ca-8416b2f7203c",
  "MerchantLocationId": "7a3ebd42-0bd4-4091-8aa1-ded6273a64d6",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "53cc672d-c4d2-4025-8351-378424ef863c",
    "MerchantId": "85687b59-4090-4de9-a581-0b8b25c23f23",
    "AppId": "3bb3aaba-6451-4547-a253-cb3257c8d000",
    "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": "2019-03-21T01:55:27.0356553+00:00",
    "EndDate": "2019-03-21T01:55:27.0356553+00:00",
    "ExpiryDate": "2019-03-21T01:55:27.0356553+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2019-03-21T01:55:27.0356553+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "4c8b98ac-2d0c-4903-8dfc-46afdd1ad0fb",
      "PlanId": "f38b8a30-2fe3-4560-8be3-b5c631e5a22e",
      "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": "2019-03-21T01:55:27.0356553+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2019-03-21T01:55:27.0356553+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": "f0360dfe-ea11-479a-bbb8-a652d1ab1f85",
        "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": "2a2b014f-7482-4c7a-9929-66ba7541375b",
          "MerchantId": "11b102d5-59ab-4466-a0de-ad74d55298b7",
          "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": "c59f9b9b-155e-4315-9ed8-52b33163aa9c",
      "MerchantId": "a6855771-88de-4b4f-b38b-f6a0634d739d",
      "KeyId": "25442569-7528-4edf-a514-44074fa4b6b7",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2019-03-21T01:55:27.0356553+00:00",
      "Modified": "2019-03-21T01:55:27.0356553+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "47a69a06-64ab-4207-944a-7227e2d99370",
        "MerchantId": "5c99fa33-854f-4151-b266-1ee7e89a3c89",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2019-03-21T01:55:27.0356553+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "1bee2ac8-80bc-4aca-b7a2-853fbb2423f1",
        "FromConsumerId": "659f8a10-7bea-4f06-890b-1c3aa8c01094",
        "ToConsumerId": "90277280-fecf-44a7-b7b0-4d14c3edf6df",
        "OfferId": "a9b4cb49-1feb-486e-a545-5e3eece143b6",
        "Redeemed": true,
        "Timestamp": "2019-03-21T01:55:27.0356553+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2019-03-21T01:55:27.0356553+00:00",
        "MerchantLocationId": "7d81234d-4636-46cc-84c8-85e934ef897d",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "9379a898-51e1-4fed-a78a-c7de61b84f7a",
          "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.