Skip to content

Commit

Permalink
SDP: add how to update the SMS messages template (#244)
Browse files Browse the repository at this point in the history
* feat: add how to update the SMS messages template

* feat: add SMS templates on the endpoint response

* chore: improve example

* chore: improve description and example
  • Loading branch information
CaioTeixeira95 authored Feb 22, 2024
1 parent 96ea773 commit 083f7a1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "This endpoint returns the organization's info. It is used in many
sidebar_label: "Get Organization Info"
hide_title: true
hide_table_of_contents: true
api: {"responses":{"200":{"description":"Returns organization details","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Stellar Aid"},"logo_url":{"type":"string","example":"https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo"},"distribution_account_public_key":{"type":"string","example":"GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL"},"timezone_utc_offset":{"type":"string","example":"+00:00"},"is_approval_required":{"description":"Enables multi-user approval workflow for disbursements","type":"boolean","example":true}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not authorized","extras":{"status":401,"message":"Not authorized"}}},"examples":{"response":{"value":{"error":"Not authorized","extras":{"status":401,"message":"Not authorized"}}}}}}}},"operationId":"Get Organization Info","description":"This endpoint returns the organization's info. It is used in many places across the UI. It returns the name in the navbar and the public key of the organization’s distribution account.","tags":["Organization"],"security":[{"BearerAuth":[]}],"method":"get","path":"/organization","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authentication, signed with an ES256 private key."}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":"The Stellar Disbursement Platform (SDP) is a tool built for organizations to make bulk payments to a group of recipients over the Stellar network. You can read more about using the SDP [here](https://developers.stellar.org/docs/category/use-the-stellar-disbursement-platform)."},"postman":{"name":"Get Organization Info","description":{"content":"This endpoint returns the organization's info. It is used in many places across the UI. It returns the name in the navbar and the public key of the organization’s distribution account.","type":"text/plain"},"url":{"path":["organization"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"<API Key>","key":"value"},{"type":"any","value":"header","key":"in"}]}}}
api: {"responses":{"200":{"description":"Returns organization details","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Stellar Aid"},"logo_url":{"type":"string","example":"https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo"},"distribution_account_public_key":{"type":"string","example":"GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL"},"timezone_utc_offset":{"type":"string","example":"+00:00"},"is_approval_required":{"description":"Enables multi-user approval workflow for disbursements","type":"boolean","example":true},"sms_registration_message_template":{"description":"The custom SMS message template set for the registration invite. The `default` message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.RegistrationLink}} which is the link generated by SDP to send to the receiver (in case this is not present in the message, it's automatically appended at the end).","type":"string","example":"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."},"otp_message_template":{"description":"The custom OTP message template set to send OTP code to the receiver complete the registration flow. The `default` message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.OTP}} which is the OTP code to send to the receiver complete the registration flow (in case this is not present in the message, it's automatically appended at the end).","type":"string","example":"{{.OTP}} is your {{.OrganizationName}} phone verification code."}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not authorized","extras":{"status":401,"message":"Not authorized"}}},"examples":{"response":{"value":{"error":"Not authorized","extras":{"status":401,"message":"Not authorized"}}}}}}}},"operationId":"Get Organization Info","description":"This endpoint returns the organization's info. It is used in many places across the UI. It returns the name in the navbar and the public key of the organization’s distribution account.","tags":["Organization"],"security":[{"BearerAuth":[]}],"method":"get","path":"/organization","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authentication, signed with an ES256 private key."}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":"The Stellar Disbursement Platform (SDP) is a tool built for organizations to make bulk payments to a group of recipients over the Stellar network. You can read more about using the SDP [here](https://developers.stellar.org/docs/category/use-the-stellar-disbursement-platform)."},"postman":{"name":"Get Organization Info","description":{"content":"This endpoint returns the organization's info. It is used in many places across the UI. It returns the name in the navbar and the public key of the organization’s distribution account.","type":"text/plain"},"url":{"path":["organization"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"<API Key>","key":"value"},{"type":"any","value":"header","key":"in"}]}}}
sidebar_class_name: "get api-method"
info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api
custom_edit_url: null
Expand Down Expand Up @@ -34,7 +34,7 @@ This endpoint returns the organization's info. It is used in many places across

Returns organization details

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Stellar Aid"}}></SchemaItem><SchemaItem collapsible={false} name={"logo_url"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo"}}></SchemaItem><SchemaItem collapsible={false} name={"distribution_account_public_key"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL"}}></SchemaItem><SchemaItem collapsible={false} name={"timezone_utc_offset"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"+00:00"}}></SchemaItem><SchemaItem collapsible={false} name={"is_approval_required"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables multi-user approval workflow for disbursements","type":"boolean","example":true}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"name\": \"Stellar Aid\",\n \"logo_url\": \"https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo\",\n \"distribution_account_public_key\": \"GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL\",\n \"timezone_utc_offset\": \"+00:00\",\n \"is_approval_required\": true\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Stellar Aid"}}></SchemaItem><SchemaItem collapsible={false} name={"logo_url"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo"}}></SchemaItem><SchemaItem collapsible={false} name={"distribution_account_public_key"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL"}}></SchemaItem><SchemaItem collapsible={false} name={"timezone_utc_offset"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"+00:00"}}></SchemaItem><SchemaItem collapsible={false} name={"is_approval_required"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"description":"Enables multi-user approval workflow for disbursements","type":"boolean","example":true}}></SchemaItem><SchemaItem collapsible={false} name={"sms_registration_message_template"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"The custom SMS message template set for the registration invite. The `default` message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.RegistrationLink}} which is the link generated by SDP to send to the receiver (in case this is not present in the message, it's automatically appended at the end).","type":"string","example":"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."}}></SchemaItem><SchemaItem collapsible={false} name={"otp_message_template"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"The custom OTP message template set to send OTP code to the receiver complete the registration flow. The `default` message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.OTP}} which is the OTP code to send to the receiver complete the registration flow (in case this is not present in the message, it's automatically appended at the end).","type":"string","example":"{{.OTP}} is your {{.OrganizationName}} phone verification code."}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"name\": \"Stellar Aid\",\n \"logo_url\": \"https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo\",\n \"distribution_account_public_key\": \"GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL\",\n \"timezone_utc_offset\": \"+00:00\",\n \"is_approval_required\": true,\n \"sms_registration_message_template\": \"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.\",\n \"otp_message_template\": \"{{.OTP}} is your {{.OrganizationName}} phone verification code.\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

Expand Down
Loading

0 comments on commit 083f7a1

Please sign in to comment.