An Invitation is created when a customer has completed the full purchase process in your webshop, including payment. The Invitation is a key element in order to collect ratings and reviews and all necessary information for sending review reminder emails to the customer is returned after a purchase is created.


GET /invitations/:token
Receive a single Invitation

Receive a single Invitation

Supported Formats

json

Params

Param name Description
token
required

An unique token that identifies a single Invitation (which might have multiple Products)


Value:

Must be String

api_key
required

API key (a 24 character unique code)


Value:

Must be String

Examples

GET /invitations/8475e5d62d5b4a9d72cfbff7a6440ccf820ee17d?api_key=889c3f3e4b6ac67269261324

Response
{ "invitation": { "id": 1521893, "invitation_token": "8475e5d62d5b4a9d72cfbff7a6440ccf820ee17d", "created_at": "2017-12-24T14:48:43.932Z", "purchased_at": "2017-12-24T14:48:43.874Z", "discount_descr": "We give away one free college hoodie each month to one randomly picked reviewer! In addition you will get a 15% discount on your next purchase by entering the voucher code that will be emailed to you after your review has been published.", "voucher_sent": false, "lang": "en", "cancelled": false, "invitation_date": "2017-12-25T14:48:43.874Z", "invitation_sent_at": null, "invitation_clicked_at": null, "second_invitation_date": null, "second_invitation_sent_at": null, "second_invitation_clicked_at": null, "has_discount": true, "landing_url": "http://mysite.com/products/htc-m8/6268A?lipscore_token=eyJwdXJjaGFzZSI6eyJyZW1pbmRlcl90b2tlbiI6Ijg0NzVlNWQ2MmQ1YjRhOWQ3MmNmYmZmN2E2NDQwY2NmODIwZWUxN2QiLCJoYXNfZGlzY291bnQiOnRydWUsInByb2R1Y3RzIjpbeyJpZCI6MTgwLCJuYW1lIjoidGVzdHAzIG5hbWUifV0sImFiX3Rlc3QiOm51bGx9LCJzZXR0aW5ncyI6eyJyYXRpbmdfdHlwZSI6IjUtc3RhcnMiLCJyYXRpbmdfc3Rhcl90eXBlIjoidGhpY2siLCJyYXRpbmdfc3Rhcl9jb2xvciI6IiMyYjk5Y2YiLCJyYXRpbmdfd2lkZ2V0X3R5cGUiOiJjb21wYWN0IiwicmF0aW5nX3NtYWxsX3R5cGUiOiIxLXN0YXIiLCJmZWF0dXJlcyI6WyJyYXRpbmdzX3Jldmlld3MiLCJyYXRpbmdzX3Jldmlld3MiLCJyZW1vdmVfYnJhbmRpbmciLCJsb3dfdHJpZ2dlciJdfX0=&lipscore_received=1", "products": [ { "id": "1807875", "name": "LipscoreDemo HTC One M8 Gold" } ], "user": { "id": 56634, "name": "John Doe", "avatar_thumb_url": "https://static.lipscore.com/avatars/000/000/000/thumb_000000005936.jpg" } } }

POST /invitations
Create one or more Invitations

Create one or more Invitations. If you want to create multiple Invitations you need to use the invitations param. This param is an Array of hashes which contain params described below (see examples).

Supported Formats

json

Params

Param name Description
invitation
required

Invitation data


Value:

Must be a Hash

invitation[buyer_email]
required

The customers email address


Value:

Must be String

invitation[buyer_name]
required

The customers full name (an actual full name is required, nicknames/alias/etc are not accepted)


Value:

Must be String

invitation[discount_voucher]
optional

Discount voucher code (a discount code for giving customers that write a review and incentive for doing so. The code will be sent to the customer after the review is created)


Value:

Must be String

invitation[discount_descr]
optional

A description of the provided discount voucher code.


Value:

Must be String

invitation[lang]
required

A two letter code of the language that will be used in emails to the customer. Available values are: br, cz, de, dk, en, es, fi, fr, it, ja, nl, no, ru, se


Value:

Must be String

invitation[template]
optional

A template name that will be used in emails to a customer. If it’s empty email settings will be used.


Value:

Must be String

products[]
required

An array of purchased products. Each element of the array is a hash of product params.


Value:

Must be an Array of nested elements

products[][internal_id]
required

The products internal ID in your webshop (the product will also get a Lipscore product ID, usually referred to as “id”)


Value:

Must be String

products[][url]
required

The URL of the product details page in your webshop


Value:

Must be String

products[][name]
required

The full name of the product (not including brand name)


Value:

Must be String

products[][brand]
optional

The product brand (i.e. “Apple” for an iPhone)


Value:

Must be String

products[][sku_values]
optional

One or more Product SKU values


Value:

Must be an array of String

products[][image_url]
optional

The product image URL (full path)


Value:

Must be String

products[][price]
optional

The Product price without currency


Value:

Must be Numeric

products[][currency]
optional

The price currency


Value:

Must be String

products[][category]
optional

The product category


Value:

Must be String

api_key
required

API key (a 24 character unique code)


Value:

Must be String

Examples

POST /invitations?api_key=889c3f3e4b6ac67269261324

Single Invitation
Request
{ "invitation": { "buyer_email": "johndoe@example.com", "buyer_name": "John Doe", "discount_voucher": "LSDISC-104543", "discount_descr": "We give away one free college hoodie each month to one randomly picked reviewer! In addition you will get a 15% discount on your next purchase by entering the voucher code that will be emailed to you after your review has been published.", "lang": "en", "template": "confirm_and_review" }, "products": [ { "internal_id": "4716051", "url": "http://mysite.com/products/htc-m8/6268A", "name": "LipscoreDemo HTC One M8 Gold", "brand": "HTC", "sku_values": [ "LipscoreDemo_4716051" ], "image_url": "http://mysite.com/images/htc-m8/6268A.png", "price": "200", "currency": "USD", "category": "smartphones" } ] }
Response
{ "invitation": { "id": 1521893, "invitation_token": "8475e5d62d5b4a9d72cfbff7a6440ccf820ee17d", "created_at": "2017-12-24T14:48:43.932Z", "purchased_at": "2017-12-24T14:48:43.874Z", "discount_descr": "We give away one free college hoodie each month to one randomly picked reviewer! In addition you will get a 15% discount on your next purchase by entering the voucher code that will be emailed to you after your review has been published.", "voucher_sent": false, "lang": "en", "cancelled": false, "invitation_date": "2017-12-25T14:48:43.874Z", "invitation_sent_at": null, "invitation_clicked_at": null, "second_invitation_date": null, "second_invitation_sent_at": null, "second_invitation_clicked_at": null, "has_discount": true, "landing_url": "http://mysite.com/products/htc-m8/6268A?lipscore_token=eyJwdXJjaGFzZSI6eyJyZW1pbmRlcl90b2tlbiI6Ijg0NzVlNWQ2MmQ1YjRhOWQ3MmNmYmZmN2E2NDQwY2NmODIwZWUxN2QiLCJoYXNfZGlzY291bnQiOnRydWUsInByb2R1Y3RzIjpbeyJpZCI6MTgwLCJuYW1lIjoidGVzdHAzIG5hbWUifV0sImFiX3Rlc3QiOm51bGx9LCJzZXR0aW5ncyI6eyJyYXRpbmdfdHlwZSI6IjUtc3RhcnMiLCJyYXRpbmdfc3Rhcl90eXBlIjoidGhpY2siLCJyYXRpbmdfc3Rhcl9jb2xvciI6IiMyYjk5Y2YiLCJyYXRpbmdfd2lkZ2V0X3R5cGUiOiJjb21wYWN0IiwicmF0aW5nX3NtYWxsX3R5cGUiOiIxLXN0YXIiLCJmZWF0dXJlcyI6WyJyYXRpbmdzX3Jldmlld3MiLCJyYXRpbmdzX3Jldmlld3MiLCJyZW1vdmVfYnJhbmRpbmciLCJsb3dfdHJpZ2dlciJdfX0=&lipscore_received=1", "products": [ { "id": "1807875", "name": "LipscoreDemo HTC One M8 Gold" } ], "user": { "id": 56634, "name": "John Doe", "avatar_thumb_url": "https://static.lipscore.com/avatars/000/000/000/thumb_000000005936.jpg" } } } ?api_key=889c3f3e4b6ac67269261324
Multiple Invitations
Request
{ "invitations": [ { "invitation": { }, "products": [ ] }, { "invitation": { }, "products": [ ] } ] }
Response
[ { "invitation": { } }, { "invitation": { } } ]