diff options
author | priscilla <priscilla.huang@efrei.net> | 2022-11-14 10:26:07 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2022-11-14 10:26:07 -0500 |
commit | 283006f975e7a83e9b2367b81fb51e96ffb41036 (patch) | |
tree | 4d01843eafab4ba8fd330e42a32b17a85cfdf094 /core | |
parent | 597931175a7d78be1148b9c4528958186e6f810e (diff) | |
download | docs-283006f975e7a83e9b2367b81fb51e96ffb41036.tar.gz docs-283006f975e7a83e9b2367b81fb51e96ffb41036.tar.bz2 docs-283006f975e7a83e9b2367b81fb51e96ffb41036.zip |
Templates
Diffstat (limited to 'core')
-rw-r--r-- | core/api-merchant.rst | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 1cbb2a01..0626edf5 100644 --- 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 |