Sell stock
Create a stock sale document that reduces inventory quantities. The payload follows the same line-item structure as income/invoice (date, customer, items[] with item_name, quantity, selling_price, category). COGS is computed automatically from cost_price.
Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Body
1Cash or bank name received into.
Returned as receipt_no.
Set true (or 1) to create a prepaid_income record (unearned revenue). The income is deferred and recognized monthly over prepayment_duration.
Number of months to recognize the prepaid income over. Required when is_prepayment is true.
Liability account name (unearned revenue) for the deferred balance. Defaults to the business unearned revenue account.
Response
Sale document created