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": "975db688-98e7-4d54-80b0-274137bb6b9e",
  "OfferId": "9e9e8848-ab2b-4cb5-b1f5-1fee5f92ec4e",
  "MerchantLocationId": "5ff48a25-27b6-4435-820e-4664d5fc93a8",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "2260d843-a299-4729-8444-bd4eba9961d5",
    "MerchantId": "f3a602f6-6e25-47a6-b051-86001538fd06",
    "AppId": "171a1c26-7152-47ad-adaf-515a7629ab65",
    "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-09-20T13:15:58.7191363+00:00",
    "EndDate": "2018-09-20T13:15:58.7191363+00:00",
    "ExpiryDate": "2018-09-20T13:15:58.7191363+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-09-20T13:15:58.7191363+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "35e9846e-3b06-43b2-91b5-5c3ff0e41be1",
      "PlanId": "54d52e7c-62ca-42a9-8fa2-e16cf42484be",
      "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-09-20T13:15:58.7191363+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-09-20T13:15:58.7191363+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": "abd2a8ef-1005-4a72-96b5-cb2207e9545f",
        "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": "e65c8149-759f-4c9b-9023-000dc44c9c6f",
          "MerchantId": "ac18b26c-a62c-4d2b-ad13-4867d878458d",
          "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,
          "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": "df68db8c-daef-41fd-80b7-a7fe9b76ebae",
      "MerchantId": "f1f4e906-f10d-44eb-b773-94c1579a12d8",
      "KeyId": "92cd783b-3908-48a2-b41d-6217e7c6acc5",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-09-20T13:15:58.7191363+00:00",
      "Modified": "2018-09-20T13:15:58.7191363+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "80897549-f27a-4325-8982-0d692edad2ab",
        "MerchantId": "ab642313-31ee-4113-9100-6735082db091",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-09-20T13:15:58.7191363+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "1d842fdf-3b5a-4f0c-8baa-17f77d042620",
        "FromConsumerId": "831a5ec1-5475-47cc-bfb4-805a5ed082cc",
        "ToConsumerId": "65f7e480-72f2-4e36-84f2-235c894418e1",
        "OfferId": "3e5b6f32-4e39-486c-b9f1-4b7867e763bb",
        "Redeemed": true,
        "Timestamp": "2018-09-20T13:15:58.7191363+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-09-20T13:15:58.7191363+00:00",
        "MerchantLocationId": "7f48b8d1-fc4f-49e8-a7cc-b0c7f2ed5474",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "72c8f088-b965-45c0-bf42-241dfd1bb17b",
          "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": "2719aa55-25e0-4e6f-9b18-b5175707153b",
  "OfferId": "cfb0ce06-e93a-4356-8e4f-c4f0fd2bb178",
  "MerchantLocationId": "f5e7c10f-a23f-4fec-9dc6-b687f12a4b6b",
  "Deleted": true,
  "Offer": {
    "$id": "2",
    "Id": "ca7d833c-23e5-4df0-8d2e-bd4d4af74fe7",
    "MerchantId": "fc98a968-ae5b-44bf-af55-b5c2fc449a3f",
    "AppId": "2857b0db-cae2-466a-803e-4bea5d770649",
    "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-09-20T13:15:58.8317138+00:00",
    "EndDate": "2018-09-20T13:15:58.8317138+00:00",
    "ExpiryDate": "2018-09-20T13:15:58.8317138+00:00",
    "Limited": true,
    "RedemptionLimit": 10,
    "Share": true,
    "Created": "2018-09-20T13:15:58.8317138+00:00",
    "Deleted": true,
    "Published": true,
    "OfferImage": "sample string 14",
    "Pause": true,
    "Private": true,
    "Merchant": {
      "$id": "3",
      "Id": "d92fc977-2727-49d0-a829-54a992731ed0",
      "PlanId": "84d2f731-d226-40b6-9566-fd9cce8b99d2",
      "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-09-20T13:15:58.8317138+00:00",
        "RegistrationCompleted": true,
        "LastLogin": "2018-09-20T13:15:58.8317138+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": "d70a1396-dfc5-4e1f-bb56-d05f4dccb213",
        "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": "ca29eda3-cfdc-4ed4-9988-bde3660d983a",
          "MerchantId": "8b92e982-9d46-41d7-b99c-f09bf68baade",
          "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,
          "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": "dc312a2f-77a7-4315-a845-37fd200303d0",
      "MerchantId": "e8dcf235-e5a9-4cf3-88ba-4e5fb9872258",
      "KeyId": "e2154a09-36ad-4935-be5d-4e234775f45c",
      "Name": "sample string 4",
      "Description": "sample string 5",
      "Created": "2018-09-20T13:15:58.8317138+00:00",
      "Modified": "2018-09-20T13:15:58.8317138+00:00",
      "Photo": "sample string 7",
      "Deleted": true,
      "Merchant": {
        "$ref": "3"
      },
      "Key": {
        "$id": "9",
        "Id": "1cb7102e-6f70-45b6-a5c7-0279685e2ee0",
        "MerchantId": "ca43450a-edc1-4eab-8cd7-fc4141007098",
        "Name": "sample string 3",
        "SecretKey": "sample string 4",
        "Created": "2018-09-20T13:15:58.8317138+00:00",
        "Deleted": true,
        "Assigned": true,
        "Merchant": {
          "$ref": "3"
        }
      }
    },
    "Shares": [
      {
        "$id": "10",
        "Id": "62efa5b4-3e30-49fc-a2e7-931a09adf667",
        "FromConsumerId": "c0ceb63f-38a5-4c89-97fe-8a1920b3ce75",
        "ToConsumerId": "88796d3d-6784-400e-98ee-18ada54e7a28",
        "OfferId": "7a6bdd88-26fc-4aa2-9ba6-20c3163b8bde",
        "Redeemed": true,
        "Timestamp": "2018-09-20T13:15:58.8317138+00:00",
        "ReceiptImage": "sample string 4",
        "TotalAmount": "sample string 5",
        "RedeemedOn": "2018-09-20T13:15:58.8317138+00:00",
        "MerchantLocationId": "b9dc1195-d18c-4ad2-9f9c-1394a6e729fd",
        "UserName": "sample string 6",
        "Consumer": {
          "$id": "11",
          "Id": "93614a53-2ce6-4749-825d-75b9bb251d12",
          "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.