Set Revenue Line Mapping
PATCH/api/ebay/:integrationInstance/products/:product/revenue-mapping
Map this eBay listing to a revenue financial line type, or clear that mapping.
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
classificationisrevenue. 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
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.