Teya Print Receipts (ePOS) API
Create a receipt print job and fetch its status/events
Create a receipt print job and fetch its status/events
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/teya:teya-print-receipts-epos-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: POSLink Print Receipts (ePOS) API
description: Handles messaging between the ePOS software and terminal.
contact:
name: Poslink Service
url: https://teyaglobal.atlassian.net/wiki/spaces/CE/pages/5993563200/Integration+Guide
email: poslink@teya.com
version: '1.2'
servers:
- url: https://api.teya.com
description: Production Server
- url: https://api.teya.xyz
description: Staging Server
security:
- authorisation: []
tags:
- name: Print Receipts (ePOS)
description: Create a receipt print job and fetch its status/events
paths:
/poslink/v1/receipt-requests:
post:
tags:
- Print Receipts (ePOS)
summary: Create a receipt to print (JSON or multipart image)
description: 'Creates a receipt print job by either:
- Sending a JSON payload that describes the receipt content to be rendered by the service; or
- Uploading a pre-rendered receipt image via multipart/form-data.
On success, a new receipt job is created and the response contains the unique receipt_id,
initial status (NOT_PRINTED), and creation timestamp. Clients can then subscribe to status updates via the SSE endpoint or poll for the result.
Content types:
- application/json
- multipart/form-data (fields: store_id, terminal_id, image)
Response: 201 Created with a JSON body containing identifiers and initial status.'
operationId: createPrintJob
parameters:
- name: store_id
in: query
required: true
schema:
type: string
- name: terminal_id
in: query
required: true
schema:
type: string
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
image:
type: string
format: binary
required:
- image
application/json:
schema:
$ref: '#/components/schemas/ReceiptCreateRequest'
required: true
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/ReceiptCreatedResponse'
example:
receipt_id: rcpt_123
status: NOT_PRINTED
created_at: '2025-09-10T12:34:56Z'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: BAD_REQUEST
description: Bad Request
'401':
description: Lacks valid authentication credentials for the requested resource
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: UNAUTHORISED
description: Unauthorised
'403':
description: The server understands the request but refuses to authorise it
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: FORBIDDEN
description: Forbidden
'429':
description: Too many requests in a given amount of time
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: TOO_MANY_REQUESTS
description: Too Many Requests
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: INTERNAL_SERVER_ERROR
description: Internal Server Error
/poslink/v1/receipt-requests/{receipt_id}/status:
get:
tags:
- Print Receipts (ePOS)
summary: Get receipt print job with real-time updates
description: 'Streams real-time updates for a receipt print job using Server‑Sent Events (SSE) with content type text/event-stream.
Each message in the stream is an SSE event with:
- data: a JSON object with receipt status fields (no formal schema available for SSE payload)
- a blank line terminates each event frame
Semantics:
- The stream emits receipt status updates as they occur.
- When the receipt reaches a final status (for example, PRINTED or FAILED), a last event is sent and the stream is closed.
- If the receipt is already final when requested, a single event is sent and the connection is closed immediately.
Possible statuses:
- NOT_PRINTED
- ENQUEUED
- PRINTING
- PRINTED
- FAILED
- UNKNOWN
Possible status reasons:
- TIMEOUT
- BUSY
- OUT_OF_PAPER
- OVERHEATED
- COVER_OPEN
- LOW_BATTERY
- OTHER
Connection behavior:
- The server may close the connection after approximately one minute of inactivity; clients should reconnect if updates are still expected.
Wire example:
data: {"receipt_id":"...","status":"PRINTED","status_reason":null,"updated_at":"2025-09-10T12:30:45Z"}
Note: The response schema below describes the structure of the JSON object placed in the SSE data field, not the SSE framing itself.'
operationId: streamEvents
parameters:
- name: receipt_id
in: path
required: true
schema:
type: string
responses:
'200':
description: SSE stream
content:
text/event-stream:
schema:
type: string
description: 'Server-Sent Events stream with lines prefixed by data: '
example: "data: {\n \"receipt_id\" : \"rcpt_123\",\n \"status\" : \"NOT_PRINTED\",\n \"status_reason\": null,\n \"updated_at\" : \"2025-09-10T12:35:00Z\"\n}\n"
title: SSE Event Stream
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: BAD_REQUEST
description: Bad Request
'401':
description: Lacks valid authentication credentials for the requested resource
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: UNAUTHORISED
description: Unauthorised
'403':
description: The server understands the request but refuses to authorise it
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: FORBIDDEN
description: Forbidden
'429':
description: Too many requests in a given amount of time
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: TOO_MANY_REQUESTS
description: Too Many Requests
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: INTERNAL_SERVER_ERROR
description: Internal Server Error
components:
schemas:
DividerRow:
allOf:
- $ref: '#/components/schemas/Row'
example:
type: Divider
title: DividerRow
PrintDocument:
type: object
example:
rows:
- type: Items
items:
- type: Text
text: Hello
properties:
rows:
type: array
items:
$ref: '#/components/schemas/Row'
maxItems: 150
minItems: 1
required:
- rows
title: PrintDocument
ReceiptCreatedResponse:
type: object
description: Response returned after a receipt print job is created
properties:
receipt_id:
type: string
description: Generated receipt identifier
example: rcpt_123
status:
type: string
description: Current status of the receipt
example: NOT_PRINTED
created_at:
type: string
format: date-time
description: Creation timestamp in ISO 8601 date-time format (e.g., 2025-09-10T12:34:56Z)
example: '2025-09-10T12:34:56Z'
title: Receipt Created Response
InvalidParams:
type: object
description: A single failed parameter from a 4xx validation response.
example:
path: requested_amount.amount
reason: Amount exceeds the tab's remaining balance
properties:
path:
type: string
description: Dot-notation path to the offending field on the request body, in snake_case.
example: requested_amount.amount
reason:
type: string
description: Human-readable explanation of why the parameter was rejected.
example: Amount exceeds the tab's remaining balance
required:
- path
- reason
title: InvalidParams
ReceiptCreateRequest:
type: object
description: Request body to create a new print receipt job
properties:
store_id:
type: string
format: uuid
description: Store identifier
example: 4b33fd70-7c92-4060-9898-f066e77d3ae1
terminal_id:
type: string
description: Terminal identifier
example: 80c267d3
print_model:
$ref: '#/components/schemas/PrintDocument'
required:
- print_model
- store_id
- terminal_id
title: Receipt Create Request
ItemsRow:
allOf:
- $ref: '#/components/schemas/Row'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/Element'
maxItems: 10
minItems: 1
example:
type: Items
items:
- type: Text
text: Header
bold: true
align: CENTER
required:
- items
title: ItemsRow
ImageElement:
allOf:
- $ref: '#/components/schemas/Element'
- type: object
properties:
base64:
type: string
minLength: 1
align:
type: string
enum:
- LEFT
- RIGHT
- CENTER
example:
type: Image
base64: '...'
align: RIGHT
required:
- base64
title: ImageElement
TableRow:
allOf:
- $ref: '#/components/schemas/Row'
- type: object
properties:
header_cells:
type: array
items:
$ref: '#/components/schemas/TableHeaderCell'
rows:
type: array
items:
$ref: '#/components/schemas/TableInnerRow'
example:
type: Table
header_cells:
- element:
type: Text
text: QTD DESIGNACAO
weight: 1.5
rows:
- cells:
- type: Text
text: 1 Coffee
align: LEFT
title: TableRow
Element:
discriminator:
propertyName: type
example:
type: Text
oneOf:
- $ref: '#/components/schemas/TextElement'
- $ref: '#/components/schemas/QrCodeElement'
- $ref: '#/components/schemas/ImageElement'
properties:
type:
type: string
required:
- type
title: Element
TableHeaderCell:
type: object
example:
element:
type: Text
text: Header
weight: 1
properties:
element:
$ref: '#/components/schemas/Element'
oneOf:
- $ref: '#/components/schemas/TextElement'
- $ref: '#/components/schemas/ImageElement'
- $ref: '#/components/schemas/QrCodeElement'
weight:
type: number
format: double
required:
- element
title: TableHeaderCell
SpacerRow:
allOf:
- $ref: '#/components/schemas/Row'
example:
type: Spacer
title: SpacerRow
QrCodeElement:
allOf:
- $ref: '#/components/schemas/Element'
- type: object
properties:
url:
type: string
minLength: 1
align:
type: string
enum:
- LEFT
- RIGHT
- CENTER
example:
type: QrCode
url: https://teya.com
align: LEFT
required:
- url
title: QrCodeElement
TableInnerRow:
type: object
example:
cells:
- type: Text
text: Item
align: LEFT
properties:
cells:
type: array
items:
$ref: '#/components/schemas/Element'
minItems: 1
required:
- cells
title: TableInnerRow
Error:
type: object
description: Error response
properties:
code:
type: string
format: enum
description: The error code
enum:
- BAD_REQUEST
- UNAUTHORISED
- FORBIDDEN
- CONFLICT
- INTERNAL_SERVER_ERROR
- TOO_MANY_REQUESTS
- NOT_FOUND
- GONE
- UNSUPPORTED_MEDIA_TYPE
description:
type: string
description: The description of the error
invalid_params:
type: array
description: Invalid parameters
items:
$ref: '#/components/schemas/InvalidParams'
required:
- code
- description
title: Error
TextElement:
allOf:
- $ref: '#/components/schemas/Element'
- type: object
properties:
text:
type: string
minLength: 1
bold:
type: boolean
align:
type: string
enum:
- LEFT
- RIGHT
- CENTER
example:
type: Text
text: Coffee
bold: false
align: LEFT
required:
- text
title: TextElement
Row:
discriminator:
propertyName: type
example:
type: Spacer
oneOf:
- $ref: '#/components/schemas/ItemsRow'
- $ref: '#/components/schemas/TableRow'
- $ref: '#/components/schemas/SpacerRow'
- $ref: '#/components/schemas/DividerRow'
properties:
type:
type: string
required:
- type
title: Row
securitySchemes:
authorisation:
type: oauth2
description: 'Given a valid access token, you can now use a Bearer Token to authenticate your requests.
To do so you have to preface your access token with Bearer and send it in the HTTP Authorization header.
It should look something like this: `Authorization: Bearer <ACCESS_TOKEN>`
'
flows:
authorizationCode:
authorizationUrl: https://id.teya.com/oauth/v2/oauth-authorize
tokenUrl: https://id.teya.com/oauth/v2/oauth-token
scopes: {}
x-teya-variables:
production:
rps-payment-request: 15
rps-payment-request: '1'
staging:
rps-payment-request: 15