Website feeds from Consonance via the product API

The Consonance API gives you access to secure client product data for use in your own app. It strives to be RESTful and is organised around the main resources you’re familiar with from the Consonance interface.

Product API Basics

Before you do anything, contact us to register for an API key to make API calls. In the meantime, use the demo credentials on this page.

An example response

Paste the following into a terminal window, including the sample authorisation token provided.

1
  curl -g -H "Authorization: Token token=b0c15687c2c3483b9efca116db0917b9" "https://demo.consonance.app/api/v2/products.json"

The response is as follows.

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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
{
   "current_page": 1,
   "per_page": 50,
   "total_pages": 10,
   "url": "https://demo.consonance.app/api/v2/products.json",
   "products": [
      {
         "id": 3384,
         "work_id": 714,
         "full_title": "Adept",
         "subtitle": null,
         "pub_date": "2004-05-01",
         "publishing_status": "04",
         "out_of_print_date": null,
         "product_form": "BC",
         "edition_type_codes": null,
         "edition_statement": null,
         "proprietary_format_description": "B format paperback",
         "isbn": "978-0-9545759-1-5",
         "edition_number": 1,
         "extents": {
            "page_count": 416,
            "main_content_page_count": 416,
            "number_of_words": null,
            "front_matter_page_count": null,
            "back_matter_page_count": null,
            "total_numbered_pages": null,
            "production_page_count": null,
            "absolute_page_count": null,
            "number_of_pages_in_print_counterpart": null,
            "notional_number_of_pages_in_print_counterpart": null,
            "content_page_count": null,
            "total_unnumbered_insert_page_count": null,
            "filesize_bytes": null
         },
         "measurements": {
            "product_dimensions_mm": "178 x 110",
            "product_dimensions_in": "7.01 x 4.33",
            "page_trim_dimensions_mm": null,
            "page_trim_dimensions_in": null,
            "page_trim_height_mm": null,
            "page_trim_height_in": null,
            "page_trim_width_mm": null,
            "page_trim_width_in": null,
            "product_height_mm": 178.0,
            "product_height_in": 7.008,
            "product_width_mm": 110.0,
            "product_width_in": 4.331
         },
         "authorship": "Robert Finn",
         "authorship_overridden": false,
         "series_ids": [
         ],
         "prices": [
            {
               "id": 168748,
               "currency_code": "GBP",
               "price_amount": 7.99,
               "includes_tax": true,
               "price_qualifier": "05"
            }
         ],
         "contributors": [
            {
               "id": 120,
               "sequence_number": 9,
               "contributor_role": "A01",
               "biographical_note": null,
               "name": "Robert Finn"
            }
         ],
         "supportingresources": [
            {
               "id": 206878,
               "resource_content_type": "07",
               "image_fingerprint": "0d396c690873bb44a641ddcfa17817b6",
               "style_urls": [
                  {
                     "style": "jpg_rgb_0050w",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0050w.jpg"
                  },
                  {
                     "style": "jpg_rgb_0075w",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0075w.jpg"
                  },
                  {
                     "style": "jpg_rgb_0250w",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0250w.jpg"
                  },
                  {
                     "style": "jpg_rgb_0150h",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0150h.jpg"
                  },
                  {
                     "style": "jpg_rgb_0250h",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0250h.jpg"
                  },
                  {
                     "style": "jpg_rgb_0400h",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0400h.jpg"
                  },
                  {
                     "style": "jpg_rgb_0650h",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_0650h.jpg"
                  },
                  {
                     "style": "jpg_rgb_1500h",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_1500h.jpg"
                  },
                  {
                     "style": "jpg_rgb_original",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_rgb_original.jpg"
                  },
                  {
                     "style": "jpg_cmyk_original",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_jpg_cmyk_original.jpg"
                  },
                  {
                     "style": "tiff_original",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_tiff_original.tiff"
                  },
                  {
                     "style": "png_original",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_png_original.png"
                  },
                  {
                     "style": "original",
                     "url": "https://bibliocloudimages.s3-eu-west-1.amazonaws.com/1/206878/714/714_original.jpg"
                  }
               ]
            }
         ],
         "marketingtexts": [
            {
               "id": 16269,
               "code": "01",
               "external_text": "It's a strange kind of robbery: nothing is missing and the only damage done is to the criminals. David Braun, star investigator for an exclusive insurance firm, discovers the truth that the crime was intended to conceal. Behind it all, a ruthless thief, who is intent on acquiring a priceless antique - an antique with a bloody history its owners would prefer to keep hidden. Susan Milton, an expert in exotic antiques, must unearth the object's past to make sense of the present. When she takes on the project she has no idea that her research will put her life in danger. As David and Susan learn to work together the pieces begin to fall into place, but the more they find out, the less they believe. Caught between powerful enemies and being hunted by a killer the police cannot catch, their only hope is to stay one step ahead. They know enough to put them in the worst danger of their lives. Will it also be enough to save them?",
               "internal_text": "It's a strange kind of robbery: nothing is missing and the only damage done is to the criminals. David Braun, star investigator for an exclusive insurance firm, discovers the truth that the crime was intended to conceal. Behind it all, a ruthless thief, who is intent on acquiring a priceless antique - an antique with a bloody history its owners would prefer to keep hidden. Susan Milton, an expert in exotic antiques, must unearth the object's past to make sense of the present. When she takes on the project she has no idea that her research will put her life in danger. As David and Susan learn to work together the pieces begin to fall into place, but the more they find out, the less they believe. Caught between powerful enemies and being hunted by a killer the police cannot catch, their only hope is to stay one step ahead. They know enough to put them in the worst danger of their lives. Will it also be enough to save them?",
               "alternate_external_text": null,
               "alternate_internal_text": null
            },
            {
               "id": 16270,
               "code": "02",
               "external_text": "It's a British variant on The Da Vinci Code and The Rule of Four - Andrew Taylor",
               "internal_text": "It's a British variant on The Da Vinci Code and The Rule of Four - Andrew Taylor",
               "alternate_external_text": null,
               "alternate_internal_text": null
            },
            {
               "id": 16275,
               "code": "25",
               "external_text": "Bestselling author with 70,000 copies sold; Top Ten Small Publisher Bestseller chart position for over a year; Sequel available - Ex Machina; Numerous foreign rights and film discussions underway - Italian, Serbian, Bulgarian, Russian, French and audio rights sold.",
               "internal_text": "Bestselling author with 70,000 copies sold; Top Ten Small Publisher Bestseller chart position for over a year; Sequel available - Ex Machina; Numerous foreign rights and film discussions underway - Italian, Serbian, Bulgarian, Russian, French and audio rights sold.",
               "alternate_external_text": null,
               "alternate_internal_text": null
            },
            {
               "id": 16276,
               "code": "08",
               "external_text": "\"An impressively ambitious debut that marries the crime novel with the occult thriller...It's a British variant on The Da Vinci Code and The Rule of Four.\" Andrew Taylor, twice winner of the CWA Ellis Peters Dagger",
               "internal_text": "\"An impressively ambitious debut that marries the crime novel with the occult thriller...It's a British variant on The Da Vinci Code and The Rule of Four.\" Andrew Taylor, twice winner of the CWA Ellis Peters Dagger",
               "alternate_external_text": null,
               "alternate_internal_text": null
            },
            {
               "id": 16437,
               "code": "25",
               "external_text": "Popular acclaim and word of mouth bestseller; Adept was compared to The Da Vinci Code and The Rule of Four; Sales have been consistently strong and this omnibus presents excellent value for money. Prequel to \u003ci\u003eAdept\u003c/i\u003e and \u003ci\u003eEx Machina\u003c/i\u003e out now --\u0026nbsp;\u003ci\u003eUnderlife\u003c/i\u003e.",
               "internal_text": "Popular acclaim and word of mouth bestseller; Adept was compared to The Da Vinci Code and The Rule of Four; Sales have been consistently strong and this omnibus presents excellent value for money. Prequel to Adept and Ex Machina out now - Underlife.",
               "alternate_external_text": null,
               "alternate_internal_text": null
            },
            {
               "id": 16511,
               "code": "25",
               "external_text": "Bestselling author with 40,000 copies sold; Top Ten Small Publisher Bestseller chart position for over a year; Sequel available - Ex Machina; Numerous foreign rights and film discussions underway - Italian, Serbian, Bulgarian, Russian, French and audio rights sold. Prequel to Adept and Ex Machina coming out Summer 2007 - Underlife.",
               "internal_text": "Bestselling author with 40,000 copies sold; Top Ten Small Publisher Bestseller chart position for over a year; Sequel available - Ex Machina; Numerous foreign rights and film discussions underway - Italian, Serbian, Bulgarian, Russian, French and audio rights sold. Prequel to Adept and Ex Machina coming out Summer 2007 - Underlife.",
               "alternate_external_text": null,
               "alternate_internal_text": null
            },
            {
               "id": 16512,
               "code": "08",
               "external_text": "The Observer Review (World of Books) said it had achieved \"a measure of success rare among new, small publishers\" newBOOKSmagazine said it was \"a very stylish thriller... witty, entertaining and totally original.\"",
               "internal_text": "The Observer Review (World of Books) said it had achieved \"a measure of success rare among new, small publishers\" newBOOKSmagazine said it was \"a very stylish thriller... witty, entertaining and totally original.\"",
               "alternate_external_text": null,
               "alternate_internal_text": null
            }
         ],
         "subject_ids": [
            9
         ],
         "main_subject_id": 9,
         "all_related_products": [
            {
               "relation_code": "06",
               "product_id": 3728,
               "isbn": "978-1-907777-01-1"
            },
            {
               "relation_code": "22",
               "product_id": 3407,
               "isbn": "978-1-905005-06-2"
            },
            {
               "relation_code": "22",
               "product_id": 3418,
               "isbn": "978-1-905005-30-7"
            },
            {
               "relation_code": "22",
               "product_id": 3447,
               "isbn": "978-1-905005-64-2"
            },
            {
               "relation_code": "22",
               "product_id": 3461,
               "isbn": "978-1-905005-69-7"
            },
            {
               "relation_code": "22",
               "product_id": 3465,
               "isbn": "978-1-905005-70-3"
            },
            {
               "relation_code": "22",
               "product_id": 3470,
               "isbn": "978-1-905005-92-5"
            },
            {
               "relation_code": "22",
               "product_id": 3663,
               "isbn": "978-1-907777-15-8"
            },
            {
               "relation_code": "22",
               "product_id": 3668,
               "isbn": "978-1-907777-20-2"
            },
            {
               "relation_code": "22",
               "product_id": 3726,
               "isbn": "978-1-905005-57-4"
            },
            {
               "relation_code": "22",
               "product_id": 3728,
               "isbn": "978-1-907777-01-1"
            },
            {
               "relation_code": "27",
               "product_id": 3728,
               "isbn": "978-1-907777-01-1"
            }
         ],
         "marketing_highlight_work_ids": [

         ],
         "rights_available_countries": [
            "AD",
            "AE",
            "AF",
            "AG",
            "AI",
            "AL",
            "AM",
            "AO",
            "AQ",
            "AR",
            "AS",
            "AT",
            "AU",
            "AW",
            "AX",
            "AZ",
            "BA",
            "BB",
            "BD",
            "BE",
            "BF",
            "BG",
            "BH",
            "BI",
            "BJ",
            "BL",
            "BM",
            "BN",
            "BO",
            "BQ",
            "BR",
            "BS",
            "BT",
            "BV",
            "BW",
            "BY",
            "BZ",
            "CA",
            "CC",
            "CD",
            "CF",
            "CG",
            "CH",
            "CI",
            "CK",
            "CL",
            "CM",
            "CN",
            "CO",
            "CR",
            "CU",
            "CV",
            "CW",
            "CX",
            "CY",
            "CZ",
            "DE",
            "DJ",
            "DK",
            "DM",
            "DO",
            "DZ",
            "EC",
            "EE",
            "EG",
            "EH",
            "ER",
            "ES",
            "ET",
            "FI",
            "FJ",
            "FK",
            "FM",
            "FO",
            "FR",
            "GA",
            "GB",
            "GD",
            "GE",
            "GF",
            "GG",
            "GH",
            "GI",
            "GL",
            "GM",
            "GN",
            "GP",
            "GQ",
            "GR",
            "GS",
            "GT",
            "GU",
            "GW",
            "GY",
            "HK",
            "HM",
            "HN",
            "HR",
            "HT",
            "HU",
            "ID",
            "IE",
            "IL",
            "IM",
            "IN",
            "IO",
            "IQ",
            "IR",
            "IS",
            "IT",
            "JE",
            "JM",
            "JO",
            "JP",
            "KE",
            "KG",
            "KH",
            "KI",
            "KM",
            "KN",
            "KP",
            "KR",
            "KW",
            "KY",
            "KZ",
            "LA",
            "LB",
            "LC",
            "LI",
            "LK",
            "LR",
            "LS",
            "LT",
            "LU",
            "LV",
            "LY",
            "MA",
            "MC",
            "MD",
            "ME",
            "MF",
            "MG",
            "MH",
            "MK",
            "ML",
            "MM",
            "MN",
            "MO",
            "MP",
            "MQ",
            "MR",
            "MS",
            "MT",
            "MU",
            "MV",
            "MW",
            "MX",
            "MY",
            "MZ",
            "NA",
            "NC",
            "NE",
            "NF",
            "NG",
            "NI",
            "NL",
            "NO",
            "NP",
            "NR",
            "NU",
            "NZ",
            "OM",
            "PA",
            "PE",
            "PF",
            "PG",
            "PH",
            "PK",
            "PL",
            "PM",
            "PN",
            "PR",
            "PS",
            "PT",
            "PW",
            "PY",
            "QA",
            "RE",
            "RO",
            "RS",
            "RU",
            "RW",
            "SA",
            "SB",
            "SC",
            "SD",
            "SE",
            "SG",
            "SH",
            "SI",
            "SJ",
            "SK",
            "SL",
            "SM",
            "SN",
            "SO",
            "SR",
            "SS",
            "ST",
            "SV",
            "SX",
            "SY",
            "SZ",
            "TC",
            "TD",
            "TF",
            "TG",
            "TH",
            "TJ",
            "TK",
            "TL",
            "TM",
            "TN",
            "TO",
            "TR",
            "TT",
            "TV",
            "TW",
            "TZ",
            "UA",
            "UG",
            "UM",
            "US",
            "UY",
            "UZ",
            "VA",
            "VC",
            "VE",
            "VG",
            "VI",
            "VN",
            "VU",
            "WF",
            "WS",
            "YE",
            "YT",
            "ZA",
            "ZM",
            "ZW"
         ],
         "rights_not_available_countries": [

         ],
         "digest": "cecf19a3deff6ac9e08e1967136b50ad"
      }
   ]
}

With query parameters

1
  curl -g -H "Authorization: Token token=b0c15687c2c3483b9efca116db0917b9" "https://demo.consonance.app/api/v2/products.json?q[id_eq]=[1]"

Predicates

q[id_eq]

int32. Get a product by its Consonance ID

q[id_in][]

int32. Get a set of products by their ID. Can be chained e.g. q[id_in][]=ID&q[id_in][]=ID

q[work_id_eq]

int32. Get products by work id

q[work_title_eq]

string. Get products by title

q[shops_id_eq]

int32. Get the products that belong to a shop

q[subjectcodes_id_eq]

int32. Get the products with a particular subject code

q[seriesnames_id_eq]

int32. Get the products belonging to a particular series

q[publishing_status_eq]

string. Get the products with a particular ONIX product publishing status

digest_only

boolean. Return the digest if you want to check for incremental changes

version

int32

page

int32. Page of the response

page_size

int32. Number of products per page. Defaults to 50.

Incorrect syntax in the query parameters will be silently ignored, so if you used a parameter q[publishing_status] instead of the correct q[publishing_status_eq] then the filter would not be applied. During development we suggest that you use a deliberately incorrect value that should return no products, such as q[subjectcodes_id_eq]=123456789, and if results are returned then the syntax is probably incorrect.

ONIX code lists

The API codes are generally from the ONIX 2.1 codelists. A complete set can be downloaded from the onix_code_lists.json end point, or the EDItEUR codelist browser can be used.

All docs about API