Amazon
List Amazon Integration Instances (Simple Dropdown)
Simple flat list of all Amazon integration instances suitable for use in dropdown selectors and integration filters in the UI. Returns just `{id, name}` for each instance with no pagination.
Show Amazon Integration Instance
Show a single Amazon integration instance with its salesChannel and integration relationships eager-loaded. Returns an Amazon integration instance object.
Update Amazon Integration Instance
Full or partial update of an Amazon integration instance. Validated by `UpdateAmazonIntegrationData` (all fields Optional). Supports both `PUT` (full) and `PATCH` (partial with deep-merge of `integration_settings` / `connection_settings`).
Delete Amazon Integration Instance
Soft-delete an Amazon integration instance. Dispatches a background job to clean up the linked sales channel and related records asynchronously. Returns 204 No Content.
Create Amazon Integration Instance
Create a new Amazon integration instance. Validated by `StoreAmazonIntegrationData`. After creation the controller also ensures a PaymentType for Amazon exists, then returns the redirect URL the user must follow to authorize the SP-API connection.
List Amazon Integration Instances
List all Amazon integration instances. Registered automatically by the `Route::salesChannel('amazon', ...)` macro — this is the standard `apiResource` index returning the configured list view response (paginated Amazon integration instance object collection).
Update Amazon Settings (Partial)
Optimized partial update used by the application UI Amazon settings page. Validated by `UpdateAmazonSettingsOnlyData` — every field is Optional, so the client may send only the fields the user actually changed. Internally, root-level fields (`name`, `is_automatic_sync_enabled`) are separated from `integration_settings` fields and merged into the existing settings JSON.
OAuth Callback (Web)
Amazon Seller Central OAuth callback endpoint. Amazon redirects the user here after they grant or deny SP-API access in Seller Central. This endpoint is a **web** route (not under `/api`), is invoked by the user's browser (not by SKU.io frontend code), and accepts any HTTP method (`Route::any`).
Get Authorization URL
Returns the Amazon Seller Central OAuth authorization URL for the given Amazon integration instance. The frontend should redirect the user to this URL so they can grant SP-API access to SKU.io. Upon successful authorization, Amazon redirects the user back to the configured callback URL with `spapi_oauth_code`, `state`, and `selling_partner_id` query parameters.
List Fee Mappings
List Fee Mappings
Create Fee Mapping
Create Fee Mapping
Update Fee Mapping
Update Fee Mapping
Delete Fee Mapping
Delete Fee Mapping
Preview Recategorization
Preview the impact of recategorizing historical settlement data based on current fee mappings (dry-run).
Recategorize Historical
Recategorize historical settlement data based on current fee mappings.
List Merchant SKU Mappings
List Merchant SKU Mappings
Bulk Update Merchant SKU Mappings
Bulk Update Merchant SKU Mappings
Update Merchant SKU Mapping
Update Merchant SKU Mapping
List Ship From Mappings
List FBA inbound ship-from location mappings for an integration instance.
Update Ship From Mappings
Update ship-from location to warehouse mappings.
Show AWD Shipment
Get details of a specific AWD shipment.
Refresh AWD Shipment
Refresh a specific AWD shipment from Amazon API.
Export AWD Shipment Items
Export items from a specific AWD shipment as CSV.
LPN Lookup
Look up a License Plate Number (LPN) to find associated inventory items.
List Warehouses
List Amazon FBA warehouses/fulfillment centers for the integration instance.
Get available fields
Returns the catalog of fields that can participate in a mapping: all Amazon listing fields (`seller_sku`, `asin1`, `item_name`, `brand`, `price`, etc.) and all SKU.io product fields (static fields like `sku`, `name`, plus dynamic fields like product pricing tiers, supplier pricing tiers, and custom product attributes). This endpoint is global (not scoped to an integration instance) and is used to populate the source/target dropdowns in the mapping configuration UI.
Get mappings for integration instance
Returns the full field-mapping picture for the given Amazon integration instance:
Update mappings for integration instance
Persists the full set of custom field mappings for the given Amazon integration instance. The payload completely replaces the previously stored custom mappings for the `listings` mapping group.
List Shipping Method Mappings
List every shipping method mapping for the Amazon integration's sales channel. Each row pairs an Amazon shipping method name (e.g. 'Standard', 'Expedited') with an optional internal SKU.io shipping method (eager-loaded with its carrier). Returns 404 if the integration has no sales channel.
Save Shipping Method Mappings (bulk upsert)
Bulk upsert mappings. Each row is matched by (sales_channel_id, sales_channel_method); existing rows are updated, new method names create rows. A null shipping_method_id clears the mapping but keeps the row. After each upsert, the new shipping_method_id is propagated to all open sales orders (order_status != closed) for that sales_channel + requested_shipping_method, so the SKU.io SO display stays in sync.
Delete Shipping Method Mapping
Delete a single shipping method mapping. Open sales orders that requested this shipping method (and belong to the same sales_channel) have their shipping_method_id cleared so SO display stays consistent. Returns 404 if the mapping belongs to a different integration's sales channel.
Import Shipping Method Mappings (CSV)
Bulk import shipping method mappings from a CSV upload. Existing rows with the same amazon_method are updated, new method names create rows. Rows with an unresolvable shipping_method_id or shipping_method_full_name are skipped and reported in the response's errors array (the rest of the import still succeeds). Same propagation to open sales orders as the bulk save endpoint.
Export Shipping Method Mappings (CSV)
Stream every shipping method mapping for the integration as a CSV download. Header row: amazon_method,shipping_method_id,shipping_method_full_name,carrier_name. Round-trip-compatible with the import endpoint.
List Orders
List Amazon orders for an integration instance (list view endpoint).
Show Order
Get details of a specific Amazon order.
Delete Order
Delete a single Amazon order.
Archive Order
Archive a single Amazon order.
Unarchive Order
Unarchive a single Amazon order.
Bulk Archive Orders
Archive multiple Amazon orders.
Bulk Unarchive Orders
Unarchive multiple Amazon orders.
Bulk Delete Orders
Delete multiple Amazon orders.
Create SKU Orders from Amazon Orders
Create SKU.io sales orders from this instance's Amazon orders. Runs synchronously.
Refresh Orders from Amazon
Refresh this instance's Amazon orders from the Amazon Selling Partner API. Queues a background job on a serialized queue that pulls new and updated orders since the last sync; the request returns immediately with a confirmation message. No request body.
Get Order Details (by path)
Aggregates removal orders + removal shipments for the given order ID, hydrates FNSKU products and metadata, and revalidates the receipt status when applicable. Returns 404 if neither orders nor shipments exist for the order ID.
Get Order Details (by query string)
Query-string variant of `getOrderDetails`. Returns 422 when `order_id` is missing/empty, 404 when no matching orders or shipments exist. Response payload is identical to the path-param variant.
Set Receiving Warehouse
Assigns (or replaces) the receiving warehouse on a removal order's metadata. Validation (`SetRemovalOrderWarehouseData`):
Unprocess Removal Orders
Unprocess removal orders.
Archive Removal Orders
Bulk-archives removal orders (sets `archived_at = now()`). Request body uses `IdSelectionData`:
Unarchive Removal Orders
Bulk-unarchives removal orders (sets `archived_at = null`). Request body uses `IdSelectionData`:
Mark Item As Unknown
Marks a single removal order row as an unknown item (`is_unknown_item = true`). No request body.
Unmark Item As Unknown
Reverses the unknown-item flag on a removal order row (`is_unknown_item = false`). No request body.
Close Receiving
Closes receiving for a removal order. The status manager automatically derives the next receipt status based on current receipts:
Resume Receiving
Re-opens receiving for a removal order by re-evaluating the receipt status against current shipments + receipts. Returns the resulting status value.
Clear Receiving Warehouse
Clears the receiving warehouse from a removal order's metadata. Returns `Warehouse cleared successfully` if a value was cleared, or `No warehouse to clear` if there was nothing to remove.
Get Unlinked Removal Orders
Returns distinct removal orders of type `Return` that are not yet linked to a SKU (warehouse transfer line). Grouped by `order_id`, sorted by request_date desc. Each row exposes only `order_id` and `date` (earliest request date).
Backfill Straddle Removal Orders
One-time repair for removal orders that straddle the integration's FBA inventory tracking start date. Before the straddle fix, removal shipments dispatched before go-live were dropped during report import, leaving the surviving removal orders with zero receivable shipments and phantom shrinkage.
Show Removal Shipment
Fetch a single removal shipment with its parent removal order eager-loaded. Returns 404 if the shipment does not belong to the supplied integration instance. NOTE: this route is registered twice — under `/api/amazon/{integrationInstance}/removal-shipments/{removalShipment}` and under `/api/amazon/{integrationInstance}/ledgers/removal-shipments/{removalShipment}` — both invoke the same controller method.
Receive Shipment
Record receipt of a removal shipment. Splits returned units into new (resellable), discarded (damaged), and optionally blemished. `items[].blemished_configurations` is an array where each entry represents ONE blemished unit. The shipment must belong to the supplied integration instance (404 otherwise).
Bulk Receive Shipments
Receive multiple removal shipments in one call, all into the same warehouse with the same receipt date. Each shipment must belong to the supplied integration instance — the controller validates this up-front and returns 404 if any shipment is missing or belongs to another integration instance.
Remove Receipt (Single Shipment)
Reverse the receipt for a single removal shipment, deleting the inventory adjustments created when it was received. Returns 404 if the shipment does not belong to the supplied integration instance.
Bulk Remove Receipts
Remove multiple receipts (inventory_adjustments rows) by ID for the given integration instance. Useful when undoing a batch of receipts at once.
Bulk Remove Discards
Bulk-remove discard records by their IDs for the given integration instance. Each deleted discard decrements the parent shipment's `qty_discarded` counter so the legacy column stays in sync with the audit-trail rows. Discards belonging to shipments outside the supplied integration instance are silently skipped (not an error). After deletion, the removal order's receipt_status is recomputed.
Remove Single Discard
Remove a single discard record. The parent shipment's `qty_discarded` counter is decremented by the deleted row's quantity (backward-compat column kept in sync with the new `amazon_fba_removal_shipment_discards` audit table). Returns 404 if the discard does not belong to the supplied integration instance. After deletion, the removal order's receipt_status is recomputed (e.g. an order that was `fully_discarded` may transition back to `pending` if there are no other discards or receipts).
Undo All Receipts for Removal Order
Undo every receipt across all shipments for a single Amazon removal order. The endpoint verifies that at least one shipment exists for the given `order_id` and integration instance, otherwise returns 404.
Reconcile Pre-Tracking Units (Straddle)
Quarantine pre-tracking units on a STRADDLE removal shipment (one that shipped before the integration's FBA inventory tracking start date). These units were already counted in opening inventory at go-live, so they are closed out into the `qty_reconciled_pretracking` bucket instead of being received into inventory — no stock, no COGS, no FBA ledger impact. Capped at the shipment's remaining pending quantity.
Undo Reconcile Pre-Tracking (Straddle)
Undo a pre-tracking reconciliation: resets the shipment's `qty_reconciled_pretracking` bucket back to zero and returns those units to pending. The shipment must belong to the supplied integration instance (404 otherwise).
Show Inbound Shipment
Get details of a specific legacy FBA inbound shipment, including its items (eager loaded), SKU link, integration instance, and counts for items and receipts. Powers the legacy inbound shipment detail page.
Delete Inbound Shipment
Permanently delete a legacy FBA inbound shipment and its downloaded items. Deletion is blocked with a 422 response when the shipment is linked to a purchase order or warehouse transfer — unprocess the shipment first to remove the link. Deleting only removes the local record; the shipment on Amazon is unaffected and an active shipment can reappear on the next refresh.
Get Activity Log for Inbound Shipment
Get the Spatie activity log for a specific legacy FBA inbound shipment. Returns the most recent 200 activities, newest first.
Get Items For Inbound Shipment
Paginated list of items for a single legacy FBA inbound shipment. Powers the Items tab on the legacy shipment detail page using the canonical sku.io list view stack (server-side pagination, search, sort, advanced filters).
Get Inbound Shipment Receipts
Paginated list of Receipt-type AmazonLedger entries for a single legacy FBA inbound shipment. Receipts are matched by integration_instance_id, reference_id (= shipment ShipmentId), and event_type = Receipts. Powers the Ledgers tab on the legacy shipment detail page.
Refresh Inbound Shipments
Refresh FBA inbound shipments from Amazon API.
Process Shipments
Process FBA inbound shipments.
Process All Shipments
Process all unprocessed FBA inbound shipments.
Unprocess Shipments
Unprocess FBA inbound shipments.
Get Unlinked Shipments
Get unlinked FBA inbound shipments.
Set Sent Before Initial Count
Mark shipments as sent before the initial count was taken.
Get Shipment from Amazon
Fetch a specific shipment directly from Amazon API by shipment ID.
Preview Process with Stock Take
Preview the covering stock take that the 'Process with Stock Take' action would create for this legacy FBA inbound. Resolves the source warehouse (from the ship-from mapping) and destination FBA warehouse, aggregates the inbound's items per product, and computes each product's source-warehouse shortfall (max(0, needed − on-hand available).
Process Inbound with Stock Take
Dispatch the tracked job that injects each product's source-warehouse shortfall via a covering stock take and then processes the legacy FBA inbound into its warehouse transfer (source warehouse → FBA warehouse).
Bulk Delete Inbound Shipments
Bulk delete legacy FBA inbound shipments by ID. Shipments that are linked to a purchase order or warehouse transfer are skipped and returned in the blocked array; unprocess them first to remove the link. Deleting only removes the local records; the shipments on Amazon are unaffected.
Show New Inbound Shipment
Get a specific new FBA inbound shipment with full detail.
Get Activity Log for New Inbound Shipment
Get the Spatie activity log for a specific new FBA inbound shipment. Returns the most recent 200 activities, newest first.
Get Items For Shipment
Paginated list of items for a single new FBA inbound shipment. Powers the Items tab on the shipment detail page using the canonical sku.io list view stack (server-side pagination, search, sort, advanced filters, saved views, column selector).
Get New Inbound Shipment Receipts
Paginated list of receipt ledger entries for a single new FBA inbound shipment. Powers the Ledgers tab on the shipment detail page using the canonical sku.io list view stack (server-side pagination, search, sort, advanced filters, saved views, column selector).
Process New Inbound Shipments
Process the given new FBA inbound shipments. For each ID this resolves the SKU link source (purchase order or warehouse transfer), creates / updates the linked PendingInbound, and applies inventory movement.
Process All Unprocessed New Inbound Shipments
Process every unprocessed new FBA inbound shipment for this integration instance. Returns immediately with a success message regardless of per-shipment outcomes — check the index endpoint afterwards to see updated statuses and any errorLog entries.
Unprocess New Inbound Shipments
Reverse the processing of the given new FBA inbound shipments. Detaches PendingInbound rows and reverses any inventory movement that was created when the shipments were processed.
Archive New Inbound Shipments
Archive the given new FBA inbound shipments by setting archived_at to now. Archived shipments are hidden from the default list view but remain in the database for audit/history. Returns the count actually archived.
Get Unlinked New Inbound Shipments
List new FBA inbound shipments for this integration instance that have not been linked to a SKU source (no purchase order or warehouse transfer assigned). Used by the UI to surface shipments that still need source assignment before they can be processed.
Set Sent Before Initial Count
Bulk toggle the is_before_initial_count flag on the given shipments. Pass value as the string 'true' or 'false'. When set, the shipment is treated as sent prior to the integration's initial inventory count and excluded from inbound inventory math. Also clears the errorLog on the affected shipments.
Unarchive New Inbound Shipments
Restore previously archived shipments by clearing archived_at. Returns the count actually unarchived.
List Draft Plans (Drafts Tab)
Paginated Drafts-tab listing for the list view.
List Draft Inbound Plans
List draft FBA inbound plans for an integration instance.
Create Draft Inbound Plan
Create a new draft FBA inbound plan.
Show Draft Inbound Plan
Get details of a specific draft FBA inbound plan.
Update Draft Inbound Plan
Update a draft FBA inbound plan. Advancing the plan to a verified state reserves source-warehouse stock; if the warehouse lacks enough on-hand quantity the request returns 400 with a product error.
Delete Draft Inbound Plan
Delete a draft FBA inbound plan and its associated warehouse transfer.
List Plan Allocations
List the inventory allocations reserved against a draft inbound plan's line items. These are the source-stock reservations (`InventoryAllocation` rows linked to `DraftAmazonFbaInboundPlanItem`) created when the plan is verified, and — after Amazon splits the plan into shipments — their migrated/fulfilled states. Backs the plan detail page's 'Allocations' tab.
Search Inbound Products (Plan Context)
Search the Amazon inbound product catalog (amazon_inbound_products_view) with plan context for the SKU Selection step. Each row is an Amazon listing joined to its internal product with FBA quantities, label/prep owners, source-warehouse availability for the plan's source, and the product's case pack.
Lookup Inbound Products by Identifiers (Bulk Add)
Bulk-resolve identifiers to Amazon inbound products with plan context — powers the Bulk Add flow on the SKU Selection step.
Submit Plan to Amazon
Submit a draft inbound plan to Amazon's API for processing.
Cancel Amazon Plan
Cancel a draft inbound plan.
Generate Packing Options
Generate packing options for a submitted draft FBA inbound plan via the Amazon FBA Inbound API (v2024-03-20 generatePackingOptions operation).
List Packing Options
List the packing options generated for a draft FBA inbound plan, including each option's packing groups and their items (with linked product details).
Confirm Packing Option
Confirm one of the offered packing options for the plan (Amazon FBA Inbound v2024-03-20 confirmPackingOption operation). Once confirmed, the plan's packing groups are fixed and boxes can be packed against them.
List Boxes
List all locally managed boxes for a draft FBA inbound plan, across all of its packing groups, including each box's items.
Create Box
Create a new (empty) box in a packing group of the draft inbound plan. The box is assigned the next sequential `box_number` for the plan and starts with status `open`.
Update Box
Update a box's attributes and/or its packed items. Returns 404 if the box does not belong to the draft inbound plan.
Delete Box
Delete a box (and its items) from the draft inbound plan. Returns 404 if the box does not belong to the plan.
Import Boxes (CSV)
Import box contents for a packing group from a CSV file (multipart/form-data). Boxes are created or updated by `box_number` and item quantities are added per row.
Submit Packing Information
Submit box content information for **every packing group of the plan's confirmed packing option** in a single request (FBA Inbound v2024-03-20 setPackingInformation operation). Amazon requires all of the confirmed option's package grouping ids together, so submission is plan-level rather than per-group — submitting one group at a time is rejected with 'Provided package grouping ids are incorrect. Expected all of [...]'.
List Carton Templates
List all ACTIVE carton templates. Soft-retired templates (`is_active` = false) are excluded.
Create Carton Template
Create a reusable carton template.
Update Carton Template
Update a carton template. All fields are optional; only provided fields are changed.
Delete Carton Template
Delete (soft-retire) a carton template. The template is deactivated (`is_active` = false) rather than removed, so historical boxes keep their carton template reference. Retired templates no longer appear in **List Carton Templates**.
Generate Placement Options
Generate placement options for the draft FBA inbound plan via the Amazon FBA Inbound API (v2024-03-20 generatePlacementOptions operation). Each placement option is a possible shipment split — Amazon proposes different ways to spread the plan's inventory across fulfillment centers, with different placement fees and discounts.
List Placement Options
List the placement options generated for the draft FBA inbound plan, including each option's preview shipments (the shipment split Amazon would create if that option is confirmed).
Get Placement Transport Estimates
Own-carrier small-parcel (SPD) transport cost estimates for every OFFERED placement option of the draft plan, so the operator can compare 'placement fee + transport' totals in real dollars before confirming an option.
Confirm Placement Option
Confirm one of the offered placement options for the plan (Amazon FBA Inbound v2024-03-20 confirmPlacementOption operation). **Confirmation is irreversible** — once a placement option is confirmed the other options expire, and only the confirmed split's shipments remain the plan's real shipments.
List Shipments
List the plan shipments of the draft FBA inbound plan with all placement/transport details nested: `items`, `pallets`, `transportation_options`, and `delivery_window_options`.
Generate Transportation Options
Generate transportation options (carrier quotes) for the confirmed placement's shipments via the Amazon FBA Inbound API (v2024-03-20 generateTransportationOptions operation). Amazon returns partnered-carrier and own-carrier options per shipping mode for each shipment.
List Transportation Options
List all transportation options generated for the draft FBA inbound plan, across all of its shipments. Use `amazon_fba_inbound_plan_shipment_id` to group options by shipment.
Confirm Transportation Options
Confirm one transportation option per shipment of the confirmed placement (Amazon FBA Inbound v2024-03-20 confirmTransportationOptions operation). This is lock gate #2 of the inbound workflow — carrier charges apply once the void window passes.
Generate Delivery Window Options
Generate delivery window options for a single plan shipment (Amazon FBA Inbound v2024-03-20 generateDeliveryWindowOptions operation). Delivery windows are required for non-partnered (own-carrier) transportation options that carry the `CONFIRMED_DELIVERY_WINDOW` precondition — confirm a window before confirming such a transportation option.
List Delivery Window Options
List the delivery window options generated for a plan shipment.
Confirm Delivery Window Option
Confirm a delivery window option for the shipment (Amazon FBA Inbound v2024-03-20 confirmDeliveryWindowOptions operation). Once confirmed, the shipment's `confirmed_delivery_window` is populated and transportation options that carry the `CONFIRMED_DELIVERY_WINDOW` precondition become confirmable.
Estimate Placement Transport Costs
Kicks off a fresh own-carrier transport estimate for every OFFERED placement option on the draft inbound plan. **Queues a background job** (the estimate runs dozens of carrier rate calls, so it is taken off the request thread) and returns a job id (`tracked_job_log_id`) for polling progress.
Create Item Labels (FNSKU)
Generate FNSKU (MSKU) item labels for products on the draft inbound plan via the synchronous Amazon FBA Inbound v2024-03-20 `createMarketplaceItemLabels` operation. Returns the label document download URL immediately (no tracked job) and records the print in the label-print audit trail (see **List Label Prints**; repeat prints are auto-flagged `is_reprint`).
Create Box Labels
Generate box (carton) labels for a confirmed shipment via the Amazon Fulfillment Inbound v0 `getLabels` operation. **Requires a shipment confirmation ID** — confirm transportation first (422 otherwise). Returns the label document download URL synchronously and records the print in the audit trail.
Create Pallet Labels
Generate pallet labels for a confirmed LTL/FTL shipment via the Amazon Fulfillment Inbound v0 `getLabels` operation with `LabelType=PALLET`. The page type is fixed to `PackageLabel_Letter_4` (Amazon's standard letter-format pallet label sheet). **Requires a shipment confirmation ID** — confirm transportation first (422 otherwise). Records the print in the audit trail.
Get Bill of Lading
Fetch the bill of lading (BOL) document for a confirmed LTL/FTL shipment via the Amazon Fulfillment Inbound v0 `getBillOfLading` operation. Amazon only generates the BOL after the carrier is assigned — until then this endpoint returns **200 with `available: false`** (not an error), including when the shipment has no confirmation ID yet or Amazon responds 404/empty.
Get 2D Barcode Data
Get the 2D box-content barcode content strings for every box of a packing group that was submitted with the `BARCODE_2D` content information source. Returns one entry per box with the content string in Amazon's documented AMZN 2D box-content format:
List Label Prints
List the label-print audit trail for the draft inbound plan, newest first. Every successful label generation (item labels, box labels, pallet labels, BOL fetch) records an entry; repeat prints of the same kind for the same shipment (or plan, for plan-level kinds like FNSKU) are auto-flagged `is_reprint: true`.
Mark Shipment as Shipped
Mark a shipment of the plan as shipped. Sets the shipment's local status to `shipped` (with `shipped_at`) and, for warehouse-sourced shipments (those with a linked warehouse transfer), transitions the linked warehouse transfer to **in-transit** via the existing FBA transfer pathway (physical-out movements + pending inbound). Supplier-sourced shipments (no warehouse transfer) skip the transfer step.
Submit Shipment Tracking
Submit non-partnered-carrier (nPCP) tracking for a shipment. Provide **exactly ONE** of:
Get Shipment Board
Post-ship shipment board for a draft inbound plan: every shipment of the plan's confirmed placement option with its items, extended with the Phase 7 monitoring fields. Data is refreshed hourly by the scheduled `amazon:fba-inbound:sync-shipments` sweep (and on demand via **Refresh Shipment**).
Get Reconciliation
Per-shipment reconciliation grid for a draft inbound plan: shipped vs received per item with the discrepancy delta, discrepancy status, and resolution state. Products are resolved through the plan's items by MSKU — `product` is null when the MSKU is not (or no longer) on the plan.
Resolve Discrepancy Item
Acknowledge (resolve) a shipment item's discrepancy with a note — e.g. after filing an Amazon reimbursement case for a SHORT item. Resolution is an overlay: it stamps `discrepancy_resolved_at` and `resolution_note` but leaves `discrepancy_status` untouched. Resolved items drop out of the tenant-level discrepancies report (unless `filter[resolved]=1`). Reversible via **Unresolve Discrepancy Item**.
Unresolve Discrepancy Item
Clear a shipment item's discrepancy resolution — nulls `discrepancy_resolved_at` and `resolution_note`, returning the item to the unresolved pool (it reappears in the tenant-level discrepancies report). `discrepancy_status` is untouched. No request body.
Refresh Shipment
Synchronous on-demand refresh of one shipment from Amazon (the board's refresh button): runs SP-API `getShipment` (status + tracking) and `listShipmentItems` (shipped/received quantities), then recomputes the per-item discrepancy statuses. Returns the shipment's updated board entry. No request body.
Generate Content Update Previews
Start generating content update previews ('Adjust shipment') for a shipped shipment via the async SP-API `generateShipmentContentUpdatePreviews` operation — used to correct box contents / item quantities after the fact. Dispatches the tracked job **'Generate FBA Content Update Previews: {plan name}'** and returns its `tracked_job_log_id` for the tracked job log endpoints; once the job completes, fetch the previews via **List Content Update Previews** and apply one via **Confirm Content Update Preview**.
List Content Update Previews
Synchronous raw passthrough of Amazon's content update previews for a shipment (SP-API `listShipmentContentUpdatePreviews`, all pages merged — no local mirror tables). Each preview is Amazon's native payload: `contentUpdatePreviewId` (use with **Confirm Content Update Preview**), `expiration`, `requestedUpdates` (the boxes/items you submitted), and `transportationOption` (the re-quoted transportation for the updated contents).
Confirm Content Update Preview
Apply a previously generated content update preview via the async SP-API `confirmShipmentContentUpdatePreview` operation. Dispatches the tracked job **'Confirm FBA Content Update: {plan name}'** and returns its `tracked_job_log_id` for the tracked job log endpoints. No request body — the preview id comes from **List Content Update Previews** (`contentUpdatePreviewId`).
List Inbound Discrepancies (Tenant-Level)
Tenant-level FBA inbound discrepancies report — note the URL: this endpoint lives at `/api/amazon/{integrationInstance}/fba-inbound/discrepancies`, OUTSIDE the per-plan `draft-inbound-plans/{draft_inbound_plan}` group, because it aggregates across ALL of the instance's inbound plans.
Refresh from Amazon
Refresh a submitted plan from Amazon. Pulls the latest plan + shipment state from Amazon's Fulfillment Inbound API (`getInboundPlan`, `getShipment`, `listShipmentItems`) and mirrors it onto the linked `AmazonNewFbaInboundPlan` (status, shipments, accepted items). Use this to reconcile the in-app plan with Seller Central after submission.
List Inbound Plans (Tab)
Paginated listing for the FBA Inbound 'Inbound Plans' tab. Mirrors each plan's Amazon status (ACTIVE / SHIPPED / VOIDED / ERRORED) and INCLUDES orphan ('Unlinked') plans that have no linked SKU draft.
Bulk Void Inbound Plans
Bulk-void selected inbound plans on Amazon — cleanup of stale plans from the 'Inbound Plans' tab. Dispatches a tracked background job (follow it via the tracked job log endpoints) and returns its `tracked_job_log_id`.
Refresh Inbound Plans From Amazon
Refresh the 'Inbound Plans' tab from Amazon. Dispatches a tracked background job (follow it via the tracked job log endpoints) and returns its tracked_job_log_id.
Inbound Plan Sync Info
Sync-info for the Refresh Inbound Plans modal header and 'Fetch Since Latest' mode: the most recently updated plan already synced locally plus the total count.
Search Inbound Plans
Search a single inbound plan on Amazon by its inbound plan id (the modal's 'Search Specific Inbound' tab). Amazon's list API has no id search, so this fetches the plan directly — which also imports/refreshes it — and returns an array with 0 or 1 OrderSearchResult-shaped row.
Refresh Single Inbound Plan
Download / refresh a single inbound plan from Amazon by its inbound plan id — the per-row action in the modal's search results.
Get Portal Data
Plan header + line items for the external verification portal. No bearer token — access is granted by the encrypted `hashedDraftInboundPlanId` in the URL (single plan scope). Generated from the plan's `portal_access_hash`.
Verify Product
Record the quantity the source can provide for one product (spread across the plan's lines for that product in order). For assemble-at-source kit lines the quantity is COMPLETE KITS buildable from component stock. No bearer token — access is granted by the encrypted `hashedDraftInboundPlanId` in the URL (single plan scope). Generated from the plan's `portal_access_hash`.
Verify All Products
Mark every line as verified at its requested quantity (the 'can fulfill everything' shortcut). No bearer token — access is granted by the encrypted `hashedDraftInboundPlanId` in the URL (single plan scope). Generated from the plan's `portal_access_hash`.
Submit Verification
Finalize the verification: plan moves to `verified` (or `verified_with_adjustments` when any line was verified short). Fails with 400 `cant_submit_verification_unless_all_items_verified` while any line is unverified. No bearer token — access is granted by the encrypted `hashedDraftInboundPlanId` in the URL (single plan scope). Generated from the plan's `portal_access_hash`.
Show Fulfillment Packet
Detect 3PL/supplier fulfillment availability for the plan and return the built packet (or null when not yet built). `available` reflects whether the plan is eligible; `source_type` is `3pl` or `supplier`; `packet` is the FbaInboundFulfillmentPacket resource including `recipient_email`, `recipient_name`, and the editable `email_template`.
Build Fulfillment Packet
Build (or rebuild) the 3PL/supplier fulfillment packet for the plan: generates the prep documents, portal token, and default instructions. Body: `channels` (optional array of `api|email|portal`), `build_kits` (boolean, default true), `instruction_override` (optional string to replace the condition-aware default instructions).
Update Fulfillment Packet
Update the fulfillment packet — same payload and behaviour as Build; re-runs the packet build with the supplied channels / kit flag / instruction override.
Download Prep & Pack Sheet CSV
Download the fulfillment prep & pack sheet as a CSV file, to hand to a 3PL or supplier that won't use the fulfilment portal (e.g. for upload into their own system). The CSV contains a Unit Mix section (SKU, product, MSKU, FNSKU, UPC, quantity, unit weight, unit dimensions, who labels, who preps) and, once box contents have been submitted, a Box Contents section (box number, SKU, quantity) matching the box-import template so it round-trips.
Send Fulfillment Order
Dispatch the full fulfillment send as a tracked background job (marks documents + packet Sent and delivers the configured channels). Returns the tracked job log id to poll for progress via the tracked job log endpoints.
Preview 3PL Email
Preview the 'Email the 3PL' compose dialog: substitutes the `{{reference}}`, `{{portal_link}}`, and `{{instructions}}` tokens in the supplied subject/body server-side and returns the rendered result (no email is sent). Body: `subject` (required, max 255), `body` (required HTML string), `cc` (optional array of email addresses).
Send 3PL Email
Send the operator-composed 'Email the 3PL' portal invitation: resolves the 3PL/supplier recipient, substitutes the `{{reference}}`/`{{portal_link}}`/`{{instructions}}` tokens, marks the packet Sent, and dispatches FbaInboundPortalInviteNotification (CC honoured). Returns the updated FbaInboundFulfillmentPacket resource. Same body as the preview endpoint.
Sync Label Documents
Attach any newly-generated FBA label documents (FNSKU / box / pallet labels, BOL) from the plan to the fulfillment portal so the 3PL can download them. Returns the refreshed packet.
Rotate Portal Link
Rotate the portal token — invalidates the old portal link and issues a fresh one (and a new `portal_url`). Use when a link may have leaked. Returns the refreshed packet.
Get Portal Payload (3PL Portal)
Anonymous 3PL/supplier fulfillment portal entry point. Access is granted by the opaque `:token` in the URL (the packet's `portal_token`) — no bearer auth (`tenant.public-portal` middleware). Returns the full portal payload the 3PL sees: shipment reference + FBA id, source, the destination fulfillment center (`destination_fc`) and its **full destination address** (`destination_address`, Amazon SP-API camelCase keys — null until Amazon assigns placement), shipping mode / LTL flags, condition-aware `instructions` (markdown, rendered inline by the portal), downloadable `documents`, the product catalogue for the box-contents packing station (`products`), the tenant's saved carton presets (`carton_templates`), any existing `box_contents_submission` / `pallets_submission`, and the confirm gating (`can_confirm`, `confirm_blocked_reason`).
Submit Box Contents (3PL Portal)
Anonymous 3PL portal submission of packed box contents. Access is granted by the opaque `:token` in the URL (the packet's `portal_token`) — no bearer auth. The submission is stored verbatim on the packet's `portal_submission.boxes` JSON.
Generate FNSKU Labels (3PL Portal)
Generate FNSKU (MSKU) item labels on demand from the anonymous 3PL/supplier portal. Token-gated — no bearer auth (`tenant.public-portal` middleware); returns 404 when the token is expired, rotated, or revoked.
Submit Pallets (3PL Portal)
Anonymous 3PL portal submission of LTL pallet details. Access is granted by the opaque `:token` in the URL (the packet's `portal_token`) — no bearer auth. The submission is stored verbatim on the packet's `portal_submission.pallets` JSON and is required before an LTL packet can be confirmed ready.
Download Portal Document (3PL Portal)
Downloads one of the fulfillment packet's documents from the anonymous 3PL/supplier portal. Access is granted solely by the opaque `:token` in the URL (the packet's portal token from the emailed link) — no bearer auth. `:document` is a document id from the `documents[]` array of the portal payload.
Acknowledge Fulfillment Order (3PL Portal)
Confirms, from the anonymous 3PL/supplier portal, that the fulfillment order is packed and ready to ship. Access is granted solely by the opaque `:token` in the URL (the packet's portal token from the emailed link) — no bearer auth. No request body.
Confirm Kits Built (3PL Portal)
Confirms, from the anonymous 3PL/supplier portal, that the kits on the fulfillment order have been physically assembled. Access is granted solely by the opaque `:token` in the URL (the packet's portal token from the emailed link) — no bearer auth. No request body.
List Prep Details
Fetch Amazon's prep requirements (prep category + prep types) for every MSKU on a draft inbound plan. SKU.io sends all of the plan's MSKUs to Amazon's listPrepDetails operation and returns the per-MSKU results. Backs the plan configuration step's 'Fetch Amazon Prep Requirements' action.
Get Draft Plan Activity Log
Paginated activity log for a draft FBA inbound plan, rolling up activity recorded on the plan itself and on each of its line items into a single stream ordered newest first.
Download Inventory Inquiry PDF
Generates and downloads the inventory inquiry PDF for the draft inbound plan. The document lists every plan item (with product image, SKU, MSKU and requested quantity), the source warehouse/supplier details, and embeds a QR code linking to the shareable verification portal so the supplier can verify quantities on their phone.
Get Portal Access Hash
Returns the encrypted plan identifier (`hashed_id`) used to build the shareable, unauthenticated verification portal URL for this draft inbound plan. The portal lets a supplier verify item quantities without logging in.
Send Inventory Inquiry
Sends the inventory inquiry email for the draft inbound plan. **Note: although this is a GET request, it has a side effect — calling it sends an email** and updates the plan.
Set Prep Details
Sets Amazon SP-API prep details (prep category + prep types) for MSKUs on the draft inbound plan whose prep category is unknown. The request is forwarded to Amazon's `setPrepDetails` operation for the plan's marketplace (derived from the destination warehouse's country); Amazon's raw response (an `operationId` you can use to correlate the asynchronous SP-API operation) is returned under `data`.
Verify All Products (Internal)
Marks every item on the draft inbound plan as verified at its full planned quantity, without going through the supplier verification portal. Use this when the operator already knows the source quantities are correct and wants to skip the emailed inventory inquiry round-trip.
Search Inbound Products by Country
Searches products eligible for FBA inbound shipping on this integration instance, scoped to one marketplace country. Backed by the mapped Amazon listings joined with current FBA inventory, so each row carries the Amazon identifiers plus live FBA quantity buckets.
Refresh Inbound Plans
Refreshes the integration's FBA inbound plans from Amazon. The request synchronously pulls inbound plan summaries from the SP-API — first plans in `SHIPPED` status, then `ACTIVE` (some active plans already have shipments) — and upserts them, along with the ship-from address mappings found on those plans.
Add Item to Draft Plan
Add an item to a draft FBA inbound plan.
Bulk Add Items to Draft Plan
Bulk add items to a draft FBA inbound plan. Items already on the plan (matched by MSKU) are skipped unless `replace_existing` is true, in which case their quantity is updated.
Update Item
Update a single draft plan item.
Remove Item from Draft Plan
Remove an item from a draft FBA inbound plan.
Bulk Update Items
Bulk update draft plan items.
Show Initial Inventory
Get a specific initial inventory record.
Reconcile Initial Inventory
Reconcile a specific initial inventory record.
Unreconcile Initial Inventory
Unreconcile a specific initial inventory record.
Reconcile All Initial Inventory
Reconcile all initial inventory records.
Reconcile Initial Inventories (Batch)
Reconcile specific initial inventory records.
Unreconcile All Initial Inventory
Unreconcile all initial inventory records.
Reconcile Initial Inventories for FNSKUs
Reconcile initial inventories for specific FNSKU products.
Unreconcile Initial Inventories (Batch)
Unreconcile specific initial inventory records.
List Initial Inventory (Across Instances)
Returns paginated FBA initial inventory rows across all Amazon integration instances. Initial inventory is the FBA warehouse balance snapshot captured at the account's inventory tracking start date, used to seed FIFO cost layers and reconcile early ledger activity.
Unreconcile Initial Inventories for FNSKUs
Unreconcile the FBA initial inventory records linked to the given FNSKU products. Runs synchronously.
List Outbound Fulfillments
List Amazon outbound fulfillment orders.
Delete Outbound Fulfillment
Delete an outbound fulfillment order.
Get Unlinked Outbound Fulfillments
Get unlinked outbound fulfillment orders.
Refresh Outbound Fulfillments
Refresh outbound fulfillment orders from Amazon.
Create Fulfillment
Links an Amazon MCF (outbound) order to its SKU sales order's FulfillmentOrder.
Create Shortage from Pending Inbound
Create an inbound shortage record from a pending inbound.
Update Inbound Shortage
Update an Amazon inbound shortage record.
Delete Inbound Shortage
Delete an Amazon inbound shortage record.
Generate Accounting Transaction for Shortage
Generate an accounting transaction for an Amazon inbound shortage.
List Reimbursement Cases
Paginated list of SKU.io-tracked FBA reimbursement claim cases, unified across all Amazon integration instances. Cases are flagged by automated detectors (lost or damaged warehouse inventory, customer returns never received back, inbound shortages, fee overcharges, etc.) and move through a claim lifecycle: potential, under_review, ready_to_submit, submitted, partially_reimbursed, reimbursed, denied, dismissed, expired.
Create Reimbursement Case
Creates a reimbursement case manually. Creation is idempotent on `idempotency_key` — if a case with the same key already exists, that case is returned instead of creating a duplicate.
Get Reimbursement Case Summary
Headline reimbursement-case totals across Amazon integration instances, for dashboard-style summaries:
Detect Reimbursement Cases
Re-runs the reimbursement discrepancy detectors and the case reconciler across all Amazon integration instances (or the subset given in `integration_instance_ids`). Works entirely from data already synced into SKU.io (inventory ledger events, customer returns, ingested reimbursement rows, etc.) — it does not call Amazon. Newly detected discrepancies create cases in `potential` status; existing open cases are matched against reimbursements Amazon has already paid.
Get Reimbursement Case
Returns a single reimbursement case by ID, including the integration instance name, the assigned user, and linked product identifiers. `days_until_expiry`, `is_expired` and `can_submit_now` are computed from the claim window dates at request time.
Update Reimbursement Case
Updates a reimbursement case. All fields are optional; only supplied fields are changed.
Delete Reimbursement Case
Permanently deletes a reimbursement case. Returns HTTP 204 with no body on success.
Transition Reimbursement Case Status
Moves a reimbursement case to a new lifecycle status, enforcing the allowed transitions and recording a case note describing the change.
Assign Reimbursement Case
Assigns a reimbursement case to a user, or unassigns it.
List Reimbursement Case Notes
Returns all notes on a reimbursement case, newest first. Notes have a `note_type` of `user` (written by a person) or `system` (recorded automatically for status transitions, submissions and reconciliation matches; `user_id` and `user_name` are null for system notes). Not paginated.
Create Reimbursement Case Note
Adds a user note to a reimbursement case. The note is attributed to the authenticated user and stored with `note_type` of `user`.
List Reimbursement Case Activity Log
Paginated audit trail for a reimbursement case, newest first. Includes create/update events on the case itself and on its notes. Each entry exposes the event name, the changed attributes (with old values where applicable) in `properties`, and the name of the user who caused the change (`causer_name`, null for system changes).
Get Dashboard Data
Get the Amazon inventory and valuation dashboard data, aggregated across integration instances.
Refresh Reports
Dispatch a background job to refresh inventory reports for a specific integration instance.
Cost Source Breakdown
Get cost confidence breakdown by cogs_source.
Cost Source Event Breakdown
Get event type breakdown for a specific cost source.
Cost Source Layer Drilldown
Get paginated individual FIFO layers for a cost source drilldown.
Check FIFO Layer Revert Eligibility
Check if a FIFO layer's manual override can be reverted.
Revert FIFO Layer Override
Revert a manual cost override on a FIFO layer back to its automatically calculated value.
Batch Check Revert Eligibility
Check revert eligibility for multiple FIFO layers at once (max 100).
Bulk Revert Manual Overrides
Bulk revert all eligible manual COGS overrides matching the given filters.
List FIFO Layers
List FIFO Layers
Show FIFO Layer detail
Returns detail for a single Amazon FIFO layer, including source links, parent/child layers, cost breakdown, and manual override tracking. 404 if not found.
List Consumptions across all FIFO Layers (paginated)
Cross-layer paginated consumption listing. Each item is transformed via Amazon fifo consumption object; the fifo_layer relation is included for cross-layer context.
List Consumptions for a Specific FIFO Layer (paginated)
Paginated consumption records for one FIFO layer. 404 if the layer doesn't exist.
Activity Log for a FIFO Layer (paginated)
Returns paginated Spatie activity-log entries for the given FIFO layer, newest first. Uses the AppliesActivityLogFilters trait for filter[event], filter[source], filter[batch_uuid]. 404 if the layer doesn't exist (findOrFail).
Bulk Update COGS
Bulk-set the same COGS value on multiple FIFO layers. Validation (BulkUpdateFifoLayerCogsData): layer_ids required array min:1; layer_ids.* required integer exists:amazon_fifo_layers,id; cogs required numeric min:0. Additionally, all selected layers MUST belong to the same product or a 422 is returned. Returns the updated_count and a success message.
Export FIFO Layers
Export FIFO Layers
Download COGS Import Template (CSV)
Streams a CSV template (fifo-layer-cogs-import-template.csv) with headers: layer_id, cogs. Includes one sample row (12345, 9.99).
Validate COGS Import
Validates a parsed CSV import payload BEFORE committing. Validation rules: rows required array min:1; rows.*.layer_id present; rows.*.cogs present. Per-row business validation checks layer existence and cogs >= 0. Returns valid_rows, error_rows, and summary counts.
Execute COGS Import
Executes a validated COGS import. Validation rules: rows required array min:1; rows.*.layer_id required integer; rows.*.cogs required numeric min:0. Each row updates the layer's cogs and propagates the change to consumptions, discrepancies, provisional layers, and pending inbounds. Wrapped in a DB transaction.
Get FIFO Inventory Valuation
Get FIFO Inventory Valuation
Get Max Report Date
Get Max Report Date
List Valuation Snapshots
List Valuation Snapshots
Get Valuation Totals
Get Valuation Totals
List Amazon Products for Integration
Paginated list of `AmazonProduct` rows for one Amazon integration instance. Powers the application UI **Amazon → Products** listing page (`AmazonProductsPage`).
Show Amazon Product
Returns a single `AmazonProduct` wrapped in the SKU.io response envelope. Delegates to the abstract sales-channel show — the response body contains the full Amazon product object payload (same fields as the list endpoint).
Update Single Product Metadata (Label / Prep Owner)
Patches the `metadata.label_owner` / `metadata.prep_owner` fields on the Amazon product associated with a SKU.io `ProductListing`. Used by the FBA prep configuration UI.
Archive Single Product
Archives a single Amazon product. The product is reloaded with `productListing.product.defaultFinancialLineType` + `productListing.subscriptionOffering` and returned as an Amazon product object.
Unarchive Single Product
Unarchives a single Amazon product. Returns the refreshed product as an Amazon product object.
Refresh Single Product (Catalog Lookup)
Refreshes a single product's catalog data directly from Amazon's SP-API catalog endpoint. Updates `catalog_data`, `catalog_data_last_sync`, `was_catalog_data_sync_attempted`, and `removed_from_amazon` in place, then returns the refreshed Amazon product object.
Get Raw Catalog Data from Amazon
Forces a live catalog lookup against Amazon for a single product and then returns the *raw* sync output: ASIN, `catalog_data`, `catalog_data_last_sync`, `was_catalog_data_sync_attempted`, `removed_from_amazon`, and the underlying `json_object` for the row.
Create SKU.io Product from Amazon Product
Single-row variant of the bulk Create-SKU-Products endpoint. Used by the per-row **Create SKU.io Product** button in the unified mapping modal (Amazon parity with Faire/Shopify).
Map Single Product to SKU.io Product
Per-row mapping endpoint used by the unified products mapping modal (Faire/Shopify parity). Maps a single Amazon product to either an existing SKU.io product (`product_id`) or a subscription offering (`subscription_offering_id`).
Unmap Single Product
Removes the existing `ProductListing` link between an Amazon product and its SKU.io product. Returns HTTP 422 with `Product is not mapped.` when no mapping exists.
Get Orders for Product
Paginated list of Amazon orders (`AmazonOrder`) that include a line item with this product's `seller_sku`. Orders are returned sorted by `PurchaseDate` (newest first) and wrapped in Amazon order object. Used by the **Recent Orders** lazy-loading tab on the product detail/mapping modal.
Get Latest Sync Info
Sync summary card data for the **Amazon → Products** page header chip — last sync timestamp, total/ mapped/unmapped product counts, and the title/date of the most recently updated product.
Refresh All Products (Tracked)
Triggers an asynchronous Amazon report request to refresh the catalog. Returns immediately with a queued-message; progress is surfaced via the tracked job log endpoints (a background job).
Export Products
Streams an export of the integration instance's Amazon products (CSV/XLSX) using the abstract sales-channel exporter. Returns a `BinaryFileResponse`, a `RedirectResponse` (when async export is dispatched), or the SKU.io response envelope on failure.
Create SKU.io Products (Bulk)
Bulk-creates SKU.io products from a selection of Amazon products.
Map Products to SKU.io Products (Bulk)
Bulk-maps Amazon products to existing SKU.io products (or `subscription_offering_id`) in a single call. Used by the legacy import wizard.
Import Mappings (CSV/XLSX)
Queues a background job on the `serial` queue to apply Amazon → SKU.io product mappings from a previously uploaded file.
Archive Products (Bulk)
Bulk-archives Amazon products. Body accepts either an explicit ID list, or `mode: 'all'` to archive every product for this integration instance.
Unarchive Products (Bulk)
Bulk-unarchives previously archived Amazon products. Same body shape as the bulk Archive endpoint (`ids` or `mode = 'all'`).
Check Archiveable
Pre-flight check that returns per-product status (`can_archive` / reason if not) for the supplied selection. Used by the UI to disable Archive in bulk-action menus when some rows can't be archived (e.g. they have open orders).
Delete Products (Bulk)
Bulk-deletes Amazon product records (and their `ProductListing` rows). Body accepts `ids` (array) or `mode: 'all'`.
Check Deleteable
Pre-flight check for the bulk-delete action. Returns per-product `can_delete` / `reason` so the UI can disable Delete in the bulk-action menu when some rows can't be removed (typically because they have linked orders or inventory movements).
Sync Inventory to Amazon
Submits the supplied SKU.io `product_listings` IDs to Amazon as an inventory feed. The controller groups listings by Amazon marketplace country code and dispatches one sync per group so that each marketplace gets its own feed.
Show FNSKU Product
Get details of a specific FNSKU product.
Generate FNSKU Products
Generate FNSKU product records from inventory data.
Link FNSKU to Product
Link a FNSKU product to an internal product.
Bulk Map by ASIN
Bulk map FNSKU products by ASIN to internal products.
Get Auto-Mapping Settings
Get FNSKU auto-mapping settings for an integration instance. Returns whether new FNSKUs are automatically mapped to a product when a matching ASIN mapping already exists. Email and in-app alerts for unmapped FNSKUs are configured separately via alert notification preferences.
Update Auto-Mapping Settings
Update FNSKU auto-mapping settings for an integration instance. Accepts `is_fnsku_auto_mapping_enabled` (boolean) to control whether new FNSKUs are automatically mapped when a matching ASIN mapping exists. Email and in-app alerts for unmapped FNSKUs are configured separately via alert notification preferences.
Get Activity Log
Get FNSKU product mapping activity log for an integration instance.
Show FBA Inventory Record
Get a specific FBA inventory report record.
Show Ledger Summary
Get a specific ledger summary record.
Get Customer Return (Per Instance)
Get a single FBA customer return report row by ID. Rows are imported from the Amazon FBA customer returns report and describe one returned unit event: order_id, sku, asin, fnsku, product_name, quantity, fulfillment_center_id, detailed_disposition (e.g. SELLABLE, CUSTOMER_DAMAGED), reason, status, license_plate_number, customer_comments, plus review metadata (reviewed_at) and the return timestamps (return_date, event_datetime) in UTC ISO 8601 format.
Get FBA Shipment Record (Per Instance)
Get a single Amazon-fulfilled shipment report row by ID. Rows are imported from the Amazon fulfilled shipments report and describe one shipped order item: Amazon order/item identifiers, purchase, payment, shipment and reporting timestamps (UTC ISO 8601), buyer and recipient details, ship-to and bill-to addresses, item/shipping/gift-wrap prices and taxes, promotion discounts, carrier and tracking number, fulfillment center, fulfillment channel and sales channel.
Get Restock Report Row (Per Instance)
Get a single row of the Amazon restock inventory recommendations report by ID. Each row is one FNSKU/marketplace combination with Amazon's replenishment guidance: identification (fnsku, merchant_sku, asin, product_name, condition, country), pricing and sales velocity (price, sales_last_30_days, units_sold_last_30_days), current inventory position (total_units, inbound, available, fc_transfer, fc_processing, customer_order, unfulfillable, working, shipped, receiving), days of supply, alerts, and Amazon's recommended_replenishment_qty and recommended_ship_date (Y-m-d).
Show Settlement Data
Get a specific settlement data record.
Get Type Mappings
Get settlement type mappings for an integration instance.
Map Settlement Types
Update settlement type mappings (maps transaction types to nominal codes).
Get Type Mapping Lookups
Get lookup data (nominal codes, mapping groups) for the settlement type mapping form.
Bulk Assign Type Mappings
Bulk assign a nominal code or mapping group to multiple settlement type mappings.
Import Settlement Types
Import settlement type mappings from a CSV file.
Export Settlement Types
Export settlement type mappings as CSV/Excel.
Get Fallback Settings (Per Instance)
Get fallback finance settings (default nominal codes) for an Amazon integration instance.
Update Fallback Settings (Per Instance)
Update fallback finance settings for an integration instance.
List Mapping Groups
List settlement mapping groups for an integration instance.
Create Mapping Group
Create a new settlement mapping group.
Update Mapping Group
Update a settlement mapping group.
Delete Mapping Group
Delete a settlement mapping group.
Reorder Mapping Groups
Reorder settlement mapping groups by providing an ordered list of IDs.
Show AWD Ledger
Get a specific AWD ledger entry.
Import AWD Ledger
Import AWD ledger data from a CSV file.
Reconcile All AWD Ledgers
Reconcile all unreconciled AWD ledger entries.
Reconcile AWD Ledgers
Reconcile specific AWD ledger entries.
Unreconcile AWD Ledgers
Unreconcile specific AWD ledger entries.
Delete AWD Ledgers
Delete specific AWD ledger entries.
Get Linkable Sales Order Lines
Get sales order lines that can be linked to an AWD ledger entry.
Link to Sales Order Line
Link an AWD ledger entry to a sales order line.
Unlink from Sales Order Line
Unlink an AWD ledger entry from its sales order line.
Get Linkable Ledgers for Sales Order Line
Get AWD ledger entries that can be linked to a specific sales order line.
Get Linkable Destination Warehouses
Get warehouses that can serve as transfer destinations for an AWD ledger entry.
Link to Warehouse Transfer
Link an AWD ledger entry to a warehouse transfer.
Unlink from Warehouse Transfer
Unlink an AWD ledger entry from its warehouse transfer.
List Nominal Code Mappings
List financial event type to nominal code mappings for an integration instance.
Create Nominal Code Mapping
Create a new financial event type to nominal code mapping.
Get Report Info
Get report configuration and status information for an integration instance.
Sync Report
Trigger a sync for a specific Amazon report.
Create Report
Request a new Amazon report.
Get Finance Dashboard
Get Finance Dashboard
New Ledger Bulk COGS Suggestions
Get COGS suggestions for multiple new ledger entries in bulk.
Create Next Report Request
Create the next pending report request for a report type on this integration instance. Computes the next data window — from the last synced data point up to the newest safe end time (Amazon report data is delayed by up to 72 hours depending on report type) — and stores a report request row without calling Amazon yet. Submit it with the Create Report from Request endpoint. If an identical pending request already exists it is returned instead of creating a duplicate. Report types with long windows are split into multiple requests; the first created request is returned.
Create Report from Request
Submit a stored report request to Amazon, creating the actual report. Calls the Amazon Selling Partner API to create a report for the request's type, data window, options and marketplaces, stores the resulting report record with its Amazon report id, and deletes the report request. The report's processing status is subsequently updated by the scheduled report sync, and its rows are imported once Amazon finishes generating it.
Show Financial Event Group
Get a specific financial event group.
List FNSKU Products (paginated, with reconciliation data)
Returns a paginated list of FNSKU products across all integration instances, enriched with per-record reconciliation_data (total_ledgers, reconciled_ledgers, reconciliation_percentage, initial_inventory_reconciled, unreconciled_discrepancies_count, reconciliation_status).
Show FNSKU Product Detail
Returns detail payload for a single FNSKU product (including reconciliation_data, initial_fba_inventory, inventory_summary, related_counts).
Get ASIN mapping statistics
Returns aggregate counts of mapped vs unmapped FNSKUs and ASIN groups.
Search FNSKU products
Lightweight FNSKU search (up to 50 results), used for manual discrepancy creation.
List Unmapped FNSKU Products (paginated)
Paginated list of FNSKU products that are not yet mapped to a product. Uses unified Amazon FNSKU product mapper object.
List Mapped FNSKU Products (paginated)
Paginated list of FNSKU products already mapped to a product. Uses unified Amazon FNSKU product mapper object.
List Unmapped FNSKUs Grouped by ASIN
FNSKUs grouped by ASIN where at least one FNSKU is unmapped. Includes FNSKUs without ASINs grouped as 'No ASIN'.
List Mapped FNSKUs Grouped by ASIN
FNSKUs grouped by ASIN where at least one FNSKU is mapped. mapping_status is 'mapped' or 'partially_mapped'.
Export FNSKU Products (unpaginated)
Returns ALL FNSKU products with reconciliation data (forces per_page=10000). Same filters as the paginated index.
Auto-Mapping Activity Log
Paginated activity log of FNSKU auto-mapping events across all integrations.
FNSKU Discrepancies (paginated)
Paginated discrepancies for an FNSKU product (route-model-bound by id). Adds computed `status` field (reconciled|unreconciled).
FNSKU Ledgers (paginated)
Paginated FBA ledger entries for an FNSKU product, formatted via unified Amazon FNSKU product ledger object.
Inventory Tally Summary
Computes ledger vs summary inventory variance for a specific as-of date, with event-type and discrepancy reason breakdowns.
Map Single FNSKU to a Product
Map a single FNSKU product to a product. Pass product_id=null to unmap (also triggers unreconciliation). When linking, dispatches a tracked reconciliation job.
Map all FNSKUs for an ASIN to a Product
Map every FNSKU with the given ASIN to a product. Pass product_id=null to unmap.
Bulk Reconcile
Dispatch bulk reconciliation for the given FNSKU product IDs, or for all IDs matching `filters` when `apply_to_all=true`.
Bulk Unreconcile
Dispatch bulk unreconciliation for the given FNSKU product IDs, or for all IDs matching `filters` when `apply_to_all=true`.
Reconcile All (tracked job)
Dispatches a tracked a background job. Returns the tracked_job_log_id so the frontend can monitor progress via the tracked job log endpoints.
Bulk Link (to single product)
Link the given FNSKU products to a single product (or all filtered IDs when apply_to_all=true). Dispatches a tracked reconciliation job.
Update Initial Unit Cost (single)
Update the initial unit cost for a single FNSKU product.
Update Auto-Mapping Settings (Bulk)
Bulk update FNSKU auto-mapping settings across multiple integration instances. Provide `ids` (array of integration instance IDs) and `is_fnsku_auto_mapping_enabled` (boolean). Email and in-app alerts for unmapped FNSKUs are configured separately via alert notification preferences.
Complete Partial Mapping (by ASIN)
For an ASIN that has some FNSKUs mapped and some unmapped, link the unmapped ones to the most-common existing product.
FNSKU Summary Ledgers (paginated)
Paginated FBA inventory ledger summary rows for an FNSKU product.
FNSKU Removal Orders (paginated)
Paginated removal orders associated with an FNSKU product.
FNSKU Removal Shipments (paginated)
Paginated removal shipments associated with an FNSKU product.
Reconciliation Timeline (paginated)
Chronological reconciliation stream (ledger entries + discrepancies) with running tally, FIFO layer data, and summary balances.
Reconciliation Sync Status
Summary statistics about how many entries are reconciled.
Reconciliation Chart Data
Time-series data points for the reconciliation chart for a single FNSKU product.
Bulk Unlink
Unlink the given FNSKU products from their products (or all filtered IDs when apply_to_all=true). Each is also auto-unreconciled.
Unreconcile All (tracked job)
Dispatches a tracked a background job. Returns the tracked_job_log_id for progress monitoring.
Reconcile Single FNSKU
Synchronously reconcile a single FNSKU product's COGS. Long-running (time limit raised to 300s).
Unreconcile Single FNSKU
Synchronously unreconcile a single FNSKU product's COGS.
Bulk Update Initial Unit Cost
Apply the same initial unit cost to multiple FNSKU products.
Suggested Initial Unit Cost (single)
Returns suggestions for the initial unit cost: from the mapped product's unit_cost and from sibling FNSKUs (same product + same country/location).
ASIN Suggestion (single)
Looks up the ASIN/MSKU/title for the given FNSKU and checks if another FNSKU with the same ASIN is already mapped to a product.
Bulk Suggested Initial Unit Cost
Returns per-FNSKU initial unit cost suggestions with pre-computed `recommended_value` and `is_uniform` flags for bulk editing.
Create FIFO Layers for Initial Inventory
Create FIFO layers for initial inventory. Specific IDs run synchronously; `apply_to_all=true` dispatches a tracked a background job.
List Ledgers
List Ledgers
Get Ledger
Get Ledger
Get Ledger Activity Log
Get Ledger Activity Log
Export Ledgers
Export Ledgers
List Summary Ledgers
List Summary Ledgers
Get Summary Ledger
Get Summary Ledger
Get Current Summary
Get Current Summary
Export Summary Ledgers
Export Summary Ledgers
Get Summary Ledger Activity Log
Get Summary Ledger Activity Log
List FBA Customer Returns (Across Instances)
Returns a paginated list of Amazon FBA customer returns aggregated across all (or selected) Amazon integration instances.
Bulk Mark Customer Returns as Reviewed
Dispatches a tracked background job to mark the given Amazon FBA customer return records as reviewed by the authenticated user.
Bulk Mark Customer Returns as Unreviewed
Dispatches a tracked background job to mark the given Amazon FBA customer return records as NOT reviewed (clearing `reviewed_at` and `reviewed_by_user_id`).
Get Customer Return KPI Stats
Returns headline counts for FBA customer returns across integration instances:
Get Customer Return
Returns a single FBA customer return report row with its cross-links resolved:
Get Customer Return Activity Log
Returns the activity log for a single FBA customer return row: the most recent 200 entries, newest first (not paginated). Each entry contains id, description, event (created / updated / deleted), causer ({id, name, email} of the user who made the change, or null for system changes), properties (old and attributes objects with the changed field values), and created_at (UTC).
List Removal Orders (Grouped Across Instances)
Returns paginated removal orders grouped by (order_id, integration_instance_id). Each row is a SUMMARY with aggregated quantities, a representative status/type/disposition, line_count, and a lines array containing line-level rows for expandable UI.
Show Removal Order
Returns a single removal order line-level row, with integrationInstance and amazonFnskuProduct.product eager-loaded.
Export Removal Orders
Exports ALL removal orders (line-level) across integration instances as a JSON collection (no pagination). Used by frontend export flow.
Bulk Archive Removal Orders
Dispatches a tracked job to bulk-archive removal orders. Body: { ids: int[] } (required, min 1, max 1000). Returns tracked_job_log_id.
Bulk Unarchive Removal Orders
Dispatches a tracked job to bulk-unarchive removal orders. Body: { ids: int[] } (required, min 1, max 1000). Returns tracked_job_log_id.
Bulk Unprocess Removal Orders
Dispatches a tracked job to bulk-unprocess removal orders (undo all receipts). Body: { ids: int[] } (required, min 1, max 1000). Returns tracked_job_log_id.
List Removal Shipments (paginated, across instances)
Returns a paginated list of Amazon FBA removal shipments aggregated across integration instances. Excludes archived shipments by default unless filter[archived]=all|only is provided. Eager-loads integrationInstance and amazonFnskuProduct.product.
Show Removal Shipment
Returns a single Amazon FBA removal shipment by id. Eager-loads integrationInstance and amazonFnskuProduct.product.
Export Removal Shipments (across instances)
Returns all matching Amazon removal shipments (not paginated) across integration instances for export purposes. Results are sorted by shipment_date descending. Note: these are flat top-level query parameters (not Spatie filter[*] format).
Bulk Archive Removal Shipments
Dispatches a tracked background job to bulk-archive the specified removal shipments. Body: `ids` (required array, min 1, max 1000 integers). Returns the tracked_job_log_id so the frontend can subscribe to job progress via the tracked job log endpoints.
Bulk Unarchive Removal Shipments
Dispatches a tracked background job to bulk-unarchive the specified removal shipments. Body: `ids` (required array, min 1, max 1000 integers). Returns the tracked_job_log_id so the frontend can subscribe to job progress via the tracked job log endpoints.
Get Removal Shipment Activity Log
Returns the activity log for a single FBA removal shipment row: the most recent 200 entries, newest first (not paginated). Each entry contains id, description, event (created / updated / deleted), causer ({id, name, email} of the user who made the change, or null for system changes), properties (old and attributes objects with the changed field values), and created_at (UTC).
Bulk Unprocess Removal Shipments
Undoes receipt processing for the selected removal shipments — removing the warehouse receipts and inventory movements created when the shipments were processed. Queues a background job and returns a tracked_job_log_id for polling progress.
List Transactions (paginated, cross-instance)
Get paginated Amazon transactions across all (or filtered) integration instances. Response wraps standard Laravel pagination plus an `unfiltered_total` field showing the true catalog size for the ExportModal 'All records' option. By default, superseded transactions are excluded — pass filter[include_superseded]=true to include them.
Show Transaction
Get a single Amazon transaction with full details: integration instance, items + their breakdowns, transaction-level breakdowns, breakdown totals grouped by top-level type, and any entities created when it was processed (SalesCredit, FinancialLine, etc.).
Statistics (grouped breakdowns)
Returns breakdown statistics grouped into business categories (sales, fees, refunds, other, net) — amounts per currency — plus available filter values for dropdowns. Excludes superseded transactions to prevent double-counting.
Sync Transactions (background job)
Dispatch a background job for each active Amazon integration instance (or only those specified via integration_instance_ids, comma-separated). Returns the count of dispatched jobs.
Process Transaction
Process a single transaction — creates the appropriate financial entities (SalesCredit, FinancialLine, etc.) and triggers a financials recalculation for affected sales order lines. Returns 422 with an error when the transaction is invalid or has no linked sales order.
Unprocess Transaction
Reverse processing for a single transaction — deletes/reverses all entities created when the transaction was originally processed. Returns the refreshed transaction resource.
Bulk Process Transactions
Process multiple transactions in one request. Required: transaction_ids (array, min 1, each must exist in amazon_transactions.id). Triggers a financials recalculation after completion.
Bulk Unprocess Transactions
Reverse processing for multiple transactions. Required: transaction_ids (array, min 1, each must exist).
Process All (background job)
Dispatch a background job — processes all unprocessed transactions matching the optional filters. Returns the tracked job log ID so the frontend can poll progress via /process-all/status or the tracked job log endpoints.
Process All Status
Returns the most recent a background job status for the authenticated user — pulled from TrackedJobLog. If a Laravel Bus batch is attached, includes per-batch progress (total/pending/processed/failed jobs, finished/cancelled flags, progress percentage).
Export Transactions (background job)
Dispatch a background job — generates an xlsx/csv export honouring the current filters (or a selected ID list). Returns a tracked_job_log_id; once complete, download the result via /export/download?file=...
Download Export File
Download a completed export file from the model-exports disk. Returns the binary file with Content-Type set based on extension (text/csv for .csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for .xlsx). 404 if file is missing.
List FBA Shipments Detail (paginated, across instances)
Paginated list of FBA shipments-detail rows aggregated across Amazon integration instances. Each row represents one shipped item line from the GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL report. Filtering uses Spatie QueryBuilder with AdvancedSearchFilter (search across order/shipment/product/tracking/recipient fields) plus ~25 text filters, ~9 numeric filters, and ~8 datetime filters. Response includes linked_sales_order (bulk-resolved via amazon_order_id → amazon_orders → sales_orders join) and amazon_product (bulk-resolved by integration_instance_id + seller_sku). Default sort: -shipment_date.
FBA Shipments Detail — KPI Stats
Cross-instance KPI summary for the FBA Shipments Detail listing. Returns total_shipments (row count), total_units (sum of quantity_shipped), total_revenue (sum of item_price), and unique_orders (distinct amazon_order_id count). Used to drive the dashboard-card row above the listing.
Show FBA Shipment Detail Row
Single FBA shipment-detail row by ID with eager-loaded integrationInstance and bulk-resolved cross-links: linked_sales_order (via amazon_order_id) and amazon_product (via integration_instance_id + seller SKU). Use this to power the detail page.
List FBA Inventory
List FBA Inventory
Get FBA Inventory Record
Returns a single FBA-managed inventory report row (from Amazon's FBA inventory report) with cross-links resolved:
List Shipments
Returns a paginated `LengthAwarePaginator` of new (v2) FBA inbound shipments across one or more Amazon integration instances. Each item is transformed by Amazon new FBA inbound shipment object and includes identifier fields (`shipmentId`, `shipmentConfirmationId`, `amazonReferenceId`, `name`, `sourceName`), status info (`status`, `pending_status`, `errorLog`, `is_archived`), destination block (`destinationCountry`, `destinationWarehouse`, `destinationType`, `destination`), transportation IDs, the `sku_link` block (linked Purchase Order or Warehouse Transfer), `actual_source` (resolved supplier/from-warehouse derived from the SKU link), and `ship_from_mapping` (the mapping that *would* be applied today — used to surface divergence client-side). When the relevant relations are eager-loaded the resource also returns `pending_inbound`, `receipts`, and `items`. Defaults to excluding archived shipments unless `filter[archived]` is provided.
Export Shipment Items (CSV)
Streams a CSV download of new inbound shipment items (line-level rows) across the supplied integration instances. Each row represents one line item with its parent shipment info repeated. Columns: `sr_no`, `confirmation_id`, `shipment_id`, `shipment_name`, `status`, `source_name`, `destination_country`, `destination_warehouse`, `integration`, `msku`, `fnsku`, `asin`, `quantity_sent`, `quantity_received`, `shipment_created_at`.
Refresh All (Sync from Amazon)
Dispatches a background job to (re)sync new FBA inbound shipments (via their plans) from Amazon for one or more integration instances. Returns immediately with a `tracked_job_log_id` that the frontend uses to render progress via the tracked job log endpoints.
Process All (Apply Unprocessed Shipments)
Dispatches a background job which links unprocessed new FBA inbound shipments to their SKU.io source records (Purchase Orders / Warehouse Transfers via ship-from mappings) and processes cancellations across one or more integration instances. Returns immediately with a `tracked_job_log_id` for the tracked job log endpoints.
KPI Stats
Returns KPI counts for the New Inbound Shipments page, scoped to active (non-archived) shipments only. Counts are computed across the provided integration instances (or all instances when none supplied). Response keys:
List Legacy FBA Inbound Shipments
Returns a paginated list of legacy `AmazonFbaInboundShipment` records aggregated across one or more integration instances. Eager loads `integrationInstance` and `skuLink`.
Export Shipment Items (CSV)
Exports legacy inbound shipment items (line-level) across the specified integration instances as a CSV file download. One row per `AmazonFbaInboundShipmentItem` with shipment metadata repeated per line.
Refresh All Shipments (dispatch tracked job)
Dispatches a background job to refresh legacy inbound shipments from Amazon across the specified integration instances.
Process All Unprocessed Shipments (dispatch tracked job)
Dispatches a background job to process unprocessed legacy inbound shipments across the specified integration instances. Processing handles SKU linking, ledger entries, and cancellation reconciliation.
Get KPI Stats
Returns KPI counts for legacy inbound shipments aggregated across the specified integration instances:
List Discrepancies
List Discrepancies
Create Discrepancy
Create Discrepancy
Get Discrepancy
Get Discrepancy
Export Discrepancies
Export Discrepancies
Get Discrepancy Statistics
Get Discrepancy Statistics
Recheck Discrepancy
Recheck Discrepancy
Recheck All Discrepancies (Async)
Recheck All Discrepancies (Async)
Update Investigation Status
Update Investigation Status
Get Discrepancy Recheck Progress
Polls the progress of a queued discrepancy recheck background job. Start the job with POST /api/amazon/unified/discrepancies/recheck-all-async, which returns a tracked_job_log_id to use as the path parameter here.
Get Discrepancy Activity Log
Returns the paginated activity log for a single FBA inventory ledger discrepancy, newest first. Each entry contains id, description, event (created / updated / deleted / bulk_upsert), properties (the recorded old and new attribute values plus the change source), causer_name (the user who made the change, null for system changes), and created_at (UTC).
Get Discrepancy Detailed Data
Returns a discrepancy together with the contextual data needed to investigate it. All dates are Y-m-d in the application timezone.
Get Discrepancy Impact Analysis
Compares SKU.io's cost-layer-derived inventory position for the discrepancy's FNSKU product against Amazon's daily inventory ledger summary balances, so you can see whether the discrepancy still affects on-hand inventory.
List Related Discrepancy Ledgers
Returns the paginated individual ledger events recorded for the discrepancy's FNSKU product around the discrepancy date (default: 7 days either side, adjustable with days_range), newest first. Useful for spotting the specific ledger rows behind a summary mismatch.
Update Discrepancy Investigation Notes
Updates the free-text investigation notes on a single discrepancy. Send investigation_notes as a string of up to 5000 characters, or null to clear the notes. The investigation status is not changed by this endpoint (use the investigation-status endpoints for that).
Bulk Update Discrepancy Investigation Status
Sets the investigation status on multiple discrepancies in one call.
Bulk Recheck Discrepancies
Re-evaluates the selected discrepancies against the current ledger summary and ledger event data, synchronously (results are returned in the same request).
Recheck All Discrepancies
Re-evaluates every ledger_summary_mismatch discrepancy matching the filters against the current ledger summary and ledger event data. This variant runs synchronously in the request — with large numbers of discrepancies it can be slow; prefer POST /api/amazon/unified/discrepancies/recheck-all-async, which queues a background job and returns a tracked_job_log_id for polling progress.
List Financial Event Groups
List Financial Event Groups
Get Financial Event Group
Get Financial Event Group
Export Financial Event Groups
Export Financial Event Groups
Generate Accounting Transactions
Generate Accounting Transactions
Delete Accounting Transactions
Delete Accounting Transactions
Bulk Generate
Bulk Generate
Update Base Currency Rate
Update Base Currency Rate
Get Bulk Manage Preflight for Financial Event Groups
Returns a read-only preview for the Bulk Manage Financial Event Groups action, without making any changes. Financial event groups are Amazon settlement (bank transaction) groupings used to generate accounting transactions in SKU.io.
Bulk Manage Financial Event Groups
Bulk manages accounting transactions for Amazon financial event groups (settlement/bank-transaction groupings): selectively deletes the specified accounting transactions (including their lines, and clearing settlement-data links back to them), then optionally generates accounting transactions for every eligible ('ready') group.
Get Bulk Regenerate Preflight for Financial Event Groups
Returns a read-only impact summary for the Bulk Regenerate Accounting Transactions action, without making any changes. It inspects every financial event group that currently has accounting transactions and reports:
Bulk Regenerate Accounting Transactions
Deletes and regenerates accounting transactions for every Amazon financial event group that currently has them. Groups with transactions linked to an external accounting integration are skipped (they are never deleted by this action). Use `GET .../bulk-regenerate/preflight` first to see how many groups are eligible and which will be skipped.
Get Purge Pre-Start Preflight for Financial Event Groups
Dry run of the purge-pre-start action: lists the Amazon financial event groups whose settlement period starts BEFORE the account's inventory start date. These are historical records that will never have matching settlement reports imported. No changes are made.
Purge Pre-Start Financial Event Groups
Queues a background job that deletes every Amazon financial event group (settlement transaction) whose settlement period starts BEFORE the account's inventory start date, along with its settlement data. These historical records predate inventory tracking and will never have matching settlement reports. Run `GET .../purge-pre-start/preflight` first to review exactly which groups will be removed.
List Reports
List Reports
Get Report
Get Report
Get Report Statistics
Get Report Statistics
Get Available Report Types
Get Available Report Types
Process Report
Process Report
Request Raw Data Download
Queues an asynchronous a background job to fetch the report's raw data from the SP-API. The job broadcasts an `amazon.report-raw-data.ready` event (status `ready` or `failed`) on the requesting user's private channel (`App.Models.User.{tenantId}.{userId}`) when it finishes, so the SPA can refetch the raw data without polling. Returns immediately with 200 once the job is dispatched, or 404 if the report does not exist.
Get Report Raw Data
Returns the raw file content of a downloaded Amazon SP-API report as a string, together with its stored filename. Amazon reports are typically tab-separated (TSV) text.
List Report Associated Data
Returns the paginated data rows that were imported into SKU.io from a specific Amazon SP-API report. Currently supported for ledger-based report types (inventory ledger detail, FBA inventory, removal orders and removal shipments reports); for those the response contains the Amazon inventory ledger entries created from the report, sorted by event date descending. Report types without associated data return 422.
Get Report Status
Returns the current lifecycle status of an Amazon SP-API report record for progress monitoring/polling.
Clone Report
Clones an existing Amazon SP-API report record: immediately requests a NEW report from Amazon with the same report type, data date range, marketplaces and options as the original, but with duplicate protection enabled (`disallow_duplicates` = true, so rows already imported from earlier reports are skipped when the clone is processed).
Cancel Report
Cancels an in-progress Amazon SP-API report record in SKU.io by marking its processing status as `CANCELLED`. This is a local status change only - it does not cancel the report request on Amazon's side. Use it to unblock creating a new report request of the same type when a previous request is stuck.
List Settlement Data
List Settlement Data
Get Settlement Data Lookups
Get Settlement Data Lookups
List Type Mappings
List Type Mappings
Get Type Mapping Lookups
Get Type Mapping Lookups
Bulk Assign Type Mappings
Bulk Assign Type Mappings
Export Type Mappings
Export Type Mappings
Import Type Mappings
Import Type Mappings
List Settlement Type Mapping Instances by Financial Code
Returns the resolved settlement type mapping for a single financial code, per Amazon integration instance. Settlement type mappings map Amazon settlement fee/transaction types to nominal codes (and settlement mapping groups) used when generating accounting transactions; overrides are per-instance exceptions to the global mapping.
Create Settlement Type Mapping Override
Creates a per-instance override for a settlement financial code, replacing the global mapping for that Amazon integration instance only. If an override already exists for the same instance and financial code, it is updated in place (upsert). The global mapping row for the financial code must already exist - otherwise a 404 is returned.
Delete Settlement Type Mapping Override
Deletes a per-instance settlement type mapping override. The affected Amazon integration instance falls back to the global mapping for that financial code. Only override records (rows tied to an integration instance) can be deleted - passing the ID of a global mapping returns 404.
Get Fallback Settings
Get Fallback Settings
Update Fallback Settings
Update Fallback Settings
List Mapping Groups
List Mapping Groups
Create Mapping Group
Create Mapping Group
Update Mapping Group
Update Mapping Group
Delete Mapping Group
Delete Mapping Group
Reorder Settlement Mapping Groups
Reorders the global Amazon settlement mapping groups. Mapping groups control how settlement lines are grouped into generated accounting documents (each group produces one invoice or bill per settlement), and their order determines display/processing order.
Get AWD initial inventory status
Returns the AWD initial inventory setup status for each NA-region Amazon integration instance, including the as-of date (day before fba_inventory_tracking_start_date). The as-of date is converted from UTC to the app timezone for display.
Get AWD initial inventory summary
Returns aggregated AWD initial inventory summary statistics (counts, totals, unique FNSKUs/countries) for each integration instance.
List AWD shipments (paginated)
Paginated AWD shipments across integration instances. Eager loads integrationInstance and items, and calls loadUnitQuantitiesForItems() per shipment.
Delete AWD shipments
Deletes selected AWD shipments by IDs. Same validation pattern as process/unprocess: ids array OR apply_to_all + filters.
Show AWD shipment
Returns a single AWD shipment with items, origin warehouse, origin supplier, integrationInstance, and full quantity/inventory data eager-loaded.
List AWD ledgers (paginated)
Paginated AWD ledger entries across integration instances. Eager-loads integrationInstance, fnskuProduct.product, fifoLayer, fifoConsumptions, salesOrderLines.salesOrder/product, warehouseTransferLines.warehouseTransfer, fbaWarehouseTransfer.
Delete AWD ledgers
Deletes AWD ledger entries by IDs. Same validation pattern as other bulk ledger ops.
Refresh AWD shipments (dispatch jobs)
Dispatches a background job for each instance. Skips non-NA region, AWD-sync-disabled, and AWD-access-denied instances. Blocks instances whose initial inventory has not been handled. The job fetches the shipment list, dispatches detail-fetch jobs, then auto-processes.
Process AWD shipments
Processes selected AWD shipments by IDs (creates WT/PO links based on ship-from mappings). Pass ids: [...] for explicit selection, OR apply_to_all: true + filters: {...} to operate on every shipment matching the filter set. Validation: apply_to_all (sometimes|boolean), filters (required_if:apply_to_all,true|array), ids (required_without:apply_to_all|array), ids.* (integer).
List ship-from mappings (paginated)
Paginated AWD/FBA ship-from mappings across integration instances. Eager loads integrationInstance and the polymorphic link (Supplier or Warehouse).
Get AWD initial inventory details
Returns detailed AWD initial inventory entries with their FIFO layer data (unit_cost, total_value, fifo_layer_id, cogs_source) for the specified integration instances.
Confirm no AWD initial inventory
Marks the specified integration instances as having no AWD initial inventory. Sets awd_initial_inventory_confirmed_no_inventory=true so AWD sync can proceed.
Import AWD initial inventory
Imports AWD initial inventory from a previously uploaded CSV file (AWD Inventory Ledger - Summary report). The integration instance is auto-detected from FNSKU data; integration_instance_id is used as a fallback if auto-detection fails. Required field: stored_name (string). Optional: integration_instance_id (integer). The endpoint validates that FNSKUs are mapped before proceeding.
Delete AWD initial inventory
Deletes all AWD initial inventory entries (and their FIFO layers) for the specified integration instances. Resets the awd_initial_inventory_imported and awd_initial_inventory_confirmed_no_inventory flags so initial inventory can be re-imported or re-confirmed.
Update AWD sync enabled
Enables or disables AWD sync per integration instance (stored in integration_settings, replaces the legacy AMAZON_AWD_SYNC_ENABLED env var). Required fields: integration_instance_ids (array of integers, min 1, each must exist in integration_instances.id), awd_sync_enabled (boolean).
Unprocess AWD shipments
Unlinks (unprocesses) selected AWD shipments by IDs, clearing their sku_link. Same validation pattern as process: pass ids or use apply_to_all + filters.
Get eligible purchase orders for AWD shipment
Returns the purchase orders eligible for linking to the given AWD shipment, with PO line summaries.
Link AWD shipment to purchase order
Links the AWD shipment to an existing purchase order. Required: purchase_order_id (integer, must exist in purchase_orders.id).
Unlink AWD shipment from purchase order
Unlinks an AWD shipment from its linked purchase order, clearing the sku_link reference. No body required.
Import AWD ledger CSV
Imports an AWD ledger CSV file. Integration instance is auto-detected from the FNSKU/Reference ID data in the CSV. Required: stored_name (string). Optional: integration_instance_id (integer) as fallback when auto-detection fails. Checks for unmapped FNSKUs before processing.
Reconcile AWD ledgers
Reconciles AWD ledger entries by IDs. Groups by integration instance internally. Same validation as other bulk ops: ids array OR apply_to_all + filters.
Unreconcile AWD ledgers
Unreconciles AWD ledger entries by IDs. Clears reconciled_at, reconciled_quantity, and amazon_fifo_layer_id. Same validation pattern.
Update ship-from mapping
Updates a ship-from mapping's link target. Optional: link_id (integer, nullable), link_type (string, nullable, must be 'App\\Models\\Supplier' or 'App\\Models\\Warehouse'). Pass null link_id to clear the mapping.
Bulk update ship-from mappings
Bulk updates ship-from mappings. Two modes: (1) explicit ids: [...] OR (2) apply_to_all: true + filters: {...}. Validation: apply_to_all (sometimes|boolean), filters (required_if:apply_to_all,true|array), ids (required_without:apply_to_all|array), ids.* (integer, must exist in amazon_fba_inbound_ship_from_mappings.id), link_id (nullable|integer), link_type (nullable|string|in:App\\Models\\Supplier,App\\Models\\Warehouse). Pass null link_id to clear mappings.
Reset AWD Access
Resets the stored 'AWD access denied' flag for the specified Amazon integration instances. An instance is flagged as access-denied when Amazon's AWD (Amazon Warehousing & Distribution) API returns a 403 for it; while flagged, AWD syncing is skipped for that instance. Resetting the flag causes the next AWD sync to re-probe Amazon and re-check eligibility.
List Restock Report
List Restock Report
Get Restock Report Row
Returns a single row from Amazon's FBA restock recommendations report, with the amazon_product cross-link resolved ({id} of the Amazon listing matching the row's merchant SKU on the same integration instance, or null when no match).
List Unified MCF Fulfillment Orders
Returns a paginated list of MCF (Multi-Channel Fulfillment) orders aggregated across all Amazon integration instances the user has access to. Supports Spatie QueryBuilder filters and sorts. Each item includes related integration instance, sales order fulfillment, items, and shipments.
Show Unified MCF Fulfillment Order
Returns a single MCF fulfillment order with full detail, including the integration instance, related sales order fulfillment, all order items, shipments, and return authorizations. Response is wrapped in the application's standard envelope (top-level `data`).
Get Fulfillment Order Activity Log
Returns the activity log for a single multi-channel fulfillment (MCF) order: the most recent 200 entries, newest first (not paginated). Each entry contains id, description, event (created / updated / deleted), causer ({id, name, email} of the user who made the change, or null for system changes), properties (old and attributes objects with the changed field values), and created_at (UTC).
List FBA Storage Fees (Across Instances)
Paginated monthly FBA storage fee report rows (GET_FBA_STORAGE_FEE_CHARGES_DATA) aggregated across all Amazon integration instances. One row per FNSKU per fulfillment center per charge month.
List Storage Fee Currencies
Distinct currency codes present across storage fee rows, optionally scoped to specific integration instances. Used to populate the Currency filter on the Storage Fees report page.
Request Latest Storage Fee Report (Sync)
Request the FBA storage fee report (GET_FBA_STORAGE_FEE_CHARGES_DATA) from Amazon, backfilling from the instance's FBA inventory tracking start month forward. Per instance, only the next contiguous block of charge months with NO data yet is requested (a single report covers a multi-month window), so months already imported are never re-requested. When every month through the last completed month is already present, no report is requested and the response carries requested=false.
Get Cost Entry Creation Setting
Aggregate state of the per-instance 'create cost entries from FBA storage fee reports' setting across the selected Amazon integrations. The same setting gates both the storage fee and aged-inventory surcharge reports. `enabled` is true when every instance has it on, false when all off, and null when mixed.
Update Cost Entry Creation Setting
Enable or disable cost entry creation across the selected Amazon integrations (omit integration_instance_ids to apply to all). Returns the resulting aggregate state. When enabled, future report runs turn each month's report into a cost entry with per-product allocations.
Get Report Schedule (Next Run)
Report-pipeline status for the daily FBA storage fee and aged-inventory surcharge report requests, powering the always-visible status strip on each report page. Scoped to the selected (FBA-enabled) integration instances via the optional `integration_instance_ids` filter.
Process Cost Entries Now
Runs the storage fee cost entry creation logic now on already-imported report data — building/refreshing one cost entry per month with per-product allocations, per FBA-enabled instance. Does NOT re-fetch from Amazon. The manual counterpart to the automatic per-instance setting. Returns tracked job log IDs so the UI can follow progress via the tracked job log endpoints.
Get Unmatched FNSKUs for Cost Entry
For a cost entry automatically created from an Amazon storage fee report (monthly storage fees or the long-term/aged inventory surcharge), returns the per-FNSKU fee rows that could not be allocated to a product because the FNSKU has no product mapping.
List FBA Aged Inventory Surcharges (Across Instances)
Paginated FBA aged-inventory surcharge (long-term storage fee) report rows (GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA) aggregated across all Amazon integration instances. One row per aged-inventory snapshot per SKU.
List Aged Inventory Surcharge Currencies
Distinct currency codes present across aged-inventory surcharge rows, optionally scoped to specific integration instances. Used to populate the Currency filter.
Request Latest Aged Inventory Surcharge Report (Sync)
Request the FBA aged inventory surcharge / long-term storage fee report (GET_FBA_FULFILLMENT_LONGTERM_STORAGE_FEE_CHARGES_DATA) from Amazon, backfilling from the instance's FBA inventory tracking start month forward. Per instance, only the next contiguous block of charge months with NO data yet is requested (a single report covers a multi-month window), so months already imported are never re-requested. When every month through the last completed month is already present, no report is requested and the response carries requested=false.
Process Cost Entries Now
Runs the aged inventory surcharge cost entry creation logic now on already-imported report data — building/refreshing one cost entry per month with per-product allocations, per FBA-enabled instance. Does NOT re-fetch from Amazon. The manual counterpart to the automatic per-instance setting. Returns tracked job log IDs so the UI can follow progress via the tracked job log endpoints.
List Fulfillment Centers (Across Instances)
Distinct fulfillment centers across all five FC-bearing sources (storage fees, ledger, customer returns, shipments, inbound shipments). A fulfillment center is a virtual entity keyed by (integration instance, normalized FC code); every aggregate is computed in a single derived query, so the list is fully sortable and filterable on any aggregate column.
Get Fulfillment Center Overview
Aggregate KPIs for one fulfillment center: country, storage fee total, and counts of storage rows, ledger events, customer returns, shipments, and inbound shipments.
Storage Fees at FC
Paginated monthly storage fee rows at this fulfillment center (normalized FC match).
Ledger Events at FC
Paginated FBA inventory ledger events at this fulfillment center.
Customer Returns at FC
Paginated customer returns processed at this fulfillment center.
Shipments from FC
Paginated outbound (customer) shipment lines from this fulfillment center.
Inbound Shipments to FC
Paginated inbound shipments destined for this fulfillment center.
List FBA Reimbursements
Paginated list of FBA reimbursements Amazon has already paid, unified across all Amazon integration instances. Rows are ingested from the FBA reimbursements report and form the authoritative payout log that reimbursement cases are reconciled against; `amazon_reimbursement_case_id` (and the embedded `reimbursement_case` object) is set when a row has been matched to a tracked case.
List FBA Reimbursement Currencies
Returns the distinct currency codes present in the stored FBA reimbursements, sorted alphabetically — useful for populating a currency filter. Optionally scope to specific instances with `integration_instance_ids` (comma-separated).
Sync FBA Reimbursements
Requests a fresh FBA reimbursements report from Amazon for every Amazon integration instance (or the subset given in `integration_instance_ids`) and ingests the rows into the unified payout log. Queues a background job; returns a job id (`tracked_job_log_id`) for polling progress.
List Notification Subscriptions (with health)
List every SP-API push-notification subscription (any status) for the given Amazon integration instance, each with a computed `healthy` flag. A subscription is healthy when it is ACTIVE and has seen an event (or, if brand-new, been alive) within the `window_minutes` silence window (config `amazon.notifications.health_window_minutes`, default 120). Backs the per-instance Notification Health panel. Requires an initialized tenant context.
Tear Down All Subscriptions
Tear down every active subscription for the instance. Best-effort on Amazon's side (per-type), always marked deleted locally. Returns the count of subscriptions unsubscribed. Requires an initialized tenant context.
Resync (Reconcile) Subscriptions
Force a reconcile: converge the instance's live subscriptions onto exactly what its enabled phase flags imply — create newly-enabled notification types, re-point relocated SQS/EventBridge destinations, and tear down disabled types. Idempotent and safe to re-run after a partial failure; degrades per-type rather than aborting, so one failing type never blocks the rest. Returns counts of what changed. Requires an initialized tenant context.
List Notification Events (audit log, paginated)
Paginated debug/audit log of delivered SP-API notification events across all Amazon instances, newest first. Read-only — lets support staff inspect exactly what Amazon delivered and how each event was processed (pending/processing/processed/failed, plus the raw payload and any error) when reconciling a missed or mis-handled notification. Filter by notification_type, processing_status, integration_instance_ids, or a free-text search over notification_id/error.
Replenishment Grid
Paginated FBA replenishment grid for an Amazon integration instance. Rows start from listed Amazon products (so products without existing FBA inventory or a restock report still appear), enriched with:
Refresh Restock Report
Request a fresh GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT from Amazon for this instance. The report is created immediately and monitored via a tracked job — use the returned tracked_job_log_id with the tracked job log endpoints.
Get Replenishment Settings
Replenishment settings for this instance: the instance-level default (product_id null) plus any per-product overrides, and the timestamp of the last restock report refresh.
Update Replenishment Settings
Upsert replenishment settings. Omit product_id (or send null) to update the instance-level default; send a product_id to create/update a per-product override.
Update Amazon Ads Settings
Update per-connection Amazon Ads settings. Currently this toggles whether a spend sync turns ad spend into cost entries (type 'Amazon Advertising') with per-product cost allocations on mapped SKUs.
Sync Amazon Ads Spend
Dispatch an Amazon Ads Sponsored Products spend sync for this advertiser connection. Fire-and-forget: it queues a background job and returns the tracked-job log id so the frontend can follow progress via the tracked job log endpoints. The job is idempotent — re-syncing an overlapping window restates spend rather than double-counting it (Amazon revises attribution within ~14 days).
List Amazon Ads Spend Records
Paginated per-ASIN/SKU Amazon Ads spend ledger for this advertiser connection. Each row carries spend, 7-day attributed sales, clicks, impressions, 7-day purchases, the computed ACoS, and whether the advertised SKU/ASIN mapped to a SKU.io product (is_mapped + product_* cross-link). Uses Spatie QueryBuilder filters/sorts.
Amazon Ads Spend Summary
Aggregate Amazon Ads spend/attribution summary for this advertiser connection over an optional date window + profile — feeds the summary cards. Returns total spend, 7-day attributed sales, ACoS, mapped vs unmapped spend split, the unmapped distinct SKU/ASIN count, and click/impression/purchase totals. The window defaults to a trailing 14-day range ending yesterday (matching the sync job's default pull) when no bounds are given.
List Amazon Ads Connections
List every Amazon Advertising connection on the account. Each connection is a per-seller Login with Amazon authorization for the Amazon Ads API, holding the advertiser profiles discovered for that seller and the subset selected for spend syncing.
Get Amazon Ads Connection
Get a single Amazon Advertising connection, including its discovered advertiser profiles, the profile ids selected for syncing, and whether spend syncs create cost entries.
Delete Amazon Ads Connection
Delete an Amazon Advertising connection. The stored authorization and profile selection are removed; already-ingested spend records are kept.
List Advertiser Profiles
List the advertiser profiles stored for this connection along with the profile ids the user has opted into for spend syncing. Profiles are discovered from the Amazon Ads API when the connection is authorized and can be re-fetched with Refresh Advertiser Profiles.
Update Selected Advertiser Profiles
Persist which advertiser profiles are selected for spend syncing on this connection. Only selected profiles are pulled during a spend sync.
Refresh Advertiser Profiles
Re-fetch the advertiser profiles from the Amazon Ads API and persist them on the connection. Use this when the seller has gained (or lost) access to advertiser profiles since connecting.