{"openapi":"3.1.0","info":{"title":"LoyaltyLion (BYOK) API","version":"0.1.0","description":"LoyaltyLion (BYOK) lets an AI assistant read your own LoyaltyLion data through the LoyaltyLion API with a key you supply (LoyaltyLion API key (read scopes)). Read-only: 9 tools (whoami, list_customers, list_customer_transactions, list_transactions, list_activities, list_orders, get_order, list_available_rewards, list_sites). The BYOK key travels with each request, is used for that one call only...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-loyaltylion.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-loyaltylion/docs"},"termsOfService":"https://connectorbay.com/byok-loyaltylion/terms"},"servers":[{"url":"https://byok-loyaltylion.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-loyaltylion/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/whoami":{"post":{"operationId":"whoami","summary":"Show what the API key is: its kind, account id, program id and granted scopes. Use for \"Which scopes does my LoyaltyLion","description":"Show what the API key is: its kind, account id, program id and granted scopes. Use for \"Which scopes does my LoyaltyLion API key have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"whoamiArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_customers":{"post":{"operationId":"list_customers","summary":"List loyalty customers with points (approved, pending, spent), rewards claimed, enrolment, tier and dates. Email and bir","description":"List loyalty customers with points (approved, pending, spent), rewards claimed, enrolment, tier and dates. Email and birthday are left out. Needs read_customers scope. Use for \"Which LoyaltyLion customers have the most approved points\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"sort_field":{"anyOf":[{"enum":["id","updated_at"],"type":"string"},{"type":"null"}],"default":null,"description":"Sort by id or updated_at.","title":"Sort Field"},"sort_direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"asc or desc.","title":"Sort Direction"},"updated_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only customers updated on or after this ISO 8601 time.","title":"Updated At Min"},"created_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created on or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At Min"},"created_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created before this ISO 8601 time.","title":"Created At Max"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many results to return (1 to 500).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor.next to get the next page.","title":"Cursor"}},"title":"list_customersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_customer_transactions":{"post":{"operationId":"list_customer_transactions","summary":"List points transactions of one customer (by your store's customer id) with approved and pending points, type and time. ","description":"List points transactions of one customer (by your store's customer id) with approved and pending points, type and time. Needs read_customers scope. Use for \"What points did customer 1001 earn and spend in LoyaltyLion\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"merchant_id":{"description":"The customer's id in your store (the merchant_id of the customer).","maxLength":200,"title":"Merchant Id","type":"string"},"created_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created on or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At Min"},"created_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created before this ISO 8601 time.","title":"Created At Max"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many results to return (1 to 500).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor.next to get the next page.","title":"Cursor"}},"required":["merchant_id"],"title":"list_customer_transactionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_transactions":{"post":{"operationId":"list_transactions","summary":"List points transactions across all customers (earned, spent, adjusted, expired) with points and time. Needs read_custom","description":"List points transactions across all customers (earned, spent, adjusted, expired) with points and time. Needs read_customers scope. Use for \"What points transactions happened in LoyaltyLion this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"customer_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only transactions of this LoyaltyLion customer id (number).","title":"Customer Id"},"created_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created on or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At Min"},"created_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created before this ISO 8601 time.","title":"Created At Max"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many results to return (1 to 500).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor.next to get the next page.","title":"Cursor"}},"title":"list_transactionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_activities":{"post":{"operationId":"list_activities","summary":"List program activities (rule completions that award points) with value, state and time. Needs read_customers scope. Use","description":"List program activities (rule completions that award points) with value, state and time. Needs read_customers scope. Use for \"Which LoyaltyLion activities are still pending approval\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"since_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only activities with an id greater than this.","title":"Since Id"},"created_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created on or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At Min"},"created_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created before this ISO 8601 time.","title":"Created At Max"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many results to return (1 to 500).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor.next to get the next page.","title":"Cursor"}},"title":"list_activitiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_orders":{"post":{"operationId":"list_orders","summary":"List orders known to LoyaltyLion with totals, payment, fulfilment, refund and cancellation status. Needs read_orders sco","description":"List orders known to LoyaltyLion with totals, payment, fulfilment, refund and cancellation status. Needs read_orders scope. Use for \"What orders did LoyaltyLion record yesterday\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"since_id":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only orders with an id greater than this.","title":"Since Id"},"updated_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only orders updated on or after this ISO 8601 time.","title":"Updated At Min"},"updated_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only orders updated before this ISO 8601 time.","title":"Updated At Max"},"created_at_min":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created on or after this ISO 8601 time, for example 2026-01-01T00:00:00Z.","title":"Created At Min"},"created_at_max":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only results created before this ISO 8601 time.","title":"Created At Max"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many results to return (1 to 500).","title":"Limit"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's cursor.next to get the next page.","title":"Cursor"}},"title":"list_ordersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_order":{"post":{"operationId":"get_order","summary":"Get one order by your store's order id with payment, refund and cancellation status and totals. Needs read_orders scope.","description":"Get one order by your store's order id with payment, refund and cancellation status and totals. Needs read_orders scope. Use for \"Show LoyaltyLion's record of order 5001\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"merchant_id":{"description":"The order's id in your store.","maxLength":200,"title":"Merchant Id","type":"string"}},"required":["merchant_id"],"title":"get_orderArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_available_rewards":{"post":{"operationId":"list_available_rewards","summary":"List rewards a customer can currently claim (title, point cost, discount type and amount, minimum spend) by your store's","description":"List rewards a customer can currently claim (title, point cost, discount type and amount, minimum spend) by your store's customer id. Use for \"Which rewards can LoyaltyLion customer 1001 redeem\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"merchant_id":{"description":"The customer's id in your store.","maxLength":200,"title":"Merchant Id","type":"string"},"site_id":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Limit to one site of a multi-site program (number).","title":"Site Id"},"country":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter ISO country code; only rewards available there.","title":"Country"}},"required":["merchant_id"],"title":"list_available_rewardsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_sites":{"post":{"operationId":"list_sites","summary":"List the sites of the program with name, URL, platform (Shopify, BigCommerce, Magento, custom) and dates. Use for \"Which","description":"List the sites of the program with name, URL, platform (Shopify, BigCommerce, Magento, custom) and dates. Use for \"Which sites are part of my LoyaltyLion program\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_sitesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}