Reference
All calls in version 1. The base URL is https://newsletter.qrona.se/api/v1. The full description is also available as OpenAPI 3.1 for Postman and code generators.
The key
Check that the key works, which workspace it applies to and what it is allowed to do.
Contacts
Contacts are the workspace's recipients. A contact is identified by its email address, which never changes. Only create contacts who have consented to mailings (or where you have another legal basis): an active contact can be reached by mailings to distribution lists even if it is not on any list.
- GET
/contactsList contactsThe contacts the key is allowed to see, in ID order, one page at a time. - POST
/contactsCreate contactA new contact in the workspace. If the address already exists, the response is 409 contact_exists. - POST
/contacts/upsertCreate or update contactCreates the contact if the address is new; otherwise it is updated. The usual call for an integration. - POST
/contacts/lookupLook up contacts by emailUp to 100 addresses in one call. The response has the contacts that exist (all statuses, including deleted). - GET
/contacts/{id}Get contactA contact with the lists it is on. - PATCH
/contacts/{id}Update contactChanges the fields you send. The email address cannot be changed. - POST
/contacts/{id}/unsubscribeUnsubscribe contactThe person does not want any more mailings: the contact leaves all lists, gets the status unsubscribed and the address is suppressed. - POST
/contacts/{id}/eraseErase contact (GDPR)Permanently erases the contact's personal data. The address is suppressed so that it never receives mailings again.
Lists
Lists are audiences with their own sign-up mode: with double opt-in, new sign-ups must confirm by email.
- GET
/listsList listsThe workspace's lists with member counts. - POST
/listsCreate listA new list. Double opt-in is on unless you say otherwise. - GET
/lists/{id}Get listA list with member counts. - PATCH
/lists/{id}Update listName, description and sign-up mode. - DELETE
/lists/{id}Delete listDeletes the list. The contacts remain. Not possible while a campaign that is due to be sent uses the list.
List members
Who is on a list, and sign-ups to it. Sign-ups via the API follow the same rules as the forms: anyone who has unsubscribed or been suppressed is never added without confirming themselves.
- GET
/lists/{id}/membersList membersThe list's members, one page at a time. - POST
/lists/{id}/membersSign up to listSigns an address up to the list, with proof of consent. The contact is created if it does not exist. - DELETE
/lists/{id}/members/{contact_id}Remove from listRemoves the contact from the list (an administrative change, not an unsubscription).
Contact fields
The workspace's own fields – the keys that can be used in fields on a contact.
Distribution lists
Distribution lists are contacts that meet conditions (segments). Requires the person behind the key to be an administrator.
Suppression list
Addresses the workspace never sends to: unsubscribed, bouncing, spam complaints and suppressions added manually.
Stores
A web shop in the workspace. Everything in e-commerce belongs to a store and is identified by the store's own IDs, which you choose. PUT creates or updates, so the same call can be repeated without anything being duplicated. Guide: e-commerce
- GET
/storesList storesThe workspace's stores with how much each one has sent in. - GET
/stores/{store_id}Get storeA store. - PUT
/stores/{store_id}Create or update storeCreates the store with your ID, or updates it. The first call for a web shop. - DELETE
/stores/{store_id}Delete storeDeletes the store and everything in it: customers, products, orders and carts. Cannot be undone.
Customers
People who have bought from the shop – with or without consent to mailings. A customer never becomes a contact: it is linked to the workspace contact with the same address as long as one exists, for purchase conditions in distribution lists. Customers and consent
- GET
/stores/{store_id}/customersList customersThe store's customers, one page at a time. - GET
/stores/{store_id}/customers/{customer_id}Get customerA customer with the number of paid orders and their total. - PUT
/stores/{store_id}/customers/{customer_id}Create or update customerCreates the customer with the shop's ID, or updates it. Orders and carts do this themselves with their customer. - DELETE
/stores/{store_id}/customers/{customer_id}Delete customerDeletes the customer and their carts. The orders remain without a customer, so that the campaigns' revenue stays correct.
Products
The store's products with variants, for conditions such as “has bought product X”. Guide: e-commerce
- GET
/stores/{store_id}/productsList productsThe store's products with variants, one page at a time. - GET
/stores/{store_id}/products/{product_id}Get productA product with variants. - PUT
/stores/{store_id}/products/{product_id}Create or update productCreates the product with the shop's ID, or updates it. If variants is sent, it replaces all variants. - DELETE
/stores/{store_id}/products/{product_id}Delete productDeletes the product and its variants. Order lines that mention it remain.
Orders
The store's orders with lines. Paid orders count as purchases in conditions and as revenue for the campaign the customer came from (campaign_id). Revenue per campaign
- GET
/stores/{store_id}/ordersList ordersThe store's orders with lines, one page at a time. - GET
/stores/{store_id}/orders/{order_id}Get orderAn order with lines. - PUT
/stores/{store_id}/orders/{order_id}Create or update orderCreates the order with the store's ID, or updates it – send the order again when it changes (paid, refunded, cancelled). - DELETE
/stores/{store_id}/orders/{order_id}Delete orderDeletes the order. A cancelled or refunded order is better sent with its new status.
Carts
Open carts. Delete the cart once it has become an order. Guide: e-commerce
- GET
/stores/{store_id}/cartsList cartsThe store's open carts, one page at a time. - GET
/stores/{store_id}/carts/{cart_id}Get cartA cart with lines. - PUT
/stores/{store_id}/carts/{cart_id}Create or update cartCreates the cart with the shop's ID, or updates it. The lines replace the previous ones. - DELETE
/stores/{store_id}/carts/{cart_id}Delete cartDeletes the cart, for example when it has become an order.
Revenue
Revenue per campaign: the paid orders that came from the campaign's links. Revenue per campaign
Batch
Up to 500 calls in one, for example to import old orders. Each operation is validated and run as if it had been sent on its own. Batch and idempotency
Messages
One message at a time to one recipient, made from a Qrona template and the message's own data. Only for the add-on Byråstöd: Klientkommunikation, with Qrona's system key – a person's key cannot send messages. Guide: messages from Qrona
Qrona templates
The templates the messages are made from, designed in Qrona Newsletter against a data contract. Preview a template with data, exactly as it is sent. Templates and data contracts
Webhooks
URLs that are notified of sign-ups, unsubscriptions, bounces and spam complaints in the workspace, signed with HMAC. Requires the person behind the key to be an administrator. Guide: webhooks
- GET
/webhooksList webhooksThe workspace's webhooks. - POST
/webhooksCreate webhookA new webhook. The response contains the secret that deliveries are signed with – it is shown only now. - GET
/webhooks/{id}Get webhookA webhook and how its deliveries are going. - PATCH
/webhooks/{id}Update webhookURL, events and description, or disable and enable it. - DELETE
/webhooks/{id}Delete webhookDeletes the webhook. Pending deliveries are not sent. - GET
/webhooks/{id}/deliveriesList deliveriesThe webhook's deliveries over the last 30 days, newest first: what was sent, how the receiver responded and when the next attempt will be made. - POST
/webhooks/{id}/testTest webhookSends a ping to the URL immediately and responds with the result. Not retried.