Import personal offer coupons
curl --request POST \
--url https://{host}/promotion/v3/personaloffers/bulk \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
{
"offerId": "c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16",
"memberId": "5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29",
"preActivated": false,
"visibleFrom": "2026-11-02T00:00:00Z",
"pickUpEndDate": "2026-11-29T23:59:59Z",
"rule1Value": 10,
"storeId": "1042"
}
]
'import requests
url = "https://{host}/promotion/v3/personaloffers/bulk"
payload = [
{
"offerId": "c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16",
"memberId": "5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29",
"preActivated": False,
"visibleFrom": "2026-11-02T00:00:00Z",
"pickUpEndDate": "2026-11-29T23:59:59Z",
"rule1Value": 10,
"storeId": "1042"
}
]
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
offerId: 'c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16',
memberId: '5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29',
preActivated: false,
visibleFrom: '2026-11-02T00:00:00Z',
pickUpEndDate: '2026-11-29T23:59:59Z',
rule1Value: 10,
storeId: '1042'
}
])
};
fetch('https://{host}/promotion/v3/personaloffers/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/promotion/v3/personaloffers/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'offerId' => 'c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16',
'memberId' => '5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29',
'preActivated' => false,
'visibleFrom' => '2026-11-02T00:00:00Z',
'pickUpEndDate' => '2026-11-29T23:59:59Z',
'rule1Value' => 10,
'storeId' => '1042'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/promotion/v3/personaloffers/bulk"
payload := strings.NewReader("[\n {\n \"offerId\": \"c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16\",\n \"memberId\": \"5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29\",\n \"preActivated\": false,\n \"visibleFrom\": \"2026-11-02T00:00:00Z\",\n \"pickUpEndDate\": \"2026-11-29T23:59:59Z\",\n \"rule1Value\": 10,\n \"storeId\": \"1042\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/promotion/v3/personaloffers/bulk")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"offerId\": \"c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16\",\n \"memberId\": \"5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29\",\n \"preActivated\": false,\n \"visibleFrom\": \"2026-11-02T00:00:00Z\",\n \"pickUpEndDate\": \"2026-11-29T23:59:59Z\",\n \"rule1Value\": 10,\n \"storeId\": \"1042\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v3/personaloffers/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"offerId\": \"c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16\",\n \"memberId\": \"5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29\",\n \"preActivated\": false,\n \"visibleFrom\": \"2026-11-02T00:00:00Z\",\n \"pickUpEndDate\": \"2026-11-29T23:59:59Z\",\n \"rule1Value\": 10,\n \"storeId\": \"1042\"\n }\n]"
response = http.request(request)
puts response.read_body{
"errors": []
}Import personal offer coupons
Imports a batch of personal offer coupons, one row per customer and offer, when the allocation is computed outside Lobyco. Your backend calls it directly, or a Data Import file upload calls it for you.
- Every row of a job shares the first row’s
visibleFromandpickUpEndDate; when the first row has none, the offer’s own dates are used. - The coupons are not visible in the app until
POST /v3/personaloffers/finish-bulkis called with the sameJobId. - A batch that fails is rolled back as a whole; other batches of the same job are kept. To undo the whole job, call
DELETE /v3/personaloffers. - Repeating the exact same batch imports nothing twice: the first and the last (
offerId,memberId) pair of the batch form the idempotency key. - Run one import at a time; imports running in parallel slow each other down.
POST
/
v3
/
personaloffers
/
bulk
Import personal offer coupons
curl --request POST \
--url https://{host}/promotion/v3/personaloffers/bulk \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
[
{
"offerId": "c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16",
"memberId": "5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29",
"preActivated": false,
"visibleFrom": "2026-11-02T00:00:00Z",
"pickUpEndDate": "2026-11-29T23:59:59Z",
"rule1Value": 10,
"storeId": "1042"
}
]
'import requests
url = "https://{host}/promotion/v3/personaloffers/bulk"
payload = [
{
"offerId": "c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16",
"memberId": "5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29",
"preActivated": False,
"visibleFrom": "2026-11-02T00:00:00Z",
"pickUpEndDate": "2026-11-29T23:59:59Z",
"rule1Value": 10,
"storeId": "1042"
}
]
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
offerId: 'c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16',
memberId: '5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29',
preActivated: false,
visibleFrom: '2026-11-02T00:00:00Z',
pickUpEndDate: '2026-11-29T23:59:59Z',
rule1Value: 10,
storeId: '1042'
}
])
};
fetch('https://{host}/promotion/v3/personaloffers/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/promotion/v3/personaloffers/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'offerId' => 'c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16',
'memberId' => '5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29',
'preActivated' => false,
'visibleFrom' => '2026-11-02T00:00:00Z',
'pickUpEndDate' => '2026-11-29T23:59:59Z',
'rule1Value' => 10,
'storeId' => '1042'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/promotion/v3/personaloffers/bulk"
payload := strings.NewReader("[\n {\n \"offerId\": \"c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16\",\n \"memberId\": \"5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29\",\n \"preActivated\": false,\n \"visibleFrom\": \"2026-11-02T00:00:00Z\",\n \"pickUpEndDate\": \"2026-11-29T23:59:59Z\",\n \"rule1Value\": 10,\n \"storeId\": \"1042\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/promotion/v3/personaloffers/bulk")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"offerId\": \"c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16\",\n \"memberId\": \"5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29\",\n \"preActivated\": false,\n \"visibleFrom\": \"2026-11-02T00:00:00Z\",\n \"pickUpEndDate\": \"2026-11-29T23:59:59Z\",\n \"rule1Value\": 10,\n \"storeId\": \"1042\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/promotion/v3/personaloffers/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"offerId\": \"c1e7b2a4-9d3f-4b6c-8e5a-7f0d2c4b9a16\",\n \"memberId\": \"5b9d2e8f-3a7c-4f1b-a6d4-0c8e1f7b3d29\",\n \"preActivated\": false,\n \"visibleFrom\": \"2026-11-02T00:00:00Z\",\n \"pickUpEndDate\": \"2026-11-29T23:59:59Z\",\n \"rule1Value\": 10,\n \"storeId\": \"1042\"\n }\n]"
response = http.request(request)
puts response.read_body{
"errors": []
}Authorizations
Headers
Body
application/json
The coupons to import. Must not be empty.
Last modified on August 10, 2026