Create Offer State from Query Parameters
Creates an offer state using the osid token OR with the offer_id and channel_id.
member_identifierORmember_idmust be present in either case.
Query Parameters
- Type: stringtoken
An offer state's osid
- Type: stringmember
_id Required if
member_identifieris not present - Type: stringmember
_identifier Required if
member_idis not present - Type: stringoffer
_id Required if no
tokenpresent - Type: stringchannel
_id Required if no
tokenpresent
Headers
- Type: stringContent
- Type application/json
Body·
application/json
- Type: objectoffer
_state
Responses
- application/json
- application/json
- application/json
- 401
Unauthorized
- application/json
- application/json
- application/json
Request Example for post/members/offer_states
curl https://api-staging.sparkfly.com/v1.0/members/offer_states \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: YOUR_SECRET_TOKEN' \
--data '{
"offer_state": {
"activates_at": "",
"expires_at": "",
"external_ref_id": "",
"campaign_id": "",
"enforce_idempotency": true
}
}'
{
"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": {}
}