Download OpenAPI specification:
The Publizon Reporting API provides a clear and consistent method for outbound customers (retailers and partners) to report back to Publizon on earnings, content consumption, and reader demography.
An API key and a set of credentials (email and password) must be used to authenticate. Use the auth api to get the short-lived token needed to call the reporting api endpoints.
Requests are limited to 5 per second. Requests exceeding the limit will be rejected with a 429 Too Many Requests response.
The companyId header is only relevant when your user belongs to more than one company. In that case it must be set on every request to indicate which company the call is being made on behalf of. If this applies to you, contact Publizon to obtain your company id.
This endpoint allows partners to upload structured data regarding the financial performance of content sold or consumed via their platform. It covers the flow of financial information back to Publizon.
Each retailerTransactionId must be unique for the calling retailer. A request that reuses an id — either within the same batch or against a previously reported transaction — is rejected as a whole; no transactions are inserted.
UNAUTHORIZED: Authentication failed or the caller is not allowed to access this endpoint.FORBIDDEN: The caller is authenticated but does not have permission to report revenue data.PRODUCT_NOT_FOUND: One or more provided product identifiers do not exist. The request is rejected as a whole — if any product is missing, no transactions from the batch are inserted.COMPANY_NOT_FOUND: The company specified by the companyId header does not exist.DUPLICATE_RETAILER_TRANSACTION_ID: One or more retailerTransactionId values have already been reported by this retailer. The request is rejected as a whole.UNPROCESSABLE_ENTITY: The request payload is invalid.required | Array of objects (RevenueTransaction) [ 1 .. 250 ] items |
{- "transactions": [
- {
- "customerId": "string",
- "productIdentifier": "string",
- "retailerTransactionId": "string",
- "saleDateTime": "2019-08-24T14:15:22Z",
- "quantity": {
- "value": 0.1,
- "type": "Units"
}, - "unitAmount": 0.1,
- "totalAmount": 0.1,
- "currency": "DKK",
- "market": "AD"
}
]
}{- "errorCode": "UNAUTHORIZED",
- "message": "string"
}This endpoint allows publishers and sales channels to export transactional revenue data.
Response:
customerId: Optional customer identifier from the retailer system.productIdentifier: The primary identifier for the title, typically the ISBN-13.retailerTransactionId: A unique string generated by the retailer to ensure each consumption event or sale is reported only once and can be audited.quantity: The numerical volume of usage. Depending on the QuantityType, this could be a whole number (units / parts) or a decimal (hours/percentage).saleTimestamp: Datetime when the transaction occurred.unitAmount: The calculated rate paid per single unit of the chosentotalAmount: The total net revenue or royalty share to be paid to the publisher for this specific line item.market: The geographic market of the user (e.g., SE, DK, FI).UNAUTHORIZED: Authentication failed or the caller is not allowed to access this endpoint.FORBIDDEN: The caller is authenticated but does not have permission to read revenue data.UNPROCESSABLE_ENTITY: Query parameters are invalid.| startDate required | string The start date for the query range (ISO 8601 format). The range cannot exceed 31 days. |
| endDate required | string The end date for the query range (ISO 8601 format). |
[- {
- "saleTimestamp": "string",
- "customerId": "string",
- "productIdentifier": "string",
- "retailerTransactionId": "string",
- "quantity": {
- "value": 0.1,
- "type": "Units"
}, - "unitAmount": 0,
- "totalAmount": 0,
- "currency": "DKK",
- "market": "string"
}
]This endpoint handles the reporting of how end-users consume the digital content. It is only available to outbound channels.
UNAUTHORIZED: Authentication failed or the caller is not allowed to access this endpoint.FORBIDDEN: The caller is authenticated but does not have permission to report usage data.PRODUCT_NOT_FOUND: One or more provided product identifiers do not exist. The request is rejected as a whole — if any product is missing, no usage events from the batch are inserted.COMPANY_NOT_FOUND: The company specified by the companyId header does not exist.UNPROCESSABLE_ENTITY: The request payload is invalid.required | Array of objects (ProductUsageReport) [ 1 .. 50 ] items |
{- "products": [
- {
- "subscriptionId": "string",
- "customerId": "string",
- "productIdentifier": "string",
- "usages": [
- {
- "part": 0,
- "format": "Epub",
- "startPosition": 0,
- "endPosition": 0,
- "usageId": "string",
- "usageDateTime": "2019-08-24T14:15:22Z"
}
]
}
]
}{- "errorCode": "UNAUTHORIZED",
- "message": "string"
}This endpoint allows publishers and sales channels to export transactional usage data.
Response:
usageTimestamp: Datetime when the usage started.customerId: Optional customer identifier from the retailer system.productIdentifier: The primary identifier for the title, typically the ISBN-13.part: Part index reported for the usage event.format: Format in which the usage happened.startPosition: Start position in seconds (audiobooks) or words (ebooks).endPosition: End position in seconds (audiobooks) or words (ebooks).usageId: Unique identifier generated by the retailer for de-duplication.UNAUTHORIZED: Authentication failed or the caller is not allowed to access this endpoint.FORBIDDEN: The caller is authenticated but does not have permission to read usage data.UNPROCESSABLE_ENTITY: Query parameters are invalid.| startDate required | string The start date for the query range (ISO 8601 format). The range cannot exceed 31 days. |
| endDate required | string The end date for the query range (ISO 8601 format). |
[- {
- "customerId": "string",
- "productIdentifier": "string",
- "usageTimestamp": "string",
- "part": 0,
- "format": "Epub",
- "startPosition": 0,
- "endPosition": 0,
- "usageId": "string"
}
]