Self Service (1.1-oas3)

Download OpenAPI specification:Download

An API to allow users to check items in and out on their own.

Public

Operations that can be called without logging in

Log in to get initial access token.

Request Body schema:
username
required
string

The user's myTurn.com username, or their membership ID with their organization/tool library.

password
required
string

The user's myTurn.com password.

Responses

Request samples

Content type
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "username": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "displayName": "string",
  • "emailAddress": "string",
  • "expires_in": 0,
  • "token_type": "Bearer",
  • "access_token": "string",
  • "roles": [
    ],
  • "isAdmin": true,
  • "membership": {
    },
  • "organizations": [
    ]
}

Organization info.

Returns information about the organization for which we support self-checkout or self-registration. See also self-checkout API.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "shortName": "string",
  • "apiUrl": "string",
  • "name": "string",
  • "logo": "string",
  • "hours": [
    ],
  • "address": {
    },
  • "playSounds": true,
  • "hideMoney": true,
  • "enableKioskMode": true,
  • "selfServeEnabled": true,
  • "allowKioskScanLogin": true,
  • "allowKioskFormLogin": true,
  • "logoutTimeout": 5,
  • "skipKioskCheckinConfirmation": true,
  • "skipKioskCheckoutConfirmation": true,
  • "skipKioskLogoutConfirmation": true,
  • "kioskWelcomeText": "<p>Welcome to our Kiosk. Log in or scan your key fob to get started</p>",
  • "kioskHomeText": "string",
  • "kioskCheckInText": "string",
  • "kioskCheckOutText": "string",
  • "kioskPostCheckInText": "<p>Please be sure to lock up when you leave.</p>",
  • "kioskPostCheckOutText": "string",
  • "kioskScanLoginErrorText": "string",
  • "kioskFormLoginErrorText": "If you are having trouble logging in, please call Jane at (888) 555-1212",
  • "locale": "fr-CA",
  • "currencyCode": "CAD",
  • "useTwoPhaseCommitOnKiosk": false,
  • "projectsSupported": true,
  • "email": "string",
  • "renewMembershipUrl": "string"
}

List of supported languages/locales

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Available statuses

List of statuses available for this organization

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

A list of the locations for this organization.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

User

Operations available to registered users who are logged in

Log the user out of the system.

Responses

Log the user out of the system. Deprecated

Responses

Retrieve a list of items or search for specific ones.

query Parameters
q
string

A word, a few words, or parts of words to search on.

location
number

Id of the location. This will restrict the items returned to the requested location and its sublocations.

offset
integer >= 0

The number of items to skip before starting to collect the result set.

limit
integer [ 1 .. 200 ]
Default: 20

The numbers of items to return.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Return the details for a single item.

path Parameters
id
required
number

The unique identifier for the item.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[]

Retrieve a list of item categories.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json

Return a single category.

path Parameters
id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json

List or search for items by category.

path Parameters
id
required
number
query Parameters
offset
integer >= 0

The number of items to skip before starting to collect the result set.

limit
integer [ 1 .. 200 ]
Default: 20

The numbers of items to return.

q
string

A word, a few words, or parts of words to search on.

location
number

Id of the location. This will restrict the items returned to the requested location and its sublocations.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List a user's approved reservations (defaults to reservations for today).

query Parameters
includeFulfilled
string
Default: "N"

Use "Y" to include fulfilled reservations; anything else is taken to mean "do not include fulfilled".

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get the details of one reservation.

Get the details of one reservation.

path Parameters
reservation-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 413,
  • "startDate": "2018-11-01T00:00:00.000Z",
  • "endDate": "2018-11-15T00:00:00.000Z",
  • "items": [
    ]
}

Remove an item from the reservation.

Remove an item from the reservation. This is useful to make sure the reservation will be flagged as complete once a checkout with all the items on the reservation is processed. NOTE that you may not remove the last item on a reservation.

path Parameters
reservation-id
required
number
item-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 413,
  • "startDate": "2018-11-01T00:00:00.000Z",
  • "endDate": "2018-11-15T00:00:00.000Z",
  • "items": [
    ]
}

List a user's projects

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List the carts for a user.

List the carts for a user. In most cases, there is only one cart to return.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[]

Create a new cart for the user.

Create a new cart for the user.

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
Example
{}

Return a specific cart.

Return a single cart by cartId.

path Parameters
cart-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Delete a specific cart.

Delete cart and cancel the current transaction.

path Parameters
cart-id
required
number

Responses

Response samples

Content type
application/json
"OK"

Start the return for a specific loan.

Start the return process for one loan. This will not be completed until the cart is committed (see /cart/{cart-id}/commit).

path Parameters
cart-id
required
number
loan-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Request Body schema: multipart/form-data
new-status
number

New status to set on the item being returned. Status id must be valid.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Remove a specific loan previously marked for return.

Remove a specific loan previously marked for return.

path Parameters
cart-id
required
number
loan-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Confirm that the user has returned the item, usually in a secured location.

The item has been returned, and should the cart be interrupted, this SHOULD be recorded has having been returned anyway.

path Parameters
cart-id
required
number
loan-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Add an item to the cart by Item ID to mark it for check out.

Add an item to the cart based on the unique Item ID (barcode/RFID) to mark the user wants to check it out. It will not be checked out to the user until the cart is converted (completed/submitted).

path Parameters
cart-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Request Body schema: application/x-www-form-urlencoded
required
item-id
required
string
reservation-id
number

The id of a reservation. Normally, this is the reservation from which the item was pulled, but it will take the due date based on the reservation even if the item wasn't on the reservation. If the reservation has passed, it will be ignored.

due-date
string

The due date in ISO format, without time (YYYY-MM-DD). One of due-date or reservation-id must be passed.

project-id
number

The id of the project to associate with this check out. Required to check out if the organization requires projects to check out. Use id 0 to unset the project for this check out.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Set or change details about the check out.

After an item is added to a cart for check out you can update information about it. This is currently limited to the due date and project.

path Parameters
cart-id
required
number
checkout-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Request Body schema: application/x-www-form-urlencoded
due-date
string <ISO date format, without time (YYYY-MM-DD).>
project-id
number

The id of the project to associate with this check out. Required to check out if the organization requires projects to check out. Use id 0 to unset the project for this check out.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Do not check out an item.

Do not check out an item and remove the item from the cart.

path Parameters
cart-id
required
number
checkout-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Confirm that the item has been removed, usually from a secured space.

path Parameters
cart-id
required
number
checkout-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
{
  • "id": 43,
  • "amount": 0,
  • "amountPayable": 0,
  • "displayAmountPayable": "string",
  • "outstandingLoans": [
    ],
  • "checkouts": [
    ],
  • "membershipChange": { },
  • "otherFees": { },
  • "payments": [
    ],
  • "discounts": [
    ],
  • "canCheckoutItems": true,
  • "projectRequired": true
}

Process the cart and complete all pending transactions.

Process the cart and complete all pending transactions.

path Parameters
cart-id
required
number
header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
"OK"

Testing

List of supported languages/locales

header Parameters
Accept-Language
string

Locale requested, per RFC 3282. However, myTurn will only use the language portion of the locale requested, and apply the organization's country. You are welcome to send only the two letter language code.

Responses

Response samples

Content type
application/json
[
  • {
    }
]