Clients can set a selected number of configuration settings to adjust the behavior of the Profifact application to their preferences. This article identifies the settings available to a client and explains how settings can be retrieved. Because client settings are usually configured using the the Profifact UI and do not change often, it is currently not possible to change settings using the Profifact service.
Retrieving all settings
Client settings provide a way for clients to customize their Profifact experience. Most of the
client settings are only useful in the Profifact UI, but some may be used to provide default
values for certain properties. For example, when creating a new invoice using the Profifact
service the client can use the value of the defaultPriceType setting for the
priceType property of the new invoice. This approach may be flexible than hardcoding
the desired price type.
The /settings resource currently provides access to the following settings:
- The number assigned to the first invoice created by the client. This setting is useful for clients that start using Profifact after having created invoices outside of Profifact. By setting the number of the first Profifact invoice, clients can ensure the numbers of their invoices are consecutive.
- The number assigned to the first offer created by the client. This setting is useful for clients that start using Profifact after having created offers outside of Profifact. By setting the number of the first Profifact offer, clients can ensure the numbers of their offer are consecutive.
- The unique ID of the VAT rate that is selected by default in the Profifact UI when creating a new invoice or offer.
- The default price type for invoices and offers. Valid values are INCLUSIVE and EXCLUSIVE. With this setting clients can specify whether the prices entered as part of invoice lines and offer lines include VAT. For clients that use both types, the selectPriceType setting can be used to force the UI to show a selection control for the price type of a new invoice or offer.
- The length of the default payment period for invoices in days. For individual invoices the value of this setting takes precedence after the payment period of the customer targeted by the invoice. The value of this setting is used if no customer specific payment period is set.
- The length of the default valid period for offers in days. The offer expires after this many days have passed without an offer confirmation from the customer.
- The payment type that is selected by default when adding payments using the Profifact UI. Possible values are defined in the introduction to the Payments resource. The default value is UNSPECIFIED.
- The length of the VAT return period of the client in months. Valid values are 1 for monthly returns, 3 for quarterly returns and 12 for annual returns. The value of this setting is currently only used for showing the VAT overview in the client's dashboard of the Profifact UI.
- Specifies whether a client has the option to select a price type (INCLUSIVE or EXCLUSIVE) when creating an invoice or an offer using the Profifact UI. Valid values are 0 for disabled and 1 for enabled.
- Specifies whether the client has the option to select a template when creating an invoice or an offer. If disabled the Profifact UI always uses the customer's default invoice or offer template. If enabled a selection control is shown from which the client can select a template. Valid values are 0 for disabled and 1 for enabled.
- A format string that yields a file name for a PDF document when formatted in the context of an invoice, offer or reminder. See Tekst in sjablonen for more on format string syntax.
Retrieving all settingsClients can retrieve all their settings by sending an HTTP GET request to /settings. Authentication is required and unlike other resources only a single object is returned that contains properties whose names are defined in the introduction.
RequestNo futher GET parameters are supported.
// Retrieve all settings of the client:
GET /settings HTTP/1.1
The Profifact server may send any of the status codes defined in response status codes in response to an incoming request. For a valid request HTTP status 200 OK is returned and the response body contains a data structure with the members defined in the table below. See the section on data types for an explanation of property data types.
|firstInvoiceNumber||int||The number of the first invoice created by the client using Profifact.|
|firstOfferNumber||int||The number of the first offer created by the client using Profifact.|
|defaultVatRateId||int||The unique ID of the client's default VAT rate.|
|defaultPriceType||string||The default price type for new invoices and offers (INCLUSIVE or EXCLUSIVE).|
|defaultInvoicePaymentPeriod||int||The default payment period for new invoices in days (0 - 999).|
|defaultOfferValidPeriod||int||The default valid period for new offers in days (0 - 999).|
|defaultPaymentType||string||The default payment type for new payments.|
|vatReturnPeriod||int||The VAT return period of the client in months (1, 3 or 12).|
|selectPriceType||bool||Specifies whether the client can select a price type for each new invoice or offer in the Profifact UI instead of always using the default price type.|
|selectTemplate||bool||Specifies whether the client can select a template for each new invoice and offer in the Profifact UI instead of using the default templates.|