Last active
August 29, 2015 14:03
-
-
Save bonnie/44f212c858ae16808750 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
# examples of 500friends LoyaltyPlus security signature calculations based on API parameters | |
# the parameters in the final_url are alphabetized for easier code comparison | |
# v. 1.1 | |
UUID: ABCDEFGHIJKLMNO | |
SECRET_KEY: 12345678901234567890123456789012 | |
ENV: production | |
TEST_TYPE: API | |
examples: | |
- name: enroll | |
endpoint: /api/enroll.json | |
parameters: | |
email: [email protected] | |
uuid: ABCDEFGHIJKLMNO | |
security_string_before_hash: 12345678901234567890123456789012emailtest@500friends.comuuidABCDEFGHIJKLMNO | |
signature: d3e00ef9354b0b84bdea7f4d832f70a9 | |
final_url: https://api.500friends.com/api/enroll.json?email=test%40500friends.com&sig=d3e00ef9354b0b84bdea7f4d832f70a9&uuid=ABCDEFGHIJKLMNO | |
- name: update customer info | |
endpoint: /data/customer/update_customer_info.json | |
parameters: | |
postal_code: 94105 | |
address_line_2: Suite 213 | |
state: CA | |
external_customer_id: 1723643262345 | |
email: [email protected] | |
channel: web | |
address_line_1: 444 Spear St | |
address_line_2: 'Apt. #213' | |
home_phone: '+15555555555' | |
home_store: Boston | |
name: FiveHundred O'Friends | |
first_name: FiveHundred | |
last_name: O'Friends | |
mobile_phone: '+15555555555' | |
city: San Francisco | |
first_name: Five Hundred | |
last_name: O'Friends | |
birthdate: 05-26 | |
work_phone: '+15555555555' | |
country: US | |
uuid: ABCDEFGHIJKLMNO | |
security_string_before_hash: "12345678901234567890123456789012address_line_1444 Spear Staddress_line_2Apt. #213birthdate05-26channelwebcitySan [email protected]_customer_id1723643262345first_nameFive Hundredhome_phone+15555555555home_storeBostonlast_nameO'Friendsmobile_phone+15555555555nameFiveHundred O'Friendspostal_code94105stateCAuuidABCDEFGHIJKLMNOwork_phone+15555555555" | |
signature: 814b48662a536a5f8ce11406449383bb | |
final_url: https://api.500friends.com/data/customer/update_customer_info.json?address_line_1=444%20Spear%20St&address_line_2=Apt.%20%23213&birthdate=05-26&channel=web&city=San%20Francisco&country=US&email=test%40500friends.com&external_customer_id=1723643262345&first_name=Five%20Hundred&home_phone=%2B15555555555&home_store=Boston&last_name=O%27Friends&mobile_phone=%2B15555555555&name=FiveHundred%20O%27Friends&postal_code=94105&sig=814b48662a536a5f8ce11406449383bb&state=CA&uuid=ABCDEFGHIJKLMNO&work_phone=%2B15555555555 | |
- name: purchase with product catalog (two products) | |
endpoint: /api/record.json | |
parameters: | |
event_id: 96953859279893 | |
value: 45 | |
type: purchase | |
email: [email protected] | |
products: | |
0: | |
price: 9 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 1 | |
product_id: 0 | |
1: | |
price: 18 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 2 | |
product_id: 1 | |
uuid: ABCDEFGHIJKLMNO | |
security_string_before_hash: [email protected]_id96953859279893products0brandsbrand1,brand2categoriescategory1,category2>subcategoryprice9product_id0quantity11brandsbrand1,brand2categoriescategory1,category2>subcategoryprice18product_id1quantity2typepurchaseuuidABCDEFGHIJKLMNOvalue45 | |
signature: 48345851695543f9cce2cc7e23c979e7 | |
final_url: https://api.500friends.com/api/record.json?email=test%40500friends.com&event_id=96953859279893&products[0][brands]=brand1%2Cbrand2&products[0][categories]=category1%2Ccategory2%3Esubcategory&products[0][price]=9&products[0][product_id]=0&products[0][quantity]=1&products[1][brands]=brand1%2Cbrand2&products[1][categories]=category1%2Ccategory2%3Esubcategory&products[1][price]=18&products[1][product_id]=1&products[1][quantity]=2&sig=48345851695543f9cce2cc7e23c979e7&type=purchase&uuid=ABCDEFGHIJKLMNO&value=45 | |
- name: purchase with product catalog (twelve products) | |
endpoint: /api/record.json | |
parameters: | |
event_id: 96953859279893 | |
value: 5850 | |
type: purchase | |
email: [email protected] | |
products: | |
0: | |
price: 9 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 1 | |
product_id: 0 | |
1: | |
price: 18 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 2 | |
product_id: 1 | |
2: | |
price: 27 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 3 | |
product_id: 2 | |
3: | |
price: 36 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 4 | |
product_id: 3 | |
4: | |
price: 45 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 5 | |
product_id: 4 | |
5: | |
price: 54 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 6 | |
product_id: 5 | |
6: | |
price: 63 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 7 | |
product_id: 6 | |
7: | |
price: 72 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 8 | |
product_id: 7 | |
8: | |
price: 81 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 9 | |
product_id: 8 | |
9: | |
price: 90 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 10 | |
product_id: 9 | |
10: | |
price: 99 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 11 | |
product_id: 10 | |
11: | |
price: 108 | |
brands: brand1,brand2 | |
categories: category1,category2>subcategory | |
quantity: 12 | |
product_id: 11 | |
uuid: ABCDEFGHIJKLMNO | |
security_string_before_hash: [email protected]_id96953859279893products0brandsbrand1,brand2categoriescategory1,category2>subcategoryprice9product_id0quantity11brandsbrand1,brand2categoriescategory1,category2>subcategoryprice18product_id1quantity210brandsbrand1,brand2categoriescategory1,category2>subcategoryprice99product_id10quantity1111brandsbrand1,brand2categoriescategory1,category2>subcategoryprice108product_id11quantity122brandsbrand1,brand2categoriescategory1,category2>subcategoryprice27product_id2quantity33brandsbrand1,brand2categoriescategory1,category2>subcategoryprice36product_id3quantity44brandsbrand1,brand2categoriescategory1,category2>subcategoryprice45product_id4quantity55brandsbrand1,brand2categoriescategory1,category2>subcategoryprice54product_id5quantity66brandsbrand1,brand2categoriescategory1,category2>subcategoryprice63product_id6quantity77brandsbrand1,brand2categoriescategory1,category2>subcategoryprice72product_id7quantity88brandsbrand1,brand2categoriescategory1,category2>subcategoryprice81product_id8quantity99brandsbrand1,brand2categoriescategory1,category2>subcategoryprice90product_id9quantity10typepurchaseuuidABCDEFGHIJKLMNOvalue5850 | |
signature: 9c2e9e664675f7872c0d2ee730f8a31e | |
final_url: https://api.500friends.com/api/record.json?email=test%40500friends.com&event_id=96953859279893&products[0][brands]=brand1%2Cbrand2&products[0][categories]=category1%2Ccategory2%3Esubcategory&products[0][price]=9&products[0][product_id]=0&products[0][quantity]=1&products[1][brands]=brand1%2Cbrand2&products[1][categories]=category1%2Ccategory2%3Esubcategory&products[1][price]=18&products[1][product_id]=1&products[1][quantity]=2&products[10][brands]=brand1%2Cbrand2&products[10][categories]=category1%2Ccategory2%3Esubcategory&products[10][price]=99&products[10][product_id]=10&products[10][quantity]=11&products[11][brands]=brand1%2Cbrand2&products[11][categories]=category1%2Ccategory2%3Esubcategory&products[11][price]=108&products[11][product_id]=11&products[11][quantity]=12&products[2][brands]=brand1%2Cbrand2&products[2][categories]=category1%2Ccategory2%3Esubcategory&products[2][price]=27&products[2][product_id]=2&products[2][quantity]=3&products[3][brands]=brand1%2Cbrand2&products[3][categories]=category1%2Ccategory2%3Esubcategory&products[3][price]=36&products[3][product_id]=3&products[3][quantity]=4&products[4][brands]=brand1%2Cbrand2&products[4][categories]=category1%2Ccategory2%3Esubcategory&products[4][price]=45&products[4][product_id]=4&products[4][quantity]=5&products[5][brands]=brand1%2Cbrand2&products[5][categories]=category1%2Ccategory2%3Esubcategory&products[5][price]=54&products[5][product_id]=5&products[5][quantity]=6&products[6][brands]=brand1%2Cbrand2&products[6][categories]=category1%2Ccategory2%3Esubcategory&products[6][price]=63&products[6][product_id]=6&products[6][quantity]=7&products[7][brands]=brand1%2Cbrand2&products[7][categories]=category1%2Ccategory2%3Esubcategory&products[7][price]=72&products[7][product_id]=7&products[7][quantity]=8&products[8][brands]=brand1%2Cbrand2&products[8][categories]=category1%2Ccategory2%3Esubcategory&products[8][price]=81&products[8][product_id]=8&products[8][quantity]=9&products[9][brands]=brand1%2Cbrand2&products[9][categories]=category1%2Ccategory2%3Esubcategory&products[9][price]=90&products[9][product_id]=9&products[9][quantity]=10&sig=9c2e9e664675f7872c0d2ee730f8a31e&type=purchase&uuid=ABCDEFGHIJKLMNO&value=5850 | |
- name: custom function invalidator | |
endpoint: /api/record.json | |
parameters: | |
event_id: 96953859279894 | |
value: 48 | |
type: purchase | |
email: [email protected] | |
custom_functions: | |
first_time_double_points: | |
invalid: order_placed | |
uuid: ABCDEFGHIJKLMNO | |
security_string_before_hash: 12345678901234567890123456789012custom_functionsfirst_time_double_pointsinvalidorder_placedemailtest@500friends.comevent_id96953859279894typepurchaseuuidABCDEFGHIJKLMNOvalue48 | |
signature: e2213f7a3d399b25e4ee85752affd8b2 | |
final_url: https://api.500friends.com/api/record.json?custom_functions[first_time_double_points][invalid]=order_placed&email=test%40500friends.com&event_id=96953859279894&sig=e2213f7a3d399b25e4ee85752affd8b2&type=purchase&uuid=ABCDEFGHIJKLMNO&value=48 | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment