v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Passes

Add a new set of day passes

Add a new set of day passes

Required scopes: flex.space.passes.create

post/api/v2/organizations/{orgSlug}/passes

Path parameters

orgSlugstring required

organization slug

Request body

startDatestring date-time required

The start date of the monthly recurring passes. Should be used only for credits with "intervalLength" set to "month".

countnumber required

The number of passes granted.

intervalLengthnumber required

Determines the recurrence of the passes. Can be either "month" or "once". If unspecified the credits issued will be set as "once".

endDatestring date-time

The end date of the monthly recurring passes. Should be used only for credits with "intervalLength" set to "month".

companystring

The _id of the company with which the passes are associated.

memberstring

The _id of the member with which the passes are associated.

isPersonalboolean required

Shows if the set of passes is for a single member or if its shared for a company.

resourceTypestring required

The type of the resource associated to the set of passes.

Example request

{
  "startDate": "2024-04-12T00:00:00.000Z",
  "count": 15,
  "endDate": "2024-05-12T00:00:00.000Z",
  "company": "6080186f490fcf6e0537ec62",
  "member": "6080186f490fcf6e0537ec67",
  "isPersonal": true,
  "resourceType": "hotdesk"
}

Response

_idstring

The _id of the set of passes.

countnumber

The number of passes granted.

usedCountnumber

The number of used passes.

intervalLengthnumber

Determines the recurrence of the passes. Can be either "month" or "once". If unspecified the credits issued will be set as "once".

startDatestring date-time

The start date of the monthly recurring passes. Should be used only for credits with "intervalLength" set to "month".

endDatestring date-time

The end date of the monthly recurring passes. Should be used only for credits with "intervalLength" set to "month".

renewDatestring date-time

The renew date of the monthly recurring passes. Should be used only for credits with "intervalLength" set to "month".

validFromstring date-time

The start date from which the passes are valid.

validTostring date-time

The end date for which the passes are valid.

companystring

The _id of the company with which the passes are associated.

memberstring

The _id of the member with which the passes are associated.

isPersonalboolean

Shows if the set of passes is for a single member or if its shared for a company.

membershipstring

The _id of the membership with which the passes are associated.

feestring

Shows if the set of fee is for a single member or if its shared for a company.

shouldGrantActiveStatusboolean

Shows if the set of passes grants active status to members that do not have active memberships.

resourceTypestring

The type of the resource associated to the set of passes.

status'used' | 'valid' | 'expired' | 'pending'

The status of the set of passes.

createdAtstring date-time

The date and time of the creation of the set of passes.

createdBystring

The user that created the set of passes.

modifiedAtstring date-time

The date and time of the last update the set of passes.

modifiedBystring

The user that last updated the set of passes.

Example response

{
  "_id": "6080186f490fcf6e0537ec52",
  "count": 15,
  "usedCount": 5,
  "startDate": "2024-04-12T00:00:00.000Z",
  "endDate": "2024-05-12T00:00:00.000Z",
  "renewDate": "2024-05-12T00:00:00.000Z",
  "validFrom": "2024-03-06T00:00:00.000Z",
  "validTo": "2024-04-06T00:00:00.000Z",
  "company": "6080186f490fcf6e0537ec62",
  "member": "6080186f490fcf6e0537ec67",
  "isPersonal": true,
  "membership": "6080186f490fcf6e0537ec33",
  "fee": "6080186f490fcf6e0537ec34",
  "shouldGrantActiveStatus": true,
  "resourceType": "hotdesk",
  "createdAt": "2024-04-12T00:00:00.000Z",
  "createdBy": "6080186f490fcf6e0537ec27",
  "modifiedAt": "2024-05-12T00:00:00.000Z",
  "modifiedBy": "6080186f490fcf6e0537ec54"
}