Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Hiddenfragment macro
groupVisibilitybrponly


BRP ONLY

Ligger webservern bakom en reverse proxy så krävs det att reverse proxyn sätter en http-header med vilken ip-adress som anropet kommer ifrån. Inställningen 'ipHeaderReverseProxy' måste då sättas för att servern ska veta vilken header som den ska titta på. Vanligast är att den kallas: "X-Forwarded-For". Om headern förväntas innehålla någonting mer komplicerat än bara en vanlig IP-address så kan det behövas en uppdatering, eftersom vårat stöd för rfc7239 inte är speciellt robust.

Glöm inte att köra about.gsp för att gogen ska läsa om inställningarna.


Support tickets

Be as specific as you can possibly be, for example:

  • Present yourself properly, who are you working for and who is our joint customer.

  • Show us the full request including URL and API-key.

  • Tell us what your result was and what result you were expecting.

  • Let us know if you got an error message and what it said.

  • Let us know how severe your problem is for your production.

Limited liability

This document is a work in progress and must be interpreted as such. Corrections and modifications can and will occur and BRP Systems shall not be held responsible for subsequent modifications required on part of end users. 

...

Any and all error messages will be displayed in English. 

Example

Code Block
languagehtml/xml
<errors>
   <error>
      <code>1001</code>
      <message>Invalid parameter, firstname</message>
      <debuginfo>field=firstname</debuginfo>
   </error>
</errors>


Format

Data type

Format

Example

Comments

Date

yyyy-MM-DD

2012-12-24

GMT+1 (Stockholm) including adjustments required for summer and winter time

Time

HH:mm

14:54

GMT+1 (Stockholm) including adjustments required for summer and winter time

Timestamp

nnnnnnnnnnnnn

1298023236

Unix Epoch, Number of seconds since 1/1 1970, 00:00:00 GMT

Boolean

true/false

true


ID-list

n,n,n....

1,2,45

List containing object id

String


Spinningsal

Text string UTF-8 in desired length. Characters are escaped in accordance with either XML or JSON standards.

Number

nnnnnnnnn

124234

Integers are always specified without thousands separators or 10 powers

Decimal

nnnn.nnn

34.45

There are no limits for the number of decimals that may be used. No thousands separators or 10 powers. If the number of decimals is 0 no decimal divider will be sent.

ID

nnnn

43

Integer that is an object ID

Product type

groupActivity/ subscription/ package/ article/ service/ event/ stockProduct/ valueCard/ entry

groupActivity

Text strings that represent product groups

Sex

male/female

female

Text strings denoting sex

E-mail


test@test.com

Valid e-mail address

Personal ID number


850101-123X

Valid Swedish, Norwegian or Finnish personal ID number, depending on the facility. For persons connected to a Swedish facility a Swedish personal ID number must be used.

Telephone number


013-342 00 20

Valid telephone number

Miscellaneous

When currency is used it is specified in Swedish öre or Euro cents. For example: SEK 34,99 is formatted as 3499.

...

Parameter names must be formatted in lowercase.

Other parameters are to be interpreted as filtering parameters when list-calls are used.

When parameters are sent they must be properly formatted or an error will be returned.

There is support for sending parameters in the request string or body with Content-Type  application/ x-www-form-urlencodedapplication/json eller application/xml

  NOTE: Send parameters in either the request string OR body, not both, when using PUT. Using both will result in the parameters in the body being ignored.


Code Block
https://api.brpsystems.se/brpgog/api/ver2/baz

...

The API key is available in three different levels:

  • Level 1: Required for GET requests where contents are only displayed, not modified. This is commonly used to display items such as today's schedule where no interaction is required.

  • Level 2: Required for PUT, DELETE and POST requests. This is used when objects need to be created, modified or even deleted. Amoung other uses this is commonly used when a user's login credentials are stored in a mobile phone.

  • Level 3: This level used for system to system requests where the user's credentials are not known. The IP number of the requesting device must be pre-registered in order for this to work.

Response

Response tags that represent valid objects always contain the objects unique ID, always an integer.

All tags and attribute names are lowercase.

The response will always be encoded in the coding the request was made in. If the request did not specify an encoding the default encoding of UTF-8 will be used for the response. From 2023-01-01 the response will always be encoded as UTF-8.

...

Hiddenfragment macro
groupVisibilitybrponly


BRP ONLY

Filter response

From version x it is possible to control what fields are sent back from the API.

This is done with the parameters response.include / response.exclude.

Only one of these can be specified and if response.include is specified response.exclude is ignored.

The value of the parameter should be the path for the fields to be included/excluded. The paths corresponds to the XML answer so if you are using JSON it makes it easier if you check the return value in xml-format to see how you should format your include/exclude-parameter.

Example:

Asking for products from products.json we just want id and name and nothing else.

Do a call to products.xml to see the structure:

xml

The include parameters to get only id and name for this call would look like this:

.../products.json?response.include=products.product.id&response.include=products.product.name

The response JSON will then look like this:



Definitions

Word

Definition

Comments

activitybooking

Class booking

Class booking and waiting list

purchase

Purchase

Purchase of services, events, goods, subscriptions, value cards and deals

person

User/booker


resource

Resource

Rooms, instructors, staff, equipment etc.

activity

Group activity/class


event

Event

Events such as speaches, courses

order

Order

Completed order, either paid or confirmed

bokning

Booking

Based on type of product: service, goods, subscription, valuecard and deal

receipt

Receipt


item

Order row or receipt row


timeslotsuggestions

Suggested time for service booking