Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 2.3 KB

requests.md

File metadata and controls

49 lines (31 loc) · 2.3 KB

Requests

The Mews POS API is REST-based and follows the JSON:API specification for formatting HTTP requests and responses. All requests must include the Content-Type header set to the JSON:API media type application/vnd.api+json.

JSON:API

JSON:API is a widely-used specification for structuring API requests and responses. Understanding this format will help you effectively interact with the Mews POS API.

Key features supported

For more tools and resources:

  • Client Libraries – Use libraries from the JSON:API Implementations list to streamline development.
  • Media Type – Ensure that requests use the media type application/vnd.api+json.

Address pattern

All operations in the Mews POS API follow a consistent URL structure:

[PlatformAddress]/api/v2/[Resource]/{id}
  • PlatformAddress – The base address of the API (varies by environment: test, demo, production).
  • Resource – The pluralized name of the target resource (e.g. bills, reservations).
  • id – Unique identifier of the Resource, used only when referencing a specific Resource.

Example:

https://pos.mews-demo.com/api/v2/invoice-items/31b14937-2524-491f-b0a0-dc0a7393ff3f

Query parameters

The Mews POS API supports query parameters for Relationships, Filtering and Sparse fieldsets.

Example:

https://pos.mews-demo.com/api/v2/invoices?filter[createdAtGt]=2024-07-25T16%3A29%3A35%2B00%3A00

Request body

Each request will include a header with authentication information, and a body with any data needed to perform the operation, formatted as per JSON:API. 'Get' operations, such as Get invoices, use the GET http verb and therefore do not have any data in the request body.