Versions Compared

Key

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

Table of contents:

...

Extend a membership with a request
Use level 3 API for persons
Create an order and add order items without specifying a customer

...

 

Code Block
POST:APIURL/receipts.xml
apikey=338934897438
orderid={orderid}
payment.valuecardnumber={valuecardnumber}
payment.totalamount={lefttopay}
payment.paymentmethodid=6

Show the length of a waiting list and a specific position

There are two alternatives as per below:

Alternative 1:

List group activities/classes and include the bookings
Group activities/classes

Code Block
GET:APIURL/activities.xml?apikey=338934897438&businessunitids=4,332&includebooking=true

Alternative 2:

List group activity/class bookings by waitinglist type

Group activity/class bookings

Code Block
GET:APIURL/activitybookings.xml?apikey=338934897438&type=waitinglist

Create an order and add order items without specifying a customer

1. Create Anonymous Order

2. Add an order item without specifying a customer

3. Create a customer for the order or select an existing customer.

4. Add the customer to the order via the change order method but send the orderedbyid=<customerID>. Please note that due to rebates and pricelists for a specific customer that the order value may change. The value returned in this step is to be used in step 4. 

5. Pay for the order by accessing receipts. If no customer is specified the paramater "anonymous=true" must be sent.

Note: Step 3 and 4 listed above are required if any of the order rows are subscriptions/memberships.

Create and add items to a package booking

1.  List packages
Products
Examples of packages

Code Block
GET:APIURL/products.xml?apikey=338934897438&producttype=package


The response received for a package will also contain individual package items (se products).

2. Create an order

Code Block
POST:APIURL/orders.xml 
apikey=338934897438

3. Create a package booking
Create an orderrow with productid = package product ID and quantity. The price for this order row is 0.
Please note the item.id for the specfic order row

Code Block
POST:APIURL/orders/{orderid}/items.xml 
apikey=338934897438 
productid=<package product id> 
quantity=1

4. Fill the package with individual package items (packageparts)
Create order rows with products that are included in the package part by product type. Bear in mind that each type of product (services, item etc.) requires different parameters (see items).

Ad the packageid parameter with the value that the package orderrow was given.

Code Block
POST:APIURL/orders/{orderid}/items.xml 
apikey=338934897438 
productid=99 
quantity=1 
packageid = <item.id> from 3.


BRP performs a sanity check that the specific products are in fact valid for the package product. Other requirements are left up to the integrating developer.

45. Complete purchase as usual

Create an order with an item and a service booking

Follow step 1 through 7 located at Create an order with one or more products

1. List services

Products
Examples:

 

GET:APIURL/products.xml?apikey: 338934897438 &producttype=service

 

2. Show available times
Use one of the products obtained with step 6
Available times

3. Book service
Order rows
Use the ID obtained in step X and a starting time from step 7. Använd det id som erhölls i steg och en starttid som erhölls i steg 7.
4. Show order
Orders
5. Create external payment
For example using an integration to a payment service provider (PSP)
6. Create receipt for payment
Receipts
Example:

 

POST:APIURL/receipts.xml
apikey: 338934897438
orderid={orderid}
payment.totalamount={value of payment in cents/ören}
payment.paymentmethodid= 1

 

7. Show receipt
Receipt

 

GET:APIURL/receipts/{receiptid}.xml?apikey: 338934897438