Modifier une demande de remboursement
Un remboursement en cours peut être modifié dans la limite de son montant initial tant qu'il n'a pas été exécuté (statut CREATED ou PENDING).
La modification s’effectue à l’aide de l’uuid du remboursement en question, à travers la ressource :
PUTrefunds/{refund_uuid}refunds_update
Si le montant du remboursement
est inchangé, le serveur renvoie une erreur HTTP 400.
Exemple :
Requête
PUT https://secure.lyra.com/marketplace/v1/refunds/16ad9da8-b9cb-11e4-97c6-b1229586dec7
Corps
{ "order": "9537e049-8862-400a-ae8d-da2ec9ca6051", "reference": "remb000045", "description": "Remboursement Mme Lafont 001", "currency": "EUR", "items": [ { "seller": "dfc42a76-10b5-421a-91cd-c288c8265c92", "reference": "remb000045a", "description":"Phoneshop", "amount": 9450, "is_commission": false }, { "seller":"975e2a43-7e72-438c-a2b2-b61347aa160c", "reference": "remb000045b", "description": "Gestionnaire", "amount": 900, "is_commission":false } ] }
Réponse
{ "uuid": "83402cc0-d969-443b-a72a-0f2fe9557879", "href": "https://secure.lyra.com/marketplace/v1/refunds/83402cc0-d969-443b-a72a-0f2fe9557879", "created_at": "2019-06-11T09:31:59.659687Z", "updated_at": "2019-06-11T09:52:51.959406Z", "order": "67ca248e-99cd-4345-9795-5873bb6fd8f2", "reference": "remb000045", "description": "Remboursement Mme Lafont 001", "amount": 10905, "currency": "EUR", "status": "PENDING", "transaction": null, "items": [ { "seller": "dfc42a76-10b5-421a-91cd-c288c8265c92", "refund": "83402cc0-d969-443b-a72a-0f2fe9557879", "item": "9f7c6d31-deff-4299-a3db-71bb214cae9e", "reference": "remb000045a", "description":"Phoneshop", "amount": 9450, "is_commission": false }, { "seller":"975e2a43-7e72-438c-a2b2-b61347aa160c", "refund": "83402cc0-d969-443b-a72a-0f2fe9557879", "item": "7b99691b-0492-42ff-a819-302ac178fc7e", "reference": "remb000045b", "description": "Gestionnaire", "amount": 900, "is_commission": false } ] }