Skip to main content

Set Revenue Line Mapping

PATCH 

/api/shopify/:integrationInstance/products/:product/revenue-mapping

Map this Shopify listing to a revenue financial line type, or clear that mapping.

Not yet available to API tokens

This endpoint currently requires session authentication; Personal Access Token scope support is in progress.

Once mapped, order lines carrying this listing are imported as a revenue financial line on the sales order instead of a stock-bearing order line. Use it for non-inventory charges sold as listings: package protection, service fees, extended warranties.

No catalog product is created, and none is required. The mapping is stored against the listing itself, so a listing that has never been mapped to a product can still carry a revenue mapping. A listing that IS already mapped to a product keeps that mapping; the revenue line simply wins for future order imports.

Pass financial_line_type_id: null to clear the mapping. Clearing it removes the listing entirely when the revenue mapping was the only thing it carried.

Authentication: Requires Bearer token.

Request body

  • financial_line_type_id: integer or null. Required (the key must be present). The id of a financial line type whose classification is revenue. Pass null to clear the mapping.

Responses

  • 200 - mapping set or cleared; returns the updated listing.
  • 403 - the listing does not belong to the given integration instance.
  • 422 - the referenced financial line type does not exist, or is not a revenue type.

Request

Responses

OK

Response Headers
    Content-Type