Get Offer State from Query Parameters

Gets an offer state using one of four methods providing the following information via query parameters

  1. a token with the OSID

  2. credential_identifier

  3. external_ref_id with either:

    • offer_id and member_id, or
    • campaign_xid and member_identifier
  4. eligible_channel_id and member_id

You only need to provide one of the four information sets above to retrieve an offer state.

Query Parameters
  • token
    Type: string

    An offer state's osid

  • credential_identifier
    Type: string

    The identifier of the credential

  • eligible_channel_id
    Type: string

    The campaign ID and requires the member_id query param as well

  • member_id
    Type: string

    Required when searching by eligible_channel_id, or when searching by external_ref_id without member_identifier

  • external_ref_id
    Type: string

    An external identifier. Requires either (member_id and offer_id) or (member_identifier and campaign_xid)

  • offer_id
    Type: string

    Required when searching by external_ref_id without campaign_xid

  • member_identifier
    Type: string

    the member identifier attached to a member

  • campaign_xid
    Type: string

    The campaign XID. Required when searching by external_ref_id with member_identifier instead of offer_id and member_id

Headers
  • Content-Type
    Type: string

    application/json

Responses
  • application/json
  • 401

    Unauthorized

  • application/json
  • application/json
Request Example for get/members/offer_states
curl https://api-staging.sparkfly.com/v1.0/members/offer_states \
  --header 'X-Auth-Token: YOUR_SECRET_TOKEN'
{
  "offer_state": {
    "offer_state_id": 1,
    "offer_id": 1,
    "member_id": 1,
    "status": "string",
    "value": 1,
    "locked": true,
    "activates_at": "string",
    "expires_at": "string",
    "external_ref_id": "string",
    "custom_data": null,
    "credential_custom_data": null,
    "offer_activities": [
      {}
    ],
    "offer_name": "string",
    "offer_short_name": "string",
    "offer_campaign_name": "string",
    "offer_group": "string",
    "offer_description": "string",
    "offer_value_required": 1,
    "offer_terms_and_conditions": "string",
    "offer_web_image_url": "string",
    "offer_web_thumb_url": "string",
    "offer_mobile_image_url": "string",
    "offer_mobile_thumb_url": "string",
    "is_reward": true,
    "credential_identifier": "string",
    "token": "string",
    "transferable": true,
    "reusable": true,
    "offer_tags": [
      {}
    ],
    "offer_campaign_tags": [
      {}
    ],
    "campaign_custom_fields": [
      {
        "id": 1,
        "custom_field_id": 1,
        "key": "string",
        "label": "string",
        "value": "string",
        "created_at": "string",
        "updated_at": "string"
      }
    ],
    "campaign_external_id": "string",
    "campaign_xid": "string",
    "campaign_id": 1,
    "item_sets": [
      {
        "item_set_id": 1,
        "name": "string",
        "type": "required",
        "quantity": 1,
        "items": [
          {
            "pos_item_code": "string"
          }
        ]
      }
    ],
    "offer_status": "pending",
    "campaign_status": "active"
  },
  "errors": {}
}