# BeanRails - [BeanRails API](https://api-docs.beanrails.com/index.md): Connect your ERP, accounting or e-commerce system to BeanRails. - [Quickstart](https://api-docs.beanrails.com/quickstart.md): Create an API key and make your first request. - [Authentication](https://api-docs.beanrails.com/authentication.md): API keys, scopes and what a key is allowed to see. - [Conventions](https://api-docs.beanrails.com/conventions.md): Pagination, search, filters, dates and money. - [Errors](https://api-docs.beanrails.com/errors.md): Status codes and the error format. - [List contacts](https://api-docs.beanrails.com/api-reference/contacts/list-contacts.md): Returns the contacts your key can see, newest first. Requires the `contacts:read` scope. - [Create a contact](https://api-docs.beanrails.com/api-reference/contacts/create-a-contact.md): Creates a contact. Provide at least one of `company_name`, `first_name`, `last_name`, `email` or `phone`. Requires the `contacts:write` scope. - [Retrieve a contact](https://api-docs.beanrails.com/api-reference/contacts/retrieve-a-contact.md): Requires the `contacts:read` scope. - [Update a contact](https://api-docs.beanrails.com/api-reference/contacts/update-a-contact.md): Updates a contact. Send the full set of fields you want the contact to have; the same required-field rules as creation apply. If you send `addresses`, include each existing address `id` to update it. Requires the `contacts:write` scope. - [List a contact's addresses](https://api-docs.beanrails.com/api-reference/contact-addresses/list-a-contacts-addresses.md): Requires the `contacts:read` scope. - [Add an address to a contact](https://api-docs.beanrails.com/api-reference/contact-addresses/add-an-address-to-a-contact.md): Setting `is_primary` to true demotes the contact's current primary address. Requires the `contacts:write` scope. - [Update a contact address](https://api-docs.beanrails.com/api-reference/contact-addresses/update-a-contact-address.md): Requires the `contacts:write` scope. - [List works](https://api-docs.beanrails.com/api-reference/works/list-works.md): Returns the works your key can see, newest first. Requires the `works:read` scope. - [Create a work](https://api-docs.beanrails.com/api-reference/works/create-a-work.md): Creates a work. When the workspace assigns work numbers automatically, leave `work_number` out. Requires the `works:write` scope. - [Retrieve a work](https://api-docs.beanrails.com/api-reference/works/retrieve-a-work.md): Requires the `works:read` scope. - [Update a work](https://api-docs.beanrails.com/api-reference/works/update-a-work.md): Updates a work. Send the full set of fields you want the work to have; the same required-field rules as creation apply. Completed works can only be updated if the workspace allows it. Requires the `works:write` scope. - [Cancel or reopen a work](https://api-docs.beanrails.com/api-reference/works/cancel-or-reopen-a-work.md): Only two transitions are available through the API. Drivers move works through `in_progress` and `completed` in the mobile app. - [Reschedule a work](https://api-docs.beanrails.com/api-reference/works/reschedule-a-work.md): Changes the date, time window or vehicle of a work. Send only the fields you want to change. Requires the `works:write` scope. - [List proof of delivery records of a work](https://api-docs.beanrails.com/api-reference/work-pods/list-proof-of-delivery-records-of-a-work.md): Requires the `works:read` scope. - [Retrieve a proof of delivery record](https://api-docs.beanrails.com/api-reference/work-pods/retrieve-a-proof-of-delivery-record.md): Requires the `works:read` scope. - [List invoices](https://api-docs.beanrails.com/api-reference/invoices/list-invoices.md): Returns the invoices your key can see, newest first. Requires the `documents:read` scope. - [Create an invoice](https://api-docs.beanrails.com/api-reference/invoices/create-an-invoice.md): Creates a draft invoice. Totals, taxes and discounts are calculated for you. Requires the `documents:write` scope. - [Retrieve an invoice](https://api-docs.beanrails.com/api-reference/invoices/retrieve-an-invoice.md): Requires the `documents:read` scope. - [Change an invoice status](https://api-docs.beanrails.com/api-reference/invoices/change-an-invoice-status.md): Moves an invoice to another status. Refunded and voided invoices can no longer change. Setting `paid` records a payment for the full amount. If the workspace requires a reason for voiding or cancelling, include `reason_code`. Requires the `documents:write` scope. - [List payments of an invoice](https://api-docs.beanrails.com/api-reference/invoice-payments/list-payments-of-an-invoice.md): Requires the `documents:read` scope. - [Record a payment](https://api-docs.beanrails.com/api-reference/invoice-payments/record-a-payment.md): Records a payment against an invoice, typically after you have received the money in your accounting system. Requires the `documents:write` scope. - [Retrieve a payment](https://api-docs.beanrails.com/api-reference/invoice-payments/retrieve-a-payment.md): Requires the `documents:read` scope. - [List quotations](https://api-docs.beanrails.com/api-reference/quotations/list-quotations.md): Returns the quotations your key can see, newest first. Requires the `documents:read` scope. - [Create a quotation](https://api-docs.beanrails.com/api-reference/quotations/create-a-quotation.md): Creates a draft quotation. The request body is the same as for an invoice, without `work_id`. Requires the `documents:write` scope. - [Retrieve a quotation](https://api-docs.beanrails.com/api-reference/quotations/retrieve-a-quotation.md): Requires the `documents:read` scope. - [Change a quotation status](https://api-docs.beanrails.com/api-reference/quotations/change-a-quotation-status.md): Moves a quotation to another status. A quotation can only become `pending` from `draft`. If the workspace requires a reason for cancelling, include `reason_code`. Requires the `documents:write` scope. ## OpenAPI Specs - [openapi](/openapi.yaml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.