Vendors may wish to authorize reprints from within their own systems rather than log in to the admin console each time a reprint request is made. The authorizeReprint method exposes this functionality and requires a user ID, music ID, order ID, and quantity. The value that is returned from this method depends on the supplied quantity, the number of prints purchased, and the number of reprints previously authorized. Vendors will receive an "Invalid Quantity" return code if they supply a quantity greater than the number of prints purchased.
authorizeReprint | ||
Description | Authorizes a reprint for a user | |
Example | https://app.legatomedia.com/vend/authorizeReprint/<user_id>/<music_id>/<quantity>/<user_ip>/<order_id>/?username=vmusicr&api_key=4f0400000000000000 | |
e.g.: https://app.legatomedia.com/vend/authorizeReprint/12345/10000/2/208.187.128.18/10000/?username=vmusic&api_key=4f0400000000000000 | ||
Parameters | <user_id> | The Legato user ID of the user |
<music_id> | The Legato music ID of the music piece purchased | |
<quantity> | The number of reprints to authorize | |
<user_ip> | The user's IP address. | |
<order_id> | The Legato order ID the print is saved under | |
<vendor_username> | Your Legato vendor username | |
<api_key> | Your Legato vendor API key | |
Return | {"order_record": 1382732, "success": true, "printout_id": 1806014} | The supplied Legato order ID or a new order ID if an order was updated |
Possible Errors | invalid_user_id invalid_music_id invalid_ip invalid_region invalid_order music_absent - specified music not in specified order invalid_quantity - specified quantity is greater than purchased quantity |