Skip to content

Get transaction detail

GET
/v1/transactions/{transaction_id}
curl --request GET \
--url https://api.loyx.se/partners/v1/transactions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Retrieve a single transaction by its internal UUID.

transaction_id
required
Transaction Id

The transaction’s internal UUID.

string format: uuid

The transaction’s internal UUID.

The requested transaction.

Media typeapplication/json
TransactionResponse

Full transaction response for detail endpoints.

object
_id
required
Id
string format: uuid
company_id
required
Company Id
string format: uuid
country_code
required
Country Code
string
created_at
required
Created At
string format: date-time
currency
required
Currency
string
discounts
Discounts
Array<object>
DiscountResponse

Discount in response (line-level or basket-level).

object
amount
required
PriceSchema

Monetary amount in minor units + currency code + formatting metadata (response).

Includes minor_units (divisor to convert to major units) and locale (RFC 5646) so the client can display prices without hardcoding rules.

object
currency
Currency

ISO 4217 currency code

string
default: SEK
locale
required
Locale

RFC 5646 locale for formatting (e.g. sv-SE)

string
minor_units
required
Minor Units

Divisor to convert to major units (e.g. 100 for SEK)

integer
value
required
Value

Amount in minor units (e.g. öre, cents)

integer
description
Description
string
""
personal_offer_id
Any of:
string format: uuid
type
required
Type
string
external
required
ExternalFieldsInput

External POS fields — all optional, stored as-received.

object
cashier_id
Any of:
string
<= 255 characters
cashier_name
Any of:
string
<= 255 characters
control_unit_code
Any of:
string
<= 255 characters
external_store_id
Any of:
string
<= 255 characters
external_transaction_id
Any of:
string
<= 255 characters
pos_serial
Any of:
string
<= 255 characters
pos_system
Any of:
string
<= 255 characters
purchased_at
Any of:
string format: date-time
receipt_number
Any of:
string
<= 255 characters
items
required
Items
Array<object>
ItemResponse

Line item in a transaction response — includes computed fields.

object
description
Any of:
string
discounts
Discounts
Array<object>
DiscountResponse

Discount in response (line-level or basket-level).

object
amount
required
PriceSchema

Monetary amount in minor units + currency code + formatting metadata (response).

Includes minor_units (divisor to convert to major units) and locale (RFC 5646) so the client can display prices without hardcoding rules.

object
currency
Currency

ISO 4217 currency code

string
default: SEK
locale
required
Locale

RFC 5646 locale for formatting (e.g. sv-SE)

string
minor_units
required
Minor Units

Divisor to convert to major units (e.g. 100 for SEK)

integer
value
required
Value

Amount in minor units (e.g. öre, cents)

integer
description
Description
string
""
personal_offer_id
Any of:
string format: uuid
type
required
Type
string
external_product_id
Any of:
string
identifiers
Identifiers
Array<object>
IdentifierInput

Product identifier (gtin, sku, etc.).

object
type
required
Type
string
value
required
Value
string
>= 1 characters <= 255 characters
loyalty_eligible
required
Loyalty Eligible
boolean
product_id
Any of:
string format: uuid
product_name
Any of:
string
quantity
required
QuantityInput

Quantity with unit.

object
unit
Unit
string
default: ea
value
required
Value
integer
> 0
sequence_number
required
Sequence Number
integer
tax_rate
required
Tax Rate
integer
total_amount
required
PriceSchema

Monetary amount in minor units + currency code + formatting metadata (response).

Includes minor_units (divisor to convert to major units) and locale (RFC 5646) so the client can display prices without hardcoding rules.

object
currency
Currency

ISO 4217 currency code

string
default: SEK
locale
required
Locale

RFC 5646 locale for formatting (e.g. sv-SE)

string
minor_units
required
Minor Units

Divisor to convert to major units (e.g. 100 for SEK)

integer
value
required
Value

Amount in minor units (e.g. öre, cents)

integer
total_discount
required
PriceSchema

Monetary amount in minor units + currency code + formatting metadata (response).

Includes minor_units (divisor to convert to major units) and locale (RFC 5646) so the client can display prices without hardcoding rules.

object
currency
Currency

ISO 4217 currency code

string
default: SEK
locale
required
Locale

RFC 5646 locale for formatting (e.g. sv-SE)

string
minor_units
required
Minor Units

Divisor to convert to major units (e.g. 100 for SEK)

integer
value
required
Value

Amount in minor units (e.g. öre, cents)

integer
unit_price
required
PriceSchema

Monetary amount in minor units + currency code + formatting metadata (response).

Includes minor_units (divisor to convert to major units) and locale (RFC 5646) so the client can display prices without hardcoding rules.

object
currency
Currency

ISO 4217 currency code

string
default: SEK
locale
required
Locale

RFC 5646 locale for formatting (e.g. sv-SE)

string
minor_units
required
Minor Units

Divisor to convert to major units (e.g. 100 for SEK)

integer
value
required
Value

Amount in minor units (e.g. öre, cents)

integer
locale
required
Locale
string
loyalty
Any of:
LoyaltyResponse

Loyalty block in responses. Pre-populated with empty keys, filled by the loyalty engine after processing.

object
cycle
Any of:
integer
exchange_rate_used
Any of:
object
key
additional properties
any
points_deducted
Any of:
integer
points_earned
Points Earned
integer
0
post_balance
Post Balance
integer
0
pre_balance
Pre Balance
integer
0
processed_at
Any of:
string format: date-time
refund_processed_at
Any of:
string format: date-time
refund_type
Any of:
string
stamps_earned
Stamps Earned
integer
0
member
required
Member
Array<object>
MemberIdentifierInput

Member identifier (user_id, membership_id, mobile_number, email, social_security_number).

object
identifier
required
Identifier
string
value
required
Value
string
>= 1 characters <= 255 characters
membership_id
Any of:
string format: uuid
metadata
Metadata
object
key
additional properties
any
origin
Any of:
string
status
Status
string
default: unresolved
store_id
Any of:
string format: uuid
totals
required
Totals
Array<object>
TotalResponse

Single totals entry. Value is integer minor units. Currency is on the transaction root — not duplicated here.

object
type
required
Type
string
value
required
Value
integer
transaction_type
required
Transaction Type
string
updated_at
required
Updated At
string format: date-time
user_id
Any of:
string format: uuid
voided_at
Any of:
string format: date-time

Example

{
"discounts": [
{
"amount": {
"currency": "SEK"
},
"description": ""
}
],
"items": [
{
"discounts": [
{
"amount": {
"currency": "SEK"
},
"description": ""
}
],
"quantity": {
"unit": "ea"
},
"total_amount": {
"currency": "SEK"
},
"total_discount": {
"currency": "SEK"
},
"unit_price": {
"currency": "SEK"
}
}
],
"loyalty": {
"points_earned": 0,
"post_balance": 0,
"pre_balance": 0,
"stamps_earned": 0
},
"status": "unresolved"
}

missing_token, invalid_authorization_header or invalid_token: get a new access token and retry once.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

insufficient_scope: the API key lacks the scope this route needs.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Transaction not found.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Validation Error

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

rate_limit_exceeded: wait Retry-After seconds.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

internal_server_error or database_error (type internal_error): our fault. Retry with backoff; quote request_id.

Media typeapplication/json
ErrorResponse

Standard error response format.

object
error
required
ErrorDetail

Error detail structure (Stripe-like format).

object
code
required
Code

Machine-readable error code

string
details
Any of:
Array<object>
FieldErrorDetail

One failing field of a validation error.

object
message
required
Message

Why the value was refused

string
param
required
Param

Dotted path of the field, e.g. items.0.unit_price.value

string
doc_url
Any of:
string
message
required
Message

Human-readable error message

string
param
Any of:
string
type
required
Type

Error type category

string
request_id
Any of:
string

Example generated

{
"error": {
"code": "example",
"details": [
{
"message": "example",
"param": "example"
}
],
"doc_url": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}