diff options
author | priscilla <priscilla.huang@efrei.net> | 2022-11-14 11:46:36 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2022-11-14 11:46:36 -0500 |
commit | 63eaa4fad0060617513a0637bc493ec5b15f79dc (patch) | |
tree | 1efedaca1f32f3f26b5584a45d99e7e3d14ccafd /core/api-merchant.rst | |
parent | e5ec65bd1f32f6d79196793093f71ec3c717d87a (diff) | |
download | docs-63eaa4fad0060617513a0637bc493ec5b15f79dc.tar.gz docs-63eaa4fad0060617513a0637bc493ec5b15f79dc.tar.bz2 docs-63eaa4fad0060617513a0637bc493ec5b15f79dc.zip |
Modification
Diffstat (limited to 'core/api-merchant.rst')
-rw-r--r-- | core/api-merchant.rst | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/core/api-merchant.rst b/core/api-merchant.rst index 037a9e88..8a935cc8 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -3050,7 +3050,7 @@ It cannot be change by the customer. Adding templates ------------------- +---------------- .. http:post:: [/instances/$INSTANCE]/private/templates @@ -3065,19 +3065,47 @@ Adding templates The merchant instance is unknown.This is used to edit the template. + .. ts:def:: TemplateAddDetail + + interface TemplateAddDetail { + + // Template ID to use. + tenplate_id: string; + + // Human-readable summary for the template. + summary: string; + + // Map from IETF BCP 47 language tags to localized descriptions. + description_i18n?: { [lang_tag: string]: string }; + + // The price is imposed by the merchant and cannot be changed by the customer. + // This parametrer is optional. + price_imposed?: Amount; + + // A base64-encoded image selected by the merchant. + image: ImageDataUrl; + + // Identifies where the store is. + address_store: Location; + + // Minimum age buyer must have (in years). Default is 0. + minimum_age: Integer; + + } + Editing templates ----------------- -.. http:patch:: [/instances/$INSTNCE]/private/templates/$TEMPLATE_ID +.. http:patch:: [/instances/$INSTANCE]/private/templates/$TEMPLATE_ID This is used to update template. **Response:** :http:statuscode:`200 Ok`: - The templates has successfylly modififed. + The templates has successfully modififed. :http:statuscode:`404 Not found`: The templates(ID) is unknown to the backend. @@ -3135,8 +3163,6 @@ Removing 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. ------------------ |