Skip to main content

Core Operations

Project description

sparkfly

The Sparkfly Platform provides a full lifecycle for promotions and rewards from creation to distribution to settlement. The platform integrates in real-time at the point-of-sale and provides item level discounting and tracking. The capabilities of the Sparkfly Platform are available through the use of the Sparkfly Platform API.

The Sparkfly documentation site is under development. If the documentation you're after isn't available here, please contact support@sparkfly.com and we will get you what you need.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.4.9
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://help.sparkfly.com/

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import sparkfly

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import sparkfly

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import sparkfly
from sparkfly.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api-staging.sparkfly.com/v1.0
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly.Configuration(
    host = "https://api-staging.sparkfly.com/v1.0"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: XAuthToken
configuration.api_key['XAuthToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['XAuthToken'] = 'Bearer'


# Enter a context with an instance of the API client
async with sparkfly.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sparkfly.AudiencesApi(api_client)
    content_type = 'content_type_example' # str | application/json (optional)
    create_audience_request = sparkfly.CreateAudienceRequest() # CreateAudienceRequest |  (optional)

    try:
        # Create an Audience
        api_response = await api_instance.create_audience(content_type=content_type, create_audience_request=create_audience_request)
        print("The response of AudiencesApi->create_audience:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AudiencesApi->create_audience: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api-staging.sparkfly.com/v1.0

Class Method HTTP request Description
AudiencesApi create_audience POST /audiences Create an Audience
AudiencesApi create_sub_audience POST /audiences/{audience_id}/sub_audiences Create a Sub-Audience
AudiencesApi delete_audience DELETE /audiences/{audience_id} Remove an Audience
AudiencesApi delete_sub_audience DELETE /audiences/{audience_id}/sub_audiences/{sub_audience_id} Remove a Sub-Audience
AudiencesApi get_audience GET /audiences/{audience_id} Retrieve an Audience
AudiencesApi get_sub_audience GET /audiences/{audience_id}/sub_audiences/{sub_audience_id} Retrieve a Sub-Audience
AudiencesApi list_audiences GET /audiences List all Audiences
AudiencesApi list_sub_audiences GET /audiences/{audience_id}/sub_audiences List all Sub-Audiences
AudiencesApi update_audience PUT /audiences/{audience_id} Update an Audience
AudiencesApi update_sub_audience PUT /audiences/{audience_id}/sub_audiences/{sub_audience_id} Update a Sub-Audience
AuthenticationApi authenticate POST /auth Request an Authentication Token
BIStoreListsApi list_bi_store_lists GET /merchants/bi_store_lists List all BI Store Lists
CampaignsApi approve_campaign PUT /campaigns/{campaign_id}/actions/{action} Set a Campaign's Status
CampaignsApi create_campaign POST /campaigns Create a Campaign
CampaignsApi get_campaign GET /campaigns/{campaign_id} Retrieve a Campaign by Campaign ID
CampaignsApi list_campaign_tags GET /campaigns/tags Retrieve Campaign Tags
CampaignsApi list_campaigns GET /campaigns List all Campaigns
CampaignsApi update_campaign PUT /campaigns/{campaign_id} Update a Campaign by Campaign ID
CredentialsApi create_credential POST /credentials Create a Credential
CredentialsApi search_credentials GET /credentials Search Credentials
CtmApi ctm_allocate POST /ctm/allocate/{site_id}/{credential} CTM Allocate
CtmApi ctm_create_member POST /v2/ctm/members/{site_id}/{credential} CTM Update Response
CtmApi ctm_create_member_by_site POST /v2/ctm/members/{site_id} CTM Update Response
CtmApi ctm_deallocate POST /ctm/deallocate/{site_id} CTM Dealocate
CtmApi ctm_get_custom_messages GET /v2/ctm/customposmessages CTM Custom Messages
CtmApi ctm_get_member GET /ctm/members/{site_id}/{credential} CTM Show Response
CtmApi ctm_get_qitems POST /ctm/qitems/{site_id}/{credential} CTM Qitems
CtmApi ctm_get_store GET /v2/ctm/stores CTM Stores
CtmApi ctm_update_member PUT /ctm/members/{site_id}/{credential} CTM Update Response
CtmApi ctm_update_member_v2 PUT /v2/ctm/members/{site_id}/{credential} CTM Show Response
CtmApi ctm_update_transaction PUT /ctm/members/{site_id} CTM Transaction Update
EligibleItemSetsApi create_eligible_item_set POST /offers/{offer_id}/eligible_item_sets Create an Eligible Item Set
EligibleItemSetsApi delete_eligible_item_set DELETE /offers/{offer_id}/eligible_item_sets/{id} Remove an Eligible Item Set
EligibleItemSetsApi get_eligible_item_set GET /offers/{offer_id}/eligible_item_sets/{id} Get an Eligible Item Set
EligibleItemSetsApi list_eligible_item_sets GET /offers/{offer_id}/eligible_item_sets List all Eligible Item Sets
EligibleItemSetsApi update_eligible_item_set PUT /offers/{offer_id}/eligible_item_sets/{id} Update an Eligible Item Set
EmailOptInApi create_optin POST /optins Email Opt In
EventNotificationsApi create_callback POST /event_notifications/callbacks Create Callback
EventNotificationsApi create_subscription POST /event_notifications/subscriptions Create Subscription
EventNotificationsApi delete_callback DELETE /event_notifications/callbacks/{callback_id} Delete Callback
EventNotificationsApi delete_subscription DELETE /event_notifications/subscriptions/{subscription_id} Delete Subscription
EventNotificationsApi get_callback GET /event_notifications/callbacks/{callback_id} Get Callback by ID
EventNotificationsApi get_subscription GET /event_notifications/subscriptions/{subscription_id} Get Subscription by ID
EventNotificationsApi list_callbacks GET /event_notifications/callbacks List Callbacks
EventNotificationsApi list_subscriptions GET /event_notifications/subscriptions List Subscriptions
ImpressionsApi create_impression POST /impressions Create an Impression
ImpressionsApi delete_impression DELETE /impressions/{id} Delete an Impression
ImpressionsApi list_impressions GET /impressions List Impressions
ItemsApi add_item_to_set POST /item_sets/{item_set_id}/items/{id} Add Item to Set
ItemsApi create_item POST /items Create Item
ItemsApi create_item_set POST /item_sets Item Set Create
ItemsApi delete_item DELETE /items/{id} Delete Item
ItemsApi delete_item_set DELETE /item_sets/{item_set_id} Delete an Item Set
ItemsApi get_item GET /items/{id} Get Item
ItemsApi get_item_set GET /item_sets/{item_set_id} Get an Item Set
ItemsApi list_item_sets GET /item_sets Item Set Index
ItemsApi list_items GET /items Item Index
ItemsApi list_set_items GET /item_sets/{item_set_id}/items Item Set Item Index
ItemsApi remove_item_from_set DELETE /item_sets/{item_set_id}/items/{id} Remove Item from Set
ItemsApi update_item PUT /items/{id} Update Item
ItemsApi update_item_set PUT /item_sets/{item_set_id} Update an Item Set
MemberPrivacyApi export_member_privacy GET /privacy/member/export Exports Data Associated with a Member
MemberPrivacyApi request_member_deletion POST /privacy/member/delete_request Creates a Deletion Request for a Member
MembersApi create_member POST /members Create a Member
MembersApi create_profile POST /members/{id}/profile Create/Update a Member Profile
MembersApi delete_member DELETE /members/{member_id} Remove a Member
MembersApi get_member GET /members/{member_id} Find a Member
MembersApi get_profile GET /members/{id}/profile Retrieve a Member Profile
MembersApi list_members GET /members List Members
MembersApi register_member POST /members/register Register a New Member
MembersApi search_members GET /members/search Search for a Member
MembersApi update_member PUT /members/{member_id} Update a Member
OfferListsApi create_offer_list POST /offer_lists Create an Offer List
OfferListsApi delete_offer_list DELETE /offer_lists/{offer_list_id} Remove an Offer List
OfferListsApi get_offer_list GET /offer_lists/{offer_list_id} Retrieve an Offer List
OfferListsApi list_offer_lists GET /offer_lists List all Offer Lists
OfferListsApi update_offer_list PUT /offer_lists/{offer_list_id} Update an Offer List
OfferPOSOfferCodesApi create_pos_code POST /offers/{offer_id}/pos_offer_codes Create an Offer POS Offer Code
OfferPOSOfferCodesApi delete_pos_code DELETE /offers/{offer_id}/pos_offer_codes/{id} Remove an Offer POS Offer Code
OfferPOSOfferCodesApi get_offer_pos_code GET /offers/{offer_id}/pos_offer_codes/{id} Get an Offer POS Offer Code
OfferPOSOfferCodesApi list_pos_codes GET /offers/{offer_id}/pos_offer_codes List all Offer POS Offer Codes
OfferPOSOfferCodesApi update_pos_code PUT /offers/{offer_id}/pos_offer_codes/{id} Update an Offer POS Offer Code
OfferStatesApi create_offer_state POST /members/offer_states Create Offer State from Query Parameters
OfferStatesApi get_offer_state GET /members/{member_id}/offer_states/{offerstate_id} Get Offer State by Offer State ID
OfferStatesApi issue_offer POST /members/offer_states/issue Issue an Offer to a member (high throughput)
OfferStatesApi issue_offer_state POST /members/{member_id}/offer_states Create Offer State
OfferStatesApi list_members_offers GET /members/{member_id}/offers/{offer_id} Get Offer State by Offer ID
OfferStatesApi list_offer_states GET /members/{member_id}/offer_states Get all Offer States
OfferStatesApi query_offer_states GET /members/offer_states Get Offer State from Query Parameters
OfferStatesApi redeem_offer_state POST /members/{member_id}/offer_states/{offerstate_id} Update Offer State - Post
OfferStatesApi update_offer_state PUT /members/{member_id}/offer_states/{offerstate_id} Update Offer State
OfferStatesApi void_offer_state POST /members/{member_id}/offer_states/{offerstate_id}/void Void Offer State
OfferStatesApi void_offer_state_by_identifier POST /members/offer_states/{offerstate_id}/void Void Offer State by Member Identifier
OffersApi create_offer POST /offers Create an Offer
OffersApi delete_offer DELETE /offers/{offer_id} Delete an Offer
OffersApi get_offer GET /offers/{offer_id} Find an Offer
OffersApi list_offers GET /offers List all Offers
OffersApi update_offer PUT /offers/{offer_id} Update an Offer
POSOfferCodesApi get_pos_code GET /pos_offer_codes/{id} Get a POS Offer Code
POSOfferCodesApi list_all_pos_codes GET /pos_offer_codes List all POS Offer Codes
StoreListsApi create_store_list POST /merchants/{merchant_id}/store_lists Create a Store List
StoreListsApi delete_store_list DELETE /merchants/{merchant_id}/store_lists/{store_list_id} Remove a Store List
StoreListsApi get_store_list GET /merchants/{merchant_id}/store_lists/{store_list_id} Retrieve a Store List
StoreListsApi list_store_lists GET /merchants/{merchant_id}/store_lists List all Store Lists
StoreListsApi update_store_list PUT /merchants/{merchant_id}/store_lists/{store_list_id} Update a Store List
StoresApi create_store POST /merchants/{merchant_id}/stores Create a Store
StoresApi delete_store DELETE /merchants/{merchant_id}/stores/{store_id} Remove a Store
StoresApi get_store GET /merchants/{merchant_id}/stores/{store_id} Retrieve a Store
StoresApi list_stores GET /merchants/{merchant_id}/stores List all Stores
StoresApi list_stores_index GET /merchants/stores/index List all Stores with Active Offers
StoresApi update_store PUT /merchants/{merchant_id}/stores/{store_id} Update a Store
TemplatesApi list_templates GET /templates Get all Templates
TransactionsApi get_transaction GET /transactions/{transaction_id} Get Transaction Details

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

XAuthToken

  • Type: API key
  • API key parameter name: X-Auth-Token
  • Location: HTTP header

XAuthIdentity

  • Type: API key
  • API key parameter name: X-Auth-Identity
  • Location: HTTP header

XAuthKey

  • Type: API key
  • API key parameter name: X-Auth-Key
  • Location: HTTP header

Author

support@sparkfly.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sparkfly-1.4.9.tar.gz (166.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sparkfly-1.4.9-py3-none-any.whl (926.1 kB view details)

Uploaded Python 3

File details

Details for the file sparkfly-1.4.9.tar.gz.

File metadata

  • Download URL: sparkfly-1.4.9.tar.gz
  • Upload date:
  • Size: 166.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for sparkfly-1.4.9.tar.gz
Algorithm Hash digest
SHA256 6e36a321b9e07166aeb112da715734c5a85f5f1dc81488d44683dfdd1a90c0e7
MD5 56dac070ccc56855ab1b7887f8ac3e5a
BLAKE2b-256 d3db2688b5e25e5ec896ddce538c5b24516b7b9e820d038e91555a72d015136e

See more details on using hashes here.

File details

Details for the file sparkfly-1.4.9-py3-none-any.whl.

File metadata

  • Download URL: sparkfly-1.4.9-py3-none-any.whl
  • Upload date:
  • Size: 926.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for sparkfly-1.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 88720e69e3670cc6793106b48f1e29e4db8e2132cdfdbdd7464e0a9851ffe733
MD5 a9ad19eaef7e1460d553ad99218188eb
BLAKE2b-256 4f0be6448c49987ff2b126b9aca506a6989e117ed773467a292760f4da205366

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page