View | Details | Raw Unified | Return to bug 17007
Collapse All | Expand All

(-)a/Koha/REST/V1/Biblio.pm (-1 / +3 lines)
Lines 35-41 sub get { Link Here
35
        return $c->$cb({error => "Biblio not found"}, 404);
35
        return $c->$cb({error => "Biblio not found"}, 404);
36
    }
36
    }
37
37
38
    my $items = $biblio->items();
38
    my $items ||= Koha::Items->search( { biblionumber => $biblionumber }, {
39
	       columns => [qw/itemnumber/],
40
    });
39
41
40
    $biblio = $biblio->unblessed;
42
    $biblio = $biblio->unblessed;
41
    $biblio->{items} = $items->unblessed;
43
    $biblio->{items} = $items->unblessed;
(-)a/api/v1/definitions/biblio.json (-2 / +8 lines)
Lines 3-9 Link Here
3
  "properties": {
3
  "properties": {
4
    "biblionumber": {
4
    "biblionumber": {
5
      "type": "string",
5
      "type": "string",
6
      "description": "unique identifier assigned to each bibliographic record"
6
      "description": "internal bibliographic record identifier"
7
    },
7
    },
8
    "frameworkcode": {
8
    "frameworkcode": {
9
      "type": "string",
9
      "type": "string",
Lines 52-58 Link Here
52
    "items": {
52
    "items": {
53
      "type": "array",
53
      "type": "array",
54
      "items": {
54
      "items": {
55
        "$ref": "item.json"
55
        "type": "object",
56
        "properties": {
57
          "itemnumber": {
58
            "type": "string",
59
            "description": "internal item identifier"
60
          }
61
        }
56
      }
62
      }
57
    }
63
    }
58
  }
64
  }
(-)a/api/v1/definitions/biblioitems.json (-56 lines)
Lines 1-56 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "biblionumber": {
5
      "type": "string",
6
      "description": "unique identifier assigned to each bibliographic record"
7
    },
8
    "frameworkcode": {
9
      "type": "string",
10
      "description": "foreign key from the biblio_framework table to identify which framework was used in cataloging this record"
11
    },
12
    "author": {
13
      "type": ["string", "null"],
14
      "description": "statement of responsibility from MARC record (100$a in MARC21)"
15
    },
16
    "title": {
17
      "type": ["string", "null"],
18
      "description": "title (without the subtitle) from the MARC record (245$a in MARC21)"
19
    },
20
    "untitle": {
21
      "type": ["string", "null"],
22
      "description": "uniform title (without the subtitle) from the MARC record (240$a in MARC21)"
23
    },
24
    "notes": {
25
      "type": ["string", "null"],
26
      "description": "values from the general notes field in the MARC record (500$a in MARC21) split by bar (|)"
27
    },
28
    "serial": {
29
      "type": ["boolean", "null"],
30
      "description": "Boolean indicating whether biblio is for a serial"
31
    },
32
    "seriestitle": {
33
      "type": ["string", "null"],
34
      "description": "Title for describing the series"
35
    },
36
    "copyrightdate": {
37
      "type": ["string", "null"],
38
      "description": "publication or copyright date from the MARC record"
39
    },
40
    "timestamp": {
41
      "type": "string",
42
      "description": "date and time this record was last touched"
43
    },
44
    "datecreated": {
45
      "type": "string",
46
      "description": "the date this record was added to Koha"
47
    },
48
    "abstract": {
49
      "type": ["string", "null"],
50
      "description": "summary from the MARC record (520$a in MARC21)"
51
    },
52
    "items": {
53
      "$ref": "biblioitems.json"
54
    }
55
  }
56
}
(-)a/api/v1/definitions/index.json (-1 lines)
Lines 2-8 Link Here
2
    "patron": { "$ref": "patron.json" },
2
    "patron": { "$ref": "patron.json" },
3
    "holds": { "$ref": "holds.json" },
3
    "holds": { "$ref": "holds.json" },
4
    "hold": { "$ref": "hold.json" },
4
    "hold": { "$ref": "hold.json" },
5
    "item": { "$ref": "item.json" },
6
    "biblio": { "$ref": "biblio.json" },
5
    "biblio": { "$ref": "biblio.json" },
7
    "error": { "$ref": "error.json" }
6
    "error": { "$ref": "error.json" }
8
}
7
}
(-)a/api/v1/definitions/item.json (-178 lines)
Lines 1-177 Link Here
1
{
2
  "type": "object",
3
  "properties": {
4
    "itemnumber": {
5
      "type": "string",
6
      "description": "internally assigned item identifier"
7
    },
8
    "biblionumber": {
9
      "type": "string",
10
      "description": "internally assigned biblio identifier"
11
    },
12
    "biblioitemnumber": {
13
      "type": "string",
14
      "description": "internally assigned biblio item identifier"
15
    },
16
    "barcode": {
17
      "type": ["string", "null"],
18
      "description": "item barcode"
19
    },
20
    "dateaccessioned": {
21
      "type": ["string", "null"],
22
      "description": "date the item was acquired or added to Koha"
23
    },
24
    "booksellerid": {
25
      "type": ["string", "null"],
26
      "description": "where the item was purchased"
27
    },
28
    "homebranch": {
29
      "type": ["string", "null"],
30
      "description": "library that owns this item"
31
    },
32
    "price": {
33
      "type": ["string", "null"],
34
      "description": "purchase price"
35
    },
36
    "replacementprice": {
37
      "type": ["string", "null"],
38
      "description": "cost the library charges to replace the item if it has been marked lost"
39
    },
40
    "replacementpricedate": {
41
      "type": ["string", "null"],
42
      "description": "the date the price is effective from"
43
    },
44
    "datelastborrowed": {
45
      "type": ["string", "null"],
46
      "description": "the date the item was last checked out/issued"
47
    },
48
    "datelastseen": {
49
      "type": ["string", "null"],
50
      "description": "the date the item was last see (usually the last time the barcode was scanned or inventory was done)"
51
    },
52
    "stack": {
53
      "type": ["string", "null"],
54
      "description": "?"
55
    },
56
    "notforloan": {
57
      "type": "string",
58
      "description": "authorized value defining why this item is not for loan"
59
    },
60
    "damaged": {
61
      "type": "string",
62
      "description": "authorized value defining this item as damaged"
63
    },
64
    "itemlost": {
65
      "type": "string",
66
      "description": "authorized value defining this item as lost"
67
    },
68
    "itemlost_on": {
69
      "type": ["string", "null"],
70
      "description": "the date and time an item was last marked as lost, NULL if not lost"
71
    },
72
    "withdrawn": {
73
      "type": "string",
74
      "description": "authorized value defining this item as withdrawn"
75
    },
76
    "withdrawn_on": {
77
      "type": ["string", "null"],
78
      "description": "the date and time an item was last marked as withdrawn, NULL if not withdrawn"
79
    },
80
    "itemcallnumber": {
81
      "type": ["string", "null"],
82
      "description": "call number for this item"
83
    },
84
    "coded_location_qualifier": {
85
      "type": ["string", "null"],
86
      "description": "coded location qualifier"
87
    },
88
    "issues": {
89
      "type": ["string", "null"],
90
      "description": "number of times this item has been checked out/issued"
91
    },
92
    "renewals": {
93
      "type": ["string", "null"],
94
      "description": "number of times this item has been renewed"
95
    },
96
    "reserves": {
97
      "type": ["string", "null"],
98
      "description": "number of times this item has been placed on hold/reserved"
99
    },
100
    "restricted": {
101
      "type": ["string", "null"],
102
      "description": "authorized value defining use restrictions for this item"
103
    },
104
    "itemnotes": {
105
      "type": ["string", "null"],
106
      "description": "public notes on this item"
107
    },
108
    "itemnotes_nonpublic": {
109
      "type": ["string", "null"],
110
      "description": "non-public notes on this item"
111
    },
112
    "holdingbranch": {
113
      "type": ["string", "null"],
114
      "description": "library that is currently in possession item"
115
    },
116
    "paidfor": {
117
      "type": ["string", "null"],
118
      "description": "?"
119
    },
120
    "timestamp": {
121
      "type": "string",
122
      "description": "date and time this item was last altered"
123
    },
124
    "location": {
125
      "type": ["string", "null"],
126
      "description": "authorized value for the shelving location for this item"
127
    },
128
    "permanent_location": {
129
      "type": ["string", "null"],
130
      "description": "linked to the CART and PROC temporary locations feature, stores the permanent shelving location"
131
    },
132
    "onloan": {
133
      "type": ["string", "null"],
134
      "description": "defines if item is checked out (NULL for not checked out, and checkout date for checked out)"
135
    },
136
    "cn_source": {
137
      "type": ["string", "null"],
138
      "description": "classification source used on this item"
139
    },
140
    "cn_sort": {
141
      "type": ["string", "null"],
142
      "description": "?"
143
    },
144
    "ccode": {
145
      "type": ["string", "null"],
146
      "description": "authorized value for the collection code associated with this item"
147
    },
148
    "materials": {
149
      "type": ["string", "null"],
150
      "description": "materials specified"
151
    },
152
    "uri": {
153
      "type": ["string", "null"],
154
      "description": "URL for the item"
155
    },
156
    "itype": {
157
      "type": ["string", "null"],
158
      "description": "itemtype defining the type for this item"
159
    },
160
    "more_subfields_xml": {
161
      "type": ["string", "null"],
162
      "description": "additional 952 subfields in XML format"
163
    },
164
    "enumchron": {
165
      "type": ["string", "null"],
166
      "description": "serial enumeration/chronology for the item"
167
    },
168
    "copynumber": {
169
      "type": ["string", "null"],
170
      "description": "copy number"
171
    },
172
    "stocknumber": {
173
      "type": ["string", "null"],
174
      "description": "inventory number"
175
    }
176
  }
177
}
178
- 

Return to bug 17007