recurring invoices

POST /companies/{companySlug}/recurringInvoices/{recurringInvoiceId}/jobs

Changed on

Adds a new job (an additional customer) to an existing recurring invoice. The new job copies the invoice lines and settings from an existing job in the collection; only the recipient differs. A customer can only appear once per recurring invoice. The job is rejected if the customer has no recipient (e.g. no email and not EHF-registered), since its invoices could not be sent automatically.

Request

  • Base URL
    https://api.fiken.no/api/v2
  • URL
    https://api.fiken.no/api/v2/companies/{companySlug}/recurringInvoices/{recurringInvoiceId}/jobs
  • Auth
    OAuth 2
    Authorization code: https://fiken.no/oauth/authorize
    Token URL: https://fiken.no/oauth/token

Request body

customerIdinteger required

customerId = contactId where customer = true. Must not already be on the recurring invoice.

contactPersonIdsinteger[]

Optional contact persons to send the invoice to. Every contact person must belong to the given customer and have an email. Each email is resolved and stored as an email recipient, and the first one is also used as the billing contact on the invoice. If omitted, the recipient is derived automatically from the customer (EHF if registered, otherwise the customer's email).

nextDatestring date

Optional first issue date for the new job. Defaults to the next date of an existing job if omitted.

Example request

{
  "customerId": 7340852,
  "nextDate": "2018-06-03"
}

Response

Created

Changes