Zapier

CursusOffice for Zapier: documentation

This page describes how CursusOffice connects to Zapier: how to authenticate, what each trigger, action and search does, what the errors look like and how to test everything. It also lists the public API endpoints the app uses.

Overview

CursusOffice is a business management suite for agencies, professionals and small businesses: customers, quotes, invoices, payments and projects in one place, with electronic invoicing for the countries it supports. Every customer of CursusOffice has their own workspace with its own address, for example yourcompany.cursusoffice.com.

The CursusOffice integration lets a workspace exchange data with the other apps connected to Zapier. It uses the public CursusOffice REST API (JSON, over HTTPS only) and outgoing webhooks, which are the same ones documented on this page.

Status: the CursusOffice app for Zapier is built and tested and is being prepared for the Zapier App Directory. Until it is listed there, you can connect CursusOffice with the "Webhooks by Zapier" app, as described on the integration page.

Authentication

The app uses API key authentication. When you connect your account, Zapier asks for two values:

  • Your CursusOffice address: the address of your workspace, without https://, for example yourcompany.cursusoffice.com.
  • API token: a token that starts with co_.
  1. In CursusOffice, open Management, then API and webhooks, then the API tokens tab.
  2. Create a token and choose only the permissions you need (see the table below). The token is shown once: copy it right away.
  3. In Zapier, connect your CursusOffice account and paste the address and the token.

Every request is sent to https://<your address>/api/v1 with the header Authorization: Bearer <token>. HTTP is not accepted in production. A token belongs to one workspace only, can have an expiry date and can be revoked at any time; the revocation applies from the next request. The connection test is GET /api/v1/, which answers 200 when the address and the token are valid.

PermissionWhat it allowsUsed by
customers:readRead customersNew Customer (sample data), Find Customer, customer drop-down
customers:writeCreate and update customersCreate Customer
products:readRead products and VAT ratesNew Product (sample data), VAT rate drop-down
quotes:readRead quotesQuote Accepted (sample data)
quotes:writeCreate quote draftsCreate Quote Draft
invoices:readRead invoicesInvoice Issued (sample data), Find Invoice
invoices:writeCreate invoice draftsCreate Invoice Draft
payments:readRead paymentsNew Payment (sample data)
projects:readRead projectsNew Project (sample data)
webhooks:writeSubscribe and unsubscribe webhooksAll instant triggers

Triggers

All triggers are instant (REST hooks). When a Zap is turned on, Zapier subscribes its own address with POST /api/v1/webhooks; when the Zap is turned off, it removes the subscription with DELETE /api/v1/webhooks/{id}. A token can only see and delete the subscriptions it created.

Events are queued when the action happens in CursusOffice and delivered by a background job that runs every minute, so a trigger can take up to about one minute to reach Zapier. Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. Each event has a unique id (id in the envelope), so duplicates can be ignored.

The data of a trigger is the object itself (the same shape the API returns). Amounts are decimal strings, dates and times are ISO 8601 with time zone, and ids are integers.

TriggerFires whenEventSample data from
New CustomerA customer is createdcustomer.createdGET /customers
Invoice IssuedAn invoice is issuedinvoice.issuedGET /invoices
Quote AcceptedA customer accepts a quotequote.acceptedGET /quotes?status=accepted
New PaymentA payment is recorded against an invoice (it only records an incoming payment: no money is moved by the app)payment.receivedGET /payments
New ProjectA project is createdproject.createdGET /projects
New ProductA product or service is createdproduct.createdGET /products
New Website RequestA request arrives from a website form connected to CursusOfficesite_request.receivedStatic sample

Actions

Actions create data in CursusOffice. Quotes and invoices are always created as drafts: numbering, issuing and sending a document stay a deliberate step of a person inside CursusOffice (invoices have tax effects). Totals and VAT are always calculated by CursusOffice, never by Zapier.

Lines as text lets a Zap build the lines from another app without line-item mapping. Write one line per row: description | quantity | unit price (net) | VAT rate | unit (optional). The VAT rate can be a percentage such as 22, the code of a VAT rate as listed by GET /vat-rates, or # followed by the id of the VAT rate. Example:

Website project | 1 | 1200 | 22
Monthly maintenance | 3 | 80 | 22 | month

The Customer and VAT Rate drop-downs are filled from the workspace (GET /customers and GET /vat-rates).

ActionEndpointFields
Create CustomerPOST /customersType (company or person), Company Name, First Name, Last Name, Email, Phone, VAT Number, Tax Code, Country, Address, ZIP, City, Province, Notes
Create Invoice DraftPOST /invoicesCustomer (required), Issue Date, Due Date (required), Reference, Notes, Lines (Description, Quantity, Unit, Unit Price net, VAT Rate) or Lines as text
Create Quote DraftPOST /quotesCustomer (required), Issue Date, Valid Until, Reference, Notes, Lines (as above) or Lines as text

Searches

SearchEndpointFinds
Find CustomerGET /customers?q=...Customers whose name, email, VAT number or code contains the text (up to 5 results)
Find InvoiceGET /invoices?q=...Invoices whose number, reference or customer name contains the text (up to 5 results)

Errors and limits

Errors are returned as JSON with a stable code (in English), a readable message and, when relevant, the name of the field. The message is written in the language of the workspace (Italian for an Italian workspace); the messages added by the app itself are in English. The app shows the message and the field in the Zap history:

Creating records accepts an Idempotency-Key header: the same key with the same body within 24 hours returns the first answer instead of creating a second document.

{ "error": { "code": "bad_parameter", "message": "Data non valida: usa il formato AAAA-MM-GG o AAAA-MM-GGTHH:MM:SS.", "field": "updated_since" } }
HTTP statusMeaning
400Invalid JSON or parameter
401Missing, wrong, revoked or expired token
403The token does not have the needed permission, or the workspace is suspended or closing
404The record does not exist
409Request already in progress, or limit reached
422Validation error (the field is named in the error)
429More than 120 requests per minute for the token: wait for the number of seconds in the Retry-After header

How to test the app

A workspace for testing, with an administrator account, is provided in the Zapier submission form; its credentials are never published here. To see everything working:

  1. Connect the account with the workspace address and an API token that has all the permissions listed above.
  2. New Customer: create a customer in the workspace. New Product: create a product or service. New Project: create a project. New Website Request: send a test request to one of the workspace website forms.
  3. Invoice Issued: create an invoice for a customer and issue it. New Payment: record a payment on that issued invoice. Quote Accepted: send a quote to a customer and accept it from the public link in the email.
  4. Actions: Create Customer, Create Invoice Draft and Create Quote Draft create records you can see in the Customers, Invoices and Quotes pages. The invoice and quote stay drafts, without a number.
  5. Searches: Find Customer and Find Invoice return the records created above.

Triggers are delivered by a background job that runs every minute: if "Test trigger" finds nothing right after the event, wait a minute and test again.

API endpoints used by the app

Base address: https://<your address>/api/v1. All responses are JSON. Lists are paginated with page and per_page (maximum 100) and accept updated_since.

Method and pathPermissionNotes
GET /noneConnection test and information
GET /customers, GET /customers/{id}customers:readFilters q, state, country, updated_since
POST /customers, PATCH /customers/{id}customers:writeSame checks as the interface (VAT number, tax code, country)
GET /products, GET /products/{id}, GET /vat-ratesproducts:readThe VAT rate id is used in document lines
GET /quotes, GET /quotes/{id}quotes:readFilters q, status, customer_id, updated_since
POST /quotesquotes:writeCreates a draft
GET /invoices, GET /invoices/{id}invoices:readIncludes credit notes (type)
POST /invoicesinvoices:writeCreates a draft
GET /payments, GET /payments/{id}payments:readFilters invoice_id, paid_from, paid_to
GET /projects, GET /projects/{id}projects:readFilters status, customer_id, q
POST /webhooks, DELETE /webhooks/{id}webhooks:writeSubscribe and unsubscribe (events listed above)

Contact us

Questions about the integration? Write to us from the contact page. Contact us

Discover what CursusOffice can do for you Pricing Try free for 30 daysTry free