taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 283006f975e7a83e9b2367b81fb51e96ffb41036
parent 597931175a7d78be1148b9c4528958186e6f810e
Author: priscilla <priscilla.huang@efrei.net>
Date:   Mon, 14 Nov 2022 10:26:07 -0500

Templates

Diffstat:
Mcore/api-merchant.rst | 94+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+), 0 deletions(-)

diff --git a/core/api-merchant.rst b/core/api-merchant.rst @@ -3040,6 +3040,100 @@ Scaning the QR code The QR code is unknown to the backend. +-------- +Template +-------- + +The templates is a bakckend feature that is used to create an order. The template is define by the merchant. +It cannot be change by the customer. + + + +Adding templates +------------------ + +.. http:pos:: [/instances/$INSTANCE]/private/templates + + This is used to create template. + + **Response:** + + :http:statuscode:`200 Ok`: + The creation of the template is successfull. + + :http:statuscode:`404 Not found` + The merchant instance is unknown.This is used to edit the template. + + + +.. http:patch:: [/instances/$INSTNCE]/private/templates/$TEMPLATE_ID + + This is used to update template. + + **Response:** + + :http:statuscode:`200 Ok`: + The templates has successfylly modififed. + + :http:statuscode:`404 Not found`: + The templates(ID) is unknown to the backend. + + :http:statuscode:`409 Conflict`: + The provided information is inconsistent with the current state of the template. + + + +Inspecting template +------------------- + +.. http:get:: [/instances/$INSTANCE]/private/templates + + This is used to return the list of all the template. + + + **Response:** + + :http:statuscode:`200 OK`: + The backend has successfully returned all the template. + + :http:statuscode:`404 Not found`: + The backend has does not know about the instance. + + + +.. http:get:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID + + This is used to obtain detailed information about a specific template. + + + **Response:** + + :http:statuscode:`200 OK`: + The backend has successfully returned the detailed information about a specific template. + + :http:statuscode:`404 Not found`: + The template(ID) is unknown to the backend. + + + +Removing template +----------------- + +.. http:delete:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID + + This is used to delete information about a template. Fails if the template is locked by anyone. + + **Response:** + + :http:statuscode:`204 No content`: + The backend has successfully deleted the template. + + :http:statuscode:`404 Not found`: + The backend does not know the instance or the template. + + :http:statuscode:`409 Conflict`: + The backend refuses to delete the template because it is locked. + ------------------ The Contract Terms