---
title: Search Offers
slug: mihai-tests/search-offers
createdAt: 2025-05-02T10:16:35.480Z
---

{
  "id": "q9Ufaro4rGJKNCTpwSRnG",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers.search",
    "servers": [
      {
        "url": "https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers.search",
        "description": "triple Sandbox"
      }
    ],
    "name": "Search Offers",
    "description": "<p>Search for offers, optionally by category.</p>\n<p>Providing a <code>latitude</code> and <code>longitude</code> for <strong><code>proximity_target</code> is highly\nencouraged.</strong> Doing so allows Triple to deliver the most relevant Offers\nand Merchant Locations.</p>\n<p>The default behavior of this endpoint is the null query, which fetches\ntriple offers recommendations based on a Customer's geo-location,\ntransaction history, and offer interactions.</p>\n<p>However, a Customer can also search directly for offers with ad hoc text\nqueries and/or by faceting on offer category. This action replaces the\nnull query with search terms and/or one or more offer category facets.\nFor example, a Customer may search for 'italian food' in plain text and\nselect the 'FOOD' offer category facet.</p>\n<p>Search results are paginated, using the <code>page_size</code> and <code>page_offset</code>\nparameters. For example, page_size=10 and page_offset=30 corresponds to\nthe 4th page of 10 offers.</p>\n<p>Note that Offer Display Rules are enforced against all search results.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "cardholder_id",
          "type": "object",
          "example": "triple-abc-123",
          "description": "The triple-defined ID for the entity.",
          "customType": "EntityId",
          "schema": [],
          "modelRef": "#/components/schemas/EntityId"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "apply_filter",
              "kind": "optional",
              "type": "object",
              "description": "Applies a search filter.\n\nIf more than one filter property is specified, the filter condition\nis expressed as an AND of the specified filter properties.\n",
              "modelRef": "#/components/schemas/ApplyFilter",
              "customType": "ApplyFilter",
              "schema": [
                {
                  "name": "category",
                  "kind": "optional",
                  "type": "string",
                  "description": "**triple Offer Category**",
                  "modelRef": "#/components/schemas/TripleOfferCategory",
                  "customType": "TripleOfferCategory",
                  "schema": []
                },
                {
                  "name": "exclude_offer_ids",
                  "kind": "optional",
                  "type": "array",
                  "description": "The triple-defined ID for the entity.",
                  "modelRef": "#/components/schemas/EntityId",
                  "customType": "EntityId[]",
                  "schema": []
                },
                {
                  "name": "include_offer_ids",
                  "kind": "optional",
                  "type": "array",
                  "description": "The triple-defined ID for the entity.",
                  "modelRef": "#/components/schemas/EntityId",
                  "customType": "EntityId[]",
                  "schema": []
                },
                {
                  "name": "mode",
                  "kind": "optional",
                  "type": "string",
                  "description": "The offer delivery mode",
                  "modelRef": "#/components/schemas/OfferMode",
                  "customType": "OfferMode",
                  "schema": []
                },
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string",
                  "description": "The type of offer - card-linked, affiliate, categorical, etc.\n",
                  "modelRef": "#/components/schemas/OfferType",
                  "customType": "OfferType",
                  "schema": []
                },
                {
                  "name": "activation_required",
                  "kind": "optional",
                  "type": "boolean",
                  "description": "Include/Exclude offers that require activation\n",
                  "modelRef": "#/components/schemas/ActivationRequired",
                  "customType": "ActivationRequired",
                  "schema": []
                }
              ]
            },
            {
              "name": "crowding_parameters",
              "kind": "optional",
              "type": "object",
              "description": "Crowding parameters control the maximum number of consecutive offers\nthat may share the same characteristic.\n\n**Supported parameters include**:\n\n**- mode:** ONLINE or IN_PERSON\n\n**- category:** RETAIL, FOOD, etc.\n\n**- merchant:** 'ACME inc.', 'Big Multinational Brand', etc.\n\n\n**NOTE:** Crowding maximums may be exceeded depending on the availability of\nrelevant replacement offers for any given query. Crowding maximums do not\napply for a particular offer characteristic if a search query filter is applied\nto that characterstic. (e.g. Filtering on mode: ONLINE will return exclusively\nONLINE results, even if a crowding parameter for mode is specified.)\n",
              "modelRef": "#/components/schemas/CrowdingParameters",
              "customType": "CrowdingParameters",
              "schema": [
                {
                  "name": "category",
                  "kind": "optional",
                  "type": "integer",
                  "example": 0
                },
                {
                  "name": "merchant",
                  "kind": "optional",
                  "type": "integer",
                  "example": 0
                },
                {
                  "name": "mode",
                  "kind": "optional",
                  "type": "integer",
                  "example": 0
                }
              ]
            },
            {
              "name": "page_offset",
              "kind": "optional",
              "type": "integer",
              "description": "The beginning index for the current page of offers.",
              "example": 0,
              "default": 0
            },
            {
              "name": "page_size",
              "kind": "optional",
              "type": "integer",
              "description": "The number of offers returned for the current page of search results.\n",
              "example": 0,
              "default": 25
            },
            {
              "name": "proximity_target",
              "kind": "optional",
              "type": "object",
              "description": "The Geo-coordinates for the end-user's location,\ngiven as `latitude` and `longitude` values or as approximate location\nparameters.\n\nIf providing postal_code, country_code is required and must be set to US,\nas only US ZIP codes are currently supported.\n\nIf providing `latitude` and `longitude`, both fields must be set.\n\nIf no location is provided, the default postal code for the Card Account or\nCard Program is used.\n",
              "modelRef": "#/components/schemas/GeoTarget",
              "customType": "GeoTarget",
              "schema": [
                {
                  "name": "country_code",
                  "kind": "optional",
                  "type": "string",
                  "description": "2-letter ISO-3166 country code",
                  "example": "US",
                  "modelRef": "#/components/schemas/CountryCode",
                  "customType": "CountryCode",
                  "schema": []
                },
                {
                  "name": "latitude",
                  "kind": "optional",
                  "type": "number",
                  "description": "",
                  "example": 40.440624,
                  "modelRef": "#/components/schemas/Latitude",
                  "customType": "Latitude",
                  "schema": []
                },
                {
                  "name": "longitude",
                  "kind": "optional",
                  "type": "number",
                  "description": "",
                  "example": -79.995888,
                  "modelRef": "#/components/schemas/Longitude",
                  "customType": "Longitude",
                  "schema": []
                },
                {
                  "name": "postal_code",
                  "kind": "optional",
                  "type": "string",
                  "description": "ZIP Code™, ZIP+4, or postal code",
                  "example": "15206",
                  "modelRef": "#/components/schemas/PostalCode",
                  "customType": "PostalCode",
                  "schema": []
                },
                {
                  "name": "radius",
                  "kind": "optional",
                  "type": "integer",
                  "description": "The distance in meters from the provided location.\n\nDefault value of `35000m` is adjusted according to population density\nof a location (ie. Rural locations will target a broader search radius\nthan urban locations).\n",
                  "default": 35000,
                  "modelRef": "#/components/schemas/Radius",
                  "customType": "Radius",
                  "schema": []
                }
              ]
            },
            {
              "name": "text_query",
              "kind": "optional",
              "type": "string",
              "description": "Text query used to search offers.\n",
              "example": "italian food"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Offers",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "offers",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/CardholderOfferPreview",
                "customType": "CardholderOfferPreview[]",
                "schema": [],
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "CardholderOfferCore",
                    "description": "",
                    "modelRef": "#/components/schemas/CardholderOfferCore",
                    "schema": [
                      {
                        "name": "activation_required",
                        "kind": "required",
                        "type": "boolean",
                        "description": "Indicates whether or not a cardholder must activate this offer prior\nto transacting and qualifying for the offer reward.\n\nIf true, transactions that occur prior to the date of the cardholder\nactivating the offer will not qualify for the offer's reward.\n",
                        "modelRef": "#/components/schemas/OfferActivationIsRequired",
                        "customType": "OfferActivationIsRequired",
                        "schema": []
                      },
                      {
                        "name": "external_id",
                        "kind": "required",
                        "type": "object",
                        "description": "Partner-provided, external ID for an Offer.\n\nExternal IDs should be **stable** and **never sensitive**.\n\nExternal IDs do not need to be globally unique, but we encourage\nthe use of UUIDs. They must be unique for the Offer within\nthe scope of its parent Content Provider.\n\nTo protect against accidental inclusion of sensitive personal\ninformation, external IDs may not be 9-digit numbers or use the\nUS Tax ID format (###-##-####).\n",
                        "modelRef": "#/components/schemas/OfferExternalId",
                        "customType": "OfferExternalId",
                        "schema": [],
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "ExternalId",
                            "description": "",
                            "modelRef": "#/components/schemas/ExternalId",
                            "schema": []
                          }
                        ]
                      },
                      {
                        "name": "category",
                        "kind": "required",
                        "type": "string",
                        "description": "**triple Offer Category**",
                        "modelRef": "#/components/schemas/TripleOfferCategory",
                        "customType": "TripleOfferCategory",
                        "schema": []
                      },
                      {
                        "name": "currency_code",
                        "kind": "required",
                        "type": "string",
                        "description": "3-character ISO-4217 currency code. Only USD is currently supported.\n\nContact your Triple representative for support with additional\ncurrencies.  Note that some values are not supported, particularly\ntest and fund codes.\n",
                        "example": "USD",
                        "default": "USD",
                        "modelRef": "#/components/schemas/CurrencyCode",
                        "customType": "CurrencyCode",
                        "schema": []
                      },
                      {
                        "name": "effective_date",
                        "kind": "required",
                        "type": "string",
                        "description": "The first date on which the offer is valid.",
                        "example": "2021-12-01",
                        "modelRef": "#/components/schemas/OfferEffectiveDate",
                        "customType": "OfferEffectiveDate",
                        "schema": []
                      },
                      {
                        "name": "expiration_date",
                        "kind": "optional",
                        "type": "string",
                        "description": "If specified, the last date on which the offer is valid.",
                        "example": "2021-12-31",
                        "modelRef": "#/components/schemas/OfferExpirationDate",
                        "customType": "OfferExpirationDate",
                        "schema": []
                      },
                      {
                        "name": "headline",
                        "kind": "required",
                        "type": "string",
                        "description": "The headline or title for the offer, appropriate for top-level\ndisplay.\n",
                        "modelRef": "#/components/schemas/OfferHeadline",
                        "customType": "OfferHeadline",
                        "schema": []
                      },
                      {
                        "name": "id",
                        "kind": "required",
                        "type": "string",
                        "description": "The triple-defined ID for the entity.",
                        "example": "triple-abc-123",
                        "modelRef": "#/components/schemas/EntityId",
                        "customType": "EntityId",
                        "schema": []
                      },
                      {
                        "name": "is_activated",
                        "kind": "required",
                        "type": "boolean",
                        "description": "**True** if an offer requires activation and has a valid activation.\n\n- Offers that are 'always on' (no activation required) are set\nto **False**.\n\n- Offers with an expired activation are set to **False**.\n- Offers that have never been activated are set to **False**.\n",
                        "modelRef": "#/components/schemas/OfferIsActivated",
                        "customType": "OfferIsActivated",
                        "schema": []
                      },
                      {
                        "name": "activated_at",
                        "kind": "optional",
                        "type": "string",
                        "description": "If specified, the absolute time in ISO format for when the offer was\nactivated or re-activated.\n",
                        "example": "2022-07-15T15:56:36+0000",
                        "modelRef": "#/components/schemas/OfferActivatedAt",
                        "customType": "OfferActivatedAt",
                        "schema": []
                      },
                      {
                        "name": "activation_expires_at",
                        "kind": "optional",
                        "type": "string",
                        "description": "If specified, the absolute time in ISO format for when the offer\nactivation expires.\n",
                        "example": "2022-07-22T15:56:36+0000",
                        "modelRef": "#/components/schemas/OfferActivationExpiresAt",
                        "customType": "OfferActivationExpiresAt",
                        "schema": []
                      },
                      {
                        "name": "merchant_logo_url",
                        "kind": "optional",
                        "type": "string",
                        "description": "A link to the merchant's logo",
                        "modelRef": "#/components/schemas/MerchantLogoUrl",
                        "customType": "MerchantLogoUrl",
                        "schema": []
                      },
                      {
                        "name": "merchant_name",
                        "kind": "required",
                        "type": "string",
                        "description": "The (doing-business-as) name of the Merchant.",
                        "modelRef": "#/components/schemas/MerchantAssumedName",
                        "customType": "MerchantAssumedName",
                        "schema": []
                      },
                      {
                        "name": "merchant_website",
                        "kind": "optional",
                        "type": "string",
                        "description": "",
                        "modelRef": "#/components/schemas/MerchantWebsite",
                        "customType": "MerchantWebsite",
                        "schema": []
                      },
                      {
                        "name": "minimum_spend",
                        "kind": "optional",
                        "type": "number",
                        "description": "The minimum monetary value that a cardholder must spend for a\ntransaction to qualify for this offer.\n",
                        "modelRef": "#/components/schemas/OfferMinimumSpend",
                        "customType": "OfferMinimumSpend",
                        "schema": []
                      },
                      {
                        "name": "offer_mode",
                        "kind": "required",
                        "type": "string",
                        "description": "The offer delivery mode",
                        "modelRef": "#/components/schemas/OfferMode",
                        "customType": "OfferMode",
                        "schema": []
                      },
                      {
                        "name": "offer_preference",
                        "kind": "required",
                        "type": "string",
                        "description": "",
                        "modelRef": "#/components/schemas/OfferPreference",
                        "customType": "OfferPreference",
                        "schema": []
                      },
                      {
                        "name": "reward_rate",
                        "kind": "optional",
                        "type": "number",
                        "description": "The reward percentage if this offer has a reward_type\nof percentage, the amount will be between 0.0 and 100.0\n",
                        "modelRef": "#/components/schemas/OfferRewardRate",
                        "customType": "OfferRewardRate",
                        "schema": []
                      },
                      {
                        "name": "reward_type",
                        "kind": "required",
                        "type": "string",
                        "description": "Indicates whether this offer is for a fixed or percentage-based\namount.\n",
                        "modelRef": "#/components/schemas/OfferRewardType",
                        "customType": "OfferRewardType",
                        "schema": []
                      },
                      {
                        "name": "reward_value",
                        "kind": "optional",
                        "type": "number",
                        "description": "The fixed reward value if this offer has a reward_type\nof fixed, the amount must be greater than or equal to 0.\n",
                        "modelRef": "#/components/schemas/OfferRewardValue",
                        "customType": "OfferRewardValue",
                        "schema": []
                      },
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "The type of offer - card-linked, affiliate, categorical, etc.\n",
                        "modelRef": "#/components/schemas/OfferType",
                        "customType": "OfferType",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "object",
                    "description": "",
                    "schema": [
                      {
                        "name": "nearest_location",
                        "kind": "optional",
                        "type": "object",
                        "description": "A location is **IN_PERSON_AND_ONLINE** or **IN_PERSON**.\n\n**IN_PERSON_AND_ONLINE** locations have a physical address and a url.\n**IN_PERSON**. locations have a physical address but no url.\n\nNo locations are available for **ONLINE** offers.\n",
                        "modelRef": "#/components/schemas/CardholderOfferLocation",
                        "customType": "CardholderOfferLocation",
                        "schema": [
                          {
                            "name": "address",
                            "kind": "required",
                            "type": "object",
                            "description": "A physical address in the world, with required fields.\n\ntriple uses address validation services to update and standardize\naddresses on our platform. Address data sent to the API may be updated\nas we process, validate, and normalize addresses.\n",
                            "modelRef": "#/components/schemas/StrictAddress",
                            "customType": "StrictAddress",
                            "schema": [],
                            "complexType": "allOf",
                            "complexItems": [
                              {
                                "name": "Address",
                                "description": "",
                                "modelRef": "#/components/schemas/Address",
                                "schema": [
                                  {
                                    "name": "city",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "Municipality or city name",
                                    "example": "PITTSBURGH"
                                  },
                                  {
                                    "name": "complete",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "The complete delivery address, composed from the Address properties.\n",
                                    "example": "7370 BAKER ST, STE 100\nPITTSBURGH, PA 15206",
                                    "modelRef": "#/components/schemas/CompleteAddress",
                                    "customType": "CompleteAddress",
                                    "schema": []
                                  },
                                  {
                                    "name": "country_code",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "2-letter ISO-3166 country code",
                                    "example": "US",
                                    "modelRef": "#/components/schemas/CountryCode",
                                    "customType": "CountryCode",
                                    "schema": []
                                  },
                                  {
                                    "name": "country_subdivision_code",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "ISO-3166-2; 2-6 letter code for a country subdivision",
                                    "example": "PA"
                                  },
                                  {
                                    "name": "latitude",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "",
                                    "example": 40.440624,
                                    "modelRef": "#/components/schemas/Latitude",
                                    "customType": "Latitude",
                                    "schema": []
                                  },
                                  {
                                    "name": "longitude",
                                    "kind": "optional",
                                    "type": "number",
                                    "description": "",
                                    "example": -79.995888,
                                    "modelRef": "#/components/schemas/Longitude",
                                    "customType": "Longitude",
                                    "schema": []
                                  },
                                  {
                                    "name": "postal_code",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "ZIP Code™, ZIP+4, or postal code",
                                    "example": "15206",
                                    "modelRef": "#/components/schemas/PostalCode",
                                    "customType": "PostalCode",
                                    "schema": []
                                  },
                                  {
                                    "name": "street_address",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "Single or multi-line physical address\n",
                                    "example": "7370 BAKER ST, STE 100\n"
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "name": "distance",
                            "kind": "optional",
                            "type": "number",
                            "description": "Distance, in kilometers, from the caller's location",
                            "example": ""
                          },
                          {
                            "name": "email",
                            "kind": "optional",
                            "type": "string",
                            "description": "An email address for the location.",
                            "example": ""
                          },
                          {
                            "name": "id",
                            "kind": "required",
                            "type": "string",
                            "description": "The triple-defined ID for the entity.",
                            "example": "triple-abc-123",
                            "modelRef": "#/components/schemas/EntityId",
                            "customType": "EntityId",
                            "schema": []
                          },
                          {
                            "name": "is_in_radius",
                            "kind": "required",
                            "type": "boolean",
                            "description": "The Offer MerchantLocation is within the Cardholder's search radius\n",
                            "example": ""
                          },
                          {
                            "name": "location_name",
                            "kind": "optional",
                            "type": "string",
                            "description": "The store location's name",
                            "example": "Peter Piper's Pizza - South Evermore"
                          },
                          {
                            "name": "phone_number",
                            "kind": "optional",
                            "type": "string",
                            "description": "A phone number for the location.",
                            "example": ""
                          },
                          {
                            "name": "url",
                            "kind": "optional",
                            "type": "string<url>",
                            "example": ""
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "name": "total",
                "kind": "required",
                "type": "number",
                "description": "The total number of offers available for the given query.",
                "modelRef": "#/components/schemas/OfferSearchResultsTotal",
                "customType": "OfferSearchResultsTotal",
                "schema": []
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "TripleBadRequestError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request is malformed."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleBadRequestError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "TripleNotAuthenticatedError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "Client authentication failed."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleNotAuthenticatedError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "TripleInvalidPathError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The url path or path parameter is invalid."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleInvalidPathError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "TripleIntegrityError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request was well-formed but violated entity integrity constraints."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleIntegrityError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "415",
        "description": "TripleUnsupportedMediaType",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request defined an unsupported media type."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleUnsupportedMediaType>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "TripleUnprocessableEntity",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request was well-formed but could not be processed."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleUnprocessableEntity>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "TripleInternalServerError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "Triple was unable to process the request due to an internal error."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleInternalServerError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "501",
        "description": "TripleNotImplementedError",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request failed because it requires a feature that is not yet implemented."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleNotImplementedError>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "503",
        "description": "TripleServiceUnavailable",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "status_code",
                "kind": "required",
                "type": "integer",
                "description": "The 3-digit HTTP Response Status code",
                "example": 0
              },
              {
                "name": "content",
                "kind": "required",
                "type": "object",
                "description": "The error response content.",
                "example": "",
                "schema": [
                  {
                    "name": "details",
                    "kind": "optional",
                    "type": "array",
                    "description": "An array of error detail",
                    "modelRef": "#/components/schemas/ErrorResponseDetails",
                    "customType": "ErrorResponseDetails",
                    "schema": []
                  },
                  {
                    "name": "error_message",
                    "kind": "required",
                    "type": "string",
                    "description": "Short description of what went wrong.",
                    "example": "",
                    "default": "The request failed due to a triple service interruption."
                  },
                  {
                    "name": "exception",
                    "kind": "required",
                    "type": "string<TripleServiceUnavailable>",
                    "description": "The exception type.",
                    "example": ""
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers.search \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"page_size\": 25,\n     \"proximity_target\": {\n     \"radius\": 35000\n     }\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"page_size\": 25,\n   \"proximity_target\": {\n      \"radius\": 35000\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers.search\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers.search\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"page_size\": 25,\n   \"proximity_target\": {\n      \"radius\": 35000\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.sandbox.tripleup.dev/partner/card-accounts/{cardholder_id}/offers.search\"\n\npayload = json.dumps({\n   \"page_size\": 25,\n   \"proximity_target\": {\n      \"radius\": 35000\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Offers\n{\n  \"offers\": {},\n  \"total\": 0\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// TripleBadRequestError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// TripleNotAuthenticatedError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// TripleInvalidPathError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-4-409",
          "language": "409",
          "code": "// TripleIntegrityError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-5-415",
          "language": "415",
          "code": "// TripleUnsupportedMediaType\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-6-422",
          "language": "422",
          "code": "// TripleUnprocessableEntity\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-7-500",
          "language": "500",
          "code": "// TripleInternalServerError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-8-501",
          "language": "501",
          "code": "// TripleNotImplementedError\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        },
        {
          "id": "response-9-503",
          "language": "503",
          "code": "// TripleServiceUnavailable\n{\n  \"status_code\": 0,\n  \"content\": {\n    \"details\": [\n      \"\"\n    ],\n    \"error_message\": \"\",\n    \"exception\": \"\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "dM9uzD4dvGtOaXPP3EZVu",
      "type": "paragraph",
      "children": [
        {
          "text": "Search for offers, optionally by category."
        }
      ]
    },
    {
      "id": "Vdty5NOuopxdoWADzN-V5",
      "type": "paragraph",
      "children": [
        {
          "text": "Providing a "
        },
        {
          "text": "latitude",
          "highlight": true
        },
        {
          "text": " and "
        },
        {
          "text": "longitude",
          "highlight": true
        },
        {
          "text": " for "
        },
        {
          "text": " is highly\nencouraged.",
          "bold": true
        },
        {
          "text": " Doing so allows Triple to deliver the most relevant Offers\nand Merchant Locations."
        }
      ]
    },
    {
      "id": "FmTCJr6TP2WCcOo2j36mA",
      "type": "paragraph",
      "children": [
        {
          "text": "The default behavior of this endpoint is the null query, which fetches\ntriple offers recommendations based on a Customer's geo-location,\ntransaction history, and offer interactions."
        }
      ]
    },
    {
      "id": "r34mkVFcbfeSefvH5qIP2",
      "type": "paragraph",
      "children": [
        {
          "text": "However, a Customer can also search directly for offers with ad hoc text\nqueries and/or by faceting on offer category. This action replaces the\nnull query with search terms and/or one or more offer category facets.\nFor example, a Customer may search for 'italian food' in plain text and\nselect the 'FOOD' offer category facet."
        }
      ]
    },
    {
      "id": "WYy5wxUDMX5s1gj7neaDM",
      "type": "paragraph",
      "children": [
        {
          "text": "Search results are paginated, using the "
        },
        {
          "text": "page_size",
          "highlight": true
        },
        {
          "text": " and "
        },
        {
          "text": "page_offset",
          "highlight": true
        },
        {
          "text": "\nparameters. For example, page_size=10 and page_offset=30 corresponds to\nthe 4th page of 10 offers."
        }
      ]
    },
    {
      "id": "lFdQZ5FKLDK3U6CkSiTcA",
      "type": "paragraph",
      "children": [
        {
          "text": "Note that Offer Display Rules are enforced against all search results."
        }
      ]
    }
  ]
}