Skip to content

Instantly share code, notes, and snippets.

View d2kagw's full-sized avatar

Aaron Wallis d2kagw

View GitHub Profile
@d2kagw
d2kagw / lexer_docs_file_upload.js
Last active September 20, 2023 01:02
file_upload.js - Via automated deployment - Visit https://learn.lexer.io for more information.
// File Upload API: Produce a URL that can be used to upload a file to.
{
"filename": "string",
"destination": {
"dataset_id": "string",
"record_type": "category"
}
}
@d2kagw
d2kagw / lexer_docs_schema_file_upload.json
Last active September 20, 2023 01:02
schema_file_upload.json - Via automated deployment - Visit https://learn.lexer.io for more information.
{
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "A name that Lexer can use to refer to the file uploaded to Lexer. We recommend setting this to {dataset_id}_{record_type}_{timestamp}.ndjson"
},
"destination": {
"type": "object",
"description": "If a destination is specified, the file is uploaded to that dataset",
@d2kagw
d2kagw / lexer_docs_batch_marketing_email_click.ndjson
Last active September 20, 2023 01:02
batch_marketing_email_click.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{"link": {"email": "jane@fake.com"}, "action_at": "2023-03-06T12:26:47Z", "campaign_id": "Black friday Menswear Teaser Aug 2020", "list": {"id": "7bff7a...", "name": "All Customers List"}, "from": {"name": "Jane Doe", "email": "jane@fake.com"}, "to": {"name": "Jane Doe", "email": "jane@fake.com"}, "clicked_link": {"name": "string", "url": "url"}}
@d2kagw
d2kagw / lexer_docs_batch_commerce_products.ndjson
Last active September 20, 2023 01:02
batch_commerce_products.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{"product_id": "b7c901...", "sku": "ac6674...", "upc": "ce6378...", "product_reference_type": "product_id", "name": "Organic Sawyer Rib Crew Knit", "description": "Whether your look is clean and casual or sharp and sophisticated, Staple Superior has what you need to achieve that effortlessly cool style.\n", "brand": "Sawyer", "size": "L", "color": "Navy", "price": 89.95, "options": {"department": ["menswear"], "category": ["outerwear"], "subcategory": ["knits", "wool"]}, "url": "https://fake.com/menswear/sawyer-rib-crew-knit", "images": ["https://fake.com/images/menswear/sawyer-rib-crew-knit.jpg"]}
@d2kagw
d2kagw / lexer_docs_batch_marketing_email_subscribe.ndjson
Last active September 20, 2023 01:02
batch_marketing_email_subscribe.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{"link": {"email": "jane@fake.com"}, "action_at": "2023-03-06T12:26:47Z", "list": {"id": "7bff7a...", "name": "All Customers List"}, "status": "subscribed"}
@d2kagw
d2kagw / lexer_docs_batch_compliance_forget.ndjson
Last active September 20, 2023 01:02
batch_compliance_forget.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{"email": "jane@fake.com"}
{"mobile": "+0123456789"}
@d2kagw
d2kagw / lexer_docs_batch_commerce_purchases.ndjson
Last active September 20, 2023 01:02
batch_commerce_purchases.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{ "link": { "email": "jane@fake.com" }, "action_at": "2023-03-06T12:26:47Z", "purchase_id": "53059a...", "store": { "store_id": "40bf96...", "type": "physical", "name": "St Kilda Outlet", "location": { "name": "St Kilda", "coordinates": { "latitude": 86.3128, "longitude": -77.920063 } } }, "type": "ecommerce", "currency": "USD", "payment_types": [ { "name": "visa", "total": 100 } ], "adjustments": [ { "price_adjustment": -50, "adjusted_at": "2023-03-06T12:26:47Z", "reason": "gift card" } ], "products": [ { "product_reference": { "id": "7ede97...", "id_type": "product_id", "dataset_id": "0e2187..." }, "price_paid": 90, "quantity": 2, "full_price": 50, "discount": 10 }, { "product_reference": { "id": "8gf983...", "id_type": "product_id", "dataset_id": "0e2187..." }, "price_paid": 10.00, "quantity": 2, "full_price": 10 } ], "custom_fields": { "is_gift": true, "gift_message": "Happy Birthday Kevin!" } }
{ "link": { "email": "jane@fake.com" }, "action_at": "2023-03-06T12:26:47Z", "purchase_id": "34kok12...", "type
@d2kagw
d2kagw / lexer_docs_batch_marketing_email_send.ndjson
Last active September 20, 2023 01:02
batch_marketing_email_send.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{"link": {"email": "jane@fake.com"}, "action_at": "2023-03-06T12:26:47Z", "campaign_id": "Black friday Menswear Teaser Aug 2020", "list": {"id": "7bff7a...", "name": "All Customers List"}, "from": {"name": "Jane Doe", "email": "jane@fake.com"}, "to": {"name": "Jane Doe", "email": "jane@fake.com"}, "subject": "Dress Best this Black Friday", "body": "Lorem ipsum do in mollit consectetur dolore magna irure exercitation."}
@d2kagw
d2kagw / lexer_docs_batch_marketing_email_bounce.ndjson
Last active September 20, 2023 01:02
batch_marketing_email_bounce.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{"link": {"email": "jane@fake.com"}, "action_at": "2023-03-06T12:26:47Z", "campaign_id": "Black friday Menswear Teaser Aug 2020", "list": {"id": "7bff7a...", "name": "All Customers List"}, "from": {"name": "Jane Doe", "email": "jane@fake.com"}, "to": {"name": "Jane Doe", "email": "jane@fake.com"}}
@d2kagw
d2kagw / lexer_docs_batch_profile_customer.ndjson
Last active September 20, 2023 01:02
batch_profile_customer.ndjson - Via automated deployment - Visit https://learn.lexer.io for more information.
{ "link": { "email": "jane@fake.com" }, "email": "jane@fake.com", "email_sha256": "8b1885...", "mobile": "+61400000000", "first_name": "Jane", "last_name": "Doe", "gender": "Female", "customer_id": "b6ef3b...", "date_of_birth": "2023-03-06", "country": "Australia", "state": "Victoria", "city": "St Kilda", "postcode": "3182", "zip": "90291", "employee_flag": false, "customer_type": "VIP", "address_1": "Inkerman St", "address_2": "string", "custom_fields": { "churn_risk": 0.291, "loyalty_status": "platinum", "tags": ["VIP", "Newly Acquired"] } }
{ "link": { "mobile": "+0123456789" }, "last_name": "Bobbington", "first_name": "Bob", "mobile": "+0123456789", "custom_fields": { "news_letter_opt_in": true } }