Skip to main content

Public REST/JSON reference

Margin-Based Upsell Ranker API

Import product costs, calculate product margins, rank post-purchase upsell recommendations by margin contribution and affinity, and measure resulting revenue attribution. Part of the Logic Igniter E-commerce Operations bundle.

Access boundary

These examples describe public API calls only. Use the service output to review, score, summarize, analyze, or recommend; do not treat the API reference as permission for an assistant to write, send, publish, charge, schedule, notify, delete, or modify records.

Base URL

https://api.logicigniter.com

Auth

Authorization: Bearer YOUR_API_KEY

Version

OpenAPI 3.0.3 · 1.0.0

Operations rendered

13

Response models rendered

17

GET/api/v1/marginupsell/health

Service liveness

Liveness probe for Margin-Based Upsell Ranker API. Returns 200 when the public API route is reachable.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/health" \
  -H "Accept: application/json"

Responses

200

Service healthy

GET/api/v1/marginupsell/customers

List customers

List customers record for the customer workspace used by Margin-Based Upsell Ranker API.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/customers" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

Requested resource was not found

PUT/api/v1/marginupsell/customers/{id}

Update customer

Update customer record for the customer workspace used by Margin-Based Upsell Ranker API.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Parameters

NameInTypeNotes
idrequiredpathstringId

Request body (required)

Schema: CustomerInput

Sample JSON payload for evaluation.

{
  "companyName": "Mira Home Goods",
  "email": "[email protected]"
}

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X PUT "https://api.logicigniter.com/api/v1/marginupsell/customers/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"companyName":"Mira Home Goods","email":"[email protected]"}'

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

Requested resource was not found

GET/api/v1/marginupsell/rankings

List rankings

List recent ranking runs and their decision summaries.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/rankings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

GET/api/v1/marginupsell/rankings/{id}

Get ranking

Read a generated recommendation ranking by identifier.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Parameters

NameInTypeNotes
idrequiredpathstringId

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/rankings/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

Requested resource was not found

POST/api/v1/marginupsell/costs/import

Import costs

Import product COGS data used to calculate contribution margin.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request body (required)

Schema: CostImportRequest

Sample JSON payload for evaluation.

{
  "id": "obj_123",
  "status": "READY",
  "summary": "CostImportRequest"
}

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X POST "https://api.logicigniter.com/api/v1/marginupsell/costs/import" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"id":"obj_123","status":"READY","summary":"CostImportRequest"}'

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

GET/api/v1/marginupsell/margins/{product_id}

Get product margin

Read margin inputs and computed contribution for one product.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Parameters

NameInTypeNotes
product_idrequiredpathstringProduct Id

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/margins/:product_id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

Requested resource was not found

GET/api/v1/marginupsell/margins

List margins

List margin records with optional SKU or category filters.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/margins" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

GET/api/v1/marginupsell/upsell/recommendations

Get recommendations

Return ranked upsell candidates for an order, customer, or product context.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/upsell/recommendations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

GET/api/v1/marginupsell/upsell/affinity-pairs

List affinity pairs

List product pairs with affinity and margin lift scores.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/upsell/affinity-pairs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

POST/api/v1/marginupsell/upsell/overrides

Override ranking

Apply business rules to boost, suppress, or exclude products from upsells.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request body (required)

Schema: OverrideRequest

Sample JSON payload for evaluation.

{
  "id": "obj_123",
  "status": "READY",
  "summary": "OverrideRequest"
}

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X POST "https://api.logicigniter.com/api/v1/marginupsell/upsell/overrides" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"id":"obj_123","status":"READY","summary":"OverrideRequest"}'

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

GET/api/v1/marginupsell/analytics/performance

Get upsell performance

Measure conversion rate, average order value lift, and margin lift for upsell placements.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/analytics/performance" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

GET/api/v1/marginupsell/analytics/attribution

Get revenue attribution

Attribute upsell revenue and margin contribution by recommendation source.

Public REST/JSON operation

This operation is documented for direct API evaluation. It describes the public payload and response contract only; assistant/MCP usage remains read only and is covered in the MCP guide.

Request example

Replace placeholders with your confirmed access key and your own business data.

curl -X GET "https://api.logicigniter.com/api/v1/marginupsell/analytics/attribution" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Responses

Successful response

Invalid request payload or parameters

Missing or invalid bearer token

Workspace does not have access to the ecommerce-operations bundle

Data models

Customer

FieldTypeNotes
idrequiredstringExample: "cus_mira_home"
companyNamerequiredstringExample: "Mira Home Goods"
emailrequiredstring (email)Example: "[email protected]"
bundlerequiredstringExample: "ecommerce-operations"
createdAtstring (date-time)

CustomerInput

FieldTypeNotes
companyNamerequiredstringExample: "Mira Home Goods"
emailrequiredstring (email)Example: "[email protected]"
bundlestringExample: "ecommerce-operations"

CustomerList

FieldTypeNotes
customersarray<Customer>

Error

FieldTypeNotes
errorrequiredstringExample: "validation failed"
messagestringExample: "sku is required"
requestIdstringExample: "req_01HX9E2M7K8Q4J3V"

AffinityPairList

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "AffinityPairList"

CostImportRequest

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "CostImportRequest"

CostImportResult

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "CostImportResult"

MarginList

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "MarginList"

OverrideRequest

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "OverrideRequest"

OverrideRule

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "OverrideRule"

ProductMargin

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "ProductMargin"

Ranking

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "Ranking"

RankingList

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "RankingList"

RankingRequest

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "RankingRequest"

RecommendationList

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "RecommendationList"

RevenueAttribution

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "RevenueAttribution"

UpsellPerformance

FieldTypeNotes
idrequiredstringExample: "obj_123"
statusrequiredstringExample: "READY"
summarystringExample: "UpsellPerformance"