Mews Product service orders API
The Product service orders API from Mews — 1 operation(s) for product service orders.
The Product service orders API from Mews — 1 operation(s) for product service orders.
openapi: 3.0.4
info:
title: Connector Account notes Product service orders API
description: General-purpose API that enables partners of Mews to access data and services in Mews Operations
termsOfService: https://www.mews.com/en/terms-conditions/partners
contact:
name: Partner success
email: partnersuccess@mews.com
version: v1
servers:
- url: https://api.mews.com
tags:
- name: Product service orders
paths:
/api/connector/v1/productServiceOrders/getAll:
post:
tags:
- Product service orders
summary: Get all product service orders
description: Returns all product service orders associated with the given enterprise. This operation uses [Pagination](https://mews-systems.gitbook.io/connector-api/guidelines/pagination/) and supports [Portfolio Access Tokens](https://mews-systems.gitbook.io/connector-api/concepts/multi-property/).
operationId: productServiceOrders_getAll
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ProductServiceOrderFilterParameters'
example:
ClientToken: E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D
AccessToken: C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D
Client: Sample Client 1.0.0
ProductServiceOrderIds:
- 9e6d4492-315b-4089-b9d6-5b1bd2eddc1b
ServiceIds:
- ae8da28c-e8a4-4141-9df0-8c998976c691
- 6b02d015-47ac-4c41-8e9f-5b4db61d4284
LinkedReservationIds:
- 0f515589-99b4-423d-b83a-b237009f0509
- b7a3f5cb-1e69-4a5f-a069-10f461996d7f
UpdatedUtc:
StartUtc: '2023-04-01T00:00:00Z'
EndUtc: '2023-05-05T00:00:00Z'
States:
- Confirmed
- Started
Limitation:
Count: 10
Cursor: 819e3435-7d5e-441f-bc68-76d89c69b8f5
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/ProductServiceOrderResult'
example:
ProductServiceOrders:
- Id: 9e6d4492-315b-4089-b9d6-5b1bd2eddc1b
ServiceId: ae8da28c-e8a4-4141-9df0-8c998976c691
AccountId: fadd5bb6-b428-45d5-94f8-fd0d89fece6d
AccountType: Customer
CreatorProfileId: 3cd637ef-4728-47f9-8fb1-afb900c9cdcf
UpdaterProfileId: 122fc063-ec6e-4198-b8db-6b168a59ffae
BookerId: bccdafd1-3e44-439d-861f-341526b597a9
Number: '52'
State: Confirmed
Origin: Connector
CommanderOrigin: null
OriginDetails: null
CreatedUtc: '2023-04-23T14:58:02Z'
UpdatedUtc: '2023-04-23T14:58:02Z'
CancelledUtc: null
VoucherId: null
BusinessSegmentId: null
LinkedReservationId: 0f515589-99b4-423d-b83a-b237009f0509
Options:
OwnerCheckedIn: true
AllCompanionsCheckedIn: true
AnyCompanionCheckedIn: true
ConnectorCheckIn: true
Cursor: 9e6d4492-315b-4089-b9d6-5b1bd2eddc1b
'400':
description: Error caused by the client app, e.g. in case of malformed request or invalid identifier of a resource. In most cases, such an error signifies a bug in the client app (consumer of the API).
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
'401':
description: Error caused by usage of invalid ClientToken, AccessToken, or you may not have the necessary permission to use the endpoint.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
'403':
description: Server error that should be reported to the end user of the client app. Happens for example when the server-side validation fails or when a business-logic check is violated.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
'408':
description: Error caused by heavy request that takes too long to process (typically tens of seconds). To get around this, request data in smaller batches. For more information, see [Request timeouts](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-timeouts)
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
'204':
description: Server has successfully fulfilled the request and there is no additional information to send back.
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
'429':
description: Error caused by too many requests sent in a given amount of time. Response contains `Retry-After` header indicating how long the user agent should wait before making a follow-up request. For more information, see [Request limits](https://mews-systems.gitbook.io/connector-api/guidelines/requests#request-limits).
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
'500':
description: Unexpected error on the Mews side. This may be due to a software fault. If such a situation occurs, the error will be logged and the development team notified, however you can raise an issue through GitHub on our [documentation repository](https://github.com/MewsSystems/gitbook-connector-api).
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorApiExceptionResult'
components:
schemas:
ServiceOrderStateEnum:
title: Service order state
enum:
- Inquired
- Confirmed
- Started
- Processed
- Canceled
- Optional
- Requested
type: string
description: '
Inquired (Confirmed neither by the customer nor enterprise.)
Confirmed (Confirmed by both parties, before check-in.)
Started (Checked in.)
Processed (Checked out.)
Canceled (Canceled.)
Optional (Confirmed by enterprise but not by the guest (the enterprise is holding resource for the guest).)
Requested (Confirmed by the customer but not by the enterprise (waitlist).)'
x-enumNames:
- Inquired
- Confirmed
- Started
- Processed
- Canceled
- Optional
- Requested
x-enumDescriptions:
- Confirmed neither by the customer nor enterprise.
- Confirmed by both parties, before check-in.
- Checked in.
- Checked out.
- Canceled.
- Confirmed by enterprise but not by the guest (the enterprise is holding resource for the guest).
- Confirmed by the customer but not by the enterprise (waitlist).
ServiceOrderCommanderOriginEnum:
title: Commander origin
enum:
- InPerson
- Channel
- Phone
- Email
- Website
- Message
- CallCenter
- RoomingList
type: string
description: '
InPerson
Channel
Phone
Email
Website
Message
CallCenter
RoomingList'
x-enumNames:
- InPerson
- Channel
- Phone
- Email
- Website
- Message
- CallCenter
- RoomingList
x-enumDescriptions:
- ''
- ''
- ''
- ''
- ''
- ''
- ''
- ''
ConnectorApiExceptionResult:
title: ConnectorApiExceptionResult
type: object
properties:
Message:
type: string
nullable: true
RequestId:
type: string
nullable: true
Details:
nullable: true
additionalProperties: false
x-schema-id: ConnectorApiExceptionResult
ProductServiceOrderResult:
title: ProductServiceOrderResult
required:
- ProductServiceOrders
type: object
properties:
ProductServiceOrders:
type: array
items:
$ref: '#/components/schemas/ServiceOrder'
description: The collection of product service orders.
Cursor:
type: string
description: Unique identifier of the item one newer in time order than the items to be returned. If Cursor is not specified, i.e. null, then the latest or most recent items will be returned.
format: uuid
nullable: true
additionalProperties: false
x-schema-id: ProductServiceOrderResult
Limitation:
title: Limitation
required:
- Count
type: object
properties:
Count:
type: integer
format: int32
Cursor:
type: string
format: uuid
nullable: true
additionalProperties: false
description: Limitation on the quantity of data returned.
x-schema-id: Limitation
AccountTypeEnum:
title: Account type
enum:
- Company
- Customer
type: string
description: 'A discriminator specifying the account type, e.g. `Customer` or `Company`
Company
Customer'
x-enumNames:
- Company
- Customer
x-enumDescriptions:
- ''
- ''
ServiceOrderOptions:
title: Service Order Options
required:
- AllCompanionsCheckedIn
- AnyCompanionCheckedIn
- ConnectorCheckIn
- OwnerCheckedIn
type: object
properties:
OwnerCheckedIn:
type: boolean
description: Owner of the reservation checked in.
AllCompanionsCheckedIn:
type: boolean
description: All companions of the reservation checked in.
AnyCompanionCheckedIn:
type: boolean
description: Any of the companions of the reservation checked in.
ConnectorCheckIn:
type: boolean
description: Check in was done via Connector API.
additionalProperties: false
x-schema-id: ServiceOrderOptions
ServiceOrderOriginEnum:
title: Service order origin
enum:
- Distributor
- ChannelManager
- Commander
- Import
- Connector
- Navigator
type: string
description: '
Distributor (From the Mews Booking Engine or Booking Engine API.)
ChannelManager (From a channel manager.)
Commander (From Mews Operations.)
Import (From an import process.)
Connector (From the Mews Connector API.)
Navigator (From Mews Guest Services.)'
x-enumNames:
- Distributor
- ChannelManager
- Commander
- Import
- Connector
- Navigator
x-enumDescriptions:
- From the Mews Booking Engine or Booking Engine API.
- From a channel manager.
- From Mews Operations.
- From an import process.
- From the Mews Connector API.
- From Mews Guest Services.
ServiceOrderState:
title: Service order state
enum:
- Inquired
- Confirmed
- Started
- Processed
- Canceled
- Optional
- Requested
type: string
x-enumDescriptions:
- Confirmed neither by the customer nor enterprise.
- Confirmed by both parties, before check-in.
- Checked in.
- Checked out.
- Canceled.
- Confirmed by enterprise but not by the guest (the enterprise is holding resource for the guest).
- Confirmed by the customer but not by the enterprise (waitlist).
TimeFilterInterval:
title: Time interval
type: object
properties:
StartUtc:
type: string
format: date-time
nullable: true
EndUtc:
type: string
format: date-time
nullable: true
additionalProperties: false
description: "When a time interval is used for **filtering** (for example in parameters such as `CreatedUtc.StartUtc` / `CreatedUtc.EndUtc`), the following rules apply:\r\n\r\n- **Start equals End (equality mode)** \r\n If `StartUtc` and `EndUtc` are exactly the same timestamp, the filter is treated as an equality check for that precise moment in time:\r\n \r\n ```\r\n CreatedUtc == StartUtc\r\n ```\r\n \r\n This does not represent an interval; only records with `CreatedUtc` equal to that exact instant are returned.\r\n\r\n- **Start differs from End (interval mode)** \r\n If `StartUtc` and `EndUtc` are different, the filter is evaluated as a half-open interval:\r\n \r\n ```\r\n StartUtc <= CreatedUtc < EndUtc\r\n ```\r\n \r\n In other words, the start is inclusive and the end is exclusive.\r\n\r\nMake sure your integration takes inclusive Start / exclusive End behavior of time intervals into account so that no records at the boundaries are omitted."
x-schema-id: TimeFilterInterval
ProductServiceOrderFilterParameters:
title: ProductServiceOrderFilterParameters
required:
- AccessToken
- Client
- ClientToken
- Limitation
- ServiceIds
type: object
properties:
ClientToken:
minLength: 1
type: string
description: Token identifying the client application.
AccessToken:
minLength: 1
type: string
description: Access token of the client application.
Client:
minLength: 1
type: string
description: Name and version of the client application.
Limitation:
allOf:
- $ref: '#/components/schemas/Limitation'
description: Limitation on the quantity of data returned and optional Cursor for the starting point of data.
EnterpriseIds:
maxItems: 1000
minItems: 1
type: array
items:
type: string
format: uuid
description: Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
nullable: true
ProductServiceOrderIds:
maxItems: 1000
minItems: 1
type: array
items:
type: string
format: uuid
description: Unique identifiers of the Product service order.
nullable: true
ServiceIds:
maxItems: 1000
minItems: 1
type: array
items:
type: string
format: uuid
description: Unique identifiers of the `Service`.
AccountIds:
maxItems: 1000
minItems: 1
type: array
items:
type: string
format: uuid
description: Unique identifiers of the Customer or Company who owns the product service order.
nullable: true
LinkedReservationIds:
maxItems: 1000
minItems: 1
type: array
items:
type: string
format: uuid
description: Unique identifiers of linked Reservations.
nullable: true
UpdatedUtc:
title: Time interval
allOf:
- $ref: '#/components/schemas/TimeFilterInterval'
description: Interval in which the Product service orders were updated.
nullable: true
x-max-interval-in-months: 3
States:
type: array
items:
$ref: '#/components/schemas/ServiceOrderState'
description: A list of product service order states to filter by.
nullable: true
additionalProperties: false
x-schema-id: ProductServiceOrderFilterParameters
ServiceOrder:
title: Product service order
required:
- AccountId
- AccountType
- CreatedUtc
- CreatorProfileId
- Id
- Number
- Options
- Origin
- ServiceId
- State
- UpdatedUtc
- UpdaterProfileId
type: object
properties:
Id:
type: string
description: Unique identifier of the product service order
format: uuid
ServiceId:
type: string
description: Unique identifier of the `Service` that product service order is made against.
format: uuid
AccountId:
type: string
description: Unique identifier of the Customer or Company who owns the product service order.
format: uuid
AccountType:
allOf:
- $ref: '#/components/schemas/AccountTypeEnum'
description: 'A discriminator specifying the type of account, e.g. `Customer` or `Company`.
Company
Customer'
CreatorProfileId:
type: string
description: Unique identifier of the user who created the product service order.
format: uuid
UpdaterProfileId:
type: string
description: Unique identifier of the user who updated the product service order.
format: uuid
BookerId:
type: string
description: Unique identifier of the Customer on whose behalf the service order was made.
format: uuid
nullable: true
Number:
minLength: 1
type: string
description: Confirmation number of the service order in Mews.
State:
title: Service order state
allOf:
- $ref: '#/components/schemas/ServiceOrderStateEnum'
description: 'State of the product service order.
Inquired (Confirmed neither by the customer nor enterprise.)
Confirmed (Confirmed by both parties, before check-in.)
Started (Checked in.)
Processed (Checked out.)
Canceled (Canceled.)
Optional (Confirmed by enterprise but not by the guest (the enterprise is holding resource for the guest).)
Requested (Confirmed by the customer but not by the enterprise (waitlist).)'
x-enumNames:
- Inquired
- Confirmed
- Started
- Processed
- Canceled
- Optional
- Requested
x-enumDescriptions:
- Confirmed neither by the customer nor enterprise.
- Confirmed by both parties, before check-in.
- Checked in.
- Checked out.
- Canceled.
- Confirmed by enterprise but not by the guest (the enterprise is holding resource for the guest).
- Confirmed by the customer but not by the enterprise (waitlist).
Origin:
title: Service order origin
allOf:
- $ref: '#/components/schemas/ServiceOrderOriginEnum'
description: 'Origin of the product service order.
Distributor (From the Mews Booking Engine or Booking Engine API.)
ChannelManager (From a channel manager.)
Commander (From Mews Operations.)
Import (From an import process.)
Connector (From the Mews Connector API.)
Navigator (From Mews Guest Services.)'
x-enumNames:
- Distributor
- ChannelManager
- Commander
- Import
- Connector
- Navigator
x-enumDescriptions:
- From the Mews Booking Engine or Booking Engine API.
- From a channel manager.
- From Mews Operations.
- From an import process.
- From the Mews Connector API.
- From Mews Guest Services.
CommanderOrigin:
allOf:
- $ref: '#/components/schemas/ServiceOrderCommanderOriginEnum'
description: 'Further detail about origin in case of Origin Commander.
InPerson
Channel
Phone
Email
Website
Message
CallCenter
RoomingList'
nullable: true
OriginDetails:
type: string
description: Details about the product service order Origin.
nullable: true
CreatedUtc:
minLength: 1
type: string
description: Creation date and time of the product service order in UTC timezone in ISO 8601 format.
format: date-time
UpdatedUtc:
minLength: 1
type: string
description: Last update date and time of the product service order in UTC timezone in ISO 8601 format.
format: date-time
CancelledUtc:
type: string
description: Cancellation date and time in UTC timezone in ISO 8601 format.
format: date-time
nullable: true
VoucherId:
type: string
description: Unique identifier of the Voucher that has been used to create product service order.
format: uuid
nullable: true
BusinessSegmentId:
type: string
description: Identifier of the Business segment.
format: uuid
nullable: true
LinkedReservationId:
type: string
description: Identifier of the linked Reservation.
format: uuid
nullable: true
Options:
title: Service order options
allOf:
- $ref: '#/components/schemas/ServiceOrderOptions'
description: Options of the service order.
additionalProperties: false
x-schema-id: ServiceOrder