Back to endpoints

Get the rental contracts for an organization

GET api/V3/{language}/org/{orgIdentifier}/rentalcontracts

?status={status}

&showArchived={showArchived}

&page={page}

&perPage={perPage}

Returns a list of rental contracts ordered by id, with the option to show archived contracts and to filter by contract status

Request Information

URI Parameters

PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
orgIdentifier (string)

Amilia-specific organization identifier. This identifier can be either the organization number, such as 8008, or the organization URL identifier. You can find that by looking at the URL of your Amilia store. It may look like lower-case words separated by a dash, such as forest-explorers. Note that in v2 and v1 we call that the 'rewrite URL'.

Required
status (string)

Possible values are 'All', 'Approved', 'Draft', and 'PendingApproval'. These values are case-insensitive.

Default value is All

Optional
showArchived (boolean)

Option to also show archived items.

Default value is False

Optional
page (integer)

Result page number that appears first.

Default value is 1

Optional
perPage (integer)

Number of results per page.

Default value is 20

Optional

Body Parameters

None.

Response Information

Resource Description

PARAMETERS
OrganizationId (integer)

Id of the organization. This one cannot be substituted for rewriteUrl, contrary to the organization id in the query parameters

ContractNumber (integer)

Number of the contract

Name (string)

Resource name

ClientId (integer)

Id of the client

AccountId (integer)

Id of the account

Bookings ()

Object containing facility bookings details (booking id, location id and name, start and end date, price and occurrence status)

DateCreated (date)

Format is 9999-12-31

Status (ContractState)

Object containing the possible status values (case-insensitive).

For a contract, possible values are All, Approved, Draft, and PendingApproval.

Notes (string)

For contracts, notes to display on the official contract, visible to the clients

IsArchived (boolean)

True if resource is archived

Version (integer)
LastUpdated (date)
Id (integer)

Resource id

ContractNumber (string)

Number of the contract

AdminNotes (string)

For contracts, private notes invisible to the clients

SetupOption (string)

Response Formats

CODE SAMPLE JSON
[
  {
    "OrganizationId": 0,
    "ContractNumber": 0,
    "Name": "August 2019 - Grantham Soccer League & Town of Grantham",
    "ClientId": 75712,
    "AccountId": 921129,
    "Bookings": [
      {
        "Id": 0,
        "LocationId": 0,
        "LocationName": "Grantham soccer field 1",
        "Start": "2022-09-01T12:47:35.164382-04:00",
        "End": "2022-09-01T12:47:35.164382-04:00",
        "Price": 0.0,
        "Status": "Tentative",
        "IsSoftDeleted": false
      }
    ],
    "DateCreated": "2022-09-01",
    "Status": "PendingApproval",
    "Notes": "Subject to conditions",
    "IsArchived": false,
    "Version": 0,
    "LastUpdated": null,
    "Id": 0,
    "AdminNotes": "Refer to agreement",
    "SetupOption": null
  },
  {
    "OrganizationId": 0,
    "ContractNumber": 0,
    "Name": "August 2019 - Grantham Soccer League & Town of Grantham",
    "ClientId": 75712,
    "AccountId": 921129,
    "Bookings": [
      {
        "Id": 0,
        "LocationId": 0,
        "LocationName": "Grantham soccer field 1",
        "Start": "2022-09-01T12:47:35.164382-04:00",
        "End": "2022-09-01T12:47:35.164382-04:00",
        "Price": 0.0,
        "Status": "Tentative",
        "IsSoftDeleted": false
      }
    ],
    "DateCreated": "2022-09-01",
    "Status": "PendingApproval",
    "Notes": "Subject to conditions",
    "IsArchived": false,
    "Version": 0,
    "LastUpdated": null,
    "Id": 0,
    "AdminNotes": "Refer to agreement",
    "SetupOption": null
  }
]