# Log an expense

pricing defaults to amount, which requires amount. pricing unit requires quantity and unitRate, and amount is stored as their product rounded to cents. billable defaults to true. An empty clientId or projectId is allowed. A project the caller can read may be a teammate's shared project. When that project belongs to a client and clientId is omitted, the expense takes the project's client. A clientId that disagrees with the project's client is rejected.

Canonical: https://easerix.com/docs/developers/api/croncrunch/expenses/createExpense

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="croncrunch" operations={[{"path":"/v1/expenses","method":"post"}]} />
    </>
  );
}
