Pause recurring invoice
const url = 'https://api.shypr.app/rest/billing/recurring-invoices/pause';const options = { method: 'POST', headers: {'X-API-KEY': '<X-API-KEY>', 'Content-Type': 'application/json'}, body: '{"iri":"example","paused":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.shypr.app/rest/billing/recurring-invoices/pause \ --header 'Content-Type: application/json' \ --header 'X-API-KEY: <X-API-KEY>' \ --data '{ "iri": "example", "paused": true }'Creates a RecurringInvoice resource.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The new RecurringInvoice resource
An invoice that the system makes each period for a customer, without a sales order. The cron job RecurringInvoicesRun sends a RunRecurringInvoice for each one that is due. It is never deleted, only archived (the generic archive and publish endpoints), and an archived one makes no invoices.
object
Example generated
{ "iri": "example", "paused": true}An invoice that the system makes each period for a customer, without a sales order. The cron job RecurringInvoicesRun sends a RunRecurringInvoice for each one that is due. It is never deleted, only archived (the generic archive and publish endpoints), and an archived one makes no invoices.
object
Responses
Section titled “Responses”RecurringInvoice resource created
An invoice that the system makes each period for a customer, without a sales order. The cron job RecurringInvoicesRun sends a RunRecurringInvoice for each one that is due. It is never deleted, only archived (the generic archive and publish endpoints), and an archived one makes no invoices.
object
The first run. Each later run counts from this date, see RecurringPeriodType::occurrence().
The last day that can get an invoice. Null: no end.
The date of the next invoice. Null when the status is ended.
The schedule is done up to this date: the day of the last run, or the date of the schedule that it invoiced when that is later. The next run is always after it.
The dates (Y-m-d) of the schedule that get no invoice.
The name that the user gives it, to find it in the list.
The reference of the customer (a contract or a purchase order number). Each invoice gets a copy, and the PDF shows it. Null: no reference.
Why the system paused it: the run failed. Null when a member paused it.
The edit counter. It also stops two workers that run the same date at the same moment: the second flush fails, with its invoice.
The next dates that get an invoice, at most UPCOMING_DATES, each as a unix timestamp (the unix of a date field). A list of dates would be a collection of resources in GraphQL.
The next dates that get an invoice as Y-m-d, for the AI tools: an agent cannot read the unix time of upcomingDates.
The lines with the price as money, for the AI tools: an agent reads a price in minor units wrong.
object
object
The currency code. For ISO currencies this will be the 3-letter uppercase ISO 4217 currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes.
The numeric currency code. For ISO currencies this will be the ISO 4217 numeric currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes. Set to null if the currency does not have a numeric code.
The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.
The default number of fraction digits (typical scale) used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it is 0. This cannot be a negative number.
The type of the currency. For ISO currencies, this indicates whether the currency is currently in use (IsoCurrent) or has been withdrawn (IsoHistorical). For non-ISO currencies defined by the application, the type is Custom.
object
Null: the payment term of the customer at the time of the run.
Example
{ "status": "active", "version": 1, "customer": "https://example.com/", "periodicity": "daily", "creator": "https://example.com/"}An invoice that the system makes each period for a customer, without a sales order. The cron job RecurringInvoicesRun sends a RunRecurringInvoice for each one that is due. It is never deleted, only archived (the generic archive and publish endpoints), and an archived one makes no invoices.
object
The first run. Each later run counts from this date, see RecurringPeriodType::occurrence().
The last day that can get an invoice. Null: no end.
The date of the next invoice. Null when the status is ended.
The schedule is done up to this date: the day of the last run, or the date of the schedule that it invoiced when that is later. The next run is always after it.
The dates (Y-m-d) of the schedule that get no invoice.
The name that the user gives it, to find it in the list.
The reference of the customer (a contract or a purchase order number). Each invoice gets a copy, and the PDF shows it. Null: no reference.
Why the system paused it: the run failed. Null when a member paused it.
The edit counter. It also stops two workers that run the same date at the same moment: the second flush fails, with its invoice.
The next dates that get an invoice, at most UPCOMING_DATES, each as a unix timestamp (the unix of a date field). A list of dates would be a collection of resources in GraphQL.
The next dates that get an invoice as Y-m-d, for the AI tools: an agent cannot read the unix time of upcomingDates.
The lines with the price as money, for the AI tools: an agent reads a price in minor units wrong.
object
Example
https://example.com/object
The currency code. For ISO currencies this will be the 3-letter uppercase ISO 4217 currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes.
The numeric currency code. For ISO currencies this will be the ISO 4217 numeric currency code. For non-ISO currencies no constraints are defined, but the code must be unique across an application and must not conflict with ISO currency codes. Set to null if the currency does not have a numeric code.
The currency name. For ISO currencies this will be the official English name of the currency. For non-ISO currencies no constraints are defined.
The default number of fraction digits (typical scale) used with this currency. For example, the default number of fraction digits for the Euro is 2, while for the Japanese Yen it is 0. This cannot be a negative number.
The type of the currency. For ISO currencies, this indicates whether the currency is currently in use (IsoCurrent) or has been withdrawn (IsoHistorical). For non-ISO currencies defined by the application, the type is Custom.
object
Null: the payment term of the customer at the time of the run.
Example
https://example.com/Invalid input
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}Forbidden
A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}A representation of common errors.
object
A short, human-readable summary of the problem.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
A URI reference that identifies the problem type
Example
{ "status": 400}An error occurred
Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}Unprocessable entity
object
object
The property path of the violation
The message associated with the violation
The code of the violation
An extra hint to understand the violation
The serialized payload of the violation
object
Example
{ "status": 422}