Patron Photo

Get Patron Photo

GET /api/.../patrons/{id}/photo

Return the patron's photo object from the media library. If the HTTP Accept header is set to image/jpg, the raw image data will be streamed.

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.

Response Information

Example
application/json, text/json
{
    "PatronID":299377,
    "Data":"/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAASAAAATgAAAAAAAABgAAAAAQAAAGAAAAABUGFpbnQuTkVUIHYzLjUuMTAA/9sAQwABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/8AAEQgAEAAQAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+v/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC//EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQMRAD8A/Af9gPwl8FPjG37VifFrwRrXjG8+Dn7IPxw/aI8Fmw8caj4V0weJPhTpelXmnaR4gstJsHv9V0XVJtTP2/7FrWj3caQKtvcIzO9c3+058L/h54F/Z7/Y8/aU8ANr/hWD9qPR/jR/bXwm8TatBr954R1T4MeN9K8HyeL/AAtrxsNI1HUfht8Q21eUeFotasLrVNJ1rwn4v0afxH4lSwj1AeI/8E6v2hfgp8HW/a71D4w/Fa3+H1x8Xf2Lvj1+zr8O7ZfCfjnxNc3HxA+K+l6Nb+HdZ1eXwr4f1S30XwhpU2lTf25qaT3uvW7TWp0vw3qiGeW2+DfHPxq8c/ETXP7d+IHjzxV8Qtbt7O10a38Q+LfEOt+JNR/sjTA0Om2NtfeIJ7jUYdLtIiRYWDeRHaQvsS2gJaMfr642rfXHWWLqxpqVNuDrzlTlH2Eqcqcabbpw/eThVcoJSUqXLtOR+Mf6g0Vg4UfqFOVTllFVFRhGpGTrU5xnKokpytTjOkoSlKPLU5nrCKf/2Q==",
    "DigitalMediaID":38,
    "CreationDate":"2012-08-13T21:39:39.547",
    "ModificationDate":"2013-03-01T14:40:07.967"
}
Example
image/jpg

HTTP Response Codes

Code Description
200 OK. Success

Save Patron Photo

POST /api/.../patrons/{id}/photo

Inserts or Updates the photo of the patron. Returns the digital media library ID of the patron's photo.

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.
photo DtoImage Yes Define this parameter in the request body.
DtoImage
Property Type Nullable Required Description
Data byte[] No Yes Encode image byte array as string
Request body
application/json, text/json
{
    "Data":"/9j/4AAQSkZJRgABAQEAYABgAAD/4QBoRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAASAAAATgAAAAAAAABgAAAAAQAAAGAAAAABUGFpbnQuTkVUIHYzLjUuMTAA/9sAQwABAQEBAQEBAQEBAQE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r4f1S30XwhpU2lTf25qaT3uvW7TWp0vw3qiGeW2+DfHPxq8c/ETXP7d+IHjzxV8Qtbt7O10a38Q+LfEOt+JNR/sjTA0Om2NtfeIJ7jUYdLtIiRYWDeRHaQvsS2gJaMfr642rfXHWWLqxpqVNuDrzlTlH2Eqcqcabbpw/eThVcoJSUqXLtOR+Mf6g0Vg4UfqFOVTllFVFRhGpGTrU5xnKokpytTjOkoSlKPLU5nrCKf/2Q==",
}

Response Information

Example
application/json, text/json
87

HTTP Response Codes

Code Description
200 OK. Success

Delete Patron Photo

DELETE /api/.../patrons/{id}/photo

Delete the photo of the patron.

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the patron.

HTTP Response Codes

Code Description
200 OK. Success
400 Bad request. Patron does not have a photo or patron ID is invalid
403 Forbidden. Permission CR_DeletePhotoIDs_Allow is denied
404 Not Found. Patron is not found