List Promotion Attributes
Retrieve a list of all Promotion Attributes associated with your Account.
GET
https://api.piggy.eu/api//promotion-attributesHeaders
Authorization
Bearer {{ api_key }}Accept
application/jsonResponse Example
Show more
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
"data": [
{
"id": 2238,
"name": "shipping",
"label": "Shipping",
"type": "select",
"description": "",
"position": 1,
"options": [
{
"value": "domestic",
"label": "Domestic",
"description": null,
"media": null
},
{
"value": "international",
"label": "International",
"description": null,
"media": null
},
{
"value": "intergalactic",
"label": "Intergalactic",
"description": null,
"media": null
}
],
"group_name": null,
"created_at": "2023-11-22T11:46:25+00:00",
"last_used_date": null,
"created_by_user": null,
"meta": []
},
{
"id": 2239,
"name": "shipping2",
"label": "shipping2",
"type": "select",
"description": "",
"position": 2,
"options": [
{
"value": "domestic",
"label": "Domestic",
"description": null,
"media": null
},
{
"value": "international",
"label": "International",
"description": null,
"media": null
},
{
"value": "intergalactic",
"label": "Intergalactic",
"description": null,
"media": null
}
],
"group_name": null,
"created_at": "2023-11-22T11:49:53+00:00",
"last_used_date": null,
"created_by_user": null,
"meta": []
},
{
"id": 2242,
"name": "some_random_attribute_3",
"label": "Some Random Attribute 3",
"type": "text",
"description": "",
"position": 3,
"options": [],
"group_name": null,
"created_at": "2023-11-22T14:42:29+00:00",
"last_used_date": null,
"created_by_user": null,
"meta": []
}
],
"meta": []
}Create Promotion Attribute
Globally create a Promotion Attribute for the Account in question, customizable to your wishes.
POST
https://api.piggy.eu/api//promotion-attributesHeaders
Authorization
Bearer {{ api_key }}Accept
application/jsonBody
namestringREQUIREDThe (internal) name for the attribute.
labelstringREQUIREDThe label for the attribute.
typestringREQUIREDType of attribute (options: url,
text,date,
phone,
float,
color,
email,
number,
select,
boolean,
rich_text,
date_time,
long_text,
date_range,
time_range,
identifier,
birth_date,
file_upload,
media_upload,
multi_select,
license_plate)
descriptionstringOPTIONALThe description of the attribute.
optionsarrayOPTIONALApplicable for (multi)selects only. Array consisting of label and value objects.
Response Example
Show more
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
"data": {
"id": 2238,
"name": "shipping",
"label": "Shipping",
"type": "select",
"description": "",
"position": 1,
"options": [
{
"value": "domestic",
"label": "Domestic",
"description": null,
"media": null
},
{
"value": "international",
"label": "International",
"description": null,
"media": null
},
{
"value": "intergalactic",
"label": "Intergalactic",
"description": null,
"media": null
}
],
"group_name": null,
"created_at": "2023-11-22T11:46:25+00:00",
"last_used_date": null,
"created_by_user": null,
"meta": []
},
"meta": []
}Code
Message
1003Invalid input.
60009Attribute already exists.
