Rental Test 1

Operations
Rental System > Category
POST /rental/category
GET /rental/category/{scopeId}/{externalCategoryId}
PUT /rental/category/{scopeId}/{externalCategoryId}
DELETE /rental/category/{scopeId}/{externalCategoryId}
GET /rental/category/{scopeId}
Create category
POST /rental/category

The category is created, if not exist

Request body

application/json

Responses

200 200

200 - Response the request was carried out correctly

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The category is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Get category
GET /rental/category/{scopeId}/{externalCategoryId}

Returns the requested category based on scopeId and externalCategoryId

Path variables

scopeId
integer required
Example:
1
externalCategoryId
integer required
Example:
1

Responses

200 200

200 - Response when category list is returned correctly - Also on empty list

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The category is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Update category
PUT /rental/category/{scopeId}/{externalCategoryId}

Updates the name of the requested category based on scopeId and externalCategoryId

Path variables

scopeId
scope_id required
externalCategoryId

Request body

application/json

Responses

200 200

200 - Category is updated

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The category is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Delete category
DELETE /rental/category/{scopeId}/{externalCategoryId}

Deletes the requested category based on scopeId and externalCategoryId

Path variables

scopeId
scope_id required
externalCategoryId

Responses

200 200

200 - Category is deleted

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The category is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Get list of category
GET /rental/category/{scopeId}

Returns all the categorys in the current scope

Path variables

scopeId
scope_id required

Responses

200 200

200 - Response when category is returned correctly, if none is found, an empty array is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Rental System > Location
POST /rental/location
GET /rental/location/{scopeId}/{externalLocationId}
PUT /rental/location/{scopeId}/{externalLocationId}
DELETE /rental/location/{scopeId}/{externalLocationId}
GET /rental/location/{scopeId}
Create location
POST /rental/location

The location is created, if not exist

Request body

application/json

Responses

200 200

200 - The created object is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The location is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
GET-rental-location-scopeId-externalLocationId
GET /rental/location/{scopeId}/{externalLocationId}

The location is returned, if exist

Path variables

scopeId
scope_id required
externalLocationId

Responses

200 200

Returns the location object int the current scopeId with the current externalLocationId

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The location is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
PUT-rental-location-scopeId-externalLocationId
PUT /rental/location/{scopeId}/{externalLocationId}

The location is updated, if exist

Path variables

scopeId
scope_id required
externalLocationId

Request body

application/json

Responses

200 200

200 - Response when location is updated

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The location is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
DELETE-rental-location-scopeId-externalLocationId
DELETE /rental/location/{scopeId}/{externalLocationId}

The location is deleted, if exist

Path variables

scopeId
scope_id required
externalLocationId

Responses

200 200

SOME

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The location is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
GET-rental-location-scopeId
GET /rental/location/{scopeId}

All locations is returned

Path variables

scopeId
scope_id required

Responses

200 200

The full list of locations in current Scope, if none is found an empty array is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Rental System > Product
POST /rental/product
GET /rental/product/{scopeId}/{externalProductId}
PUT /rental/product/{scopeId}/{externalProductId}
DELETE /rental/product/{scopeId}/{externalProductId}
GET /rental/product/{scopeId}
GET /rental/product/inCategory/{scopeId}/{externalCategoryId}
Create product
POST /rental/product

Creates new rental product and returns properties

Request body

application/json

Responses

200 200

200 - Product has been created and stored

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The category is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Get product
GET /rental/product/{scopeId}/{externalProductId}

Lookup rental product with externalProductId in scopeId

Path variables

scopeId
scope_id required
externalProductId

Responses

200 200

200 - The product is found and returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

The product is not found in the current scope

Body
application/json
500 500

Error in scripting

Body
application/json
Update product
PUT /rental/product/{scopeId}/{externalProductId}

Updates externalProductId product in scopeId with supplied parameters

Path variables

scopeId
scope_id required
externalProductId

Request body

application/json

Responses

200 200

200 - Product is updated

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

The product is not found in the current scope

Body
application/json
500 500

Error in scripting

Body
application/json
Delete product
DELETE /rental/product/{scopeId}/{externalProductId}

Delete externalProductId product from scopeId

Path variables

scopeId
scope_id required
externalProductId

Responses

200 200

200 - The requestet product has been deleted

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

The product is not found in the current scope

Body
application/json
500 500

Error in scripting

Body
application/json
Get list of products
GET /rental/product/{scopeId}

Path variables

scopeId
scope_id required

Responses

200 200

200 - List of products with assigned categorys is returned, if none is found an empty array is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
500 500

Error in scripting

Body
application/json
Get all products in category
GET /rental/product/inCategory/{scopeId}/{externalCategoryId}

Path variables

scopeId
scope_id required
externalCategoryId

Responses

200 200

200 - Full info on category and list of products in category is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The scopeId is not found

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Rental System > Order
POST /rental/order
GET /rental/order/{scopeId}/{POS_Ext_Id}/{externalOrderId}
PUT /rental/order/{scopeId}/{POS_Ext_Id}/{externalOrderId}
DELETE /rental/order/{scopeId}/{POS_Ext_Id}/{externalOrderId}
GET /rental/order/{scopeId}
GET /rental/order/orderListFromPosId/{scopeId}/{POS_Ext_Id}
GET /rental/order/ordersOnPosId/{scopeId}/{POS_Ext_Id}
GET /rental/order/orderLineStatus/{scopeId}/{orderLineId}
Create order
POST /rental/order

The order is created, if not exist

Request body

application/json

Responses

200 200

200 - The created order is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - A order or POS_Ext_Id is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Read order
GET /rental/order/{scopeId}/{POS_Ext_Id}/{externalOrderId}

Read an order if exist

Path variables

scopeId
scope_id required
POS_Ext_Id
pos_ext_id required
externalOrderId

Responses

200 200

200 - The requested externalOrderId is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - A order or POS_Ext_Id is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Update order
PUT /rental/order/{scopeId}/{POS_Ext_Id}/{externalOrderId}

Update an order

Path variables

scopeId
scope_id required
POS_Ext_Id
pos_ext_id required
externalOrderId

Responses

200 200

200 - The requested externalOrderId is updated and result is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - A order or POS_Ext_Id is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Delete order
DELETE /rental/order/{scopeId}/{POS_Ext_Id}/{externalOrderId}

Delete an order if it exist

Path variables

scopeId
scope_id required
POS_Ext_Id
pos_ext_id required
externalOrderId

Responses

200 200

200 - The requested externalOrderId is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - A order or POS_Ext_Id is not found in the current scope

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Read all orders list
GET /rental/order/{scopeId}

Get a list of orders in current scopeId

Path variables

scopeId
scope_id required

Responses

200 200

200 - Orders in the requested scopeId is returned, if none is found an empty array is returned

Body
application/json
Array of order_response
403 403

403 - Forbidden

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Read orders list on user
GET /rental/order/orderListFromPosId/{scopeId}/{POS_Ext_Id}

Get a list of orders in current scopeId

Path variables

scopeId
scope_id required
POS_Ext_Id
pos_ext_id required

Responses

200 200

200 - Orderlines in the requested POS_Ext_Id is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The scopeId is not found

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Read users order list
GET /rental/order/ordersOnPosId/{scopeId}/{POS_Ext_Id}

Get a list of orders on current POS_Ext_Id

Path variables

scopeId
scope_id required
POS_Ext_Id
pos_ext_id required

Responses

200 200

200 - Orders on the requested POS_Ext_Id is returned

Body
application/json
Array of order_response
403 403

403 - Forbidden

Body
application/json
404 404

404 - The scopeId is not found

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Update line status
GET /rental/order/orderLineStatus/{scopeId}/{orderLineId}

Updates the status of the current line

Path variables

scopeId
scope_id required
orderLineId
order_line_id required

Responses

200 200

200 - The changed line is returned

Body
application/json
403 403

403 - Forbidden

Body
application/json
404 404

404 - The scopeId is not found

Body
application/json
500 500

500 - Error in scripting

Body
application/json
Type Definitions
general_id

A general id used for internal referncing

integer
Example:
1001
scope_id

The scope of which the category i visable - Typically the ‘Festival_id’

integer
Example:
1
timestamp

A general timestamp

string
Example:
2023-02-08T10:29:48.000000Z
general_text

A generic text used for all text fields

string
Example:
Some text
url

A general URL

string
Example:
http://example.com/img.png?some=thing&other=parameters
error_respone

Standard error response

Object
errorcode
integer
Example:
-1
message
string
Example:
There was an unknown error
error_notFound

Standard ‘not found’ response

Object
errorcode
integer
Example:
404
message
string
Example:
The resource was not found
error_accessFail

Standard authentication fail response

Object
errorcode
integer
Example:
403
message
string
Example:
403 Forbidden
category_Create_object

Definition of a full category

Object
scope_id
scope_id required
external_category_id
name
category_name required
category_object

Definition of a category

Object
scope_id
external_category_id
created_at
updated_at
category_list_object

List of category_objects

Array of category_object
external_category_id

The 3party ID of a category

integer
Example:
3
category_name

The name of a category

string
Example:
Camping products
category_put_object

The name of a category

Object
Example:
Camping products
external_location_id

The 3party ID of a location

integer
Example:
3
location_name

The name of a location

string
Example:
Beer bar inside
location_Create_object

Definition of a full location create request

Object
scope_id
scope_id required
external_location_id
name
location_name required
location_Create_response_object

Definition of a full location create response

Object
scope_id
external_location_id
created_at
updated_at
location_Update_object

Definition of a full location update request

Object
external_location_id
name
location_name required
location_Put_response_object

Definition of a full location update request

Object
status
integer
Example:
1
msg
string
Example:
Location edited/deleted successfully
location_GetList_response_object

Definition of all locations list

external_product_id

The 3party ID of a product

string
Example:
aa34XX-3
external_product_type

The product type - ADD EXPLAIN

integer
Example:
0
product_name

The name of the product, displayed to the customer

string
Example:
Orange RF 2023 telt
product

Definition of a rental product

Object
scope_id
external_product_id
external_product_type
image_url
first_line
second_line
third_line
pickup_text
product_Put_object

Definition of a rental product

Object
external_product_type
image_url
first_line
second_line
third_line
pickup_text
product_Create_object

Definition of a rental product - VALIDER REQUIRED PARAMETERS

Object
scope_id
scope_id required
external_product_id
external_product_type
name
product_name required
image_url
first_line
second_line
third_line
pickup_text
category_list
Array of external_category_id required
product_Create_Response_object

Definition of a rental product - VALIDER REQUIRED PARAMETERS

Object
scope_id
external_product_id
external_product_type
image_url
first_line
second_line
third_line
pickup_text
category_list
product_Get_response_object

Definition of a rental product

Object
scope_id
external_product_id
external_product_type
image_url
first_line
second_line
third_line
pickup_text
category_list
Array of category_object
product_base_object

Definition of a rental product delete response

Object
scope_id
external_product_id
external_product_type
image_url
first_line
second_line
third_line
pickup_text
product_in_category_response_object

Definition of a rental product delete response

Object
scope_id
external_product_id
external_product_type
image_url
first_line
second_line
third_line
pickup_text
products
Array of product
action

The ACTION that shall be executed on status

integer
Example:
51000
status

The status on which the feedback shall be executed

integer
Example:
4
pos_ext_id

The shared ID linking POS user to 3party user

integer
Example:
998811
order_id

The POS internal ID

integer
Example:
1
order_line_id

The POS internal line ID

integer
Example:
100
external_order_id

The order ID referencing 3party system

string
Example:
ABtest1234
external_line_id

VALIDER DETTE ID - HVAD ER DET ??

string
Example:
sgsabas89
price

NOT AVAILABLE

number
Example:
1.23
is_returnable

Not 0 indicates that product is returnable

integer
Example:
0
reference_number

VALIDER DETTE FELT - HVAD ER DET ???

string
Example:
8sf9agsg09as90bv1
description

A general note on a order (not visable presented to customer)

string
Example:
The order is a test order
order_status_obj

The set status object of an order line

Object
status
status required
feedback_element_request

The request definition of a feedbackline

Object
status
url
url required
action
feedback_element_response

The response definition of a feedbackline

Object
order_line_id
integer

The ID of the order

Example:
1
status
url
action
created_at
updated_at
order_line_request

The request definition of a single line on a order

Object
external_product_id
external_line_id
status
price
is_returnable
feedback_elements
order_line_response

The response definition of a single line on a order

Object
order_id
product_id
integer

VALIDER DETTE ID - HVAD ER DET ??

Example:
1
external_line_id
status
price
is_returnable
created_at
updated_at
feedback_elements
order_line_update_response

The response definition of a single line on a order

Object
order_id
product_id
integer

VALIDER DETTE ID - HVAD ER DET ??

Example:
1
external_line_id
status
price
is_returnable
created_at
updated_at
order_request

The request definition of a order

Object
scope_id
scope_id required
pos_external_id
pos_ext_id required
external_order_id
description
reference_number
order_lines
order_response

The response definition of a order

Object
scope_id
pos_external_id
external_order_id
description
reference_number
created_at
updated_at
lines
order_Del_response

The response when order is deleted

Object
status
integer
Example:
1
data
Object
scope_id
pos_external_id
external_order_id
description
reference_number
created_at
updated_at
msg
string
Example:
Order deleted successfully