From b3bb46859f957b17de3c6fcaba5fd549f8baca07 Mon Sep 17 00:00:00 2001 From: Jake Urban Date: Fri, 28 Jul 2023 18:29:32 -0700 Subject: [PATCH] updating index markdown files based on updated openapi spec --- .../callbacks/get-rates.api.mdx | 2 +- .../callbacks/put-customer.api.mdx | 2 +- .../resources/get-transaction.api.mdx | 2 +- .../resources/get-transactions.api.mdx | 2 +- .../resources/patch-transactions.api.mdx | 4 +- .../resources/anchor/index.mdx | 20 + .../resources/auth/index.mdx | 8 +- .../resources/authenticate-mfa.api.mdx | 49 + .../resources/create-disbursements.api.mdx | 6 +- .../resources/create-user.api.mdx | 10 +- .../resources/delete-a-disbursement.api.mdx | 45 - .../resources/disbursements/index.mdx | 2 - ...download-disbursement-instructions.api.mdx | 22 +- .../resources/forgot-password.api.mdx | 45 + ...ets-supported-by-this-organization.api.mdx | 45 + ...ies-supported-by-this-organization.api.mdx | 45 + ...ets-supported-by-this-organization.api.mdx | 45 + .../resources/get-all-roles.api.mdx | 8 +- .../resources/get-all-users.api.mdx | 12 +- .../resources/get-organization-info.api.mdx | 10 +- .../resources/get-organization-logo.api.mdx | 37 + .../resources/get-placeholder-info.api.mdx | 41 - .../resources/get-profile.api.mdx | 6 +- .../get-sep-10-challenge-transaction.api.mdx | 4 +- .../resources/index.mdx | 2 + .../list-all-disbursement-receivers.api.mdx | 12 +- .../resources/list-all-disbursements.api.mdx | 12 +- .../resources/list-all-payments.api.mdx | 12 +- .../resources/list-all-receivers.api.mdx | 12 +- .../load-the-pii-confirmation-webpage.api.mdx | 24 +- .../resources/log-in.api.mdx | 2 +- .../resources/organization/index.mdx | 23 + .../patch-organization-profile.api.mdx | 38 +- .../resources/patch-user-activation.api.mdx | 12 +- .../resources/patch-user-profile.api.mdx | 10 +- .../resources/patch-user-role.api.mdx | 8 +- .../post-sep-10-challenge-transaction.api.mdx | 4 +- .../resources/refresh-token.api.mdx | 2 +- ...r-the-stellar-account-for-the-user.api.mdx | 4 +- .../resources/registration/index.mdx | 12 +- .../resources/reset-password.api.mdx | 45 + .../resources/retrieve-a-disbursement.api.mdx | 12 +- .../resources/retrieve-a-payment.api.mdx | 12 +- .../resources/retrieve-a-receiver.api.mdx | 14 +- .../resources/retrieve-all-statistics.api.mdx | 14 +- ...e-disbursement-specific-statistics.api.mdx | 12 +- .../send-otp-to-the-receivers-phone.api.mdx | 45 - .../resources/send-otp.api.mdx | 53 + .../resources/sidebar.js | 2 +- .../resources/stellar-toml.api.mdx | 4 +- .../update-a-disbursement-status.api.mdx | 6 +- .../resources/update-a-disbursement.api.mdx | 49 - .../resources/update-the-receiver.api.mdx | 18 +- .../upload-disbursement-instructions.api.mdx | 12 +- .../resources/validate-otp-pii.api.mdx | 41 - ...y-if-stellar-account-is-registered.api.mdx | 4 +- .../verify-receiver-registration.api.mdx | 49 + .../stellar-disbursement-platform/bundled.yml | 3348 ++++++----------- 58 files changed, 1887 insertions(+), 2514 deletions(-) create mode 100644 api/stellar-disbursement-platform/resources/anchor/index.mdx create mode 100644 api/stellar-disbursement-platform/resources/authenticate-mfa.api.mdx delete mode 100644 api/stellar-disbursement-platform/resources/delete-a-disbursement.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/forgot-password.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/get-a-list-of-assets-supported-by-this-organization.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/get-a-list-of-countries-supported-by-this-organization.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/get-a-list-of-wallets-supported-by-this-organization.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/get-organization-logo.api.mdx delete mode 100644 api/stellar-disbursement-platform/resources/get-placeholder-info.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/organization/index.mdx create mode 100644 api/stellar-disbursement-platform/resources/reset-password.api.mdx delete mode 100644 api/stellar-disbursement-platform/resources/send-otp-to-the-receivers-phone.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/send-otp.api.mdx delete mode 100644 api/stellar-disbursement-platform/resources/update-a-disbursement.api.mdx delete mode 100644 api/stellar-disbursement-platform/resources/validate-otp-pii.api.mdx create mode 100644 api/stellar-disbursement-platform/resources/verify-receiver-registration.api.mdx diff --git a/api/anchor-platform/callbacks/get-rates.api.mdx b/api/anchor-platform/callbacks/get-rates.api.mdx index d990dedb7..c38a58907 100644 --- a/api/anchor-platform/callbacks/get-rates.api.mdx +++ b/api/anchor-platform/callbacks/get-rates.api.mdx @@ -52,7 +52,7 @@ Success. An object describing the fees added on top of the rate provided via the `price` attribute. -
details object[]
  • Array [
  • ]
  • +
    details object[]
  • Array [
  • ]
  • Unprocessable Entity. This status should be returned when the anchor understood the request but cannot return a success response. diff --git a/api/anchor-platform/callbacks/put-customer.api.mdx b/api/anchor-platform/callbacks/put-customer.api.mdx index 8def208e6..f9d95ca40 100644 --- a/api/anchor-platform/callbacks/put-customer.api.mdx +++ b/api/anchor-platform/callbacks/put-customer.api.mdx @@ -5,7 +5,7 @@ description: "**The Anchor Platform does not persist any customer KYC data.**" sidebar_label: "Create or Update Customer Info" hide_title: true hide_table_of_contents: true -api: {"tags":["Customers","SEP-12","SEP-24","SEP-31"],"description":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","operationId":"putCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"type":{"description":"The type of action the customer is being KYCd for. \nSee the [Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification) documented in SEP-12 for more info.\nFor SEP-31 you can define your own types in the assets configuration.\nFor SEP-24 pre-defined value `sep24-customer` is used.\n","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"additional_name":{"type":"string"},"address_country_code":{"type":"string"},"state_or_province":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"address":{"type":"string"},"mobile_number":{"type":"string"},"email_address":{"type":"string"},"birth_date":{"type":"string","format":"date"},"birth_place":{"type":"string"},"birth_country_code":{"type":"string"},"bank_account_number":{"type":"string"},"bank_account_type":{"type":"string"},"bank_number":{"type":"string"},"bank_phone_number":{"type":"string"},"bank_branch_number":{"type":"string"},"tax_id":{"type":"string"},"tax_id_name":{"type":"string"},"occupation":{"type":"string"},"employer_name":{"type":"string"},"employer_address":{"type":"string"},"language_code":{"type":"string"},"id_type":{"type":"string"},"id_country_code":{"type":"string"},"id_issue_date":{"type":"string","format":"date"},"id_expiration_date":{"type":"string","format":"date"},"id_number":{"type":"string"},"ip_address":{"type":"string"},"sex":{"type":"string"}},"title":"PutCustomerRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"title":"PutCustomerResponse"}}}},"400":{"description":"Invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","type":"string","first_name":"string","last_name":"string","additional_name":"string","address_country_code":"string","state_or_province":"string","city":"string","postal_code":"string","address":"string","mobile_number":"string","email_address":"string","birth_date":"2023-07-20","birth_place":"string","birth_country_code":"string","bank_account_number":"string","bank_account_type":"string","bank_number":"string","bank_phone_number":"string","bank_branch_number":"string","tax_id":"string","tax_id_name":"string","occupation":"string","employer_name":"string","employer_address":"string","language_code":"string","id_type":"string","id_country_code":"string","id_issue_date":"2023-07-20","id_expiration_date":"2023-07-20","id_number":"string","ip_address":"string","sex":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The\nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Customer Info","description":{"content":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Customers","SEP-12","SEP-24","SEP-31"],"description":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","operationId":"putCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"type":{"description":"The type of action the customer is being KYCd for. \nSee the [Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification) documented in SEP-12 for more info.\nFor SEP-31 you can define your own types in the assets configuration.\nFor SEP-24 pre-defined value `sep24-customer` is used.\n","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"additional_name":{"type":"string"},"address_country_code":{"type":"string"},"state_or_province":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"address":{"type":"string"},"mobile_number":{"type":"string"},"email_address":{"type":"string"},"birth_date":{"type":"string","format":"date"},"birth_place":{"type":"string"},"birth_country_code":{"type":"string"},"bank_account_number":{"type":"string"},"bank_account_type":{"type":"string"},"bank_number":{"type":"string"},"bank_phone_number":{"type":"string"},"bank_branch_number":{"type":"string"},"tax_id":{"type":"string"},"tax_id_name":{"type":"string"},"occupation":{"type":"string"},"employer_name":{"type":"string"},"employer_address":{"type":"string"},"language_code":{"type":"string"},"id_type":{"type":"string"},"id_country_code":{"type":"string"},"id_issue_date":{"type":"string","format":"date"},"id_expiration_date":{"type":"string","format":"date"},"id_number":{"type":"string"},"ip_address":{"type":"string"},"sex":{"type":"string"}},"title":"PutCustomerRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"title":"PutCustomerResponse"}}}},"400":{"description":"Invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","type":"string","first_name":"string","last_name":"string","additional_name":"string","address_country_code":"string","state_or_province":"string","city":"string","postal_code":"string","address":"string","mobile_number":"string","email_address":"string","birth_date":"2023-07-29","birth_place":"string","birth_country_code":"string","bank_account_number":"string","bank_account_type":"string","bank_number":"string","bank_phone_number":"string","bank_branch_number":"string","tax_id":"string","tax_id_name":"string","occupation":"string","employer_name":"string","employer_address":"string","language_code":"string","id_type":"string","id_country_code":"string","id_issue_date":"2023-07-29","id_expiration_date":"2023-07-29","id_number":"string","ip_address":"string","sex":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The\nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Customer Info","description":{"content":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the\n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put)\nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors\nmust validate and persist the data passed, and return the customer's `id`.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "put api-method" info_path: api/anchor-platform/callbacks/synchronous-callbacks-api custom_edit_url: null diff --git a/api/anchor-platform/resources/get-transaction.api.mdx b/api/anchor-platform/resources/get-transaction.api.mdx index 2553f6773..7379f2ed6 100644 --- a/api/anchor-platform/resources/get-transaction.api.mdx +++ b/api/anchor-platform/resources/get-transaction.api.mdx @@ -67,7 +67,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
    +
    Bad Request diff --git a/api/anchor-platform/resources/get-transactions.api.mdx b/api/anchor-platform/resources/get-transactions.api.mdx index 1d6458371..2f6d689ba 100644 --- a/api/anchor-platform/resources/get-transactions.api.mdx +++ b/api/anchor-platform/resources/get-transactions.api.mdx @@ -67,7 +67,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
  • ]
  • +
  • ]
  • Bad Request diff --git a/api/anchor-platform/resources/patch-transactions.api.mdx b/api/anchor-platform/resources/patch-transactions.api.mdx index eea629299..2c57cf40b 100644 --- a/api/anchor-platform/resources/patch-transactions.api.mdx +++ b/api/anchor-platform/resources/patch-transactions.api.mdx @@ -5,7 +5,7 @@ description: "Accepts one or more objects containing updated information on tran sidebar_label: "Update Transactions Info" hide_title: true hide_table_of_contents: true -api: {"tags":["Transactions","SEP-24","SEP-31"],"operationId":"patchTransactions","description":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised.","responses":{"200":{"description":"Transaction(s) updated.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","required":["id","sep","kind","status","amount_expected","destination_account","started_at"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24"]},"kind":{"type":"string","enum":["deposit","withdrawal"]},"status":{"type":"string","description":"Possible status value for SEP-24 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_user_transfer_start","pending_user_transfer_complete","pending_anchor","pending_trust","pending_user","no_market","too_small","too_large"],"title":"StatusSEP24"},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text id hash"],"title":"MemoType"}},"title":"TransactionSEP24"}}},"title":"TransactionListSEP24"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","required":["id","sep","kind","status","started_at"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"kind":{"type":"string","enum":["receive"]},"status":{"type":"string","description":"Possible status value for SEP-31 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"],"title":"StatusSEP31"},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"quote_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"external_transaction_id":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}},"title":"TransactionSEP31"}}},"title":"TransactionListSEP31"}]}}}},"400":{"description":"Invalid request body. The error returned pertains to the transaction first determined to be invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string","description":"The `id` of the transaction first determined to be invalid."}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24"]},"status":{"type":"string","description":"Possible status value for SEP-24 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_user_transfer_start","pending_user_transfer_complete","pending_anchor","pending_trust","pending_user","no_market","too_small","too_large"],"title":"StatusSEP24"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"external_transaction_id":{"type":"string"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"memo":{"type":"string"},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text id hash"],"title":"MemoType"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"}},"title":"MutableTransactionSEP24"}}}}},"title":"PatchTransactionSEP24"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"status":{"type":"string","description":"Possible status value for SEP-31 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"],"title":"StatusSEP31"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"external_transaction_id":{"type":"string"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"message":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"}},"title":"MutableTransactionSEP31"}}}}},"title":"PatchTransactionSEP31"}]}}}},"method":"patch","path":"/transactions","jsonRequestBodyExample":{"records":[{"transaction":{"id":"string","sep":"24","status":"incomplete","amount_in":{"amount":"string","asset":"string"},"amount_out":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"started_at":"2023-07-20T23:19:44.245Z","updated_at":"2023-07-20T23:19:44.245Z","completed_at":"2023-07-20T23:19:44.245Z","transfer_received_at":"2023-07-20T23:19:44.245Z","external_transaction_id":"string","stellar_transactions":[{"id":"string","memo":"string","memo_type":"text","created_at":"2023-07-20T23:19:44.246Z","envelope":"string","payments":[{"id":"string","payment_type":"payment","source_account":"string","destination_account":"string","amount":{"amount":"string","asset":"string"}}]}],"memo":"string","memo_type":"text id hash","message":"string","refunds":{"amount_refunded":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"payments":[{"id":"string","id_type":"stellar","amount":{"amount":"string","asset":"string"},"fee":{"amount":"string","asset":"string"},"requested_at":"2023-07-20T23:19:44.246Z","refunded_at":"2023-07-20T23:19:44.246Z"}]}}}]},"info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Update Transactions Info","description":{"content":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised.","type":"text/plain"},"url":{"path":["transactions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Transactions","SEP-24","SEP-31"],"operationId":"patchTransactions","description":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised.","responses":{"200":{"description":"Transaction(s) updated.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","required":["id","sep","kind","status","amount_expected","destination_account","started_at"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24"]},"kind":{"type":"string","enum":["deposit","withdrawal"]},"status":{"type":"string","description":"Possible status value for SEP-24 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_user_transfer_start","pending_user_transfer_complete","pending_anchor","pending_trust","pending_user","no_market","too_small","too_large"],"title":"StatusSEP24"},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text id hash"],"title":"MemoType"}},"title":"TransactionSEP24"}}},"title":"TransactionListSEP24"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","required":["id","sep","kind","status","started_at"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"kind":{"type":"string","enum":["receive"]},"status":{"type":"string","description":"Possible status value for SEP-31 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"],"title":"StatusSEP31"},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"quote_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"external_transaction_id":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}},"title":"TransactionSEP31"}}},"title":"TransactionListSEP31"}]}}}},"400":{"description":"Invalid request body. The error returned pertains to the transaction first determined to be invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string","description":"The `id` of the transaction first determined to be invalid."}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24"]},"status":{"type":"string","description":"Possible status value for SEP-24 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_user_transfer_start","pending_user_transfer_complete","pending_anchor","pending_trust","pending_user","no_market","too_small","too_large"],"title":"StatusSEP24"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"external_transaction_id":{"type":"string"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"memo":{"type":"string"},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text id hash"],"title":"MemoType"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"}},"title":"MutableTransactionSEP24"}}}}},"title":"PatchTransactionSEP24"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"status":{"type":"string","description":"Possible status value for SEP-31 transactions","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"],"title":"StatusSEP31"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"external_transaction_id":{"type":"string"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"message":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"}},"title":"MutableTransactionSEP31"}}}}},"title":"PatchTransactionSEP31"}]}}}},"method":"patch","path":"/transactions","jsonRequestBodyExample":{"records":[{"transaction":{"id":"string","sep":"24","status":"incomplete","amount_in":{"amount":"string","asset":"string"},"amount_out":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"started_at":"2023-07-29T00:52:52.610Z","updated_at":"2023-07-29T00:52:52.610Z","completed_at":"2023-07-29T00:52:52.610Z","transfer_received_at":"2023-07-29T00:52:52.610Z","external_transaction_id":"string","stellar_transactions":[{"id":"string","memo":"string","memo_type":"text","created_at":"2023-07-29T00:52:52.610Z","envelope":"string","payments":[{"id":"string","payment_type":"payment","source_account":"string","destination_account":"string","amount":{"amount":"string","asset":"string"}}]}],"memo":"string","memo_type":"text id hash","message":"string","refunds":{"amount_refunded":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"payments":[{"id":"string","id_type":"stellar","amount":{"amount":"string","asset":"string"},"fee":{"amount":"string","asset":"string"},"requested_at":"2023-07-29T00:52:52.610Z","refunded_at":"2023-07-29T00:52:52.610Z"}]}}}]},"info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Update Transactions Info","description":{"content":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised.","type":"text/plain"},"url":{"path":["transactions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "patch api-method" info_path: api/anchor-platform/resources/platform-api custom_edit_url: null @@ -100,7 +100,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
  • ]
  • +
  • ]
  • Invalid request body. The error returned pertains to the transaction first determined to be invalid. diff --git a/api/stellar-disbursement-platform/resources/anchor/index.mdx b/api/stellar-disbursement-platform/resources/anchor/index.mdx new file mode 100644 index 000000000..a0dfe7ef9 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/anchor/index.mdx @@ -0,0 +1,20 @@ +--- +title: Anchor +order: 6 +--- + +import {EndpointsTable} from "@site/src/components/EndpointsTable"; + +The registration endpoints guide the process for a receiver to verify their identity and link their wallet address to an SDP. The registration process only needs to happen once per receiver to link their wallet. Only SDP-compatible wallet providers can facilitate the registration process. These endpoints must be supported and hit by the wallet providers after the receiver gets the initial SMS invite. After the wallet address is successfully linked, the payment automatically begins. + +The registration process uses SEP-10, SEP-24, and deep links. Please see this guide for a full set of instructions for wallet providers to become SDP-compatible. + + + +| | | +| --- | --------------------- | +| GET | [/.well-known/stellar.toml](../stellar-toml.api.mdx) | +| GET | [/WEB_AUTH_ENDPOINT](../get-sep-10-challenge-transaction.api.mdx) | +| POST | [/WEB_AUTH_ENDPOINT](../post-sep-10-challenge-transaction.api.mdx) | + + \ No newline at end of file diff --git a/api/stellar-disbursement-platform/resources/auth/index.mdx b/api/stellar-disbursement-platform/resources/auth/index.mdx index ce56e73a1..3d10b66cb 100644 --- a/api/stellar-disbursement-platform/resources/auth/index.mdx +++ b/api/stellar-disbursement-platform/resources/auth/index.mdx @@ -11,7 +11,11 @@ Authentication controls the log in/log out process for all SDP users, as well as | | | | --- | --------------------- | -| GET | [/login](../log-in.api.mdx) | -| PATCH | [/refresh_token](../refresh-token.api.mdx) | +| POST | [/login](../log-in.api.mdx) | +| POST | [/refresh_token](../refresh-token.api.mdx) | +| POST | [/mfa](../authenticate-mfa.api.mdx) | +| POST | [/forgot-password](../forgot-password.api.mdx) | +| POST | [/reset-password](../reset-password.api.mdx) | + \ No newline at end of file diff --git a/api/stellar-disbursement-platform/resources/authenticate-mfa.api.mdx b/api/stellar-disbursement-platform/resources/authenticate-mfa.api.mdx new file mode 100644 index 000000000..2a4f5ad6c --- /dev/null +++ b/api/stellar-disbursement-platform/resources/authenticate-mfa.api.mdx @@ -0,0 +1,49 @@ +--- +id: authenticate-mfa +title: "Multi-factor authentication endpoint" +description: "Multi-factor authentication endpoint" +sidebar_label: "Multi-factor authentication endpoint" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"authenticateMFA","tags":["Authentication"],"parameters":[{"in":"header","name":"Device-ID","required":false,"description":"Identifier of the device","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mfa_code":{"type":"string","description":"Multi-factor authentication code"},"remember_me":{"type":"boolean","description":"Boolean flag to remember the user"},"recaptcha_token":{"type":"string","description":"Token for reCAPTCHA validation"}},"required":["mfa_code"]}}},"description":"MFA request data","required":true},"responses":{"200":{"description":"Successful authentication","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Authentication token"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}},"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"}}}}}}}},"description":"Multi-factor authentication endpoint","method":"post","path":"/mfa","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"mfa_code":"string","remember_me":true,"recaptcha_token":"string"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Multi-factor authentication endpoint","description":{"type":"text/plain"},"url":{"path":["mfa"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"Identifier of the device","type":"text/plain"},"key":"Device-ID","value":""},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Multi-factor authentication endpoint + + + +Multi-factor authentication endpoint + +
    Header Parameters
    Request Body required
    + +MFA request data + +
    + +Successful authentication + +
    Schema
    + +Bad Request + +
    Schema
    + +Unauthorized + +
    Response Headers
      Schema
        extras object
      diff --git a/api/stellar-disbursement-platform/resources/create-disbursements.api.mdx b/api/stellar-disbursement-platform/resources/create-disbursements.api.mdx index 327a5c4f3..0c5744d91 100644 --- a/api/stellar-disbursement-platform/resources/create-disbursements.api.mdx +++ b/api/stellar-disbursement-platform/resources/create-disbursements.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Create Disbursements" hide_title: true hide_table_of_contents: true -api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"upload_by":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"total_payments":{"type":"number"},"total_payments_sent":{"type":"number"},"total_payments_remaining":{"type":"number"},"total_payments_failed":{"type":"number"},"amount_disbursed":{"type":"string"},"total_amount":{"type":"string"},"average_amount":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"name":{"type":"string"}}},"status":{"type":"string"},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"}}}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"example":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","upload_by":{"id":"88b0ad24-8bab-4f19-903f-cb2da90108a2","name":"Marcelo"},"total_payments":0,"total_payments_sent":0,"total_payments_remaining":0,"total_payments_failed":0,"amount_disbursed":"0.0000000","total_amount":"0.0000000","average_amount":"0.0000000","country":{"code":"ua","name":"Ukraine","language":"uk","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"wallet":{"id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant","homepage":"https://vibrantapp.com"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","name":"USD Coin"},"status":"DRAFT","status_history":[{"user_id":null,"status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"}],"created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"}},"examples":{"response":{"value":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","upload_by":{"id":"88b0ad24-8bab-4f19-903f-cb2da90108a2","name":"Marcelo"},"total_payments":0,"total_payments_sent":0,"total_payments_remaining":0,"total_payments_failed":0,"amount_disbursed":"0.0000000","total_amount":"0.0000000","average_amount":"0.0000000","country":{"code":"ua","name":"Ukraine","language":"uk","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"wallet":{"id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant","homepage":"https://vibrantapp.com"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","name":"USD Coin"},"status":"DRAFT","status_history":[{"user_id":null,"status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"}],"created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Bad request","extras":{"status":400,"message":"Invalid country code provided"}}},"examples":{"response":{"value":{"error":"Bad request","extras":{"status":400,"message":"Invalid country code provided"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Create Disbursements","description":"","tags":["Disbursements"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"wallet_id":{"type":"string"},"asset_id":{"type":"string"},"country_code":{"type":"string"}},"example":{"name":"My New Disbursement name","wallet_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","asset_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","country_code":"ua"}}}}},"security":[{"oauth2":[]}],"method":"post","path":"/disbursements","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"name":"My New Disbursement name","wallet_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","asset_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","country_code":"ua"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Create Disbursements","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"201":{"description":"A new disbursement","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"verification_field":{"type":"string","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"timestamp":{"type":"string","format":"date-time"}}}},"file_name":{"type":"string"},"file_content":{"type":"string","format":"byte"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Bad request","extras":{"status":400,"message":"Invalid country code provided"}}},"examples":{"response":{"value":{"error":"Bad request","extras":{"status":400,"message":"Invalid country code provided"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Create Disbursements","description":"","tags":["Disbursements"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"wallet_id":{"type":"string"},"asset_id":{"type":"string"},"country_code":{"type":"string"}},"example":{"name":"My New Disbursement name","wallet_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","asset_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","country_code":"ua"}}}}},"security":[{"BearerAuth":[]}],"method":"post","path":"/disbursements","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"name":"My New Disbursement name","wallet_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","asset_id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","country_code":"ua"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Create Disbursements","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -28,9 +28,9 @@ import TabItem from "@theme/TabItem";
      Request Body
      -Created +A new disbursement -
      Response Headers
        Schema
          upload_by object
          country object
          wallet object
          asset object
          status_history object[]
        • Array [
        • ]
        +
        Schema
          country object
          wallet object
          asset object
          status_history object[]
        • Array [
        • ]
        Bad Request diff --git a/api/stellar-disbursement-platform/resources/create-user.api.mdx b/api/stellar-disbursement-platform/resources/create-user.api.mdx index 596e5c540..f7fe891bc 100644 --- a/api/stellar-disbursement-platform/resources/create-user.api.mdx +++ b/api/stellar-disbursement-platform/resources/create-user.api.mdx @@ -5,7 +5,7 @@ description: "Creates the authentication user and sends the invitation e-mail." sidebar_label: "Create User" hide_title: true hide_table_of_contents: true -api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"email":{"type":"string"}},"example":{"id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","first_name":"John","last_name":"Doe","roles":["business"],"email":"email@email.com"}},"examples":{"response":{"value":{"id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","first_name":"John","last_name":"Doe","roles":["business"],"email":"email@email.com"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Create User","description":"Creates the authentication user and sends the invitation e-mail.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"email":{"type":"string"}},"example":{"first_name":"John","last_name":"Doe","roles":["business"],"email":"email@email.com"}}}}},"security":[{"oauth2":[]}],"method":"post","path":"/users","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"first_name":"John","last_name":"Doe","roles":["business"],"email":"email@email.com"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Create User","description":{"content":"Creates the authentication user and sends the invitation e-mail.","type":"text/plain"},"url":{"path":["users"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"}},"required":["id","first_name","last_name","email","roles","is_active"],"example":[{"id":"7a4c6555-1f73-49b3-a211-f95bd2b8ec90","first_name":"John","last_name":"Doe","email":"email@email.com","roles":["developer"],"is_active":true},{"id":"5f4df1dd-c84f-482a-84ad-541ffd46e75a","first_name":"Jane","last_name":"Doe","email":"email@email.com","roles":["financial_controller"],"is_active":false}]}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Create User","description":"Creates the authentication user and sends the invitation e-mail.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"email":{"type":"string"}},"example":{"first_name":"John","last_name":"Doe","roles":["business"],"email":"email@email.com"}}}}},"security":[{"BearerAuth":[]}],"method":"post","path":"/users","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"first_name":"John","last_name":"Doe","roles":["business"],"email":"email@email.com"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Create User","description":{"content":"Creates the authentication user and sends the invitation e-mail.","type":"text/plain"},"url":{"path":["users"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -34,8 +34,12 @@ Creates the authentication user and sends the invitation e-mail. Created -
        Response Headers
          Schema
          +
          Schema
          Unauthorized -
          Response Headers
            Schema
            +
            Response Headers
              Schema
                extras object
              + +Forbidden + +
              Response Headers
                Schema
                diff --git a/api/stellar-disbursement-platform/resources/delete-a-disbursement.api.mdx b/api/stellar-disbursement-platform/resources/delete-a-disbursement.api.mdx deleted file mode 100644 index 1bf02a093..000000000 --- a/api/stellar-disbursement-platform/resources/delete-a-disbursement.api.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: delete-a-disbursement -title: "Delete a Disbursement" -description: "" -sidebar_label: "Delete a Disbursement" -hide_title: true -hide_table_of_contents: true -api: {"responses":{"204":{"description":"No Content","headers":{}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Delete a Disbursement","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the `Disbursement`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"delete","path":"/disbursements/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Delete a Disbursement","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Disbursement`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE","auth":{"type":"oauth2","oauth2":[]}}} -sidebar_class_name: "delete api-method" -info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api -custom_edit_url: null ---- - -import { SepBadge } from "@site/src/components/SepBadge"; - - - -import ApiTabs from "@theme/ApiTabs"; -import MimeTabs from "@theme/MimeTabs"; -import ParamsItem from "@theme/ParamsItem"; -import ResponseSamples from "@theme/ResponseSamples"; -import SchemaItem from "@theme/SchemaItem"; -import SchemaTabs from "@theme/SchemaTabs"; -import DiscriminatorTabs from "@theme/DiscriminatorTabs"; -import TabItem from "@theme/TabItem"; - -## Delete a Disbursement - -
                Path Parameters
                - -No Content - -
                Response Headers
                  - -Unauthorized - -
                  Response Headers
                    Schema
                      extras object
                    - -Forbidden - -
                    Response Headers
                      Schema
                      - -Not Found - -
                      Response Headers
                        Schema
                          extras object
                        diff --git a/api/stellar-disbursement-platform/resources/disbursements/index.mdx b/api/stellar-disbursement-platform/resources/disbursements/index.mdx index 98d73b8c1..42c064a37 100644 --- a/api/stellar-disbursement-platform/resources/disbursements/index.mdx +++ b/api/stellar-disbursement-platform/resources/disbursements/index.mdx @@ -14,8 +14,6 @@ A disbursement is a group of payments sent to multiple individuals at once. An S | GET | [/disbursements](../list-all-disbursements.api.mdx) | | POST | [/disbursements](../create-disbursements.api.mdx) | | GET | [/disbursements/:id](../retrieve-a-disbursement.api.mdx) | -| PATCH | [/disbursements/:id](../update-a-disbursement.api.mdx) | -| DELETE | [/disbursements/:id](../delete-a-disbursement.api.mdx) | | GET | [/disbursements/:id/receivers](../list-all-disbursement-receivers.api.mdx) | | POST | [/disbursements/:id/instructions](../upload-disbursement-instructions.api.mdx) | | GET | [/disbursements/:id/instructions](../download-disbursement-instructions.api.mdx) | diff --git a/api/stellar-disbursement-platform/resources/download-disbursement-instructions.api.mdx b/api/stellar-disbursement-platform/resources/download-disbursement-instructions.api.mdx index 6c343ffd3..74618041c 100644 --- a/api/stellar-disbursement-platform/resources/download-disbursement-instructions.api.mdx +++ b/api/stellar-disbursement-platform/resources/download-disbursement-instructions.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Download Disbursement Instructions" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{"Content-Disposition":{"schema":{"type":"string"}}},"content":{"text/csv":{"examples":{"response":{"value":""}}}}},"400":{"description":"Bad Request","headers":{},"content":{"text/csv":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"foo":{"type":"string"},"message":{"type":"string"}}}},"example":{"error":"Invalid request","extras":{"foo":"bar","message":"Invalid request parameters"}}}},"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"foo":{"type":"string"},"message":{"type":"string"}}}},"example":{"error":"Invalid request","extras":{"foo":"bar","message":"Invalid request parameters"}}},"examples":{"response":{"value":{"error":"Invalid request","extras":{"foo":"bar","message":"Invalid request parameters"}}}}}}},"401":{"description":"Unauthorized","headers":{}},"403":{"description":"Forbidden","headers":{}},"404":{"description":"Not Found","headers":{},"content":{"text/csv":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}},"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Download Disbursement Instructions","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the Disbursement","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"get","path":"/disbursements/{id}/instructions","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Download Disbursement Instructions","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","instructions"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the Disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"text/csv"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Disbursement CSV file","headers":{"Content-Disposition":{"description":"The filename of the returned CSV file.","schema":{"type":"string"}},"Content-Type":{"description":"text/csv","schema":{"type":"string"}}},"content":{"text/csv":{"examples":{"response":{"value":""}}}}},"400":{"description":"Bad Request","headers":{},"content":{"text/csv":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"foo":{"type":"string"},"message":{"type":"string"}}}},"example":{"error":"Invalid request","extras":{"foo":"bar","message":"Invalid request parameters"}}}},"application/json":{"examples":{"response":{"value":{"error":"Invalid request","extras":{"foo":"bar","message":"Invalid request parameters"}}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"text/csv":{"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"}}}},"application/json":{"examples":{"response":{"value":{"error":"Not authorized","extras":{"status":401,"message":"Not authorized"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"text/csv":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}}},"application/json":{"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"text/csv":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}},"application/json":{"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Download Disbursement Instructions","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the Disbursement","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/disbursements/{id}/instructions","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Download Disbursement Instructions","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","instructions"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the Disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"text/csv"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,22 +28,30 @@ import TabItem from "@theme/TabItem";
                        Path Parameters
                        -OK +Disbursement CSV file -
                        Response Headers
                        • Content-Disposition string
                        Schema
                          any
                        +
                        Response Headers
                        • Content-Disposition string
                          + +The filename of the returned CSV file. + +
                        • Content-Type string
                          + +text/csv + +
                        Schema
                          any
                        Bad Request -
                        Response Headers
                          Schema
                            extras object
                          Schema
                            extras object
                          +
                          Response Headers
                            Schema
                              extras object
                            Schema
                              any
                            Unauthorized -
                            Response Headers
                              +
                              Response Headers
                                Schema
                                  extras object
                                Schema
                                  any
                                Forbidden -
                                Response Headers
                                  +
                                  Response Headers
                                    Schema
                                    Schema
                                      any
                                    Not Found -
                                    Response Headers
                                      Schema
                                        extras object
                                      Schema
                                        extras object
                                      +
                                      Response Headers
                                        Schema
                                          extras object
                                        Schema
                                          any
                                        diff --git a/api/stellar-disbursement-platform/resources/forgot-password.api.mdx b/api/stellar-disbursement-platform/resources/forgot-password.api.mdx new file mode 100644 index 000000000..da8add0e2 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/forgot-password.api.mdx @@ -0,0 +1,45 @@ +--- +id: forgot-password +title: "Forgot password endpoint" +description: "Forgot password endpoint" +sidebar_label: "Forgot password endpoint" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"forgotPassword","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email of the user"},"recaptcha_token":{"type":"string","description":"Token for reCAPTCHA validation"}},"required":["email"]}}},"description":"Forgot password request data","required":true},"responses":{"200":{"description":"Forgot password email sent successfully","content":{"*/*":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}}},"description":"Forgot password endpoint","method":"post","path":"/forgot-password","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"email":"user@example.com","recaptcha_token":"string"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Forgot password endpoint","description":{"type":"text/plain"},"url":{"path":["forgot-password"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"*/*"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Forgot password endpoint + + + +Forgot password endpoint + +
                                        Request Body required
                                        + +Forgot password request data + +
                                        + +Forgot password email sent successfully + +
                                        Schema
                                        + +Bad Request + +
                                        Schema
                                        diff --git a/api/stellar-disbursement-platform/resources/get-a-list-of-assets-supported-by-this-organization.api.mdx b/api/stellar-disbursement-platform/resources/get-a-list-of-assets-supported-by-this-organization.api.mdx new file mode 100644 index 000000000..1fc8adcb9 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/get-a-list-of-assets-supported-by-this-organization.api.mdx @@ -0,0 +1,45 @@ +--- +id: get-a-list-of-assets-supported-by-this-organization +title: "Get a list of assets supported by this organization" +description: "Get a list of assets supported by this organization" +sidebar_label: "Get a list of assets supported by this organization" +hide_title: true +hide_table_of_contents: true +api: {"tags":["Organization"],"responses":{"200":{"description":"A list of assets","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"description":"Get a list of assets supported by this organization","method":"get","path":"/assets","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get a list of assets supported by this organization","description":{"type":"text/plain"},"url":{"path":["assets"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Get a list of assets supported by this organization + + + +Get a list of assets supported by this organization + +
                                        + +A list of assets + +
                                        Schema
                                        • Array [
                                        • ]
                                        + +Unauthorized + +
                                        Response Headers
                                          Schema
                                            extras object
                                          + +Forbidden + +
                                          Response Headers
                                            Schema
                                            diff --git a/api/stellar-disbursement-platform/resources/get-a-list-of-countries-supported-by-this-organization.api.mdx b/api/stellar-disbursement-platform/resources/get-a-list-of-countries-supported-by-this-organization.api.mdx new file mode 100644 index 000000000..7a10aefbe --- /dev/null +++ b/api/stellar-disbursement-platform/resources/get-a-list-of-countries-supported-by-this-organization.api.mdx @@ -0,0 +1,45 @@ +--- +id: get-a-list-of-countries-supported-by-this-organization +title: "Get a list of countries supported by this organization" +description: "Get a list of countries supported by this organization" +sidebar_label: "Get a list of countries supported by this organization" +hide_title: true +hide_table_of_contents: true +api: {"tags":["Organization"],"responses":{"200":{"description":"A list of countries","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"description":"Get a list of countries supported by this organization","method":"get","path":"/countries","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get a list of countries supported by this organization","description":{"type":"text/plain"},"url":{"path":["countries"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Get a list of countries supported by this organization + + + +Get a list of countries supported by this organization + +
                                            + +A list of countries + +
                                            Schema
                                            • Array [
                                            • ]
                                            + +Unauthorized + +
                                            Response Headers
                                              Schema
                                                extras object
                                              + +Forbidden + +
                                              Response Headers
                                                Schema
                                                diff --git a/api/stellar-disbursement-platform/resources/get-a-list-of-wallets-supported-by-this-organization.api.mdx b/api/stellar-disbursement-platform/resources/get-a-list-of-wallets-supported-by-this-organization.api.mdx new file mode 100644 index 000000000..188492e67 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/get-a-list-of-wallets-supported-by-this-organization.api.mdx @@ -0,0 +1,45 @@ +--- +id: get-a-list-of-wallets-supported-by-this-organization +title: "Get a list of wallets supported by this organization" +description: "Get a list of wallets supported by this organization" +sidebar_label: "Get a list of wallets supported by this organization" +hide_title: true +hide_table_of_contents: true +api: {"tags":["Organization"],"responses":{"200":{"description":"A list of wallets","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"description":"Get a list of wallets supported by this organization","method":"get","path":"/wallets","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get a list of wallets supported by this organization","description":{"type":"text/plain"},"url":{"path":["wallets"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Get a list of wallets supported by this organization + + + +Get a list of wallets supported by this organization + +
                                                + +A list of wallets + +
                                                Schema
                                                • Array [
                                                • ]
                                                + +Unauthorized + +
                                                Response Headers
                                                  Schema
                                                    extras object
                                                  + +Forbidden + +
                                                  Response Headers
                                                    Schema
                                                    diff --git a/api/stellar-disbursement-platform/resources/get-all-roles.api.mdx b/api/stellar-disbursement-platform/resources/get-all-roles.api.mdx index cfe92c55c..64d8eb046 100644 --- a/api/stellar-disbursement-platform/resources/get-all-roles.api.mdx +++ b/api/stellar-disbursement-platform/resources/get-all-roles.api.mdx @@ -5,7 +5,7 @@ description: "Returns all roles that exists in the SDP." sidebar_label: "Get All Roles" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}}},"example":{"roles":["developer","financial_controller","business","owner"]}},"examples":{"response":{"value":{"roles":["developer","financial_controller","business","owner"]}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Get All Roles","description":"Returns all roles that exists in the SDP.","tags":["Users"],"security":[{"oauth2":[]}],"method":"get","path":"/users/roles","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get All Roles","description":{"content":"Returns all roles that exists in the SDP.","type":"text/plain"},"url":{"path":["users","roles"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}}},"example":{"roles":["developer","financial_controller","business","owner"]}},"examples":{"response":{"value":{"roles":["developer","financial_controller","business","owner"]}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Get All Roles","description":"Returns all roles that exists in the SDP.","tags":["Users"],"security":[{"BearerAuth":[]}],"method":"get","path":"/users/roles","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get All Roles","description":{"content":"Returns all roles that exists in the SDP.","type":"text/plain"},"url":{"path":["users","roles"],"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":"","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 @@ -38,4 +38,8 @@ OK Unauthorized -
                                                    Response Headers
                                                      Schema
                                                      +
                                                      Response Headers
                                                        Schema
                                                          extras object
                                                        + +Forbidden + +
                                                        Response Headers
                                                          Schema
                                                          diff --git a/api/stellar-disbursement-platform/resources/get-all-users.api.mdx b/api/stellar-disbursement-platform/resources/get-all-users.api.mdx index 1fbac92fe..6c78c544e 100644 --- a/api/stellar-disbursement-platform/resources/get-all-users.api.mdx +++ b/api/stellar-disbursement-platform/resources/get-all-users.api.mdx @@ -5,7 +5,7 @@ description: "Returns all Users registered in the SDP." sidebar_label: "Get All Users" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"}},"required":["id","first_name","last_name","email","roles","is_active"]},"example":[{"id":"7a4c6555-1f73-49b3-a211-f95bd2b8ec90","first_name":"John","last_name":"Doe","email":"email@email.com","roles":["developer"],"is_active":true},{"id":"5f4df1dd-c84f-482a-84ad-541ffd46e75a","first_name":"Jane","last_name":"Doe","email":"email@email.com","roles":["financial_controller"],"is_active":false}]},"examples":{"response":{"value":[{"id":"7a4c6555-1f73-49b3-a211-f95bd2b8ec90","first_name":"John","last_name":"Doe","email":"email@email.com","roles":["developer"],"is_active":true},{"id":"5f4df1dd-c84f-482a-84ad-541ffd46e75a","first_name":"Jane","last_name":"Doe","email":"email@email.com","roles":["financial_controller"],"is_active":false}]}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Get All Users","description":"Returns all Users registered in the SDP.","tags":["Users"],"security":[{"oauth2":[]}],"method":"get","path":"/users","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get All Users","description":{"content":"Returns all Users registered in the SDP.","type":"text/plain"},"url":{"path":["users"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Returns a paginated list of User Details","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"}},"required":["id","first_name","last_name","email","roles","is_active"],"example":[{"id":"7a4c6555-1f73-49b3-a211-f95bd2b8ec90","first_name":"John","last_name":"Doe","email":"email@email.com","roles":["developer"],"is_active":true},{"id":"5f4df1dd-c84f-482a-84ad-541ffd46e75a","first_name":"Jane","last_name":"Doe","email":"email@email.com","roles":["financial_controller"],"is_active":false}]}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Get All Users","description":"Returns all Users registered in the SDP.","tags":["Users"],"security":[{"BearerAuth":[]}],"method":"get","path":"/users","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get All Users","description":{"content":"Returns all Users registered in the SDP.","type":"text/plain"},"url":{"path":["users"],"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":"","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 @@ -32,10 +32,14 @@ Returns all Users registered in the SDP.
                                                          -OK +Returns a paginated list of User Details -
                                                          Response Headers
                                                            Schema
                                                            • Array [
                                                            • ]
                                                            +
                                                            Schema
                                                            • Array [
                                                            • ]
                                                            Unauthorized -
                                                            Response Headers
                                                              Schema
                                                              +
                                                              Response Headers
                                                                Schema
                                                                  extras object
                                                                + +Forbidden + +
                                                                Response Headers
                                                                  Schema
                                                                  diff --git a/api/stellar-disbursement-platform/resources/get-organization-info.api.mdx b/api/stellar-disbursement-platform/resources/get-organization-info.api.mdx index 2cf91d37d..12295e2f8 100644 --- a/api/stellar-disbursement-platform/resources/get-organization-info.api.mdx +++ b/api/stellar-disbursement-platform/resources/get-organization-info.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Get Organization Info" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":"string"},"distribution_account_public_key":{"type":"string"},"timezone_utc_offset":{"type":"string"}},"example":{"name":"My Organization Name","logo_url":"https://localhost:8000/organization/logo?token=mytoken","distribution_account_public_key":"G...","timezone_utc_offset":"-03:00"}},"examples":{"response":{"value":{"name":"My Organization Name","logo_url":"https://localhost:8000/organization/logo?token=mytoken","distribution_account_public_key":"G...","timezone_utc_offset":"-03:00"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Get Organization Info","description":"","tags":["Profile"],"security":[{"oauth2":[]}],"method":"get","path":"/organization","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get Organization Info","description":{"content":"","type":"text/plain"},"url":{"path":["organization"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Returns organization details","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":"string"},"distribution_account_public_key":{"type":"string"},"timezone_utc_offset":{"type":"string"}},"example":{"name":"My Organization Name","logo_url":"https://localhost:8000/organization/logo?token=mytoken","distribution_account_public_key":"G...","timezone_utc_offset":"-03:00"}}}}},"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":"","tags":["Organization"],"security":[{"BearerAuth":[]}],"method":"get","path":"/organization","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get Organization Info","description":{"content":"","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":"","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 @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; @@ -28,10 +28,10 @@ import TabItem from "@theme/TabItem";
                                                                  -OK +Returns organization details -
                                                                  Response Headers
                                                                    Schema
                                                                    +
                                                                    Schema
                                                                    Unauthorized -
                                                                    Response Headers
                                                                      Schema
                                                                      +
                                                                      Response Headers
                                                                        Schema
                                                                          extras object
                                                                        diff --git a/api/stellar-disbursement-platform/resources/get-organization-logo.api.mdx b/api/stellar-disbursement-platform/resources/get-organization-logo.api.mdx new file mode 100644 index 000000000..d480d2964 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/get-organization-logo.api.mdx @@ -0,0 +1,37 @@ +--- +id: get-organization-logo +title: "Retrieve Organization Logo" +description: "Retrieves the logo of the organization" +sidebar_label: "Retrieve Organization Logo" +hide_title: true +hide_table_of_contents: true +api: {"description":"Retrieves the logo of the organization","operationId":"GetOrganizationLogo","tags":["Organization"],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"method":"get","path":"/organization/logo","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve Organization Logo","description":{"content":"Retrieves the logo of the organization","type":"text/plain"},"url":{"path":["organization","logo"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/octet-stream"}],"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Retrieve Organization Logo + + + +Retrieves the logo of the organization + +
                                                                        + +OK + +
                                                                        Schema
                                                                        • string binary
                                                                        diff --git a/api/stellar-disbursement-platform/resources/get-placeholder-info.api.mdx b/api/stellar-disbursement-platform/resources/get-placeholder-info.api.mdx deleted file mode 100644 index e84375d70..000000000 --- a/api/stellar-disbursement-platform/resources/get-placeholder-info.api.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: get-placeholder-info -title: "Get placeholder Info" -description: "This endpoint will provide the webpage with all the info that can be customizable depending on the wallet used. Things like wallet name, icon and links to the store will be provided by this endpoint." -sidebar_label: "Get placeholder Info" -hide_title: true -hide_table_of_contents: true -api: {"responses":{"200":{"description":"Token is valid and the webpage will be loaded normally.","headers":{},"content":{"text/html":{"examples":{"response":{"value":"{\n \"wallet_name\": \"Vibrant\",\n \"home_domain\": \"https://vibrantapp.com/\",\n \"icon_url\": \"https://assets-global.website-files.com/5f96d344ab2f71b1d1961172/6102b8d95dca76b415a0f9bc_Logo.png\",\n \"help_url\": \"https://support.vibrantapp.com/\",\n \"apple_store_url\": \"https://apps.apple.com/us/app/id1514223107\",\n \"google_store_url\": \"https://play.google.com/store/apps/details?id=io.sunship.app\",\n \"pii_name\": \"Date of Birth\",\n \"pii_type\": \"date\"\n}\n"}}}}},"401":{"description":"The token is invalid or expired. If it's just expired, an SMS will be sent to the user phone number with the new token.","headers":{},"content":{"text/html":{"examples":{"response":{"value":"{\n \"error\": \"Unauthorized.\",\n \"extras\": {\n \"code\": \"401_1\",\n \"details\": \"The token is invalid or expired.\"\n }\n} \n"}}}}}},"operationId":"Get placeholder Info","description":"This endpoint will provide the webpage with all the info that can be customizable depending on the wallet used. Things like wallet name, icon and links to the store will be provided by this endpoint.","tags":["Registration"],"parameters":[{"name":"token","in":"path","description":"Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","required":true,"schema":{"type":"string"}}],"method":"get","path":"/registration/receiver/{token}/wallet_info","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get placeholder Info","description":{"content":"This endpoint will provide the webpage with all the info that can be customizable depending on the wallet used. Things like wallet name, icon and links to the store will be provided by this endpoint.","type":"text/plain"},"url":{"path":["registration","receiver",":token","wallet_info"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","type":"text/plain"},"type":"any","value":"","key":"token"}]},"header":[{"key":"Accept","value":"text/html"}],"method":"GET"}} -sidebar_class_name: "get api-method" -info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api -custom_edit_url: null ---- - -import { SepBadge } from "@site/src/components/SepBadge"; - - - -import ApiTabs from "@theme/ApiTabs"; -import MimeTabs from "@theme/MimeTabs"; -import ParamsItem from "@theme/ParamsItem"; -import ResponseSamples from "@theme/ResponseSamples"; -import SchemaItem from "@theme/SchemaItem"; -import SchemaTabs from "@theme/SchemaTabs"; -import DiscriminatorTabs from "@theme/DiscriminatorTabs"; -import TabItem from "@theme/TabItem"; - -## Get placeholder Info - - - -This endpoint will provide the webpage with all the info that can be customizable depending on the wallet used. Things like wallet name, icon and links to the store will be provided by this endpoint. - -
                                                                        Path Parameters
                                                                        - -Token is valid and the webpage will be loaded normally. - -
                                                                        Response Headers
                                                                          Schema
                                                                            any
                                                                          - -The token is invalid or expired. If it's just expired, an SMS will be sent to the user phone number with the new token. - -
                                                                          Response Headers
                                                                            Schema
                                                                              any
                                                                            diff --git a/api/stellar-disbursement-platform/resources/get-profile.api.mdx b/api/stellar-disbursement-platform/resources/get-profile.api.mdx index 7a0c2cd89..c0c4a85d0 100644 --- a/api/stellar-disbursement-platform/resources/get-profile.api.mdx +++ b/api/stellar-disbursement-platform/resources/get-profile.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Get Profile" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"organization_name":{"type":"string"}},"example":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","roles":["developer"],"organization_name":"My Organization Name"}},"examples":{"response":{"value":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","roles":["developer"],"organization_name":"My Organization Name"}}}}}}},"operationId":"Get Profile","description":"","tags":["Profile"],"security":[{"oauth2":[]}],"method":"get","path":"/profile","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get Profile","description":{"content":"","type":"text/plain"},"url":{"path":["profile"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Returns user profile","content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"organization_name":{"type":"string"}},"example":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","roles":["developer"],"organization_name":"My Organization Name"}}}}}},"operationId":"Get Profile","description":"","tags":["Profile"],"security":[{"BearerAuth":[]}],"method":"get","path":"/profile","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Get Profile","description":{"content":"","type":"text/plain"},"url":{"path":["profile"],"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":"","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 @@ -28,6 +28,6 @@ import TabItem from "@theme/TabItem";
                                                                            -OK +Returns user profile -
                                                                            Response Headers
                                                                              Schema
                                                                              +
                                                                              Schema
                                                                              diff --git a/api/stellar-disbursement-platform/resources/get-sep-10-challenge-transaction.api.mdx b/api/stellar-disbursement-platform/resources/get-sep-10-challenge-transaction.api.mdx index aed997c52..865499537 100644 --- a/api/stellar-disbursement-platform/resources/get-sep-10-challenge-transaction.api.mdx +++ b/api/stellar-disbursement-platform/resources/get-sep-10-challenge-transaction.api.mdx @@ -5,7 +5,7 @@ description: "The SEP-10 endpoint where the wallet will get the challenge transa sidebar_label: "GET SEP-10 Challenge Transaction" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"string"},"network_passphrase":{"type":"string"}},"example":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAfheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3Ag==","network_passphrase":"Test SDF Network ; September 2015"}},"examples":{"response":{"value":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAfheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3Ag==","network_passphrase":"Test SDF Network ; September 2015"}}}}}},"400":{"description":"If some information was missing or invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"account":{"type":"string"}}}},"example":{"error":"Bad request.","extras":{"account":"account cannot be empty"}}},"examples":{"response":{"value":{"error":"Bad request.","extras":{"account":"account cannot be empty"}}}}}}}},"operationId":"GET SEP-10 Challenge Transaction","description":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","tags":["Registration"],"parameters":[{"name":"account","in":"query","description":"The Client Account, which can be a stellar account (G...) or muxed account (M...) that the Client wishes to authenticate with the Server..","required":true,"schema":{"type":"string"}},{"name":"memo","in":"query","description":"The memo to attach to the challenge transaction. Only permitted if a Stellar account (G...) is used. The memo must be of type id. Other memo types are not supported.","required":false,"schema":{"type":"string"}},{"name":"client_domain","in":"query","description":"a Client Domain. Need to be supplied by all Clients/Wallets.","required":true,"schema":{"type":"string"}}],"method":"get","path":"/WEB_AUTH_ENDPOINT","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"GET SEP-10 Challenge Transaction","description":{"content":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","type":"text/plain"},"url":{"path":["WEB_AUTH_ENDPOINT"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The Client Account, which can be a stellar account (G...) or muxed account (M...) that the Client wishes to authenticate with the Server..","type":"text/plain"},"key":"account","value":""},{"disabled":false,"description":{"content":"The memo to attach to the challenge transaction. Only permitted if a Stellar account (G...) is used. The memo must be of type id. Other memo types are not supported.","type":"text/plain"},"key":"memo","value":""},{"disabled":false,"description":{"content":"(Required) a Client Domain. Need to be supplied by all Clients/Wallets.","type":"text/plain"},"key":"client_domain","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"string"},"network_passphrase":{"type":"string"}},"example":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAfheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3Ag==","network_passphrase":"Test SDF Network ; September 2015"}},"examples":{"response":{"value":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAfheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3Ag==","network_passphrase":"Test SDF Network ; September 2015"}}}}}},"400":{"description":"If some information was missing or invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"account":{"type":"string"}}}},"example":{"error":"Bad request.","extras":{"account":"account cannot be empty"}}},"examples":{"response":{"value":{"error":"Bad request.","extras":{"account":"account cannot be empty"}}}}}}}},"operationId":"GET SEP-10 Challenge Transaction","description":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","tags":["Anchor"],"parameters":[{"name":"account","in":"query","description":"The Client Account, which can be a stellar account (G...) or muxed account (M...) that the Client wishes to authenticate with the Server..","required":true,"schema":{"type":"string"}},{"name":"memo","in":"query","description":"The memo to attach to the challenge transaction. Only permitted if a Stellar account (G...) is used. The memo must be of type id. Other memo types are not supported.","required":false,"schema":{"type":"string"}},{"name":"client_domain","in":"query","description":"a Client Domain. Need to be supplied by all Clients/Wallets.","required":true,"schema":{"type":"string"}}],"method":"get","path":"/WEB_AUTH_ENDPOINT","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"GET SEP-10 Challenge Transaction","description":{"content":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","type":"text/plain"},"url":{"path":["WEB_AUTH_ENDPOINT"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The Client Account, which can be a stellar account (G...) or muxed account (M...) that the Client wishes to authenticate with the Server..","type":"text/plain"},"key":"account","value":""},{"disabled":false,"description":{"content":"The memo to attach to the challenge transaction. Only permitted if a Stellar account (G...) is used. The memo must be of type id. Other memo types are not supported.","type":"text/plain"},"key":"memo","value":""},{"disabled":false,"description":{"content":"(Required) a Client Domain. Need to be supplied by all Clients/Wallets.","type":"text/plain"},"key":"client_domain","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; diff --git a/api/stellar-disbursement-platform/resources/index.mdx b/api/stellar-disbursement-platform/resources/index.mdx index 9e2f5512b..46bfdd8b6 100644 --- a/api/stellar-disbursement-platform/resources/index.mdx +++ b/api/stellar-disbursement-platform/resources/index.mdx @@ -11,8 +11,10 @@ Data on the Stellar Disbursement Platform is organized according to resources. E | | | | --------------------------------------------------- | --- | +| [Anchor](./anchor/index.mdx) | | | [Auth](./auth/index.mdx) | | | [Disbursements](./disbursements/index.mdx) | | +| [Organization](./organization/index.mdx) | | | [Payments](./payments/index.mdx) | | | [Profiles](./profile/index.mdx) | | | [Receivers](./receivers/index.mdx) | | diff --git a/api/stellar-disbursement-platform/resources/list-all-disbursement-receivers.api.mdx b/api/stellar-disbursement-platform/resources/list-all-disbursement-receivers.api.mdx index b51a7cc3b..e6b70019d 100644 --- a/api/stellar-disbursement-platform/resources/list-all-disbursement-receivers.api.mdx +++ b/api/stellar-disbursement-platform/resources/list-all-disbursement-receivers.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "List All Disbursement Receivers" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"prev":{"type":"string"},"next":{"type":"string"},"pages":{"type":"number"},"total":{"type":"number"}}},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"receiver_wallet":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"stellar_transaction_id":{"type":"string"},"stellar_operation_id":{"type":"string"},"status":{"type":"string"},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"}}},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}},"example":{"pagination":{"prev":"/disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=1","next":"/disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=3","pages":3,"total":44},"data":[{"id":"5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd","phone_number":"+380507770770","external_id":"1357","receiver_wallet":{"id":"87dae0ca-0819-4361-9af4-1760a1463dba","receiver":{"id":"5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd"},"wallet":{"id":"402bf417-11bd-4903-b310-0ce5da11e029","name":"Vibrant"},"status":"DRAFT","created_at":"2023-04-17T22:53:49.827645Z","updated_at":"2023-04-17T22:53:49.827645Z"},"payment":{"id":"320828bb-3987-4bd4-aa07-037743183af0","amount":"91.8600000","stellar_transaction_id":"","stellar_operation_id":"","status":"DRAFT","asset":{"id":"ef271bfe-1b56-4f55-8579-ae194889e745","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"},"created_at":"2023-04-18T16:24:16.710071Z","updated_at":"2023-04-18T16:24:16.710071Z"},"created_at":"2023-04-17T22:53:49.827645Z","updated_at":"2023-04-17T22:53:49.827645Z"}]}},"examples":{"response":{"value":{"pagination":{"prev":"/disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=1","next":"/disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=3","pages":3,"total":44},"data":[{"id":"5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd","phone_number":"+380507770770","external_id":"1357","receiver_wallet":{"id":"87dae0ca-0819-4361-9af4-1760a1463dba","receiver":{"id":"5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd"},"wallet":{"id":"402bf417-11bd-4903-b310-0ce5da11e029","name":"Vibrant"},"status":"DRAFT","created_at":"2023-04-17T22:53:49.827645Z","updated_at":"2023-04-17T22:53:49.827645Z"},"payment":{"id":"320828bb-3987-4bd4-aa07-037743183af0","amount":"91.8600000","stellar_transaction_id":"","stellar_operation_id":"","status":"DRAFT","asset":{"id":"ef271bfe-1b56-4f55-8579-ae194889e745","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"},"created_at":"2023-04-18T16:24:16.710071Z","updated_at":"2023-04-18T16:24:16.710071Z"},"created_at":"2023-04-17T22:53:49.827645Z","updated_at":"2023-04-17T22:53:49.827645Z"}]}}}}}},"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"}}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"List All Disbursement Receivers","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the Disbursement","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"The page number to fetch.","required":false,"schema":{"type":"number"}},{"name":"page_limit","in":"query","description":"The number of records to return per page.","required":false,"schema":{"type":"number"}}],"security":[{"oauth2":[]}],"method":"get","path":"/disbursements/{id}/receivers","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Disbursement Receivers","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","receivers"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page number to fetch.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"The number of records to return per page.","type":"text/plain"},"key":"page_limit","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the Disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"A list of Disbursement Receivers","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"next":{"type":"string"},"prev":{"type":"string"},"pages":{"type":"integer"},"total":{"type":"integer"}}},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"receiver_wallet":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}},"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"stellar_transaction_id":{"type":"string"},"stellar_operation_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]},"status_message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}}},"disbursement":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"verification_field":{"type":"string","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"timestamp":{"type":"string","format":"date-time"}}}},"file_name":{"type":"string"},"file_content":{"type":"string","format":"byte"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"receiver_wallet":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"List All Disbursement Receivers","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the Disbursement","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"The page number to fetch.","required":false,"schema":{"type":"number"}},{"name":"page_limit","in":"query","description":"The number of records to return per page.","required":false,"schema":{"type":"number"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/disbursements/{id}/receivers","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Disbursement Receivers","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","receivers"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page number to fetch.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"The number of records to return per page.","type":"text/plain"},"key":"page_limit","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the Disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,13 +28,17 @@ import TabItem from "@theme/TabItem";
                                                                              Path Parameters
                                                                              Query Parameters
                                                                              -OK +A list of Disbursement Receivers -
                                                                              Response Headers
                                                                                Schema
                                                                                  pagination object
                                                                                  data object[]
                                                                                • Array [
                                                                                • receiver_wallet object
                                                                                  receiver object
                                                                                  wallet object
                                                                                  payment object
                                                                                  asset object
                                                                                • ]
                                                                                +
                                                                                Schema
                                                                                  pagination object
                                                                                  data object[]
                                                                                • Array [
                                                                                • receiver_wallet object
                                                                                  receiver object
                                                                                  wallet object
                                                                                  received_amounts object[]
                                                                                • Array [
                                                                                • ]
                                                                                • status_history object[]
                                                                                • Array [
                                                                                • ]
                                                                                • payment object
                                                                                  status_history object[]
                                                                                • Array [
                                                                                • ]
                                                                                • disbursement object
                                                                                  country object
                                                                                  wallet object
                                                                                  asset object
                                                                                  status_history object[]
                                                                                • Array [
                                                                                • ]
                                                                                • asset object
                                                                                  receiver_wallet object
                                                                                  receiver object
                                                                                  wallet object
                                                                                  received_amounts object[]
                                                                                • Array [
                                                                                • ]
                                                                                • status_history object[]
                                                                                • Array [
                                                                                • ]
                                                                                • ]
                                                                                Unauthorized -
                                                                                Response Headers
                                                                                  Schema
                                                                                    extras object
                                                                                  +
                                                                                  Response Headers
                                                                                    Schema
                                                                                      extras object
                                                                                    + +Forbidden + +
                                                                                    Response Headers
                                                                                      Schema
                                                                                      Not Found diff --git a/api/stellar-disbursement-platform/resources/list-all-disbursements.api.mdx b/api/stellar-disbursement-platform/resources/list-all-disbursements.api.mdx index ef21a7b7d..0ec2f8937 100644 --- a/api/stellar-disbursement-platform/resources/list-all-disbursements.api.mdx +++ b/api/stellar-disbursement-platform/resources/list-all-disbursements.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "List All Disbursements" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"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":"List All Disbursements","description":"","tags":["Disbursements"],"parameters":[{"name":"page","in":"query","description":"The page requested.","required":false,"schema":{"type":"number","default":1}},{"name":"page_limit","in":"query","description":"Define how many results will be returned in the response.","required":false,"schema":{"type":"number","default":20}},{"name":"q","in":"query","description":"a search term used to query through the disbursements names.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"exact match on the status of the disbursement.","required":false,"example":"DRAFT","schema":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]}},{"name":"created_at_after","in":"query","description":"only return disbursements that are created after this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"created_at_before","in":"query","description":"only return disbursements that are created before this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"sort","in":"query","description":"field used to sort disbursements","required":false,"schema":{"type":"string","enum":["name","created_at"],"default":"created_at"}},{"name":"direction","in":"query","description":"direction for sorting disbursements.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"security":[{"oauth2":[]}],"method":"get","path":"/disbursements","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Disbursements","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page requested.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"Define how many results will be returned in the response.","type":"text/plain"},"key":"page_limit","value":""},{"disabled":false,"description":{"content":"a search term used to query through the disbursements names.","type":"text/plain"},"key":"q","value":""},{"disabled":false,"description":{"content":"exact match on the status of the disbursement.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"only return disbursements that are created after this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_after","value":""},{"disabled":false,"description":{"content":"only return disbursements that are created before this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_before","value":""},{"disabled":false,"description":{"content":"field used to sort disbursements","type":"text/plain"},"key":"sort","value":""},{"disabled":false,"description":{"content":"direction for sorting disbursements.","type":"text/plain"},"key":"direction","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"A list of Disbursement details","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"next":{"type":"string"},"prev":{"type":"string"},"pages":{"type":"integer"},"total":{"type":"integer"}}},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"verification_field":{"type":"string","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"timestamp":{"type":"string","format":"date-time"}}}},"file_name":{"type":"string"},"file_content":{"type":"string","format":"byte"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"List All Disbursements","description":"","tags":["Disbursements"],"parameters":[{"name":"page","in":"query","description":"The page requested.","required":false,"schema":{"type":"number","default":1}},{"name":"page_limit","in":"query","description":"Define how many results will be returned in the response.","required":false,"schema":{"type":"number","default":20}},{"name":"q","in":"query","description":"a search term used to query through the disbursements names.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"exact match on the status of the disbursement.","required":false,"example":"DRAFT","schema":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]}},{"name":"created_at_after","in":"query","description":"only return disbursements that are created after this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"created_at_before","in":"query","description":"only return disbursements that are created before this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"sort","in":"query","description":"field used to sort disbursements","required":false,"schema":{"type":"string","enum":["name","created_at"],"default":"created_at"}},{"name":"direction","in":"query","description":"direction for sorting disbursements.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/disbursements","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Disbursements","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page requested.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"Define how many results will be returned in the response.","type":"text/plain"},"key":"page_limit","value":""},{"disabled":false,"description":{"content":"a search term used to query through the disbursements names.","type":"text/plain"},"key":"q","value":""},{"disabled":false,"description":{"content":"exact match on the status of the disbursement.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"only return disbursements that are created after this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_after","value":""},{"disabled":false,"description":{"content":"only return disbursements that are created before this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_before","value":""},{"disabled":false,"description":{"content":"field used to sort disbursements","type":"text/plain"},"key":"sort","value":""},{"disabled":false,"description":{"content":"direction for sorting disbursements.","type":"text/plain"},"key":"direction","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,10 +28,14 @@ import TabItem from "@theme/TabItem";
                                                                                      Query Parameters
                                                                                      -OK +A list of Disbursement details -
                                                                                      Response Headers
                                                                                        +
                                                                                        Schema
                                                                                          pagination object
                                                                                          data object[]
                                                                                        • Array [
                                                                                        • country object
                                                                                          wallet object
                                                                                          asset object
                                                                                          status_history object[]
                                                                                        • Array [
                                                                                        • ]
                                                                                        • ]
                                                                                        Unauthorized -
                                                                                        Response Headers
                                                                                          Schema
                                                                                            extras object
                                                                                          +
                                                                                          Response Headers
                                                                                            Schema
                                                                                              extras object
                                                                                            + +Forbidden + +
                                                                                            Response Headers
                                                                                              Schema
                                                                                              diff --git a/api/stellar-disbursement-platform/resources/list-all-payments.api.mdx b/api/stellar-disbursement-platform/resources/list-all-payments.api.mdx index 752db3c87..33203a043 100644 --- a/api/stellar-disbursement-platform/resources/list-all-payments.api.mdx +++ b/api/stellar-disbursement-platform/resources/list-all-payments.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "List All Payments" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"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":"List All Payments","description":"","tags":["Payments"],"parameters":[{"name":"page","in":"query","description":"The page requested.","required":false,"schema":{"type":"number","default":1}},{"name":"page_limit","in":"query","description":"Define how many results will be returned in the response.","required":false,"schema":{"type":"number","default":20}},{"name":"status","in":"query","description":"exact match on the status of the payment.","required":false,"example":"DRAFT","schema":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]}},{"name":"receiver_id","in":"query","description":"uuid that represents a receiver in the database","required":false,"example":"b6b667ad-6cc2-46cf-9be7-561daace7d48","schema":{"type":"string"}},{"name":"created_at_after","in":"query","description":"only return payments that are created after this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"created_at_before","in":"query","description":"only return payments that are created before this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"sort","in":"query","description":"field used to sort payments","required":false,"schema":{"type":"string","enum":["created_at"],"default":"created_at"}},{"name":"direction","in":"query","description":"direction for sorting payments.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"security":[{"oauth2":[]}],"method":"get","path":"/payments","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Payments","description":{"content":"","type":"text/plain"},"url":{"path":["payments"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page requested.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"Define how many results will be returned in the response.","type":"text/plain"},"key":"page_limit","value":""},{"disabled":false,"description":{"content":"exact match on the status of the payment.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"uuid that represents a receiver in the database","type":"text/plain"},"key":"receiver_id","value":""},{"disabled":false,"description":{"content":"only return payments that are created after this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_after","value":""},{"disabled":false,"description":{"content":"only return payments that are created before this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_before","value":""},{"disabled":false,"description":{"content":"field used to sort payments","type":"text/plain"},"key":"sort","value":""},{"disabled":false,"description":{"content":"direction for sorting payments.","type":"text/plain"},"key":"direction","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"A paginated list of payments","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"next":{"type":"string"},"prev":{"type":"string"},"pages":{"type":"integer"},"total":{"type":"integer"}}},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"stellar_transaction_id":{"type":"string"},"stellar_operation_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]},"status_message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}}},"disbursement":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"verification_field":{"type":"string","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"timestamp":{"type":"string","format":"date-time"}}}},"file_name":{"type":"string"},"file_content":{"type":"string","format":"byte"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"receiver_wallet":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"List All Payments","description":"","tags":["Payments"],"parameters":[{"name":"page","in":"query","description":"The page requested.","required":false,"schema":{"type":"number","default":1}},{"name":"page_limit","in":"query","description":"Define how many results will be returned in the response.","required":false,"schema":{"type":"number","default":20}},{"name":"status","in":"query","description":"exact match on the status of the payment.","required":false,"example":"DRAFT","schema":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]}},{"name":"receiver_id","in":"query","description":"uuid that represents a receiver in the database","required":false,"example":"b6b667ad-6cc2-46cf-9be7-561daace7d48","schema":{"type":"string"}},{"name":"created_at_after","in":"query","description":"only return payments that are created after this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"created_at_before","in":"query","description":"only return payments that are created before this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"sort","in":"query","description":"field used to sort payments","required":false,"schema":{"type":"string","enum":["created_at"],"default":"created_at"}},{"name":"direction","in":"query","description":"direction for sorting payments.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/payments","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Payments","description":{"content":"","type":"text/plain"},"url":{"path":["payments"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page requested.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"Define how many results will be returned in the response.","type":"text/plain"},"key":"page_limit","value":""},{"disabled":false,"description":{"content":"exact match on the status of the payment.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"uuid that represents a receiver in the database","type":"text/plain"},"key":"receiver_id","value":""},{"disabled":false,"description":{"content":"only return payments that are created after this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_after","value":""},{"disabled":false,"description":{"content":"only return payments that are created before this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_before","value":""},{"disabled":false,"description":{"content":"field used to sort payments","type":"text/plain"},"key":"sort","value":""},{"disabled":false,"description":{"content":"direction for sorting payments.","type":"text/plain"},"key":"direction","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,10 +28,14 @@ import TabItem from "@theme/TabItem";
                                                                                              Query Parameters
                                                                                              -OK +A paginated list of payments -
                                                                                              Response Headers
                                                                                                +
                                                                                                Schema
                                                                                                  pagination object
                                                                                                  data object[]
                                                                                                • Array [
                                                                                                • status_history object[]
                                                                                                • Array [
                                                                                                • ]
                                                                                                • disbursement object
                                                                                                  country object
                                                                                                  wallet object
                                                                                                  asset object
                                                                                                  status_history object[]
                                                                                                • Array [
                                                                                                • ]
                                                                                                • asset object
                                                                                                  receiver_wallet object
                                                                                                  receiver object
                                                                                                  wallet object
                                                                                                  received_amounts object[]
                                                                                                • Array [
                                                                                                • ]
                                                                                                • status_history object[]
                                                                                                • Array [
                                                                                                • ]
                                                                                                • ]
                                                                                                Unauthorized -
                                                                                                Response Headers
                                                                                                  Schema
                                                                                                    extras object
                                                                                                  +
                                                                                                  Response Headers
                                                                                                    Schema
                                                                                                      extras object
                                                                                                    + +Forbidden + +
                                                                                                    Response Headers
                                                                                                      Schema
                                                                                                      diff --git a/api/stellar-disbursement-platform/resources/list-all-receivers.api.mdx b/api/stellar-disbursement-platform/resources/list-all-receivers.api.mdx index 76fbf66b2..ff7ca2696 100644 --- a/api/stellar-disbursement-platform/resources/list-all-receivers.api.mdx +++ b/api/stellar-disbursement-platform/resources/list-all-receivers.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "List All Receivers" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"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":"List All Receivers","description":"","tags":["Receivers"],"parameters":[{"name":"page","in":"query","description":"The page requested.","required":false,"schema":{"type":"number","default":1}},{"name":"page_limit","in":"query","description":"Define how many results will be returned in the response.","required":false,"schema":{"type":"number","default":20}},{"name":"q","in":"query","description":"a search term used to query through the receivers phone_number, email and ID.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"exact match on the status of the receiver wallet.","required":false,"example":"DRAFT","schema":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]}},{"name":"created_at_after","in":"query","description":"only return receivers that are created after this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"created_at_before","in":"query","description":"only return receivers that are created before this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"sort","in":"query","description":"field used to sort receivers","required":false,"schema":{"type":"string","enum":["created_at"],"default":"created_at"}},{"name":"direction","in":"query","description":"direction for sorting receivers.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"security":[{"oauth2":[]}],"method":"get","path":"/receivers","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Receivers","description":{"content":"","type":"text/plain"},"url":{"path":["receivers"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page requested.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"Define how many results will be returned in the response.","type":"text/plain"},"key":"page_limit","value":""},{"disabled":false,"description":{"content":"a search term used to query through the receivers phone_number, email and ID.","type":"text/plain"},"key":"q","value":""},{"disabled":false,"description":{"content":"exact match on the status of the receiver wallet.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"only return receivers that are created after this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_after","value":""},{"disabled":false,"description":{"content":"only return receivers that are created before this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_before","value":""},{"disabled":false,"description":{"content":"field used to sort receivers","type":"text/plain"},"key":"sort","value":""},{"disabled":false,"description":{"content":"direction for sorting receivers.","type":"text/plain"},"key":"direction","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"A paginated list of Receiver details","content":{"application/json":{"schema":{"type":"object","properties":{"pagination":{"type":"object","properties":{"next":{"type":"string"},"prev":{"type":"string"},"pages":{"type":"integer"},"total":{"type":"integer"}}},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"total_payments":{"type":"string"},"successful_payments":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"registered_wallets":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}}}}}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"List All Receivers","description":"","tags":["Receivers"],"parameters":[{"name":"page","in":"query","description":"The page requested.","required":false,"schema":{"type":"number","default":1}},{"name":"page_limit","in":"query","description":"Define how many results will be returned in the response.","required":false,"schema":{"type":"number","default":20}},{"name":"q","in":"query","description":"a search term used to query through the receivers phone_number, email and ID.","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","description":"exact match on the status of the receiver wallet.","required":false,"example":"DRAFT","schema":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]}},{"name":"created_at_after","in":"query","description":"only return receivers that are created after this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"created_at_before","in":"query","description":"only return receivers that are created before this date. Format: YYYY-MM-DD","required":false,"example":"2006-01-02","schema":{"type":"string"}},{"name":"sort","in":"query","description":"field used to sort receivers","required":false,"schema":{"type":"string","enum":["created_at"],"default":"created_at"}},{"name":"direction","in":"query","description":"direction for sorting receivers.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"asc"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/receivers","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"List All Receivers","description":{"content":"","type":"text/plain"},"url":{"path":["receivers"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The page requested.","type":"text/plain"},"key":"page","value":""},{"disabled":false,"description":{"content":"Define how many results will be returned in the response.","type":"text/plain"},"key":"page_limit","value":""},{"disabled":false,"description":{"content":"a search term used to query through the receivers phone_number, email and ID.","type":"text/plain"},"key":"q","value":""},{"disabled":false,"description":{"content":"exact match on the status of the receiver wallet.","type":"text/plain"},"key":"status","value":""},{"disabled":false,"description":{"content":"only return receivers that are created after this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_after","value":""},{"disabled":false,"description":{"content":"only return receivers that are created before this date. Format: YYYY-MM-DD","type":"text/plain"},"key":"created_at_before","value":""},{"disabled":false,"description":{"content":"field used to sort receivers","type":"text/plain"},"key":"sort","value":""},{"disabled":false,"description":{"content":"direction for sorting receivers.","type":"text/plain"},"key":"direction","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,10 +28,14 @@ import TabItem from "@theme/TabItem";
                                                                                                      Query Parameters
                                                                                                      -OK +A paginated list of Receiver details -
                                                                                                      Response Headers
                                                                                                        +
                                                                                                        Schema
                                                                                                          pagination object
                                                                                                          data object[]
                                                                                                        • Array [
                                                                                                        • received_amounts object[]
                                                                                                        • Array [
                                                                                                        • ]
                                                                                                        • wallets object[]
                                                                                                        • Array [
                                                                                                        • receiver object
                                                                                                          wallet object
                                                                                                          received_amounts object[]
                                                                                                        • Array [
                                                                                                        • ]
                                                                                                        • status_history object[]
                                                                                                        • Array [
                                                                                                        • ]
                                                                                                        • ]
                                                                                                        • ]
                                                                                                        Unauthorized -
                                                                                                        Response Headers
                                                                                                          Schema
                                                                                                            extras object
                                                                                                          +
                                                                                                          Response Headers
                                                                                                            Schema
                                                                                                              extras object
                                                                                                            + +Forbidden + +
                                                                                                            Response Headers
                                                                                                              Schema
                                                                                                              diff --git a/api/stellar-disbursement-platform/resources/load-the-pii-confirmation-webpage.api.mdx b/api/stellar-disbursement-platform/resources/load-the-pii-confirmation-webpage.api.mdx index df8ed5634..99ba8f580 100644 --- a/api/stellar-disbursement-platform/resources/load-the-pii-confirmation-webpage.api.mdx +++ b/api/stellar-disbursement-platform/resources/load-the-pii-confirmation-webpage.api.mdx @@ -1,11 +1,11 @@ --- id: load-the-pii-confirmation-webpage title: "Load the PII Confirmation Webpage" -description: "This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet (Vibrant) through a deep link." +description: "This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet through a deep link. Requires a valid SEP-24 token in the request." sidebar_label: "Load the PII Confirmation Webpage" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"Token is valid and the webpage will be loaded normally.","headers":{},"content":{"text/html":{"examples":{"response":{"value":"To be implementedThe website html will show up here.\n"}}}}},"401":{"description":"The token is invalid or expired. If it's just expired, an SMS will be sent to the user phone number with the new token.","headers":{},"content":{"text/html":{"examples":{"response":{"value":"To be implementedThe provided token is invalid or expired. If it is expired, a new token will be sent to the user phone number ⏳.\n"}}}}}},"operationId":"Load the PII Confirmation Webpage","description":"This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet (Vibrant) through a deep link.","tags":["Registration"],"parameters":[{"name":"token","in":"path","description":"Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","required":true,"schema":{"type":"string"}}],"method":"get","path":"/registration/receiver/{token}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Load the PII Confirmation Webpage","description":{"content":"This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet (Vibrant) through a deep link.","type":"text/plain"},"url":{"path":["registration","receiver",":token"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","type":"text/plain"},"type":"any","value":"","key":"token"}]},"header":[{"key":"Accept","value":"text/html"}],"method":"GET"}} +api: {"operationId":"Load the PII Confirmation Webpage","description":"This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet through a deep link. Requires a valid SEP-24 token in the request.","tags":["Wallet-Registration"],"parameters":[{"name":"token","in":"query","description":"The SEP-24 token used for authentication","required":true,"schema":{"type":"string"}},{"name":"transaction_id","in":"query","description":"The transaction id associated with the SEP-24 token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Token is valid and the webpage will be loaded normally.","content":{"text/html":{"schema":{"type":"string","description":"HTML page content"}}}},"400":{"description":"Bad Request","content":{"text/html":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"text/html":{"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"}}}},"application/json":{"examples":{"response":{"value":{"error":"Not authorized","extras":{"status":401,"message":"Not authorized"}}}}}}}},"method":"get","path":"/wallet-registration/start","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Load the PII Confirmation Webpage","description":{"content":"This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet through a deep link. Requires a valid SEP-24 token in the request.","type":"text/plain"},"url":{"path":["wallet-registration","start"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The SEP-24 token used for authentication","type":"text/plain"},"key":"token","value":""},{"disabled":false,"description":{"content":"(Required) The transaction id associated with the SEP-24 token","type":"text/plain"},"key":"transaction_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"text/html"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; @@ -28,14 +28,22 @@ import TabItem from "@theme/TabItem"; -This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet (Vibrant) through a deep link. +This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet through a deep link. Requires a valid SEP-24 token in the request. -
                                                                                                              Path Parameters
                                                                                                              +
                                                                                                              Query Parameters
                                                                                                              Token is valid and the webpage will be loaded normally. -
                                                                                                              Response Headers
                                                                                                                Schema
                                                                                                                  any
                                                                                                                To be implementedThe website html will show up here.\n"} language={"shell"}>
                                                                                                                +
                                                                                                                Schema
                                                                                                                • string
                                                                                                                  -The token is invalid or expired. If it's just expired, an SMS will be sent to the user phone number with the new token. +HTML page content -
                                                                                                                  Response Headers
                                                                                                                    Schema
                                                                                                                      any
                                                                                                                    To be implementedThe provided token is invalid or expired. If it is expired, a new token will be sent to the user phone number ⏳.\n"} language={"shell"}>
                                                                                                                    +
                                                                                                                  + +Bad Request + +
                                                                                                                  Schema
                                                                                                                  + +Unauthorized + +
                                                                                                                  Response Headers
                                                                                                                    Schema
                                                                                                                      extras object
                                                                                                                    Schema
                                                                                                                      any
                                                                                                                    diff --git a/api/stellar-disbursement-platform/resources/log-in.api.mdx b/api/stellar-disbursement-platform/resources/log-in.api.mdx index ec69125be..a439bfb9a 100644 --- a/api/stellar-disbursement-platform/resources/log-in.api.mdx +++ b/api/stellar-disbursement-platform/resources/log-in.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Log In" hide_title: true hide_table_of_contents: true -api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"example":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}},"examples":{"response":{"value":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Invalid credentials","extras":{"status":400,"message":"Invalid username or password"}}},"examples":{"response":{"value":{"error":"Invalid credentials","extras":{"status":400,"message":"Invalid username or password"}}}}}}}},"operationId":"Log In","description":"","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"example":{"username":"reece","password":"mysecret"}}}}},"method":"post","path":"/login","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"username":"reece","password":"mysecret"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Log In","description":{"content":"","type":"text/plain"},"url":{"path":["login"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"example":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}},"examples":{"response":{"value":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Invalid credentials","extras":{"status":400,"message":"Invalid username or password"}}},"examples":{"response":{"value":{"error":"Invalid credentials","extras":{"status":400,"message":"Invalid username or password"}}}}}}}},"operationId":"Log In","description":"","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"example":{"username":"johndoe@mail.com","password":"mysecret"}}}}},"method":"post","path":"/login","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"username":"johndoe@mail.com","password":"mysecret"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Log In","description":{"content":"","type":"text/plain"},"url":{"path":["login"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null diff --git a/api/stellar-disbursement-platform/resources/organization/index.mdx b/api/stellar-disbursement-platform/resources/organization/index.mdx new file mode 100644 index 000000000..d8d7a6456 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/organization/index.mdx @@ -0,0 +1,23 @@ +--- +title: Organization +order: 4 +--- + +import {EndpointsTable} from "@site/src/components/EndpointsTable"; + +Profiles endpoints manage the process of getting and updating profile information, including password reset. + +Organizations and individual SDP users both have profiles. The organization's profile has basic information set at the time of SDP deployment. It can be modified by the Owner. Individual profile information is set when the account is created and can be updated by the user on the SDP dashboard Profile page. Note: profiles never refer to receivers of funds. + + + +| | | +| --- | --------------------- | +| GET | [/organization](../get-organization-info.api.mdx) | +| PATCH | [/organization](../patch-organization-profile.api.mdx) | +| GET | [/organization/logo](../get-organization-logo.api.mdx) | +| GET | [/countries](../get-a-list-of-countries-supported-by-this-organization.api.mdx) | +| GET | [/assets](../get-a-list-of-assets-supported-by-this-organization.api.mdx) | +| GET | [/wallets](../get-a-list-of-wallets-supported-by-this-organization.api.mdx) | + + \ No newline at end of file diff --git a/api/stellar-disbursement-platform/resources/patch-organization-profile.api.mdx b/api/stellar-disbursement-platform/resources/patch-organization-profile.api.mdx index 759ed7df6..60c110e54 100644 --- a/api/stellar-disbursement-platform/resources/patch-organization-profile.api.mdx +++ b/api/stellar-disbursement-platform/resources/patch-organization-profile.api.mdx @@ -1,11 +1,11 @@ --- id: patch-organization-profile title: "Patch Organization Profile" -description: "Example of request in `Javascript` with `fetch`. Note that both fields are `optional`, but, at least `one` should be sent in the request." +description: "Patch Organization Profile" sidebar_label: "Patch Organization Profile" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"organization profile updated successfully"}},"examples":{"response":{"value":{"message":"organization profile updated successfully"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Patch Organization Profile","description":"Example of request in `Javascript` with `fetch`. Note that both fields are `optional`, but, at least `one` should be sent in the request.\n\n```js\nconst form = new FormData();\nform.append(\"logo\", \"/path/to/logo/logo.png\");\nform.append(\"data\", `{\"organization_name\": \"My Company\", \"timezone_utc_offset\": \"-03:00\"}`);\n\nconst options = {\n method: 'PATCH',\n headers: {\n Authorization: 'Bearer mytoken'\n }\n};\n\noptions.body = form;\n\nfetch('http://localhost:8000/profile/organization', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));\n```\n\n**Note**: *It's not necessary to set the header `Content-Type` for this request, it's set automaticaly by the HTTP client.*","tags":["Profile"],"security":[{"oauth2":[]}],"method":"patch","path":"/organization","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch Organization Profile","description":{"content":"Example of request in `Javascript` with `fetch`. Note that both fields are `optional`, but, at least `one` should be sent in the request.\n\n```js\nconst form = new FormData();\nform.append(\"logo\", \"/path/to/logo/logo.png\");\nform.append(\"data\", `{\"organization_name\": \"My Company\", \"timezone_utc_offset\": \"-03:00\"}`);\n\nconst options = {\n method: 'PATCH',\n headers: {\n Authorization: 'Bearer mytoken'\n }\n};\n\noptions.body = form;\n\nfetch('http://localhost:8000/profile/organization', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));\n```\n\n**Note**: *It's not necessary to set the header `Content-Type` for this request, it's set automaticaly by the HTTP client.*","type":"text/plain"},"url":{"path":["organization"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"PATCH","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"examples":{"response":{"value":{"message":"organization profile updated successfully"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Patch Organization Profile","tags":["Organization"],"security":[{"BearerAuth":[]}],"description":"Patch Organization Profile","method":"patch","path":"/organization","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch Organization Profile","description":{"type":"text/plain"},"url":{"path":["organization"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"PATCH","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "patch api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; @@ -28,36 +28,18 @@ import TabItem from "@theme/TabItem"; -Example of request in `Javascript` with `fetch`. Note that both fields are `optional`, but, at least `one` should be sent in the request. - -```js -const form = new FormData(); -form.append("logo", "/path/to/logo/logo.png"); -form.append("data", `{"organization_name": "My Company", "timezone_utc_offset": "-03:00"}`); - -const options = { - method: 'PATCH', - headers: { - Authorization: 'Bearer mytoken' - } -}; - -options.body = form; - -fetch('http://localhost:8000/profile/organization', options) - .then(response => response.json()) - .then(response => console.log(response)) - .catch(err => console.error(err)); -``` - -**Note**: *It's not necessary to set the header `Content-Type` for this request, it's set automaticaly by the HTTP client.* +Patch Organization Profile
                                                                                                                    OK -
                                                                                                                    Response Headers
                                                                                                                      Schema
                                                                                                                      +
                                                                                                                      Schema
                                                                                                                      Unauthorized -
                                                                                                                      Response Headers
                                                                                                                        Schema
                                                                                                                        +
                                                                                                                        Response Headers
                                                                                                                          Schema
                                                                                                                            extras object
                                                                                                                          + +Forbidden + +
                                                                                                                          Response Headers
                                                                                                                            Schema
                                                                                                                            diff --git a/api/stellar-disbursement-platform/resources/patch-user-activation.api.mdx b/api/stellar-disbursement-platform/resources/patch-user-activation.api.mdx index 458609d28..39edb68b3 100644 --- a/api/stellar-disbursement-platform/resources/patch-user-activation.api.mdx +++ b/api/stellar-disbursement-platform/resources/patch-user-activation.api.mdx @@ -5,7 +5,7 @@ description: "Patchs the authentication user's activation in the SDP." sidebar_label: "Patch User Activation" hide_title: true hide_table_of_contents: true -api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"user activation was updated successfully"}},"examples":{"response":{"value":{"message":"user activation was updated successfully"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Patch User Activation","description":"Patchs the authentication user's activation in the SDP.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"is_active":{"type":"boolean"}},"example":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","is_active":false}}}}},"security":[{"oauth2":[]}],"method":"patch","path":"/users/activation","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","is_active":false},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch User Activation","description":{"content":"Patchs the authentication user's activation in the SDP.","type":"text/plain"},"url":{"path":["users","activation"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"}},"required":["id","first_name","last_name","email","roles","is_active"],"example":[{"id":"7a4c6555-1f73-49b3-a211-f95bd2b8ec90","first_name":"John","last_name":"Doe","email":"email@email.com","roles":["developer"],"is_active":true},{"id":"5f4df1dd-c84f-482a-84ad-541ffd46e75a","first_name":"Jane","last_name":"Doe","email":"email@email.com","roles":["financial_controller"],"is_active":false}]},"examples":{"response":{"value":{"message":"user activation was updated successfully"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Patch User Activation","description":"Patchs the authentication user's activation in the SDP.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"is_active":{"type":"boolean"}},"example":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","is_active":false}}}}},"security":[{"BearerAuth":[]}],"method":"patch","path":"/users/activation","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","is_active":false},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch User Activation","description":{"content":"Patchs the authentication user's activation in the SDP.","type":"text/plain"},"url":{"path":["users","activation"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "patch api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -30,12 +30,16 @@ import TabItem from "@theme/TabItem"; Patchs the authentication user's activation in the SDP. -
                                                                                                                            Request Body
                                                                                                                            +
                                                                                                                            Request Body
                                                                                                                            Created -
                                                                                                                            Response Headers
                                                                                                                              Schema
                                                                                                                              +
                                                                                                                              Schema
                                                                                                                              Unauthorized -
                                                                                                                              Response Headers
                                                                                                                                Schema
                                                                                                                                +
                                                                                                                                Response Headers
                                                                                                                                  Schema
                                                                                                                                    extras object
                                                                                                                                  + +Forbidden + +
                                                                                                                                  Response Headers
                                                                                                                                    Schema
                                                                                                                                    diff --git a/api/stellar-disbursement-platform/resources/patch-user-profile.api.mdx b/api/stellar-disbursement-platform/resources/patch-user-profile.api.mdx index 3bf0d0a14..e03a39884 100644 --- a/api/stellar-disbursement-platform/resources/patch-user-profile.api.mdx +++ b/api/stellar-disbursement-platform/resources/patch-user-profile.api.mdx @@ -5,7 +5,7 @@ description: "Note that all fields are optional but at least one should be sent sidebar_label: "Patch User Profile" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"user profile updated successfully"}},"examples":{"response":{"value":{"message":"user profile updated successfully"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Patch User Profile","description":"Note that all fields are optional but at least one should be sent in the request.","tags":["Profile"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}},"example":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","password":"mysecret"}}}}},"security":[{"oauth2":[]}],"method":"patch","path":"/profile","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","password":"mysecret"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch User Profile","description":{"content":"Note that all fields are optional but at least one should be sent in the request.","type":"text/plain"},"url":{"path":["profile"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"examples":{"response":{"value":{"message":"user profile updated successfully"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Patch User Profile","description":"Note that all fields are optional but at least one should be sent in the request.","tags":["Profile"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}},"example":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","password":"mysecret"}}}}},"security":[{"BearerAuth":[]}],"method":"patch","path":"/profile","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"first_name":"FirstName","last_name":"LastName","email":"email@email.com","password":"mysecret"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch User Profile","description":{"content":"Note that all fields are optional but at least one should be sent in the request.","type":"text/plain"},"url":{"path":["profile"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "patch api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -34,8 +34,12 @@ Note that all fields are optional but at least one should be sent in the request OK -
                                                                                                                                    Response Headers
                                                                                                                                      Schema
                                                                                                                                      +
                                                                                                                                      Response Headers
                                                                                                                                        Schema
                                                                                                                                        Unauthorized -
                                                                                                                                        Response Headers
                                                                                                                                          Schema
                                                                                                                                          +
                                                                                                                                          Response Headers
                                                                                                                                            Schema
                                                                                                                                              extras object
                                                                                                                                            + +Forbidden + +
                                                                                                                                            Response Headers
                                                                                                                                              Schema
                                                                                                                                              diff --git a/api/stellar-disbursement-platform/resources/patch-user-role.api.mdx b/api/stellar-disbursement-platform/resources/patch-user-role.api.mdx index d46413e7b..9357673ec 100644 --- a/api/stellar-disbursement-platform/resources/patch-user-role.api.mdx +++ b/api/stellar-disbursement-platform/resources/patch-user-role.api.mdx @@ -5,7 +5,7 @@ description: "Patchs the authentication user's roles." sidebar_label: "Patch User Role" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"user roles were updated successfully"}},"examples":{"response":{"value":{"message":"user roles were updated successfully"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized."}},"examples":{"response":{"value":{"error":"Not authorized."}}}}}}},"operationId":"Patch User Role","description":"Patchs the authentication user's roles.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"example":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","roles":["developer"]}}}}},"security":[{"oauth2":[]}],"method":"patch","path":"/users/roles","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","roles":["developer"]},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch User Role","description":{"content":"Patchs the authentication user's roles.","type":"text/plain"},"url":{"path":["users","roles"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"user roles were updated successfully"}},"examples":{"response":{"value":{"message":"user roles were updated successfully"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Patch User Role","description":"Patchs the authentication user's roles.","tags":["Users"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}}},"example":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","roles":["developer"]}}}}},"security":[{"BearerAuth":[]}],"method":"patch","path":"/users/roles","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"user_id":"5ca230c9-da95-4bd1-b2a2-aa5d0df65efd","roles":["developer"]},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Patch User Role","description":{"content":"Patchs the authentication user's roles.","type":"text/plain"},"url":{"path":["users","roles"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "patch api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -38,4 +38,8 @@ OK Unauthorized -
                                                                                                                                              Response Headers
                                                                                                                                                Schema
                                                                                                                                                +
                                                                                                                                                Response Headers
                                                                                                                                                  Schema
                                                                                                                                                    extras object
                                                                                                                                                  + +Forbidden + +
                                                                                                                                                  Response Headers
                                                                                                                                                    Schema
                                                                                                                                                    diff --git a/api/stellar-disbursement-platform/resources/post-sep-10-challenge-transaction.api.mdx b/api/stellar-disbursement-platform/resources/post-sep-10-challenge-transaction.api.mdx index cf3141d21..c060b744f 100644 --- a/api/stellar-disbursement-platform/resources/post-sep-10-challenge-transaction.api.mdx +++ b/api/stellar-disbursement-platform/resources/post-sep-10-challenge-transaction.api.mdx @@ -5,7 +5,7 @@ description: "The SEP-10 endpoint where the wallet will get the challenge transa sidebar_label: "POST SEP-10 Challenge Transaction" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"SEP-10 handshake was successful.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"example":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJHQTZVSVhYUEVXWUZJTE5VSVdBQzM3WTRRUEVaTVFWREpIREtWV0ZaSjJLQ1dVQklVNUlYWk5EQSIsImp0aSI6IjE0NGQzNjdiY2IwZTcyY2FiZmRiZGU2MGVhZTBhZDczM2NjNjVkMmE2NTg3MDgzZGFiM2Q2MTZmODg1MTkwMjQiLCJpc3MiOiJodHRwczovL2ZsYXBweS1iaXJkLWRhcHAuZmlyZWJhc2VhcHAuY29tLyIsImlhdCI6MTUzNDI1Nzk5NCwiZXhwIjoxNTM0MzQ0Mzk0fQ.8nbB83Z6vGBgC1X9r3N6oQCFTBzDiITAfCJasRft0z0"}},"examples":{"response":{"value":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJHQTZVSVhYUEVXWUZJTE5VSVdBQzM3WTRRUEVaTVFWREpIREtWV0ZaSjJLQ1dVQklVNUlYWk5EQSIsImp0aSI6IjE0NGQzNjdiY2IwZTcyY2FiZmRiZGU2MGVhZTBhZDczM2NjNjVkMmE2NTg3MDgzZGFiM2Q2MTZmODg1MTkwMjQiLCJpc3MiOiJodHRwczovL2ZsYXBweS1iaXJkLWRhcHAuZmlyZWJhc2VhcHAuY29tLyIsImlhdCI6MTUzNDI1Nzk5NCwiZXhwIjoxNTM0MzQ0Mzk0fQ.8nbB83Z6vGBgC1X9r3N6oQCFTBzDiITAfCJasRft0z0"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"The provided transaction is not valid"}},"examples":{"response":{"value":{"error":"The provided transaction is not valid"}}}}}}},"operationId":"POST SEP-10 Challenge Transaction","description":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","tags":["Registration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"string"}},"example":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAvheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3AsiYk3UAAABArIrkvqmA0V9lIZcVyCUdja6CiwkPwsV8BfI4CZOyR1Oq7ysvNJWwY0G42dpxN9OP1qz4dum8apG2hqvxVWjkDQ=="}}}}},"method":"post","path":"/WEB_AUTH_ENDPOINT","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAvheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3AsiYk3UAAABArIrkvqmA0V9lIZcVyCUdja6CiwkPwsV8BfI4CZOyR1Oq7ysvNJWwY0G42dpxN9OP1qz4dum8apG2hqvxVWjkDQ=="},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"POST SEP-10 Challenge Transaction","description":{"content":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","type":"text/plain"},"url":{"path":["WEB_AUTH_ENDPOINT"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"responses":{"200":{"description":"SEP-10 handshake was successful.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"example":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJHQTZVSVhYUEVXWUZJTE5VSVdBQzM3WTRRUEVaTVFWREpIREtWV0ZaSjJLQ1dVQklVNUlYWk5EQSIsImp0aSI6IjE0NGQzNjdiY2IwZTcyY2FiZmRiZGU2MGVhZTBhZDczM2NjNjVkMmE2NTg3MDgzZGFiM2Q2MTZmODg1MTkwMjQiLCJpc3MiOiJodHRwczovL2ZsYXBweS1iaXJkLWRhcHAuZmlyZWJhc2VhcHAuY29tLyIsImlhdCI6MTUzNDI1Nzk5NCwiZXhwIjoxNTM0MzQ0Mzk0fQ.8nbB83Z6vGBgC1X9r3N6oQCFTBzDiITAfCJasRft0z0"}},"examples":{"response":{"value":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJHQTZVSVhYUEVXWUZJTE5VSVdBQzM3WTRRUEVaTVFWREpIREtWV0ZaSjJLQ1dVQklVNUlYWk5EQSIsImp0aSI6IjE0NGQzNjdiY2IwZTcyY2FiZmRiZGU2MGVhZTBhZDczM2NjNjVkMmE2NTg3MDgzZGFiM2Q2MTZmODg1MTkwMjQiLCJpc3MiOiJodHRwczovL2ZsYXBweS1iaXJkLWRhcHAuZmlyZWJhc2VhcHAuY29tLyIsImlhdCI6MTUzNDI1Nzk5NCwiZXhwIjoxNTM0MzQ0Mzk0fQ.8nbB83Z6vGBgC1X9r3N6oQCFTBzDiITAfCJasRft0z0"}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"The provided transaction is not valid"}},"examples":{"response":{"value":{"error":"The provided transaction is not valid"}}}}}}},"operationId":"POST SEP-10 Challenge Transaction","description":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","tags":["Anchor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"string"}},"example":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAvheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3AsiYk3UAAABArIrkvqmA0V9lIZcVyCUdja6CiwkPwsV8BfI4CZOyR1Oq7ysvNJWwY0G42dpxN9OP1qz4dum8apG2hqvxVWjkDQ=="}}}}},"method":"post","path":"/WEB_AUTH_ENDPOINT","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"transaction":"AAAAAgAAAADIiRu2BrqqeOcP28PWCkD4D5Rjjsqh71HwvqFX+F4VXAAAAGQAAAAAAAAAAAAAAAEAAAAAXzrUcQAAAABfOtf1AAAAAAAAAAEAAAABAAAAAEEB8rhqNa70RYjaNnF1ARE2CbL50iR9HPXST/fImJN1AAAACgAAADB0aGlzaXNhdGVzdC5zYW5kYm94LmFuY2hvci5hbmNob3Jkb21haW4uY29tIGF1dGgAAAABAAAAQGdGOFlIQm1zaGpEWEY0L0VJUFZucGVlRkxVTDY2V0tKMVBPYXZuUVVBNjBoL09XaC91M2Vvdk54WFJtSTAvQ2UAAAAAAAAAAvheFVwAAABAheKE1HjGnUCNwPbX8mz7CqotShKbA+xM2Hbjl6X0TBpEprVOUVjA6lqMJ1j62vrxn1mF3eJzsLa9s9hRofG3AsiYk3UAAABArIrkvqmA0V9lIZcVyCUdja6CiwkPwsV8BfI4CZOyR1Oq7ysvNJWwY0G42dpxN9OP1qz4dum8apG2hqvxVWjkDQ=="},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"POST SEP-10 Challenge Transaction","description":{"content":"The SEP-10 endpoint where the wallet will get the challenge transaction to be signed. More information [here](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#challenge).\n\nThis endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable.","type":"text/plain"},"url":{"path":["WEB_AUTH_ENDPOINT"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; diff --git a/api/stellar-disbursement-platform/resources/refresh-token.api.mdx b/api/stellar-disbursement-platform/resources/refresh-token.api.mdx index 8982c1f43..a51d5dfbc 100644 --- a/api/stellar-disbursement-platform/resources/refresh-token.api.mdx +++ b/api/stellar-disbursement-platform/resources/refresh-token.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Refresh Token" hide_title: true hide_table_of_contents: true -api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"example":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}},"examples":{"response":{"value":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Invalid token","extras":{"status":400,"message":"Token is expired or invalid"}}},"examples":{"response":{"value":{"error":"Invalid token","extras":{"status":400,"message":"Token is expired or invalid"}}}}}}}},"operationId":"Refresh Token","description":"","tags":["Authentication"],"security":[{"oauth2":[]}],"method":"post","path":"/refresh_token","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Refresh Token","description":{"content":"","type":"text/plain"},"url":{"path":["refresh_token"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"}},"example":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}},"examples":{"response":{"value":{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoidXNlci1pZCIsImVtYWlsIjoiZW1haWxAZW1haWwuY29tIiwicm9sZXMiOlt7Im5hbWUiOiJTdXBlcnZpc29yIn1dfSwiZXhwIjoxNjc1OTYyOTQ3fQ.4Zj9yBXch-iuFYF-kc_EhHPxjpwp_egMOLbOv4bZKO1MFvcmEgZ5MlXH1_1fZfgUxaNBcMCdRM6MGSqKocwGnA"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Invalid token","extras":{"status":400,"message":"Token is expired or invalid"}}},"examples":{"response":{"value":{"error":"Invalid token","extras":{"status":400,"message":"Token is expired or invalid"}}}}}}}},"operationId":"Refresh Token","description":"","tags":["Authentication"],"security":[{"BearerAuth":[]}],"method":"post","path":"/refresh_token","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Refresh Token","description":{"content":"","type":"text/plain"},"url":{"path":["refresh_token"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null diff --git a/api/stellar-disbursement-platform/resources/register-the-stellar-account-for-the-user.api.mdx b/api/stellar-disbursement-platform/resources/register-the-stellar-account-for-the-user.api.mdx index d09c48189..e806e9753 100644 --- a/api/stellar-disbursement-platform/resources/register-the-stellar-account-for-the-user.api.mdx +++ b/api/stellar-disbursement-platform/resources/register-the-stellar-account-for-the-user.api.mdx @@ -5,7 +5,7 @@ description: "This is the endpoint that will be used to register the Stellar pub sidebar_label: "Register the Stellar Account for the User" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"example":{"status":"ok"}},"examples":{"response":{"value":{"status":"ok"}}}}}},"400":{"description":"The id, token, sign or phone_number provided are incorrect.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"}}}},"example":{"error":"Unauthorized.","extras":{"code":"400_2","details":"The id, token, sign or phone_number provided are incorrect."}}},"examples":{"response":{"value":{"error":"Unauthorized.","extras":{"code":"400_2","details":"The id, token, sign or phone_number provided are incorrect."}}}}}}},"401":{"description":"The SEP-10 token is invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Unauthorized"}},"examples":{"response":{"value":{"error":"Unauthorized"}}}}}}},"operationId":"Register the Stellar Account for the User","description":"This is the endpoint that will be used to register the Stellar public key with the SDP user. It will be using the data provided in the deep link, that should have the following format: `vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc`.","tags":["Registration"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"token":{"type":"string"},"sign":{"type":"string"},"phone_number":{"type":"string"}},"example":{"id":1,"token":"1234abcd","sign":"abcd1234","phone_number":"+1415555555"}}}}},"security":[{"oauth2":[]}],"method":"post","path":"/registration/wallet","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"id":1,"token":"1234abcd","sign":"abcd1234","phone_number":"+1415555555"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Register the Stellar Account for the User","description":{"content":"This is the endpoint that will be used to register the Stellar public key with the SDP user. It will be using the data provided in the deep link, that should have the following format: `vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc`.","type":"text/plain"},"url":{"path":["registration","wallet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"example":{"status":"ok"}},"examples":{"response":{"value":{"status":"ok"}}}}}},"400":{"description":"The id, token, sign or phone_number provided are incorrect.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"}}}},"example":{"error":"Unauthorized.","extras":{"code":"400_2","details":"The id, token, sign or phone_number provided are incorrect."}}},"examples":{"response":{"value":{"error":"Unauthorized.","extras":{"code":"400_2","details":"The id, token, sign or phone_number provided are incorrect."}}}}}}},"401":{"description":"The SEP-10 token is invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Unauthorized"}},"examples":{"response":{"value":{"error":"Unauthorized"}}}}}}},"operationId":"Register the Stellar Account for the User","description":"This is the endpoint that will be used to register the Stellar public key with the SDP user. It will be using the data provided in the deep link, that should have the following format: `vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc`.","tags":["Anchor"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"token":{"type":"string"},"sign":{"type":"string"},"phone_number":{"type":"string"}},"example":{"id":1,"token":"1234abcd","sign":"abcd1234","phone_number":"+1415555555"}}}}},"security":[{"BearerAuth":[]}],"method":"post","path":"/registration/wallet","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"id":1,"token":"1234abcd","sign":"abcd1234","phone_number":"+1415555555"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Register the Stellar Account for the User","description":{"content":"This is the endpoint that will be used to register the Stellar public key with the SDP user. It will be using the data provided in the deep link, that should have the following format: `vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc`.","type":"text/plain"},"url":{"path":["registration","wallet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; diff --git a/api/stellar-disbursement-platform/resources/registration/index.mdx b/api/stellar-disbursement-platform/resources/registration/index.mdx index ff8dd335b..b0a006f3f 100644 --- a/api/stellar-disbursement-platform/resources/registration/index.mdx +++ b/api/stellar-disbursement-platform/resources/registration/index.mdx @@ -13,14 +13,8 @@ The registration process uses SEP-10, SEP-24, and deep links. Please see this gu | | | | --- | --------------------- | -| GET | [/registration/receiver/:token](../load-the-pii-confirmation-webpage.api.mdx) | -| GET | [/registration/receiver/:token/wallet_info](../get-placeholder-info.api.mdx) | -| POST | [/registration/receiver/:token/send_otp](../send-otp-to-the-receivers-phone.api.mdx) | -| POST | [/registration/receiver/:token/validate](../validate-otp-pii.api.mdx) | -| GET | [/.well-known/stellar.toml](../stellar-toml.api.mdx) | -| GET | [/WEB_AUTH_ENDPOINT](../get-sep-10-challenge-transaction.api.mdx) | -| POST | [/WEB_AUTH_ENDPOINT](../post-sep-10-challenge-transaction.api.mdx) | -| POST | [/registration/wallet](../register-the-stellar-account-for-the-user.api.mdx) | -| GET | [/registration/wallet](../verify-if-stellar-account-is-registered.api.mdx) | +| GET | [/wallet-registration/start](../load-the-pii-confirmation-webpage.api.mdx) | +| POST | [/wallet-registration/otp](../send-otp.api.mdx) | +| POST | [/wallet-registration/verification](../verify-receiver-registration.api.mdx) | \ No newline at end of file diff --git a/api/stellar-disbursement-platform/resources/reset-password.api.mdx b/api/stellar-disbursement-platform/resources/reset-password.api.mdx new file mode 100644 index 000000000..696dd053b --- /dev/null +++ b/api/stellar-disbursement-platform/resources/reset-password.api.mdx @@ -0,0 +1,45 @@ +--- +id: reset-password +title: "Reset password endpoint" +description: "Reset password endpoint" +sidebar_label: "Reset password endpoint" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"resetPassword","tags":["Authentication"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","description":"New password for the user"},"reset_token":{"type":"string","description":"Token used to identify a valid password reset request"}},"required":["password","reset_token"]}}},"description":"Reset password request data","required":true},"responses":{"200":{"description":"Password reset successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}}},"description":"Reset password endpoint","method":"post","path":"/reset-password","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"password":"string","reset_token":"string"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Reset password endpoint","description":{"type":"text/plain"},"url":{"path":["reset-password"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Reset password endpoint + + + +Reset password endpoint + +
                                                                                                                                                    Request Body required
                                                                                                                                                    + +Reset password request data + +
                                                                                                                                                    + +Password reset successfully + +
                                                                                                                                                    + +Bad Request + +
                                                                                                                                                    Schema
                                                                                                                                                    diff --git a/api/stellar-disbursement-platform/resources/retrieve-a-disbursement.api.mdx b/api/stellar-disbursement-platform/resources/retrieve-a-disbursement.api.mdx index 2b84ce32f..819b866b2 100644 --- a/api/stellar-disbursement-platform/resources/retrieve-a-disbursement.api.mdx +++ b/api/stellar-disbursement-platform/resources/retrieve-a-disbursement.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Retrieve a Disbursement" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"upload_by":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"total_payments":{"type":"number"},"total_payments_sent":{"type":"number"},"total_payments_remaining":{"type":"number"},"total_payments_failed":{"type":"number"},"amount_disbursed":{"type":"string"},"total_amount":{"type":"string"},"average_amount":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"name":{"type":"string"}}},"beneficiaries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"phone_number":{"type":"string"},"payment_id":{"type":"string"},"amount":{"type":"string"},"stellar_address":{"type":"string"},"stellar_transaction_id":{"type":"string"},"status":{"type":"string"}},"required":["payment_id","phone_number","amount","stellar_address","stellar_transaction_id","status"]}},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"}},"required":["user_id","status","timestamp"]}},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"example":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","upload_by":{"id":"88b0ad24-8bab-4f19-903f-cb2da90108a2","name":"Marcelo"},"total_payments":2,"total_payments_sent":1,"total_payments_remaining":1,"total_payments_failed":0,"amount_disbursed":"75.000000","total_amount":"150.0000000","average_amount":"75.00000000","country":{"code":"ua","name":"Ukraine","language":"uk","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"wallet":{"id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant","homepage":"https://vibrantapp.com"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","name":"USD Coin"},"beneficiaries":[{"id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","phone_number":"+380441234567","payment_id":"b6b667ad-6cc2-46cf-9be7-561daace7d48","amount":"75.0000000","stellar_address":"GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ","stellar_transaction_id":"614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef","status":"SUCCESS"},{"payment_id":"b6b667ad-6cc2-46cf-9be7-561daace7d48","phone_number":"+380441234567","amount":"75.0000000","stellar_address":"GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ","stellar_transaction_id":"614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef","status":"READY"}],"status_history":[{"user_id":null,"status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"},{"user_id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"},{"user_id":null,"status":"READY","timestamp":"2023-02-03T11:45:51.000Z"},{"user_id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","status":"READY","timestamp":"2023-02-03T11:45:51.000Z"}],"status":"READY","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T11:45:51.000Z"}},"examples":{"response":{"value":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","upload_by":{"id":"88b0ad24-8bab-4f19-903f-cb2da90108a2","name":"Marcelo"},"total_payments":2,"total_payments_sent":1,"total_payments_remaining":1,"total_payments_failed":0,"amount_disbursed":"75.000000","total_amount":"150.0000000","average_amount":"75.00000000","country":{"code":"ua","name":"Ukraine","language":"uk","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"wallet":{"id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant","homepage":"https://vibrantapp.com"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","name":"USD Coin"},"beneficiaries":[{"id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","phone_number":"+380441234567","payment_id":"b6b667ad-6cc2-46cf-9be7-561daace7d48","amount":"75.0000000","stellar_address":"GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ","stellar_transaction_id":"614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef","status":"SUCCESS"},{"payment_id":"b6b667ad-6cc2-46cf-9be7-561daace7d48","phone_number":"+380441234567","amount":"75.0000000","stellar_address":"GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ","stellar_transaction_id":"614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef","status":"READY"}],"status_history":[{"user_id":null,"status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"},{"user_id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"},{"user_id":null,"status":"READY","timestamp":"2023-02-03T11:45:51.000Z"},{"user_id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","status":"READY","timestamp":"2023-02-03T11:45:51.000Z"}],"status":"READY","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T11:45:51.000Z"}}}}}},"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"}}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Retrieve a Disbursement","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the `Disbursement`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"get","path":"/disbursements/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve a Disbursement","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Disbursement`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Disbursement details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"verification_field":{"type":"string","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"timestamp":{"type":"string","format":"date-time"}}}},"file_name":{"type":"string"},"file_content":{"type":"string","format":"byte"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Retrieve a Disbursement","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the `Disbursement`.","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/disbursements/{id}","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve a Disbursement","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Disbursement`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,13 +28,17 @@ import TabItem from "@theme/TabItem";
                                                                                                                                                    Path Parameters
                                                                                                                                                    -OK +Disbursement details -
                                                                                                                                                    Response Headers
                                                                                                                                                      Schema
                                                                                                                                                        upload_by object
                                                                                                                                                        country object
                                                                                                                                                        wallet object
                                                                                                                                                        asset object
                                                                                                                                                        beneficiaries object[]
                                                                                                                                                      • Array [
                                                                                                                                                      • ]
                                                                                                                                                      • status_history object[]
                                                                                                                                                      • Array [
                                                                                                                                                      • ]
                                                                                                                                                      +
                                                                                                                                                      Schema
                                                                                                                                                        country object
                                                                                                                                                        wallet object
                                                                                                                                                        asset object
                                                                                                                                                        status_history object[]
                                                                                                                                                      • Array [
                                                                                                                                                      • ]
                                                                                                                                                      Unauthorized -
                                                                                                                                                      Response Headers
                                                                                                                                                        Schema
                                                                                                                                                          extras object
                                                                                                                                                        +
                                                                                                                                                        Response Headers
                                                                                                                                                          Schema
                                                                                                                                                            extras object
                                                                                                                                                          + +Forbidden + +
                                                                                                                                                          Response Headers
                                                                                                                                                            Schema
                                                                                                                                                            Not Found diff --git a/api/stellar-disbursement-platform/resources/retrieve-a-payment.api.mdx b/api/stellar-disbursement-platform/resources/retrieve-a-payment.api.mdx index 1d57d0091..bd4e79e48 100644 --- a/api/stellar-disbursement-platform/resources/retrieve-a-payment.api.mdx +++ b/api/stellar-disbursement-platform/resources/retrieve-a-payment.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Retrieve a Payment" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"stellar_transaction_id":{"type":"string"},"stellar_operation_id":{"type":"string"},"status":{"type":"string"},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string"},"status_message":{"type":"string"},"timestamp":{"type":"string"}},"required":["status","status_message","timestamp"]}},"disbursement":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"}}},"receiver_wallet":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"example":{"id":"b6b667ad-6cc2-46cf-9be7-561daace7d48","amount":"100.000000","stellar_transaction_id":"614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef","stellar_operation_id":"192334871807819777","status":"DRAFT","status_history":[{"status":"DRAFT","status_message":"Some Message","timestamp":"2023-02-03T14:33:50.000Z"},{"status":"READY","status_message":"Some Message","timestamp":"2023-02-03T14:45:50.000Z"}],"disbursement":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","status":"DRAFT","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"},"receiver_wallet":{"id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","receiver":{"id":"e7431183-01e4-486a-8a4d-3489bdc07a4e"},"wallet":{"id":"25923001-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant"},"stellar_address":"GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ","stellar_memo":"some-memo","stellar_memo_type":"text","status":"REGISTERED","created_at":"2023-02-03T14:33:50.000Z","updated_at":"2023-02-03T14:45:50.000Z"},"created_at":"2023-02-03T14:33:50.000Z","updated_at":"2023-02-03T14:33:50.000Z"}},"examples":{"response":{"value":{"id":"b6b667ad-6cc2-46cf-9be7-561daace7d48","amount":"100.000000","stellar_transaction_id":"614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef","stellar_operation_id":"192334871807819777","status":"DRAFT","status_history":[{"status":"DRAFT","status_message":"Some Message","timestamp":"2023-02-03T14:33:50.000Z"},{"status":"READY","status_message":"Some Message","timestamp":"2023-02-03T14:45:50.000Z"}],"disbursement":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","status":"DRAFT","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"},"receiver_wallet":{"id":"2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872","receiver":{"id":"e7431183-01e4-486a-8a4d-3489bdc07a4e"},"wallet":{"id":"25923001-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant"},"stellar_address":"GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ","stellar_memo":"some-memo","stellar_memo_type":"text","status":"REGISTERED","created_at":"2023-02-03T14:33:50.000Z","updated_at":"2023-02-03T14:45:50.000Z"},"created_at":"2023-02-03T14:33:50.000Z","updated_at":"2023-02-03T14:33:50.000Z"}}}}}},"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"}}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Payment not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Payment not found"}}}}}}}},"operationId":"Retrieve a Payment","description":"","tags":["Payments"],"parameters":[{"name":"id","in":"path","description":"ID of the `Payment`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"get","path":"/payments/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve a Payment","description":{"content":"","type":"text/plain"},"url":{"path":["payments",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Payment`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Payment details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"stellar_transaction_id":{"type":"string"},"stellar_operation_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","PENDING","PAUSED","SUCCESS","FAILED"]},"status_message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}}}},"disbursement":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"},"sep_10_client_domain":{"type":"string"},"deep_link_schema":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"verification_field":{"type":"string","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY","STARTED","PAUSED","COMPLETED"]},"timestamp":{"type":"string","format":"date-time"}}}},"file_name":{"type":"string"},"file_content":{"type":"string","format":"byte"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":"string","format":"date-time"}}},"receiver_wallet":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Payment not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Payment not found"}}}}}}}},"operationId":"Retrieve a Payment","description":"","tags":["Payments"],"parameters":[{"name":"id","in":"path","description":"ID of the `Payment`.","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/payments/{id}","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve a Payment","description":{"content":"","type":"text/plain"},"url":{"path":["payments",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Payment`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,13 +28,17 @@ import TabItem from "@theme/TabItem";
                                                                                                                                                            Path Parameters
                                                                                                                                                            -OK +Payment details -
                                                                                                                                                            Response Headers
                                                                                                                                                              Schema
                                                                                                                                                                status_history object[]
                                                                                                                                                              • Array [
                                                                                                                                                              • ]
                                                                                                                                                              • disbursement object
                                                                                                                                                                asset object
                                                                                                                                                                receiver_wallet object
                                                                                                                                                                receiver object
                                                                                                                                                                wallet object
                                                                                                                                                              +
                                                                                                                                                              Schema
                                                                                                                                                                status_history object[]
                                                                                                                                                              • Array [
                                                                                                                                                              • ]
                                                                                                                                                              • disbursement object
                                                                                                                                                                country object
                                                                                                                                                                wallet object
                                                                                                                                                                asset object
                                                                                                                                                                status_history object[]
                                                                                                                                                              • Array [
                                                                                                                                                              • ]
                                                                                                                                                              • asset object
                                                                                                                                                                receiver_wallet object
                                                                                                                                                                receiver object
                                                                                                                                                                wallet object
                                                                                                                                                                received_amounts object[]
                                                                                                                                                              • Array [
                                                                                                                                                              • ]
                                                                                                                                                              • status_history object[]
                                                                                                                                                              • Array [
                                                                                                                                                              • ]
                                                                                                                                                              Unauthorized -
                                                                                                                                                              Response Headers
                                                                                                                                                                Schema
                                                                                                                                                                  extras object
                                                                                                                                                                +
                                                                                                                                                                Response Headers
                                                                                                                                                                  Schema
                                                                                                                                                                    extras object
                                                                                                                                                                  + +Forbidden + +
                                                                                                                                                                  Response Headers
                                                                                                                                                                    Schema
                                                                                                                                                                    Not Found diff --git a/api/stellar-disbursement-platform/resources/retrieve-a-receiver.api.mdx b/api/stellar-disbursement-platform/resources/retrieve-a-receiver.api.mdx index bec2fbffc..52ca8b705 100644 --- a/api/stellar-disbursement-platform/resources/retrieve-a-receiver.api.mdx +++ b/api/stellar-disbursement-platform/resources/retrieve-a-receiver.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Retrieve a Receiver" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"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"}}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Receiver not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Receiver not found"}}}}}}}},"operationId":"Retrieve a Receiver","description":"","tags":["Receivers"],"parameters":[{"name":"id","in":"path","description":"ID of the `Receiver`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"get","path":"/receivers/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve a Receiver","description":{"content":"","type":"text/plain"},"url":{"path":["receivers",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Receiver`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Receiver Details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"total_payments":{"type":"string"},"successful_payments":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"registered_wallets":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Resource not found"}}}}}}}},"operationId":"Retrieve a Receiver","description":"","tags":["Receivers"],"parameters":[{"name":"id","in":"path","description":"ID of the `Receiver`.","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/receivers/{id}","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve a Receiver","description":{"content":"","type":"text/plain"},"url":{"path":["receivers",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Receiver`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,14 +28,18 @@ import TabItem from "@theme/TabItem";
                                                                                                                                                                    Path Parameters
                                                                                                                                                                    -OK +Receiver Details -
                                                                                                                                                                    Response Headers
                                                                                                                                                                      +
                                                                                                                                                                      Schema
                                                                                                                                                                        received_amounts object[]
                                                                                                                                                                      • Array [
                                                                                                                                                                      • ]
                                                                                                                                                                      • wallets object[]
                                                                                                                                                                      • Array [
                                                                                                                                                                      • receiver object
                                                                                                                                                                        wallet object
                                                                                                                                                                        received_amounts object[]
                                                                                                                                                                      • Array [
                                                                                                                                                                      • ]
                                                                                                                                                                      • status_history object[]
                                                                                                                                                                      • Array [
                                                                                                                                                                      • ]
                                                                                                                                                                      • ]
                                                                                                                                                                      Unauthorized -
                                                                                                                                                                      Response Headers
                                                                                                                                                                        Schema
                                                                                                                                                                          extras object
                                                                                                                                                                        +
                                                                                                                                                                        Response Headers
                                                                                                                                                                          Schema
                                                                                                                                                                            extras object
                                                                                                                                                                          + +Forbidden + +
                                                                                                                                                                          Response Headers
                                                                                                                                                                            Schema
                                                                                                                                                                            Not Found -
                                                                                                                                                                            Response Headers
                                                                                                                                                                              Schema
                                                                                                                                                                                extras object
                                                                                                                                                                              +
                                                                                                                                                                              Response Headers
                                                                                                                                                                                Schema
                                                                                                                                                                                  extras object
                                                                                                                                                                                diff --git a/api/stellar-disbursement-platform/resources/retrieve-all-statistics.api.mdx b/api/stellar-disbursement-platform/resources/retrieve-all-statistics.api.mdx index 561b2d776..5431acaf1 100644 --- a/api/stellar-disbursement-platform/resources/retrieve-all-statistics.api.mdx +++ b/api/stellar-disbursement-platform/resources/retrieve-all-statistics.api.mdx @@ -1,11 +1,11 @@ --- id: retrieve-all-statistics title: "Retrieve all Statistics" -description: "" +description: "All statistics, including disbursement and receiver wallet data" sidebar_label: "Retrieve all Statistics" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized"}},"examples":{"response":{"value":{"error":"Not authorized"}}}}}}},"operationId":"Retrieve all Statistics","description":"","tags":["Statistics"],"security":[{"oauth2":[]}],"method":"get","path":"/statistics","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve all Statistics","description":{"content":"","type":"text/plain"},"url":{"path":["statistics"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"General Statistics response","content":{"application/json":{"schema":{"type":"object","properties":{"total_disbursements":{"type":"integer","description":"Total number of disbursements","format":"int64"},"payment_counters":{"type":"object","properties":{"draft":{"type":"integer","format":"int64"},"ready":{"type":"integer","format":"int64"},"pending":{"type":"integer","format":"int64"},"paused":{"type":"integer","format":"int64"},"success":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"payment_amounts_by_asset":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"payment_amounts":{"type":"object","properties":{"draft":{"type":"string"},"ready":{"type":"string"},"pending":{"type":"string"},"paused":{"type":"string"},"success":{"type":"string"},"failed":{"type":"string"},"average":{"type":"string"},"total":{"type":"string"}}}}}},"receiver_wallets_counters":{"type":"object","properties":{"draft":{"type":"integer","format":"int64"},"ready":{"type":"integer","format":"int64"},"registered":{"type":"integer","format":"int64"},"flagged":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"total_receivers":{"type":"integer","description":"Total number of receivers","format":"int64"}}}}}},"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":"Retrieve all Statistics","description":"All statistics, including disbursement and receiver wallet data","tags":["Statistics"],"security":[{"BearerAuth":[]}],"method":"get","path":"/statistics","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve all Statistics","description":{"content":"All statistics, including disbursement and receiver wallet data","type":"text/plain"},"url":{"path":["statistics"],"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":"","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 @@ -26,12 +26,16 @@ import TabItem from "@theme/TabItem"; ## Retrieve all Statistics + + +All statistics, including disbursement and receiver wallet data +
                                                                                                                                                                                -OK +General Statistics response -
                                                                                                                                                                                Response Headers
                                                                                                                                                                                  +
                                                                                                                                                                                  Schema
                                                                                                                                                                                    payment_counters object
                                                                                                                                                                                    payment_amounts_by_asset object[]
                                                                                                                                                                                  • Array [
                                                                                                                                                                                  • payment_amounts object
                                                                                                                                                                                  • ]
                                                                                                                                                                                  • receiver_wallets_counters object
                                                                                                                                                                                  Unauthorized -
                                                                                                                                                                                  Response Headers
                                                                                                                                                                                    Schema
                                                                                                                                                                                    +
                                                                                                                                                                                    Response Headers
                                                                                                                                                                                      Schema
                                                                                                                                                                                        extras object
                                                                                                                                                                                      diff --git a/api/stellar-disbursement-platform/resources/retrieve-disbursement-specific-statistics.api.mdx b/api/stellar-disbursement-platform/resources/retrieve-disbursement-specific-statistics.api.mdx index d990e30e7..9c7631a82 100644 --- a/api/stellar-disbursement-platform/resources/retrieve-disbursement-specific-statistics.api.mdx +++ b/api/stellar-disbursement-platform/resources/retrieve-disbursement-specific-statistics.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Retrieve Disbursement-specific Statistics" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized"}},"examples":{"response":{"value":{"error":"Not authorized"}}}}}}},"operationId":"Retrieve Disbursement-specific Statistics","description":"","tags":["Statistics"],"parameters":[{"name":"id","in":"path","description":"ID of the `Disbursement`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"get","path":"/statistics/disbursements/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve Disbursement-specific Statistics","description":{"content":"","type":"text/plain"},"url":{"path":["statistics","disbursements",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Disbursement`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Returns statistics for disbursement","content":{"application/json":{"schema":{"type":"object","properties":{"payment_counters":{"type":"object","properties":{"draft":{"type":"integer","format":"int64"},"ready":{"type":"integer","format":"int64"},"pending":{"type":"integer","format":"int64"},"paused":{"type":"integer","format":"int64"},"success":{"type":"integer","format":"int64"},"failed":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"payment_amounts_by_asset":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"payment_amounts":{"type":"object","properties":{"draft":{"type":"string"},"ready":{"type":"string"},"pending":{"type":"string"},"paused":{"type":"string"},"success":{"type":"string"},"failed":{"type":"string"},"average":{"type":"string"},"total":{"type":"string"}}}}}},"receiver_wallets_counters":{"type":"object","properties":{"draft":{"type":"integer","format":"int64"},"ready":{"type":"integer","format":"int64"},"registered":{"type":"integer","format":"int64"},"flagged":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"}}},"total_receivers":{"type":"integer","description":"Total number of receivers","format":"int64"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}}},"operationId":"Retrieve Disbursement-specific Statistics","description":"","tags":["Statistics"],"parameters":[{"name":"id","in":"path","description":"ID of the `Disbursement`.","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"method":"get","path":"/statistics/disbursements/{id}","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Retrieve Disbursement-specific Statistics","description":{"content":"","type":"text/plain"},"url":{"path":["statistics","disbursements",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Disbursement`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","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 @@ -28,10 +28,14 @@ import TabItem from "@theme/TabItem";
                                                                                                                                                                                      Path Parameters
                                                                                                                                                                                      -OK +Returns statistics for disbursement -
                                                                                                                                                                                      Response Headers
                                                                                                                                                                                        +
                                                                                                                                                                                        Schema
                                                                                                                                                                                          payment_counters object
                                                                                                                                                                                          payment_amounts_by_asset object[]
                                                                                                                                                                                        • Array [
                                                                                                                                                                                        • payment_amounts object
                                                                                                                                                                                        • ]
                                                                                                                                                                                        • receiver_wallets_counters object
                                                                                                                                                                                        Unauthorized -
                                                                                                                                                                                        Response Headers
                                                                                                                                                                                          Schema
                                                                                                                                                                                          +
                                                                                                                                                                                          Response Headers
                                                                                                                                                                                            Schema
                                                                                                                                                                                              extras object
                                                                                                                                                                                            + +Forbidden + +
                                                                                                                                                                                            Response Headers
                                                                                                                                                                                              Schema
                                                                                                                                                                                              diff --git a/api/stellar-disbursement-platform/resources/send-otp-to-the-receivers-phone.api.mdx b/api/stellar-disbursement-platform/resources/send-otp-to-the-receivers-phone.api.mdx deleted file mode 100644 index 076068f31..000000000 --- a/api/stellar-disbursement-platform/resources/send-otp-to-the-receivers-phone.api.mdx +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: send-otp-to-the-receivers-phone -title: "Send OTP to the Receiver's Phone" -description: "This is the endpoint that will trigger an SMS sharing an OTP with the user phone." -sidebar_label: "Send OTP to the Receiver's Phone" -hide_title: true -hide_table_of_contents: true -api: {"responses":{"200":{"description":"The OTP was successfully sent.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"sanitized_phone_number":{"type":"string"}},"example":{"status":"ok","sanitized_phone_number":"* *** *** *415"}},"examples":{"response":{"value":{"status":"ok","sanitized_phone_number":"* *** *** *415"}}}}}},"401":{"description":"The token is invalid or expired.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"}}}},"example":{"error":"Unauthorized.","extras":{"code":"401_1","details":"The token is invalid or expired."}}},"examples":{"response":{"value":{"error":"Unauthorized.","extras":{"code":"401_1","details":"The token is invalid or expired."}}}}}}},"429":{"description":"An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"}}}},"example":{"error":"Too many requests.","extras":{"code":"429_1","details":"An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again."}}},"examples":{"response":{"value":{"error":"Too many requests.","extras":{"code":"429_1","details":"An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again."}}}}}}}},"operationId":"Send OTP to the Receiver's Phone","description":"This is the endpoint that will trigger an SMS sharing an OTP with the user phone.","tags":["Registration"],"parameters":[{"name":"token","in":"path","description":"Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","required":true,"schema":{"type":"string"}}],"method":"post","path":"/registration/receiver/{token}/send_otp","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Send OTP to the Receiver's Phone","description":{"content":"This is the endpoint that will trigger an SMS sharing an OTP with the user phone.","type":"text/plain"},"url":{"path":["registration","receiver",":token","send_otp"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","type":"text/plain"},"type":"any","value":"","key":"token"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST"}} -sidebar_class_name: "post api-method" -info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api -custom_edit_url: null ---- - -import { SepBadge } from "@site/src/components/SepBadge"; - - - -import ApiTabs from "@theme/ApiTabs"; -import MimeTabs from "@theme/MimeTabs"; -import ParamsItem from "@theme/ParamsItem"; -import ResponseSamples from "@theme/ResponseSamples"; -import SchemaItem from "@theme/SchemaItem"; -import SchemaTabs from "@theme/SchemaTabs"; -import DiscriminatorTabs from "@theme/DiscriminatorTabs"; -import TabItem from "@theme/TabItem"; - -## Send OTP to the Receiver's Phone - - - -This is the endpoint that will trigger an SMS sharing an OTP with the user phone. - -
                                                                                                                                                                                              Path Parameters
                                                                                                                                                                                              - -The OTP was successfully sent. - -
                                                                                                                                                                                              Response Headers
                                                                                                                                                                                                Schema
                                                                                                                                                                                                - -The token is invalid or expired. - -
                                                                                                                                                                                                Response Headers
                                                                                                                                                                                                  Schema
                                                                                                                                                                                                    extras object
                                                                                                                                                                                                  - -An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again. - -
                                                                                                                                                                                                  Response Headers
                                                                                                                                                                                                    Schema
                                                                                                                                                                                                      extras object
                                                                                                                                                                                                    diff --git a/api/stellar-disbursement-platform/resources/send-otp.api.mdx b/api/stellar-disbursement-platform/resources/send-otp.api.mdx new file mode 100644 index 000000000..9dff42603 --- /dev/null +++ b/api/stellar-disbursement-platform/resources/send-otp.api.mdx @@ -0,0 +1,53 @@ +--- +id: send-otp +title: "Send OTP to the provided phone number" +description: "This endpoint generates a 6-digit OTP and sends it via SMS to the phone number provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request." +sidebar_label: "Send OTP to the provided phone number" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"SendOTP","description":"This endpoint generates a 6-digit OTP and sends it via SMS to the phone number provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request.","tags":["Wallet-Registration"],"parameters":[{"name":"Authorization","in":"header","description":"SEP-24 token for authorization (Format: 'Bearer {token}')","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number":{"type":"string","description":"Phone number to which the OTP will be sent"}}}}},"description":"Object containing phone number","required":true},"responses":{"200":{"description":"OTP sent successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}},"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"}}}}}}},"429":{"description":"An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"}}}}}}}}},"method":"post","path":"/wallet-registration/otp","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"phone_number":"string"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Send OTP to the provided phone number","description":{"content":"This endpoint generates a 6-digit OTP and sends it via SMS to the phone number provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request.","type":"text/plain"},"url":{"path":["wallet-registration","otp"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Send OTP to the provided phone number + + + +This endpoint generates a 6-digit OTP and sends it via SMS to the phone number provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request. + +
                                                                                                                                                                                                    Header Parameters
                                                                                                                                                                                                    Request Body required
                                                                                                                                                                                                    + +Object containing phone number + +
                                                                                                                                                                                                    + +OTP sent successfully + +
                                                                                                                                                                                                    Schema
                                                                                                                                                                                                    + +Bad Request + +
                                                                                                                                                                                                    Schema
                                                                                                                                                                                                    + +Unauthorized + +
                                                                                                                                                                                                    Response Headers
                                                                                                                                                                                                      Schema
                                                                                                                                                                                                        extras object
                                                                                                                                                                                                      + +An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again. + +
                                                                                                                                                                                                      Schema
                                                                                                                                                                                                        extras object
                                                                                                                                                                                                      diff --git a/api/stellar-disbursement-platform/resources/sidebar.js b/api/stellar-disbursement-platform/resources/sidebar.js index 32c36a8ab..25c8a6295 100644 --- a/api/stellar-disbursement-platform/resources/sidebar.js +++ b/api/stellar-disbursement-platform/resources/sidebar.js @@ -1 +1 @@ -module.exports = [{"type":"doc","id":"stellar-disbursement-platform/resources/stellar-disbursement-platform-api"},{"type":"category","label":"Authentication","link":{"type":"generated-index","title":"Authentication","slug":"/category/stellar-disbursement-platform/resources/authentication"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/log-in","label":"Log In","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/refresh-token","label":"Refresh Token","className":"api-method post"}]},{"type":"category","label":"Disbursements","link":{"type":"generated-index","title":"Disbursements","slug":"/category/stellar-disbursement-platform/resources/disbursements"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-disbursements","label":"List All Disbursements","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/create-disbursements","label":"Create Disbursements","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-a-disbursement","label":"Retrieve a Disbursement","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/update-a-disbursement","label":"Update a Disbursement","className":"api-method patch"},{"type":"doc","id":"stellar-disbursement-platform/resources/delete-a-disbursement","label":"Delete a Disbursement","className":"api-method delete"},{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-disbursement-receivers","label":"List All Disbursement Receivers","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/upload-disbursement-instructions","label":"Upload Disbursement Instructions","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/download-disbursement-instructions","label":"Download Disbursement Instructions","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/update-a-disbursement-status","label":"Update a Disbursement Status","className":"api-method patch"}]},{"type":"category","label":"Payments","link":{"type":"generated-index","title":"Payments","slug":"/category/stellar-disbursement-platform/resources/payments"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-payments","label":"List All Payments","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-a-payment","label":"Retrieve a Payment","className":"api-method get"}]},{"type":"category","label":"Receivers","link":{"type":"generated-index","title":"Receivers","slug":"/category/stellar-disbursement-platform/resources/receivers"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-receivers","label":"List All Receivers","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-a-receiver","label":"Retrieve a Receiver","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/update-the-receiver","label":"Update the Receiver","className":"api-method patch"}]},{"type":"category","label":"Statistics","link":{"type":"generated-index","title":"Statistics","slug":"/category/stellar-disbursement-platform/resources/statistics"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-all-statistics","label":"Retrieve all Statistics","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-disbursement-specific-statistics","label":"Retrieve Disbursement-specific Statistics","className":"api-method get"}]},{"type":"category","label":"Registration","link":{"type":"generated-index","title":"Registration","slug":"/category/stellar-disbursement-platform/resources/registration"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/load-the-pii-confirmation-webpage","label":"Load the PII Confirmation Webpage","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-placeholder-info","label":"Get placeholder Info","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/send-otp-to-the-receivers-phone","label":"Send OTP to the Receiver's Phone","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/validate-otp-pii","label":"Validate OTP + PII","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/stellar-toml","label":"Stellar toml","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-sep-10-challenge-transaction","label":"GET SEP-10 Challenge Transaction","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/post-sep-10-challenge-transaction","label":"POST SEP-10 Challenge Transaction","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/register-the-stellar-account-for-the-user","label":"Register the Stellar Account for the User","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/verify-if-stellar-account-is-registered","label":"Verify if Stellar Account is Registered","className":"api-method get"}]},{"type":"category","label":"Profile","link":{"type":"generated-index","title":"Profile","slug":"/category/stellar-disbursement-platform/resources/profile"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/get-profile","label":"Get Profile","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-user-profile","label":"Patch User Profile","className":"api-method patch"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-organization-info","label":"Get Organization Info","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-organization-profile","label":"Patch Organization Profile","className":"api-method patch"}]},{"type":"category","label":"Users","link":{"type":"generated-index","title":"Users","slug":"/category/stellar-disbursement-platform/resources/users"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/get-all-users","label":"Get All Users","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/create-user","label":"Create User","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-user-activation","label":"Patch User Activation","className":"api-method patch"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-all-roles","label":"Get All Roles","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-user-role","label":"Patch User Role","className":"api-method patch"}]}]; \ No newline at end of file +module.exports = [{"type":"doc","id":"stellar-disbursement-platform/resources/stellar-disbursement-platform-api"},{"type":"category","label":"Authentication","link":{"type":"generated-index","title":"Authentication","slug":"/category/stellar-disbursement-platform/resources/authentication"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/log-in","label":"Log In","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/refresh-token","label":"Refresh Token","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/authenticate-mfa","label":"Multi-factor authentication endpoint","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/forgot-password","label":"Forgot password endpoint","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/reset-password","label":"Reset password endpoint","className":"api-method post"}]},{"type":"category","label":"Disbursements","link":{"type":"generated-index","title":"Disbursements","slug":"/category/stellar-disbursement-platform/resources/disbursements"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-disbursements","label":"List All Disbursements","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/create-disbursements","label":"Create Disbursements","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-a-disbursement","label":"Retrieve a Disbursement","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-disbursement-receivers","label":"List All Disbursement Receivers","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/upload-disbursement-instructions","label":"Upload Disbursement Instructions","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/download-disbursement-instructions","label":"Download Disbursement Instructions","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/update-a-disbursement-status","label":"Update a Disbursement Status","className":"api-method patch"}]},{"type":"category","label":"Payments","link":{"type":"generated-index","title":"Payments","slug":"/category/stellar-disbursement-platform/resources/payments"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-payments","label":"List All Payments","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-a-payment","label":"Retrieve a Payment","className":"api-method get"}]},{"type":"category","label":"Receivers","link":{"type":"generated-index","title":"Receivers","slug":"/category/stellar-disbursement-platform/resources/receivers"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/list-all-receivers","label":"List All Receivers","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-a-receiver","label":"Retrieve a Receiver","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/update-the-receiver","label":"Update the Receiver","className":"api-method patch"}]},{"type":"category","label":"Statistics","link":{"type":"generated-index","title":"Statistics","slug":"/category/stellar-disbursement-platform/resources/statistics"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-all-statistics","label":"Retrieve all Statistics","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/retrieve-disbursement-specific-statistics","label":"Retrieve Disbursement-specific Statistics","className":"api-method get"}]},{"type":"category","label":"Anchor","link":{"type":"generated-index","title":"Anchor","slug":"/category/stellar-disbursement-platform/resources/anchor"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/stellar-toml","label":"Stellar toml","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-sep-10-challenge-transaction","label":"GET SEP-10 Challenge Transaction","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/post-sep-10-challenge-transaction","label":"POST SEP-10 Challenge Transaction","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/register-the-stellar-account-for-the-user","label":"Register the Stellar Account for the User","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/verify-if-stellar-account-is-registered","label":"Verify if Stellar Account is Registered","className":"api-method get"}]},{"type":"category","label":"Wallet-Registration","link":{"type":"generated-index","title":"Wallet-Registration","slug":"/category/stellar-disbursement-platform/resources/wallet-registration"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/load-the-pii-confirmation-webpage","label":"Load the PII Confirmation Webpage","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/send-otp","label":"Send OTP to the provided phone number","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/verify-receiver-registration","label":"Verify Receiver Registration","className":"api-method post"}]},{"type":"category","label":"Profile","link":{"type":"generated-index","title":"Profile","slug":"/category/stellar-disbursement-platform/resources/profile"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/get-profile","label":"Get Profile","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-user-profile","label":"Patch User Profile","className":"api-method patch"}]},{"type":"category","label":"Users","link":{"type":"generated-index","title":"Users","slug":"/category/stellar-disbursement-platform/resources/users"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/get-all-users","label":"Get All Users","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/create-user","label":"Create User","className":"api-method post"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-user-activation","label":"Patch User Activation","className":"api-method patch"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-all-roles","label":"Get All Roles","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-user-role","label":"Patch User Role","className":"api-method patch"}]},{"type":"category","label":"Organization","link":{"type":"generated-index","title":"Organization","slug":"/category/stellar-disbursement-platform/resources/organization"},"items":[{"type":"doc","id":"stellar-disbursement-platform/resources/get-organization-info","label":"Get Organization Info","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/patch-organization-profile","label":"Patch Organization Profile","className":"api-method patch"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-organization-logo","label":"Retrieve Organization Logo","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-a-list-of-countries-supported-by-this-organization","label":"Get a list of countries supported by this organization","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-a-list-of-assets-supported-by-this-organization","label":"Get a list of assets supported by this organization","className":"api-method get"},{"type":"doc","id":"stellar-disbursement-platform/resources/get-a-list-of-wallets-supported-by-this-organization","label":"Get a list of wallets supported by this organization","className":"api-method get"}]}]; \ No newline at end of file diff --git a/api/stellar-disbursement-platform/resources/stellar-toml.api.mdx b/api/stellar-disbursement-platform/resources/stellar-toml.api.mdx index e57c35de1..6ed6affe0 100644 --- a/api/stellar-disbursement-platform/resources/stellar-toml.api.mdx +++ b/api/stellar-disbursement-platform/resources/stellar-toml.api.mdx @@ -5,7 +5,7 @@ description: "This is the endpoint where the wallet will gather the SEP-10 serve sidebar_label: "Stellar toml" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"Token is valid and the webpage will be loaded normally.","headers":{},"content":{"text/toml":{"examples":{"response":{"value":"NETWORK_PASSPHRASE=\"Test SDF Network ; September 2015\"\nSIGNING_KEY=\"GC4HAYCFQYQLJV5SE6FB3LGC37D6XGIXGMAXCXWNBLH7NWW2JH4OZLHQ\"\nWEB_AUTH_ENDPOINT=\"https://localhost:8000/sep10_auth\"\n"}}}}}},"operationId":"Stellar toml","description":"This is the endpoint where the wallet will gather the SEP-10 server url and SEP-10 signing public key.","tags":["Registration"],"method":"get","path":"/.well-known/stellar.toml","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Stellar toml","description":{"content":"This is the endpoint where the wallet will gather the SEP-10 server url and SEP-10 signing public key.","type":"text/plain"},"url":{"path":[".well-known","stellar.toml"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"text/toml"}],"method":"GET"}} +api: {"responses":{"200":{"description":"Token is valid and the webpage will be loaded normally.","headers":{},"content":{"text/toml":{"examples":{"response":{"value":"NETWORK_PASSPHRASE=\"Test SDF Network ; September 2015\"\nSIGNING_KEY=\"GC4HAYCFQYQLJV5SE6FB3LGC37D6XGIXGMAXCXWNBLH7NWW2JH4OZLHQ\"\nWEB_AUTH_ENDPOINT=\"https://localhost:8000/sep10_auth\"\n"}}}}}},"operationId":"Stellar toml","description":"This is the endpoint where the wallet will gather the SEP-10 server url and SEP-10 signing public key.","tags":["Anchor"],"method":"get","path":"/.well-known/stellar.toml","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Stellar toml","description":{"content":"This is the endpoint where the wallet will gather the SEP-10 server url and SEP-10 signing public key.","type":"text/plain"},"url":{"path":[".well-known","stellar.toml"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"text/toml"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; diff --git a/api/stellar-disbursement-platform/resources/update-a-disbursement-status.api.mdx b/api/stellar-disbursement-platform/resources/update-a-disbursement-status.api.mdx index 7c68757d5..5665570ff 100644 --- a/api/stellar-disbursement-platform/resources/update-a-disbursement-status.api.mdx +++ b/api/stellar-disbursement-platform/resources/update-a-disbursement-status.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Update a Disbursement Status" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Disbursement started"}},"examples":{"response":{"value":{"message":"Disbursement started"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Bad request","extras":{"status":400,"message":"Disbursement is not ready to be started"}}},"examples":{"response":{"value":{"error":"Bad request","extras":{"status":400,"message":"Disbursement is not ready to be started"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Update a Disbursement Status","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the disbursement","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"patch","path":"/disbursements/{id}/status","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Update a Disbursement Status","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","status"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"PATCH","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Message Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]},"examples":{"response":{"value":{"message":"Disbursement started"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Bad request","extras":{"status":400,"message":"Disbursement is not ready to be started"}}},"examples":{"response":{"value":{"error":"Bad request","extras":{"status":400,"message":"Disbursement is not ready to be started"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Update a Disbursement Status","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the disbursement","required":true,"schema":{"type":"string"}}],"security":[{"BearerAuth":[]}],"method":"patch","path":"/disbursements/{id}/status","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Update a Disbursement Status","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","status"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"PATCH","auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "patch api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -28,9 +28,9 @@ import TabItem from "@theme/TabItem";
                                                                                                                                                                                                      Path Parameters
                                                                                                                                                                                                      -OK +Message Response -
                                                                                                                                                                                                      Response Headers
                                                                                                                                                                                                        Schema
                                                                                                                                                                                                        +
                                                                                                                                                                                                        Schema
                                                                                                                                                                                                        Bad Request diff --git a/api/stellar-disbursement-platform/resources/update-a-disbursement.api.mdx b/api/stellar-disbursement-platform/resources/update-a-disbursement.api.mdx deleted file mode 100644 index 5a52b17ca..000000000 --- a/api/stellar-disbursement-platform/resources/update-a-disbursement.api.mdx +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: update-a-disbursement -title: "Update a Disbursement" -description: "" -sidebar_label: "Update a Disbursement" -hide_title: true -hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"upload_by":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}}},"total_payments":{"type":"number"},"total_payments_sent":{"type":"number"},"total_payments_remaining":{"type":"number"},"total_payments_failed":{"type":"number"},"amount_disbursed":{"type":"string"},"total_amount":{"type":"string"},"average_amount":{"type":"string"},"country":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"asset":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"issuer":{"type":"string"},"name":{"type":"string"}}},"status":{"type":"string"},"status_history":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"}},"required":["user_id","status","timestamp"]}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"example":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","upload_by":{"id":"88b0ad24-8bab-4f19-903f-cb2da90108a2","name":"Marcelo"},"total_payments":20,"total_payments_sent":0,"total_payments_remaining":20,"total_payments_failed":0,"amount_disbursed":"0.000000","total_amount":"0.0000000","average_amount":"0.00000000","country":{"code":"ua","name":"Ukraine","language":"uk","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"wallet":{"id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant","homepage":"https://vibrantapp.com"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","name":"USD Coin"},"status":"DRAFT","status_history":[{"user_id":null,"status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"},{"user_id":null,"status":"READY","timestamp":"2023-02-03T11:45:51.000Z"}],"created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T11:45:51.000Z"}},"examples":{"response":{"value":{"id":"619da857-8725-4c58-933d-c120a458e0f5","name":"Disbursement Name","upload_by":{"id":"88b0ad24-8bab-4f19-903f-cb2da90108a2","name":"Marcelo"},"total_payments":20,"total_payments_sent":0,"total_payments_remaining":20,"total_payments_failed":0,"amount_disbursed":"0.000000","total_amount":"0.0000000","average_amount":"0.00000000","country":{"code":"ua","name":"Ukraine","language":"uk","created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T10:45:51.000Z"},"wallet":{"id":"e2de8544-b7e2-40a9-ad40-411f70d5c4bf","name":"Vibrant","homepage":"https://vibrantapp.com"},"asset":{"id":"25923001-508a-4629-9186-c41211b2a3d0","code":"USDC","issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN","name":"USD Coin"},"status":"DRAFT","status_history":[{"user_id":null,"status":"DRAFT","timestamp":"2023-02-03T10:45:51.000Z"},{"user_id":null,"status":"READY","timestamp":"2023-02-03T11:45:51.000Z"}],"created_at":"2023-02-03T10:45:51.000Z","updated_at":"2023-02-03T11:45:51.000Z"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Bad request","extras":{"status":400,"message":"Invalid country code provided"}}},"examples":{"response":{"value":{"error":"Bad request","extras":{"status":400,"message":"Invalid country code provided"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Update a Disbursement","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the `Disbursement`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"patch","path":"/disbursements/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Update a Disbursement","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Disbursement`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"PATCH","auth":{"type":"oauth2","oauth2":[]}}} -sidebar_class_name: "patch api-method" -info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api -custom_edit_url: null ---- - -import { SepBadge } from "@site/src/components/SepBadge"; - - - -import ApiTabs from "@theme/ApiTabs"; -import MimeTabs from "@theme/MimeTabs"; -import ParamsItem from "@theme/ParamsItem"; -import ResponseSamples from "@theme/ResponseSamples"; -import SchemaItem from "@theme/SchemaItem"; -import SchemaTabs from "@theme/SchemaTabs"; -import DiscriminatorTabs from "@theme/DiscriminatorTabs"; -import TabItem from "@theme/TabItem"; - -## Update a Disbursement - -
                                                                                                                                                                                                        Path Parameters
                                                                                                                                                                                                        - -OK - -
                                                                                                                                                                                                        Response Headers
                                                                                                                                                                                                          Schema
                                                                                                                                                                                                            upload_by object
                                                                                                                                                                                                            country object
                                                                                                                                                                                                            wallet object
                                                                                                                                                                                                            asset object
                                                                                                                                                                                                            status_history object[]
                                                                                                                                                                                                          • Array [
                                                                                                                                                                                                          • ]
                                                                                                                                                                                                          - -Bad Request - -
                                                                                                                                                                                                          Response Headers
                                                                                                                                                                                                            Schema
                                                                                                                                                                                                              extras object
                                                                                                                                                                                                            - -Unauthorized - -
                                                                                                                                                                                                            Response Headers
                                                                                                                                                                                                              Schema
                                                                                                                                                                                                                extras object
                                                                                                                                                                                                              - -Forbidden - -
                                                                                                                                                                                                              Response Headers
                                                                                                                                                                                                                Schema
                                                                                                                                                                                                                - -Not Found - -
                                                                                                                                                                                                                Response Headers
                                                                                                                                                                                                                  Schema
                                                                                                                                                                                                                    extras object
                                                                                                                                                                                                                  diff --git a/api/stellar-disbursement-platform/resources/update-the-receiver.api.mdx b/api/stellar-disbursement-platform/resources/update-the-receiver.api.mdx index 9ce63cf82..7622fe760 100644 --- a/api/stellar-disbursement-platform/resources/update-the-receiver.api.mdx +++ b/api/stellar-disbursement-platform/resources/update-the-receiver.api.mdx @@ -5,7 +5,7 @@ description: "" sidebar_label: "Update the Receiver" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"OK","headers":{}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Invalid verification value."}},"examples":{"response":{"value":{"error":"Invalid verification value."}}}}}},"401":{"description":"Unauthorized","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not authorized"}},"examples":{"response":{"value":{"error":"Not authorized"}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{}}},"operationId":"Update the Receiver","description":"","tags":["Receivers"],"parameters":[{"name":"id","in":"path","description":"ID of the `Receiver`.","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"patch","path":"/receivers/{id}","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Update the Receiver","description":{"content":"","type":"text/plain"},"url":{"path":["receivers",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Receiver`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"PATCH","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"Updated Receiver Details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"total_payments":{"type":"string"},"successful_payments":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"registered_wallets":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"wallets":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"receiver":{"type":"object","properties":{"id":{"type":"string"}}},"wallet":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"homepage":{"type":"string"}}},"stellar_address":{"type":"string"},"stellar_memo":{"type":"string"},"stellar_memo_type":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"invited_at":{"type":"string"},"last_sms_sent":{"type":"string"},"total_payments":{"type":"string"},"payments_received":{"type":"string"},"failed_payments":{"type":"string"},"remaining_payments":{"type":"string"},"received_amounts":{"type":"array","items":{"type":"object","properties":{"asset_code":{"type":"string"},"asset_issuer":{"type":"string"},"received_amount":{"type":"string"}}}},"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"status_history":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY","REGISTERED","FLAGGED"]},"timestamp":{"type":"string","format":"date-time"}}}}}}}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Resource not found"}}}}}}}},"operationId":"Update the Receiver","description":"","tags":["Receivers"],"parameters":[{"name":"id","in":"path","description":"ID of the `Receiver`.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"date_of_birth":{"type":"string","description":"Date of birth of the receiver"},"pin":{"type":"string","description":"Personal identification number of the receiver"},"national_id":{"type":"string","description":"National ID of the receiver"},"email":{"type":"string","description":"Email of the receiver"},"external_id":{"type":"string","description":"External ID of the receiver"}},"example":{"date_of_birth":"1980-01-01","pin":"1234","national_id":"123456789","email":"john@example.com","external_id":"external123"}}}},"description":"List of fields to patch for the receiver","required":true},"security":[{"BearerAuth":[]}],"method":"patch","path":"/receivers/{id}","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"date_of_birth":"1980-01-01","pin":"1234","national_id":"123456789","email":"john@example.com","external_id":"external123"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Update the Receiver","description":{"content":"","type":"text/plain"},"url":{"path":["receivers",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the `Receiver`.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "patch api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -26,19 +26,23 @@ import TabItem from "@theme/TabItem"; ## Update the Receiver -
                                                                                                                                                                                                                  Path Parameters
                                                                                                                                                                                                                  +
                                                                                                                                                                                                                  Path Parameters
                                                                                                                                                                                                                  Request Body required
                                                                                                                                                                                                                  -OK +List of fields to patch for the receiver -
                                                                                                                                                                                                                  Response Headers
                                                                                                                                                                                                                    +
                                                                                                                                                                                                                    + +Updated Receiver Details + +
                                                                                                                                                                                                                    Schema
                                                                                                                                                                                                                      received_amounts object[]
                                                                                                                                                                                                                    • Array [
                                                                                                                                                                                                                    • ]
                                                                                                                                                                                                                    • wallets object[]
                                                                                                                                                                                                                    • Array [
                                                                                                                                                                                                                    • receiver object
                                                                                                                                                                                                                      wallet object
                                                                                                                                                                                                                      received_amounts object[]
                                                                                                                                                                                                                    • Array [
                                                                                                                                                                                                                    • ]
                                                                                                                                                                                                                    • status_history object[]
                                                                                                                                                                                                                    • Array [
                                                                                                                                                                                                                    • ]
                                                                                                                                                                                                                    • ]
                                                                                                                                                                                                                    Bad Request -
                                                                                                                                                                                                                    Response Headers
                                                                                                                                                                                                                      Schema
                                                                                                                                                                                                                      +
                                                                                                                                                                                                                      Schema
                                                                                                                                                                                                                      Unauthorized -
                                                                                                                                                                                                                      Response Headers
                                                                                                                                                                                                                        Schema
                                                                                                                                                                                                                        +
                                                                                                                                                                                                                        Response Headers
                                                                                                                                                                                                                          Schema
                                                                                                                                                                                                                            extras object
                                                                                                                                                                                                                          Forbidden @@ -46,4 +50,4 @@ Forbidden Not Found -
                                                                                                                                                                                                                          Response Headers
                                                                                                                                                                                                                            +
                                                                                                                                                                                                                            Response Headers
                                                                                                                                                                                                                              Schema
                                                                                                                                                                                                                                extras object
                                                                                                                                                                                                                              diff --git a/api/stellar-disbursement-platform/resources/upload-disbursement-instructions.api.mdx b/api/stellar-disbursement-platform/resources/upload-disbursement-instructions.api.mdx index a4a6cc445..f926977d8 100644 --- a/api/stellar-disbursement-platform/resources/upload-disbursement-instructions.api.mdx +++ b/api/stellar-disbursement-platform/resources/upload-disbursement-instructions.api.mdx @@ -1,11 +1,11 @@ --- id: upload-disbursement-instructions title: "Upload Disbursement Instructions" -description: "" +description: "Upload a CSV file with disbursement instructions." sidebar_label: "Upload Disbursement Instructions" hide_title: true hide_table_of_contents: true -api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"File uploaded succesfully"}},"examples":{"response":{"value":{"message":"File uploaded succesfully"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"foo":{"type":"string"},"message":{"type":"string"}}}},"example":{"error":"Invalid file format *.xyz","extras":{"foo":"bar","message":"Not authorized"}}},"examples":{"response":{"value":{"error":"Invalid file format *.xyz","extras":{"foo":"bar","message":"Not authorized"}}}}}}},"401":{"description":"Unauthorized","headers":{}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Upload Disbursement Instructions","description":"","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the Disbursement","required":true,"schema":{"type":"string"}}],"security":[{"oauth2":[]}],"method":"post","path":"/disbursements/{id}/instructions","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Upload Disbursement Instructions","description":{"content":"","type":"text/plain"},"url":{"path":["disbursements",":id","instructions"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the Disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"POST","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"201":{"description":"Created","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"File uploaded succesfully"}},"examples":{"response":{"value":{"message":"File uploaded succesfully"}}}}}},"400":{"description":"Bad Request","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"foo":{"type":"string"},"message":{"type":"string"}}}},"example":{"error":"Invalid file format *.xyz","extras":{"foo":"bar","message":"Not authorized"}}},"examples":{"response":{"value":{"error":"Invalid file format *.xyz","extras":{"foo":"bar","message":"Not authorized"}}}}}}},"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"}}}}}}},"403":{"description":"Forbidden","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Forbidden"}},"examples":{"response":{"value":{"error":"Forbidden"}}}}}},"404":{"description":"Not Found","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"status":{"type":"number"},"message":{"type":"string"}}}},"example":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}},"examples":{"response":{"value":{"error":"Not found","extras":{"status":404,"message":"Disbursement not found"}}}}}}}},"operationId":"Upload Disbursement Instructions","description":"Upload a CSV file with disbursement instructions.","tags":["Disbursements"],"parameters":[{"name":"id","in":"path","description":"ID of the Disbursement","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"Disbursement instructions file to upload. The CSV file should be in the following format: `phone,id,amount,verification`","type":"string","format":"binary"}},"required":["file"]}}},"required":true},"security":[{"BearerAuth":[]}],"method":"post","path":"/disbursements/{id}/instructions","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Upload Disbursement Instructions","description":{"content":"Upload a CSV file with disbursement instructions.","type":"text/plain"},"url":{"path":["disbursements",":id","instructions"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the Disbursement","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Content-Type","value":"multipart/form-data"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"formdata","formdata":[]},"auth":{"type":"apikey","apikey":[{"type":"any","value":"Authorization","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "post api-method" info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api custom_edit_url: null @@ -26,7 +26,11 @@ import TabItem from "@theme/TabItem"; ## Upload Disbursement Instructions -
                                                                                                                                                                                                                              Path Parameters
                                                                                                                                                                                                                              + + +Upload a CSV file with disbursement instructions. + +
                                                                                                                                                                                                                              Path Parameters
                                                                                                                                                                                                                              Request Body required
                                                                                                                                                                                                                              Created @@ -38,7 +42,7 @@ Bad Request Unauthorized -
                                                                                                                                                                                                                              Response Headers
                                                                                                                                                                                                                                +
                                                                                                                                                                                                                                Response Headers
                                                                                                                                                                                                                                  Schema
                                                                                                                                                                                                                                    extras object
                                                                                                                                                                                                                                  Forbidden diff --git a/api/stellar-disbursement-platform/resources/validate-otp-pii.api.mdx b/api/stellar-disbursement-platform/resources/validate-otp-pii.api.mdx deleted file mode 100644 index 7de8d4b59..000000000 --- a/api/stellar-disbursement-platform/resources/validate-otp-pii.api.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: validate-otp-pii -title: "Validate OTP + PII" -description: "This is the endpoint that will be used to validate the OTP + PII. It will retiurn the deep link used to launch the wallet application (Vibrant)." -sidebar_label: "Validate OTP + PII" -hide_title: true -hide_table_of_contents: true -api: {"responses":{"200":{"description":"The OTP + PII were successfully validated. This response will comtain the link used to launch Vibrant and finalize the wallet<>SDP registration step from there.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"deep_link":{"type":"string"}},"example":{"deep_link":"vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc"}},"examples":{"response":{"value":{"deep_link":"vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc"}}}}}},"400":{"description":"The token, PII or OTP provided are invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"extras":{"type":"object","properties":{"code":{"type":"string"},"details":{"type":"string"}}}},"example":{"error":"Bad request.","extras":{"code":"400_1","details":"The token, PII or OTP provided are incorrect."}}},"examples":{"response":{"value":{"error":"Bad request.","extras":{"code":"400_1","details":"The token, PII or OTP provided are incorrect."}}}}}}}},"operationId":"Validate OTP + PII","description":"This is the endpoint that will be used to validate the OTP + PII. It will retiurn the deep link used to launch the wallet application (Vibrant).","tags":["Registration"],"parameters":[{"name":"token","in":"path","description":"Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pii":{"type":"string"},"otp":{"type":"string"}},"example":{"pii":"2000-01-01","otp":"123abc"}}}}},"method":"post","path":"/registration/receiver/{token}/validate","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"jsonRequestBodyExample":{"pii":"2000-01-01","otp":"123abc"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Validate OTP + PII","description":{"content":"This is the endpoint that will be used to validate the OTP + PII. It will retiurn the deep link used to launch the wallet application (Vibrant).","type":"text/plain"},"url":{"path":["registration","receiver",":token","validate"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process.","type":"text/plain"},"type":"any","value":"","key":"token"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} -sidebar_class_name: "post api-method" -info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api -custom_edit_url: null ---- - -import { SepBadge } from "@site/src/components/SepBadge"; - - - -import ApiTabs from "@theme/ApiTabs"; -import MimeTabs from "@theme/MimeTabs"; -import ParamsItem from "@theme/ParamsItem"; -import ResponseSamples from "@theme/ResponseSamples"; -import SchemaItem from "@theme/SchemaItem"; -import SchemaTabs from "@theme/SchemaTabs"; -import DiscriminatorTabs from "@theme/DiscriminatorTabs"; -import TabItem from "@theme/TabItem"; - -## Validate OTP + PII - - - -This is the endpoint that will be used to validate the OTP + PII. It will retiurn the deep link used to launch the wallet application (Vibrant). - -
                                                                                                                                                                                                                                  Path Parameters
                                                                                                                                                                                                                                  Request Body
                                                                                                                                                                                                                                  - -The OTP + PII were successfully validated. This response will comtain the link used to launch Vibrant and finalize the wallet<\>SDP registration step from there. - -
                                                                                                                                                                                                                                  Response Headers
                                                                                                                                                                                                                                    Schema
                                                                                                                                                                                                                                    - -The token, PII or OTP provided are invalid. - -
                                                                                                                                                                                                                                    Response Headers
                                                                                                                                                                                                                                      Schema
                                                                                                                                                                                                                                        extras object
                                                                                                                                                                                                                                      diff --git a/api/stellar-disbursement-platform/resources/verify-if-stellar-account-is-registered.api.mdx b/api/stellar-disbursement-platform/resources/verify-if-stellar-account-is-registered.api.mdx index 3a4ce8814..e44d026b7 100644 --- a/api/stellar-disbursement-platform/resources/verify-if-stellar-account-is-registered.api.mdx +++ b/api/stellar-disbursement-platform/resources/verify-if-stellar-account-is-registered.api.mdx @@ -5,7 +5,7 @@ description: "This is the endpoint that will be used to verify if the Stellar pu sidebar_label: "Verify if Stellar Account is Registered" hide_title: true hide_table_of_contents: true -api: {"responses":{"200":{"description":"The account containing the given public key has already been registered with the SDP.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"example":{"status":"ok"}},"examples":{"response":{"value":{"status":"ok"}}}}}},"401":{"description":"The SEP-10 token is invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Unauthorized"}},"examples":{"response":{"value":{"error":"Unauthorized"}}}}}},"404":{"description":"The account containing the given public key has never been registered with the SDP.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not found."}},"examples":{"response":{"value":{"error":"Not found."}}}}}}},"operationId":"Verify if Stellar Account is Registered","description":"This is the endpoint that will be used to verify if the Stellar public key is already registered with the SDP user.","tags":["Registration"],"security":[{"oauth2":[]}],"method":"get","path":"/registration/wallet","securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/","tokenUrl":"/","scopes":{}}}}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Verify if Stellar Account is Registered","description":{"content":"This is the endpoint that will be used to verify if the Stellar public key is already registered with the SDP user.","type":"text/plain"},"url":{"path":["registration","wallet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"responses":{"200":{"description":"The account containing the given public key has already been registered with the SDP.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}},"example":{"status":"ok"}},"examples":{"response":{"value":{"status":"ok"}}}}}},"401":{"description":"The SEP-10 token is invalid.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Unauthorized"}},"examples":{"response":{"value":{"error":"Unauthorized"}}}}}},"404":{"description":"The account containing the given public key has never been registered with the SDP.","headers":{},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"example":{"error":"Not found."}},"examples":{"response":{"value":{"error":"Not found."}}}}}}},"operationId":"Verify if Stellar Account is Registered","description":"This is the endpoint that will be used to verify if the Stellar public key is already registered with the SDP user.","tags":["Anchor"],"security":[{"BearerAuth":[]}],"method":"get","path":"/registration/wallet","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Verify if Stellar Account is Registered","description":{"content":"This is the endpoint that will be used to verify if the Stellar public key is already registered with the SDP user.","type":"text/plain"},"url":{"path":["registration","wallet"],"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":"","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 @@ -13,7 +13,7 @@ custom_edit_url: null import { SepBadge } from "@site/src/components/SepBadge"; - + import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; diff --git a/api/stellar-disbursement-platform/resources/verify-receiver-registration.api.mdx b/api/stellar-disbursement-platform/resources/verify-receiver-registration.api.mdx new file mode 100644 index 000000000..f5ed428da --- /dev/null +++ b/api/stellar-disbursement-platform/resources/verify-receiver-registration.api.mdx @@ -0,0 +1,49 @@ +--- +id: verify-receiver-registration +title: "Verify Receiver Registration" +description: "This endpoint verifies the receiver's registration by validating the OTP and other verification values provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request." +sidebar_label: "Verify Receiver Registration" +hide_title: true +hide_table_of_contents: true +api: {"operationId":"VerifyReceiverRegistration","description":"This endpoint verifies the receiver's registration by validating the OTP and other verification values provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request.","tags":["Wallet-Registration"],"parameters":[{"name":"Authorization","in":"header","description":"SEP-24 token for authorization (Format: 'Bearer {token}')","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"phone_number":{"type":"string","description":"Phone number used in registration"},"otp":{"type":"string","description":"One-Time Password received for verification"},"verification":{"type":"string","description":"Verification value provided by the user"},"verification_type":{"type":"string","description":"Type of verification value","enum":["DATE_OF_BIRTH","PIN","NATIONAL_ID_NUMBER"]},"recaptcha_token":{"type":"string","description":"Token received from Google reCAPTCHA"}}}}},"description":"Verification data including phone number, OTP, verification value, and reCAPTCHA token","required":true},"responses":{"200":{"description":"Verification successful","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"ok"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Details about the error"}}}}}},"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"}}}}}}}},"method":"post","path":"/wallet-registration/verification","securitySchemes":{"BearerAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"JWT used for authorization"}},"jsonRequestBodyExample":{"phone_number":"string","otp":"string","verification":"string","verification_type":"DATE_OF_BIRTH","recaptcha_token":"string"},"info":{"title":"Stellar Disbursement Platform API","version":"","description":""},"postman":{"name":"Verify Receiver Registration","description":{"content":"This endpoint verifies the receiver's registration by validating the OTP and other verification values provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request.","type":"text/plain"},"url":{"path":["wallet-registration","verification"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: api/stellar-disbursement-platform/resources/stellar-disbursement-platform-api +custom_edit_url: null +--- + +import { SepBadge } from "@site/src/components/SepBadge"; + + + +import ApiTabs from "@theme/ApiTabs"; +import MimeTabs from "@theme/MimeTabs"; +import ParamsItem from "@theme/ParamsItem"; +import ResponseSamples from "@theme/ResponseSamples"; +import SchemaItem from "@theme/SchemaItem"; +import SchemaTabs from "@theme/SchemaTabs"; +import DiscriminatorTabs from "@theme/DiscriminatorTabs"; +import TabItem from "@theme/TabItem"; + +## Verify Receiver Registration + + + +This endpoint verifies the receiver's registration by validating the OTP and other verification values provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request. + +
                                                                                                                                                                                                                                      Header Parameters
                                                                                                                                                                                                                                      Request Body required
                                                                                                                                                                                                                                      + +Verification data including phone number, OTP, verification value, and reCAPTCHA token + +
                                                                                                                                                                                                                                      + +Verification successful + +
                                                                                                                                                                                                                                      Schema
                                                                                                                                                                                                                                      + +Bad Request + +
                                                                                                                                                                                                                                      Schema
                                                                                                                                                                                                                                      + +Unauthorized + +
                                                                                                                                                                                                                                      Response Headers
                                                                                                                                                                                                                                        Schema
                                                                                                                                                                                                                                          extras object
                                                                                                                                                                                                                                        diff --git a/openapi/stellar-disbursement-platform/bundled.yml b/openapi/stellar-disbursement-platform/bundled.yml index 142d0e7ca..d7e97ff74 100644 --- a/openapi/stellar-disbursement-platform/bundled.yml +++ b/openapi/stellar-disbursement-platform/bundled.yml @@ -62,7 +62,7 @@ paths: password: type: string example: - username: reece + username: johndoe@mail.com password: mysecret produces: - application/json @@ -117,40 +117,123 @@ paths: produces: - application/json security: - - oauth2: [] - /disbursements: - get: + - BearerAuth: [] + /mfa: + post: + summary: Multi-factor authentication endpoint + operationId: authenticateMFA + tags: + - Authentication + parameters: + - in: body + name: body + description: MFA request data + required: true + schema: + type: object + properties: + mfa_code: + type: string + description: Multi-factor authentication code + remember_me: + type: boolean + description: Boolean flag to remember the user + recaptcha_token: + type: string + description: Token for reCAPTCHA validation + required: + - mfa_code + - in: header + name: Device-ID + type: string + required: false + description: Identifier of the device responses: '200': - description: OK - headers: {} - examples: {} + description: Successful authentication + schema: + type: object + properties: + token: + type: string + description: Authentication token + '400': + $ref: '#/responses/BadRequestResponse' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized + $ref: '#/responses/UnauthorizedResponse' + produces: + - application/json + /forgot-password: + post: + summary: Forgot password endpoint + operationId: forgotPassword + tags: + - Authentication + parameters: + - in: body + name: body + description: Forgot password request data + required: true schema: type: object properties: - error: + email: type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Not authorized - extras: - status: 401 - message: Not authorized + format: email + description: Email of the user + recaptcha_token: + type: string + description: Token for reCAPTCHA validation + required: + - email + responses: + '200': + description: Forgot password email sent successfully + schema: + $ref: '#/definitions/MessageResponse' + '400': + $ref: '#/responses/BadRequestResponse' + /reset-password: + post: + summary: Reset password endpoint + operationId: resetPassword + tags: + - Authentication + parameters: + - in: body + name: body + description: Reset password request data + required: true + schema: + type: object + properties: + password: + type: string + description: New password for the user + reset_token: + type: string + description: Token used to identify a valid password reset request + required: + - password + - reset_token + responses: + '200': + description: Password reset successfully + '400': + $ref: '#/responses/BadRequestResponse' + produces: + - application/json + /disbursements: + get: + responses: + '200': + description: A list of Disbursement details + schema: + $ref: '#/definitions/DisbursementPagination' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: List All Disbursements operationId: List All Disbursements description: '' @@ -219,161 +302,13 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] post: responses: '201': - description: Created - headers: {} - examples: - application/json: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - upload_by: - id: 88b0ad24-8bab-4f19-903f-cb2da90108a2 - name: Marcelo - total_payments: 0 - total_payments_sent: 0 - total_payments_remaining: 0 - total_payments_failed: 0 - amount_disbursed: '0.0000000' - total_amount: '0.0000000' - average_amount: '0.0000000' - country: - code: ua - name: Ukraine - language: uk - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - wallet: - id: e2de8544-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - homepage: https://vibrantapp.com - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - name: USD Coin - status: DRAFT - status_history: - - user_id: null - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' + description: A new disbursement schema: - type: object - properties: - id: - type: string - name: - type: string - upload_by: - type: object - properties: - id: - type: string - name: - type: string - total_payments: - type: number - total_payments_sent: - type: number - total_payments_remaining: - type: number - total_payments_failed: - type: number - amount_disbursed: - type: string - total_amount: - type: string - average_amount: - type: string - country: - type: object - properties: - code: - type: string - name: - type: string - language: - type: string - created_at: - type: string - updated_at: - type: string - wallet: - type: object - properties: - id: - type: string - name: - type: string - homepage: - type: string - asset: - type: object - properties: - id: - type: string - code: - type: string - issuer: - type: string - name: - type: string - status: - type: string - status_history: - type: array - items: - type: object - properties: - user_id: - type: string - status: - type: string - timestamp: - type: string - created_at: - type: string - updated_at: - type: string - example: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - upload_by: - id: 88b0ad24-8bab-4f19-903f-cb2da90108a2 - name: Marcelo - total_payments: 0 - total_payments_sent: 0 - total_payments_remaining: 0 - total_payments_failed: 0 - amount_disbursed: '0.0000000' - total_amount: '0.0000000' - average_amount: '0.0000000' - country: - code: ua - name: Ukraine - language: uk - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - wallet: - id: e2de8544-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - homepage: https://vibrantapp.com - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - name: USD Coin - status: DRAFT - status_history: - - user_id: null - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' + $ref: '#/definitions/Disbursement' '400': description: Bad Request headers: {} @@ -401,44 +336,9 @@ paths: status: 400 message: Invalid country code provided '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized - 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 + $ref: '#/responses/UnauthorizedResponse' '403': - description: Forbidden - headers: {} - examples: - application/json: - error: Forbidden - schema: - type: object - properties: - error: - type: string - example: - error: Forbidden + $ref: '#/responses/ForbiddenResponse' summary: Create Disbursements operationId: Create Disbursements description: '' @@ -466,247 +366,27 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /disbursements/{id}: get: responses: '200': - description: OK - headers: {} - examples: - application/json: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - upload_by: - id: 88b0ad24-8bab-4f19-903f-cb2da90108a2 - name: Marcelo - total_payments: 2 - total_payments_sent: 1 - total_payments_remaining: 1 - total_payments_failed: 0 - amount_disbursed: '75.000000' - total_amount: '150.0000000' - average_amount: '75.00000000' - country: - code: ua - name: Ukraine - language: uk - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - wallet: - id: e2de8544-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - homepage: https://vibrantapp.com - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - name: USD Coin - beneficiaries: - - id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - phone_number: '+380441234567' - payment_id: b6b667ad-6cc2-46cf-9be7-561daace7d48 - amount: '75.0000000' - stellar_address: GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ - stellar_transaction_id: 614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef - status: SUCCESS - - payment_id: b6b667ad-6cc2-46cf-9be7-561daace7d48 - phone_number: '+380441234567' - amount: '75.0000000' - stellar_address: GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ - stellar_transaction_id: 614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef - status: READY - status_history: - - user_id: null - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - - user_id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - - user_id: null - status: READY - timestamp: '2023-02-03T11:45:51.000Z' - - user_id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - status: READY - timestamp: '2023-02-03T11:45:51.000Z' - status: READY - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T11:45:51.000Z' + description: Disbursement details schema: - type: object - properties: - id: - type: string - name: - type: string - upload_by: - type: object - properties: - id: - type: string - name: - type: string - total_payments: - type: number - total_payments_sent: - type: number - total_payments_remaining: - type: number - total_payments_failed: - type: number - amount_disbursed: - type: string - total_amount: - type: string - average_amount: - type: string - country: - type: object - properties: - code: - type: string - name: - type: string - language: - type: string - created_at: - type: string - updated_at: - type: string - wallet: - type: object - properties: - id: - type: string - name: - type: string - homepage: - type: string - asset: - type: object - properties: - id: - type: string - code: - type: string - issuer: - type: string - name: - type: string - beneficiaries: - type: array - items: - type: object - properties: - id: - type: string - phone_number: - type: string - payment_id: - type: string - amount: - type: string - stellar_address: - type: string - stellar_transaction_id: - type: string - status: - type: string - required: - - payment_id - - phone_number - - amount - - stellar_address - - stellar_transaction_id - - status - status_history: - type: array - items: - type: object - properties: - user_id: - type: string - status: - type: string - timestamp: - type: string - required: - - user_id - - status - - timestamp - status: - type: string - created_at: - type: string - updated_at: - type: string - example: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - upload_by: - id: 88b0ad24-8bab-4f19-903f-cb2da90108a2 - name: Marcelo - total_payments: 2 - total_payments_sent: 1 - total_payments_remaining: 1 - total_payments_failed: 0 - amount_disbursed: '75.000000' - total_amount: '150.0000000' - average_amount: '75.00000000' - country: - code: ua - name: Ukraine - language: uk - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - wallet: - id: e2de8544-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - homepage: https://vibrantapp.com - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - name: USD Coin - beneficiaries: - - id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - phone_number: '+380441234567' - payment_id: b6b667ad-6cc2-46cf-9be7-561daace7d48 - amount: '75.0000000' - stellar_address: GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ - stellar_transaction_id: 614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef - status: SUCCESS - - payment_id: b6b667ad-6cc2-46cf-9be7-561daace7d48 - phone_number: '+380441234567' - amount: '75.0000000' - stellar_address: GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ - stellar_transaction_id: 614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef - status: READY - status_history: - - user_id: null - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - - user_id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - - user_id: null - status: READY - timestamp: '2023-02-03T11:45:51.000Z' - - user_id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - status: READY - timestamp: '2023-02-03T11:45:51.000Z' - status: READY - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T11:45:51.000Z' + $ref: '#/definitions/Disbursement' '401': - description: Unauthorized + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' + '404': + description: Not Found headers: {} examples: application/json: - error: Not authorized + error: Not found extras: - status: 401 - message: Not authorized + status: 404 + message: Disbursement not found schema: type: object properties: @@ -720,10 +400,36 @@ paths: message: type: string example: - error: Not authorized + error: Not found extras: - status: 401 - message: Not authorized + status: 404 + message: Disbursement not found + summary: Retrieve a Disbursement + operationId: Retrieve a Disbursement + description: '' + tags: + - Disbursements + parameters: + - name: id + in: path + description: ID of the `Disbursement`. + required: true + type: string + produces: + - application/json + security: + - BearerAuth: [] + /disbursements/{id}/receivers: + get: + responses: + '200': + description: A list of Disbursement Receivers + schema: + $ref: '#/definitions/DisbursementReceiverPagination' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' '404': description: Not Found headers: {} @@ -750,219 +456,55 @@ paths: extras: status: 404 message: Disbursement not found - summary: Retrieve a Disbursement - operationId: Retrieve a Disbursement + summary: List All Disbursement Receivers + operationId: List All Disbursement Receivers description: '' tags: - Disbursements parameters: - name: id in: path - description: ID of the `Disbursement`. + description: ID of the Disbursement required: true type: string + - name: page + in: query + description: The page number to fetch. + required: false + type: number + - name: page_limit + in: query + description: The number of records to return per page. + required: false + type: number produces: - application/json security: - - oauth2: [] - patch: + - BearerAuth: [] + /disbursements/{id}/instructions: + post: responses: - '200': - description: OK + '201': + description: Created headers: {} examples: application/json: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - upload_by: - id: 88b0ad24-8bab-4f19-903f-cb2da90108a2 - name: Marcelo - total_payments: 20 - total_payments_sent: 0 - total_payments_remaining: 20 - total_payments_failed: 0 - amount_disbursed: '0.000000' - total_amount: '0.0000000' - average_amount: '0.00000000' - country: - code: ua - name: Ukraine - language: uk - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - wallet: - id: e2de8544-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - homepage: https://vibrantapp.com - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - name: USD Coin - status: DRAFT - status_history: - - user_id: null - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - - user_id: null - status: READY - timestamp: '2023-02-03T11:45:51.000Z' - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T11:45:51.000Z' + message: File uploaded succesfully schema: type: object properties: - id: - type: string - name: - type: string - upload_by: - type: object - properties: - id: - type: string - name: - type: string - total_payments: - type: number - total_payments_sent: - type: number - total_payments_remaining: - type: number - total_payments_failed: - type: number - amount_disbursed: - type: string - total_amount: - type: string - average_amount: - type: string - country: - type: object - properties: - code: - type: string - name: - type: string - language: - type: string - created_at: - type: string - updated_at: - type: string - wallet: - type: object - properties: - id: - type: string - name: - type: string - homepage: - type: string - asset: - type: object - properties: - id: - type: string - code: - type: string - issuer: - type: string - name: - type: string - status: - type: string - status_history: - type: array - items: - type: object - properties: - user_id: - type: string - status: - type: string - timestamp: - type: string - required: - - user_id - - status - - timestamp - created_at: - type: string - updated_at: + message: type: string example: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - upload_by: - id: 88b0ad24-8bab-4f19-903f-cb2da90108a2 - name: Marcelo - total_payments: 20 - total_payments_sent: 0 - total_payments_remaining: 20 - total_payments_failed: 0 - amount_disbursed: '0.000000' - total_amount: '0.0000000' - average_amount: '0.00000000' - country: - code: ua - name: Ukraine - language: uk - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - wallet: - id: e2de8544-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - homepage: https://vibrantapp.com - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - name: USD Coin - status: DRAFT - status_history: - - user_id: null - status: DRAFT - timestamp: '2023-02-03T10:45:51.000Z' - - user_id: null - status: READY - timestamp: '2023-02-03T11:45:51.000Z' - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T11:45:51.000Z' + message: File uploaded succesfully '400': description: Bad Request headers: {} examples: application/json: - error: Bad request - extras: - status: 400 - message: Invalid country code provided - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Bad request - extras: - status: 400 - message: Invalid country code provided - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized + error: Invalid file format *.xyz extras: - status: 401 + foo: bar message: Not authorized schema: type: object @@ -972,28 +514,19 @@ paths: extras: type: object properties: - status: - type: number + foo: + type: string message: type: string example: - error: Not authorized + error: Invalid file format *.xyz extras: - status: 401 + foo: bar message: Not authorized + '401': + $ref: '#/responses/UnauthorizedResponse' '403': - description: Forbidden - headers: {} - examples: - application/json: - error: Forbidden - schema: - type: object - properties: - error: - type: string - example: - error: Forbidden + $ref: '#/responses/ForbiddenResponse' '404': description: Not Found headers: {} @@ -1020,36 +553,50 @@ paths: extras: status: 404 message: Disbursement not found - summary: Update a Disbursement - operationId: Update a Disbursement - description: '' + summary: Upload Disbursement Instructions + operationId: Upload Disbursement Instructions + description: Upload a CSV file with disbursement instructions. + consumes: + - multipart/form-data tags: - Disbursements parameters: - name: id in: path - description: ID of the `Disbursement`. + description: ID of the Disbursement required: true type: string + - name: file + in: formData + description: 'Disbursement instructions file to upload. The CSV file should be in the following format: `phone,id,amount,verification`' + required: true + type: file produces: - application/json security: - - oauth2: [] - delete: + - BearerAuth: [] + get: responses: - '204': - description: No Content - headers: {} - examples: {} - '401': - description: Unauthorized + '200': + description: Disbursement CSV file + headers: + Content-Disposition: + type: string + description: The filename of the returned CSV file. + Content-Type: + type: string + description: text/csv + examples: + text/csv: '' + '400': + description: Bad Request headers: {} examples: application/json: - error: Not authorized + error: Invalid request extras: - status: 401 - message: Not authorized + foo: bar + message: Invalid request parameters schema: type: object properties: @@ -1058,28 +605,19 @@ paths: extras: type: object properties: - status: - type: number + foo: + type: string message: type: string example: - error: Not authorized + error: Invalid request extras: - status: 401 - message: Not authorized + foo: bar + message: Invalid request parameters + '401': + $ref: '#/responses/UnauthorizedResponse' '403': - description: Forbidden - headers: {} - examples: - application/json: - error: Forbidden - schema: - type: object - properties: - error: - type: string - example: - error: Forbidden + $ref: '#/responses/ForbiddenResponse' '404': description: Not Found headers: {} @@ -1106,183 +644,40 @@ paths: extras: status: 404 message: Disbursement not found - summary: Delete a Disbursement - operationId: Delete a Disbursement + summary: Download Disbursement Instructions + operationId: Download Disbursement Instructions description: '' tags: - Disbursements parameters: - name: id in: path - description: ID of the `Disbursement`. + description: ID of the Disbursement required: true type: string produces: - - application/json + - text/csv security: - - oauth2: [] - /disbursements/{id}/receivers: - get: + - BearerAuth: [] + /disbursements/{id}/status: + patch: responses: '200': - description: OK - headers: {} + description: Message Response + schema: + $ref: '#/definitions/MessageResponse' examples: application/json: - pagination: - prev: /disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=1 - next: /disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=3 - pages: 3 - total: 44 - data: - - id: 5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd - phone_number: '+380507770770' - external_id: '1357' - receiver_wallet: - id: 87dae0ca-0819-4361-9af4-1760a1463dba - receiver: - id: 5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd - wallet: - id: 402bf417-11bd-4903-b310-0ce5da11e029 - name: Vibrant - status: DRAFT - created_at: '2023-04-17T22:53:49.827645Z' - updated_at: '2023-04-17T22:53:49.827645Z' - payment: - id: 320828bb-3987-4bd4-aa07-037743183af0 - amount: '91.8600000' - stellar_transaction_id: '' - stellar_operation_id: '' - status: DRAFT - asset: - id: ef271bfe-1b56-4f55-8579-ae194889e745 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - created_at: '2023-04-18T16:24:16.710071Z' - updated_at: '2023-04-18T16:24:16.710071Z' - created_at: '2023-04-17T22:53:49.827645Z' - updated_at: '2023-04-17T22:53:49.827645Z' - schema: - type: object - properties: - pagination: - type: object - properties: - prev: - type: string - next: - type: string - pages: - type: number - total: - type: number - data: - type: array - items: - type: object - properties: - id: - type: string - phone_number: - type: string - external_id: - type: string - receiver_wallet: - type: object - properties: - id: - type: string - receiver: - type: object - properties: - id: - type: string - wallet: - type: object - properties: - id: - type: string - name: - type: string - status: - type: string - created_at: - type: string - updated_at: - type: string - payment: - type: object - properties: - id: - type: string - amount: - type: string - stellar_transaction_id: - type: string - stellar_operation_id: - type: string - status: - type: string - asset: - type: object - properties: - id: - type: string - code: - type: string - issuer: - type: string - created_at: - type: string - updated_at: - type: string - created_at: - type: string - updated_at: - type: string - example: - pagination: - prev: /disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=1 - next: /disbursements/2e15759b-8ffd-43de-b661-87a80fd70241/receivers?page=3 - pages: 3 - total: 44 - data: - - id: 5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd - phone_number: '+380507770770' - external_id: '1357' - receiver_wallet: - id: 87dae0ca-0819-4361-9af4-1760a1463dba - receiver: - id: 5e7a7f60-1284-4a0b-8be1-1df17ef4d7fd - wallet: - id: 402bf417-11bd-4903-b310-0ce5da11e029 - name: Vibrant - status: DRAFT - created_at: '2023-04-17T22:53:49.827645Z' - updated_at: '2023-04-17T22:53:49.827645Z' - payment: - id: 320828bb-3987-4bd4-aa07-037743183af0 - amount: '91.8600000' - stellar_transaction_id: '' - stellar_operation_id: '' - status: DRAFT - asset: - id: ef271bfe-1b56-4f55-8579-ae194889e745 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - created_at: '2023-04-18T16:24:16.710071Z' - updated_at: '2023-04-18T16:24:16.710071Z' - created_at: '2023-04-17T22:53:49.827645Z' - updated_at: '2023-04-17T22:53:49.827645Z' - '401': - description: Unauthorized + message: Disbursement started + '400': + description: Bad Request headers: {} examples: application/json: - error: Not authorized + error: Bad request extras: - status: 401 - message: Not authorized + status: 400 + message: Disbursement is not ready to be started schema: type: object properties: @@ -1296,10 +691,14 @@ paths: message: type: string example: - error: Not authorized + error: Bad request extras: - status: 401 - message: Not authorized + status: 400 + message: Disbursement is not ready to be started + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' '404': description: Not Found headers: {} @@ -1326,633 +725,113 @@ paths: extras: status: 404 message: Disbursement not found - summary: List All Disbursement Receivers - operationId: List All Disbursement Receivers + summary: Update a Disbursement Status + operationId: Update a Disbursement Status description: '' tags: - Disbursements parameters: - name: id in: path - description: ID of the Disbursement + description: ID of the disbursement required: true type: string + produces: + - application/json + security: + - BearerAuth: [] + /payments: + get: + responses: + '200': + description: A paginated list of payments + schema: + $ref: '#/definitions/PaymentPagination' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' + summary: List All Payments + operationId: List All Payments + description: '' + tags: + - Payments + parameters: - name: page in: query - description: The page number to fetch. + description: The page requested. required: false type: number + default: 1 - name: page_limit in: query - description: The number of records to return per page. + description: Define how many results will be returned in the response. required: false type: number + default: 20 + - name: status + in: query + description: exact match on the status of the payment. + required: false + x-example: DRAFT + type: string + enum: + - DRAFT + - READY + - PENDING + - PAUSED + - SUCCESS + - FAILED + - name: receiver_id + in: query + description: uuid that represents a receiver in the database + required: false + x-example: b6b667ad-6cc2-46cf-9be7-561daace7d48 + type: string + - name: created_at_after + in: query + description: 'only return payments that are created after this date. Format: YYYY-MM-DD' + required: false + x-example: '2006-01-02' + type: string + - name: created_at_before + in: query + description: 'only return payments that are created before this date. Format: YYYY-MM-DD' + required: false + x-example: '2006-01-02' + type: string + - name: sort + in: query + description: field used to sort payments + required: false + type: string + default: created_at + enum: + - created_at + - name: direction + in: query + description: direction for sorting payments. + required: false + type: string + default: asc + enum: + - asc + - desc produces: - application/json security: - - oauth2: [] - /disbursements/{id}/instructions: - post: - responses: - '201': - description: Created - headers: {} - examples: - application/json: - message: File uploaded succesfully - schema: - type: object - properties: - message: - type: string - example: - message: File uploaded succesfully - '400': - description: Bad Request - headers: {} - examples: - application/json: - error: Invalid file format *.xyz - extras: - foo: bar - message: Not authorized - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - foo: - type: string - message: - type: string - example: - error: Invalid file format *.xyz - extras: - foo: bar - message: Not authorized - '401': - description: Unauthorized - headers: {} - examples: {} - '403': - description: Forbidden - headers: {} - examples: - application/json: - error: Forbidden - schema: - type: object - properties: - error: - type: string - example: - error: Forbidden - '404': - description: Not Found - headers: {} - examples: - application/json: - error: Not found - extras: - status: 404 - message: Disbursement not found - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Not found - extras: - status: 404 - message: Disbursement not found - summary: Upload Disbursement Instructions - operationId: Upload Disbursement Instructions - description: '' - tags: - - Disbursements - parameters: - - name: id - in: path - description: ID of the Disbursement - required: true - type: string - produces: - - application/json - security: - - oauth2: [] - get: + - BearerAuth: [] + /payments/{id}: + get: responses: '200': - description: OK - headers: - Content-Disposition: - type: string - examples: - text/csv: '' - '400': - description: Bad Request - headers: {} - examples: - application/json: - error: Invalid request - extras: - foo: bar - message: Invalid request parameters + description: Payment details schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - foo: - type: string - message: - type: string - example: - error: Invalid request - extras: - foo: bar - message: Invalid request parameters + $ref: '#/definitions/Payment' '401': - description: Unauthorized - headers: {} - examples: {} + $ref: '#/responses/UnauthorizedResponse' '403': - description: Forbidden - headers: {} - examples: {} - '404': - description: Not Found - headers: {} - examples: - application/json: - error: Not found - extras: - status: 404 - message: Disbursement not found - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Not found - extras: - status: 404 - message: Disbursement not found - summary: Download Disbursement Instructions - operationId: Download Disbursement Instructions - description: '' - tags: - - Disbursements - parameters: - - name: id - in: path - description: ID of the Disbursement - required: true - type: string - produces: - - text/csv - - application/json - security: - - oauth2: [] - /disbursements/{id}/status: - patch: - responses: - '200': - description: OK - headers: {} - examples: - application/json: - message: Disbursement started - schema: - type: object - properties: - message: - type: string - example: - message: Disbursement started - '400': - description: Bad Request - headers: {} - examples: - application/json: - error: Bad request - extras: - status: 400 - message: Disbursement is not ready to be started - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Bad request - extras: - status: 400 - message: Disbursement is not ready to be started - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized - 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 - '403': - description: Forbidden - headers: {} - examples: - application/json: - error: Forbidden - schema: - type: object - properties: - error: - type: string - example: - error: Forbidden - '404': - description: Not Found - headers: {} - examples: - application/json: - error: Not found - extras: - status: 404 - message: Disbursement not found - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Not found - extras: - status: 404 - message: Disbursement not found - summary: Update a Disbursement Status - operationId: Update a Disbursement Status - description: '' - tags: - - Disbursements - parameters: - - name: id - in: path - description: ID of the disbursement - required: true - type: string - produces: - - application/json - security: - - oauth2: [] - /payments: - get: - responses: - '200': - description: OK - headers: {} - examples: {} - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized - 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 - summary: List All Payments - operationId: List All Payments - description: '' - tags: - - Payments - parameters: - - name: page - in: query - description: The page requested. - required: false - type: number - default: 1 - - name: page_limit - in: query - description: Define how many results will be returned in the response. - required: false - type: number - default: 20 - - name: status - in: query - description: exact match on the status of the payment. - required: false - x-example: DRAFT - type: string - enum: - - DRAFT - - READY - - PENDING - - PAUSED - - SUCCESS - - FAILED - - name: receiver_id - in: query - description: uuid that represents a receiver in the database - required: false - x-example: b6b667ad-6cc2-46cf-9be7-561daace7d48 - type: string - - name: created_at_after - in: query - description: 'only return payments that are created after this date. Format: YYYY-MM-DD' - required: false - x-example: '2006-01-02' - type: string - - name: created_at_before - in: query - description: 'only return payments that are created before this date. Format: YYYY-MM-DD' - required: false - x-example: '2006-01-02' - type: string - - name: sort - in: query - description: field used to sort payments - required: false - type: string - default: created_at - enum: - - created_at - - name: direction - in: query - description: direction for sorting payments. - required: false - type: string - default: asc - enum: - - asc - - desc - produces: - - application/json - security: - - oauth2: [] - /payments/{id}: - get: - responses: - '200': - description: OK - headers: {} - examples: - application/json: - id: b6b667ad-6cc2-46cf-9be7-561daace7d48 - amount: '100.000000' - stellar_transaction_id: 614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef - stellar_operation_id: '192334871807819777' - status: DRAFT - status_history: - - status: DRAFT - status_message: Some Message - timestamp: '2023-02-03T14:33:50.000Z' - - status: READY - status_message: Some Message - timestamp: '2023-02-03T14:45:50.000Z' - disbursement: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - status: DRAFT - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - receiver_wallet: - id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - receiver: - id: e7431183-01e4-486a-8a4d-3489bdc07a4e - wallet: - id: 25923001-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - stellar_address: GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ - stellar_memo: some-memo - stellar_memo_type: text - status: REGISTERED - created_at: '2023-02-03T14:33:50.000Z' - updated_at: '2023-02-03T14:45:50.000Z' - created_at: '2023-02-03T14:33:50.000Z' - updated_at: '2023-02-03T14:33:50.000Z' - schema: - type: object - properties: - id: - type: string - amount: - type: string - stellar_transaction_id: - type: string - stellar_operation_id: - type: string - status: - type: string - status_history: - type: array - items: - type: object - properties: - status: - type: string - status_message: - type: string - timestamp: - type: string - required: - - status - - status_message - - timestamp - disbursement: - type: object - properties: - id: - type: string - name: - type: string - status: - type: string - created_at: - type: string - updated_at: - type: string - asset: - type: object - properties: - id: - type: string - code: - type: string - issuer: - type: string - receiver_wallet: - type: object - properties: - id: - type: string - receiver: - type: object - properties: - id: - type: string - wallet: - type: object - properties: - id: - type: string - name: - type: string - stellar_address: - type: string - stellar_memo: - type: string - stellar_memo_type: - type: string - status: - type: string - created_at: - type: string - updated_at: - type: string - created_at: - type: string - updated_at: - type: string - example: - id: b6b667ad-6cc2-46cf-9be7-561daace7d48 - amount: '100.000000' - stellar_transaction_id: 614942ad90df7f8b47f8a7dfa5d8bb34e577802c7d687edd067437202959d0ef - stellar_operation_id: '192334871807819777' - status: DRAFT - status_history: - - status: DRAFT - status_message: Some Message - timestamp: '2023-02-03T14:33:50.000Z' - - status: READY - status_message: Some Message - timestamp: '2023-02-03T14:45:50.000Z' - disbursement: - id: 619da857-8725-4c58-933d-c120a458e0f5 - name: Disbursement Name - status: DRAFT - created_at: '2023-02-03T10:45:51.000Z' - updated_at: '2023-02-03T10:45:51.000Z' - asset: - id: 25923001-508a-4629-9186-c41211b2a3d0 - code: USDC - issuer: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN - receiver_wallet: - id: 2ec7f1f9-add3-4e6d-9d14-bd8ac5e88872 - receiver: - id: e7431183-01e4-486a-8a4d-3489bdc07a4e - wallet: - id: 25923001-b7e2-40a9-ad40-411f70d5c4bf - name: Vibrant - stellar_address: GAUETA6XCPFIZNJQLETG5JR3GGNTJIXXRDIIY4D5QYU2JR6RPUFEUCVZ - stellar_memo: some-memo - stellar_memo_type: text - status: REGISTERED - created_at: '2023-02-03T14:33:50.000Z' - updated_at: '2023-02-03T14:45:50.000Z' - created_at: '2023-02-03T14:33:50.000Z' - updated_at: '2023-02-03T14:33:50.000Z' - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized - 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 + $ref: '#/responses/ForbiddenResponse' '404': description: Not Found headers: {} @@ -1993,40 +872,18 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /receivers: get: responses: '200': - description: OK - headers: {} - examples: {} - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized + description: A paginated list of Receiver details 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 + $ref: '#/definitions/ReceiverPagination' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: List All Receivers operationId: List All Receivers description: '' @@ -2093,66 +950,20 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /receivers/{id}: get: responses: '200': - description: OK - headers: {} - examples: {} - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - extras: - status: 401 - message: Not authorized + description: Receiver Details 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 + $ref: '#/definitions/Receiver' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' '404': - description: Not Found - headers: {} - examples: - application/json: - error: Not found - extras: - status: 404 - message: Receiver not found - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - status: - type: number - message: - type: string - example: - error: Not found - extras: - status: 404 - message: Receiver not found + $ref: '#/responses/NotFoundResponse' summary: Retrieve a Receiver operationId: Retrieve a Receiver description: '' @@ -2167,56 +978,21 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] patch: responses: '200': - description: OK - headers: {} - examples: {} - '400': - description: Bad Request - headers: {} - examples: - application/json: - error: Invalid verification value. + description: Updated Receiver Details schema: - type: object - properties: - error: - type: string - example: - error: Invalid verification value. + $ref: '#/definitions/Receiver' + '400': + $ref: '#/responses/BadRequestResponse' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized + $ref: '#/responses/UnauthorizedResponse' '403': - description: Forbidden - headers: {} - examples: - application/json: - error: Forbidden - schema: - type: object - properties: - error: - type: string - example: - error: Forbidden + $ref: '#/responses/ForbiddenResponse' '404': - description: Not Found - headers: {} - examples: {} + $ref: '#/responses/NotFoundResponse' summary: Update the Receiver operationId: Update the Receiver description: '' @@ -2228,60 +1004,46 @@ paths: description: ID of the `Receiver`. required: true type: string + - name: body + in: body + description: List of fields to patch for the receiver + required: true + schema: + $ref: '#/definitions/PatchReceiverRequest' produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /statistics: get: responses: '200': - description: OK - headers: {} - examples: {} - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized + description: General Statistics response schema: - type: object - properties: - error: - type: string - example: - error: Not authorized + $ref: '#/definitions/GeneralStatistics' + '401': + $ref: '#/responses/UnauthorizedResponse' summary: Retrieve all Statistics operationId: Retrieve all Statistics - description: '' + description: All statistics, including disbursement and receiver wallet data tags: - Statistics parameters: [] produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /statistics/disbursements/{id}: get: responses: '200': - description: OK - headers: {} - examples: {} - '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized + description: Returns statistics for disbursement schema: - type: object - properties: - error: - type: string - example: - error: Not authorized + $ref: '#/definitions/DisbursementsStatistics' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Retrieve Disbursement-specific Statistics operationId: Retrieve Disbursement-specific Statistics description: '' @@ -2296,188 +1058,75 @@ paths: produces: - application/json security: - - oauth2: [] - /registration/receiver/{token}: + - BearerAuth: [] + /wallet-registration/start: get: - responses: - '200': - description: Token is valid and the webpage will be loaded normally. - headers: {} - examples: - text/html: | - To be implementedThe website html will show up here. - '401': - description: The token is invalid or expired. If it's just expired, an SMS will be sent to the user phone number with the new token. - headers: {} - examples: - text/html: | - To be implementedThe provided token is invalid or expired. If it is expired, a new token will be sent to the user phone number ⏳. summary: Load the PII Confirmation Webpage operationId: Load the PII Confirmation Webpage - description: This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet (Vibrant) through a deep link. + description: This is the endpoint the browser will reach with the first token, so the user can confirm their PII information and then launch the wallet through a deep link. Requires a valid SEP-24 token in the request. tags: - - Registration + - Wallet-Registration + produces: + - text/html parameters: - name: token - in: path - description: Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process. + in: query + description: The SEP-24 token used for authentication + required: true + type: string + - name: transaction_id + in: query + description: The transaction id associated with the SEP-24 token required: true type: string - produces: - - text/html - /registration/receiver/{token}/wallet_info: - get: responses: '200': description: Token is valid and the webpage will be loaded normally. - headers: {} - examples: - text/html: | - { - "wallet_name": "Vibrant", - "home_domain": "https://vibrantapp.com/", - "icon_url": "https://assets-global.website-files.com/5f96d344ab2f71b1d1961172/6102b8d95dca76b415a0f9bc_Logo.png", - "help_url": "https://support.vibrantapp.com/", - "apple_store_url": "https://apps.apple.com/us/app/id1514223107", - "google_store_url": "https://play.google.com/store/apps/details?id=io.sunship.app", - "pii_name": "Date of Birth", - "pii_type": "date" - } + schema: + type: string + description: HTML page content + '400': + $ref: '#/responses/BadRequestResponse' '401': - description: The token is invalid or expired. If it's just expired, an SMS will be sent to the user phone number with the new token. - headers: {} - examples: - text/html: | - { - "error": "Unauthorized.", - "extras": { - "code": "401_1", - "details": "The token is invalid or expired." - } - } - summary: Get placeholder Info - operationId: Get placeholder Info - description: This endpoint will provide the webpage with all the info that can be customizable depending on the wallet used. Things like wallet name, icon and links to the store will be provided by this endpoint. + $ref: '#/responses/UnauthorizedResponse' + /wallet-registration/otp: + post: + summary: Send OTP to the provided phone number + operationId: SendOTP + description: This endpoint generates a 6-digit OTP and sends it via SMS to the phone number provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request. tags: - - Registration + - Wallet-Registration + consumes: + - application/json + produces: + - application/json parameters: - - name: token - in: path - description: Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process. + - name: body + in: body + description: Object containing phone number required: true - type: string - produces: - - text/html - /registration/receiver/{token}/send_otp: - post: - responses: - '200': - description: The OTP was successfully sent. - headers: {} - examples: - application/json: - status: ok - sanitized_phone_number: '* *** *** *415' - schema: - type: object - properties: - status: - type: string - sanitized_phone_number: - type: string - example: - status: ok - sanitized_phone_number: '* *** *** *415' - '401': - description: The token is invalid or expired. - headers: {} - examples: - application/json: - error: Unauthorized. - extras: - code: '401_1' - details: The token is invalid or expired. - schema: - type: object - properties: - error: - type: string - extras: - type: object - properties: - code: - type: string - details: - type: string - example: - error: Unauthorized. - extras: - code: '401_1' - details: The token is invalid or expired. - '429': - description: An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again. - headers: {} - examples: - application/json: - error: Too many requests. - extras: - code: '429_1' - details: An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again. schema: type: object properties: - error: + phone_number: type: string - extras: - type: object - properties: - code: - type: string - details: - type: string - example: - error: Too many requests. - extras: - code: '429_1' - details: An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again. - summary: Send OTP to the Receiver's Phone - operationId: Send OTP to the Receiver's Phone - description: This is the endpoint that will trigger an SMS sharing an OTP with the user phone. - tags: - - Registration - parameters: - - name: token - in: path - description: Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process. + description: Phone number to which the OTP will be sent + - name: Authorization + in: header + description: 'SEP-24 token for authorization (Format: ''Bearer {token}'')' required: true type: string - produces: - - application/json - /registration/receiver/{token}/validate: - post: responses: '200': - description: The OTP + PII were successfully validated. This response will comtain the link used to launch Vibrant and finalize the wallet<>SDP registration step from there. - headers: {} - examples: - application/json: - deep_link: vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc + description: OTP sent successfully schema: - type: object - properties: - deep_link: - type: string - example: - deep_link: vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc + $ref: '#/definitions/MessageResponse' '400': - description: The token, PII or OTP provided are invalid. - headers: {} - examples: - application/json: - error: Bad request. - extras: - code: '400_1' - details: The token, PII or OTP provided are incorrect. + $ref: '#/responses/BadRequestResponse' + '401': + $ref: '#/responses/UnauthorizedResponse' + '429': + description: An OTP was sent to the given user recently and hasn't expired yet. Only after expired it will be sent to the user again. schema: type: object properties: @@ -2490,36 +1139,42 @@ paths: type: string details: type: string - example: - error: Bad request. - extras: - code: '400_1' - details: The token, PII or OTP provided are incorrect. - summary: Validate OTP + PII - operationId: Validate OTP + PII - description: This is the endpoint that will be used to validate the OTP + PII. It will retiurn the deep link used to launch the wallet application (Vibrant). + /wallet-registration/verification: + post: + summary: Verify Receiver Registration + operationId: VerifyReceiverRegistration + description: This endpoint verifies the receiver's registration by validating the OTP and other verification values provided in the request body. A valid SEP-24 token should be included in the Authorization header of the request. tags: - - Registration + - Wallet-Registration + consumes: + - application/json + produces: + - application/json parameters: - - name: token - in: path - description: Is a unique token that expires within a {configurable} number of days and is sent to the user in order to start the registration process. - required: true - type: string - name: body in: body + description: Verification data including phone number, OTP, verification value, and reCAPTCHA token + required: true + schema: + $ref: '#/definitions/ReceiverRegistrationRequest' + - name: Authorization + in: header + description: 'SEP-24 token for authorization (Format: ''Bearer {token}'')' + required: true + type: string + responses: + '200': + description: Verification successful schema: type: object properties: - pii: - type: string - otp: + message: type: string - example: - pii: '2000-01-01' - otp: 123abc - produces: - - application/json + example: ok + '400': + $ref: '#/responses/BadRequestResponse' + '401': + $ref: '#/responses/UnauthorizedResponse' /.well-known/stellar.toml: get: responses: @@ -2535,7 +1190,7 @@ paths: operationId: Stellar toml description: This is the endpoint where the wallet will gather the SEP-10 server url and SEP-10 signing public key. tags: - - Registration + - Anchor parameters: [] produces: - text/toml @@ -2588,7 +1243,7 @@ paths: This endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable. tags: - - Registration + - Anchor parameters: - name: account in: query @@ -2642,7 +1297,7 @@ paths: This endpoint can change, but will be provided in the tomle file under the `WEB_AUTH_ENDPOINT` variable. tags: - - Registration + - Anchor parameters: - name: body in: body @@ -2714,7 +1369,7 @@ paths: operationId: Register the Stellar Account for the User description: 'This is the endpoint that will be used to register the Stellar public key with the SDP user. It will be using the data provided in the deep link, that should have the following format: `vibrantapp://stellar-disbursement-platform?id=1&token=123&sign=abc`.' tags: - - Registration + - Anchor parameters: - name: body in: body @@ -2737,7 +1392,7 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] get: responses: '200': @@ -2783,48 +1438,19 @@ paths: operationId: Verify if Stellar Account is Registered description: This is the endpoint that will be used to verify if the Stellar public key is already registered with the SDP user. tags: - - Registration + - Anchor parameters: [] produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /profile: get: responses: '200': - description: OK - headers: {} - examples: - application/json: - first_name: FirstName - last_name: LastName - email: email@email.com - roles: - - developer - organization_name: My Organization Name + description: Returns user profile schema: - type: object - properties: - first_name: - type: string - last_name: - type: string - email: - type: string - roles: - type: array - items: - type: string - organization_name: - type: string - example: - first_name: FirstName - last_name: LastName - email: email@email.com - roles: - - developer - organization_name: My Organization Name + $ref: '#/definitions/Profile' summary: Get Profile operationId: Get Profile description: '' @@ -2834,7 +1460,7 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] patch: responses: '200': @@ -2844,25 +1470,11 @@ paths: application/json: message: user profile updated successfully schema: - type: object - properties: - message: - type: string - example: - message: user profile updated successfully + $ref: '#/definitions/MessageResponse' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Patch User Profile operationId: Patch User Profile description: Note that all fields are optional but at least one should be sent in the request. @@ -2890,195 +1502,128 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /organization: get: responses: '200': - description: OK - headers: {} - examples: - application/json: - name: My Organization Name - logo_url: https://localhost:8000/organization/logo?token=mytoken - distribution_account_public_key: G... - timezone_utc_offset: '-03:00' + description: Returns organization details schema: - type: object - properties: - name: - type: string - logo_url: - type: string - distribution_account_public_key: - type: string - timezone_utc_offset: - type: string - example: - name: My Organization Name - logo_url: https://localhost:8000/organization/logo?token=mytoken - distribution_account_public_key: G... - timezone_utc_offset: '-03:00' + $ref: '#/definitions/Organization' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' summary: Get Organization Info operationId: Get Organization Info description: '' tags: - - Profile + - Organization parameters: [] produces: - application/json security: - - oauth2: [] + - BearerAuth: [] patch: responses: '200': description: OK - headers: {} examples: application/json: message: organization profile updated successfully schema: - type: object - properties: - message: - type: string - example: - message: organization profile updated successfully + $ref: '#/definitions/MessageResponse' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Patch Organization Profile operationId: Patch Organization Profile - description: |- - Example of request in `Javascript` with `fetch`. Note that both fields are `optional`, but, at least `one` should be sent in the request. - - ```js - const form = new FormData(); - form.append("logo", "/path/to/logo/logo.png"); - form.append("data", `{"organization_name": "My Company", "timezone_utc_offset": "-03:00"}`); - - const options = { - method: 'PATCH', - headers: { - Authorization: 'Bearer mytoken' - } - }; - - options.body = form; - - fetch('http://localhost:8000/profile/organization', options) - .then(response => response.json()) - .then(response => console.log(response)) - .catch(err => console.error(err)); - ``` - - **Note**: *It's not necessary to set the header `Content-Type` for this request, it's set automaticaly by the HTTP client.* tags: - - Profile + - Organization parameters: [] produces: - application/json security: - - oauth2: [] - /users: + - BearerAuth: [] + /organization/logo: get: + summary: Retrieve Organization Logo + description: Retrieves the logo of the organization + operationId: GetOrganizationLogo + tags: + - Organization + produces: + - application/octet-stream responses: '200': description: OK - headers: {} - examples: - application/json: - - id: 7a4c6555-1f73-49b3-a211-f95bd2b8ec90 - first_name: John - last_name: Doe - email: email@email.com - roles: - - developer - is_active: true - - id: 5f4df1dd-c84f-482a-84ad-541ffd46e75a - first_name: Jane - last_name: Doe - email: email@email.com - roles: - - financial_controller - is_active: false + schema: + type: string + format: binary + /countries: + get: + summary: Get a list of countries supported by this organization + tags: + - Organization + responses: + '200': + description: A list of countries schema: type: array items: - type: object - properties: - id: - type: string - first_name: - type: string - last_name: - type: string - email: - type: string - roles: - type: array - items: - type: string - is_active: - type: boolean - required: - - id - - first_name - - last_name - - email - - roles - - is_active - example: - - id: 7a4c6555-1f73-49b3-a211-f95bd2b8ec90 - first_name: John - last_name: Doe - email: email@email.com - roles: - - developer - is_active: true - - id: 5f4df1dd-c84f-482a-84ad-541ffd46e75a - first_name: Jane - last_name: Doe - email: email@email.com - roles: - - financial_controller - is_active: false + $ref: '#/definitions/Country' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' + produces: + - application/json + /assets: + get: + summary: Get a list of assets supported by this organization + tags: + - Organization + responses: + '200': + description: A list of assets schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + type: array + items: + $ref: '#/definitions/Asset' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' + produces: + - application/json + /wallets: + get: + summary: Get a list of wallets supported by this organization + tags: + - Organization + responses: + '200': + description: A list of wallets + schema: + type: array + items: + $ref: '#/definitions/Wallet' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' + produces: + - application/json + /users: + get: + responses: + '200': + description: Returns a paginated list of User Details + schema: + $ref: '#/definitions/Users' + '401': + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Get All Users operationId: Get All Users description: Returns all Users registered in the SDP. @@ -3088,55 +1633,17 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] post: responses: '201': description: Created - headers: {} - examples: - application/json: - id: 5ca230c9-da95-4bd1-b2a2-aa5d0df65efd - first_name: John - last_name: Doe - roles: - - business - email: email@email.com schema: - type: object - properties: - id: - type: string - first_name: - type: string - last_name: - type: string - roles: - type: array - items: - type: string - email: - type: string - example: - id: 5ca230c9-da95-4bd1-b2a2-aa5d0df65efd - first_name: John - last_name: Doe - roles: - - business - email: email@email.com + $ref: '#/definitions/User' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Create User operationId: Create User description: Creates the authentication user and sends the invitation e-mail. @@ -3167,36 +1674,21 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /users/activation: patch: responses: - '201': + '200': description: Created - headers: {} examples: application/json: message: user activation was updated successfully schema: - type: object - properties: - message: - type: string - example: - message: user activation was updated successfully + $ref: '#/definitions/User' '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Patch User Activation operationId: Patch User Activation description: Patchs the authentication user's activation in the SDP. @@ -3218,7 +1710,7 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] /users/roles: get: responses: @@ -3246,18 +1738,9 @@ paths: - business - owner '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Get All Roles operationId: Get All Roles description: Returns all roles that exists in the SDP. @@ -3267,7 +1750,7 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] patch: responses: '200': @@ -3284,18 +1767,9 @@ paths: example: message: user roles were updated successfully '401': - description: Unauthorized - headers: {} - examples: - application/json: - error: Not authorized. - schema: - type: object - properties: - error: - type: string - example: - error: Not authorized. + $ref: '#/responses/UnauthorizedResponse' + '403': + $ref: '#/responses/ForbiddenResponse' summary: Patch User Role operationId: Patch User Role description: Patchs the authentication user's roles. @@ -3320,35 +1794,655 @@ paths: produces: - application/json security: - - oauth2: [] + - BearerAuth: [] definitions: - Authentication: {} - Disbursement Collection: {} - Disbursement Details: {} - Disbursement Receivers: {} - Disbursement Instructions: {} - Disbursement Status: {} - Payment Collection: {} - Payment Detail: {} - Receiver Collection: {} - Receiver Details: {} - General Statistics: {} - Disbursements Statistics: {} - Account Collection: {} - Account Detail: {} - Webpage - PII Confirmation: {} - Vibrant - Stellar Public Key Confirmation: {} - User Profile: {} - Organization Profile: {} - Users Colletion: {} - Roles: {} + Amount: + type: object + properties: + asset_code: + type: string + asset_issuer: + type: string + received_amount: + type: string + Asset: + type: object + properties: + id: + type: string + code: + type: string + issuer: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + deleted_at: + type: string + format: date-time + Country: + type: object + properties: + code: + type: string + name: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + Disbursement: + type: object + properties: + id: + type: string + name: + type: string + country: + $ref: '#/definitions/Country' + wallet: + $ref: '#/definitions/Wallet' + asset: + $ref: '#/definitions/Asset' + status: + $ref: '#/definitions/DisbursementStatus' + verification_field: + $ref: '#/definitions/VerificationField' + status_history: + $ref: '#/definitions/DisbursementStatusHistory' + file_name: + type: string + file_content: + type: string + format: byte + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + DisbursementPagination: + type: object + properties: + pagination: + $ref: '#/definitions/Pagination' + data: + type: array + items: + $ref: '#/definitions/Disbursement' + DisbursementReceiver: + type: object + properties: + id: + type: string + email: + type: string + phone_number: + type: string + external_id: + type: string + receiver_wallet: + $ref: '#/definitions/ReceiverWallet' + payment: + $ref: '#/definitions/Payment' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + DisbursementReceiverPagination: + type: object + properties: + pagination: + $ref: '#/definitions/Pagination' + data: + type: array + items: + $ref: '#/definitions/DisbursementReceiver' + DisbursementsStatistics: + type: object + properties: + payment_counters: + $ref: '#/definitions/PaymentCounters' + payment_amounts_by_asset: + type: array + items: + $ref: '#/definitions/PaymentAmountsByAsset' + receiver_wallets_counters: + $ref: '#/definitions/ReceiverWalletsCounters' + total_receivers: + type: integer + description: Total number of receivers + format: int64 + DisbursementStatus: + type: string + enum: + - DRAFT + - READY + - STARTED + - PAUSED + - COMPLETED + DisbursementStatusHistory: + type: array + items: + $ref: '#/definitions/DisbursementStatusHistoryEntry' + DisbursementStatusHistoryEntry: + type: object + properties: + user_id: + type: string + status: + $ref: '#/definitions/DisbursementStatus' + timestamp: + type: string + format: date-time + GeneralStatistics: + type: object + properties: + total_disbursements: + type: integer + description: Total number of disbursements + format: int64 + payment_counters: + $ref: '#/definitions/PaymentCounters' + payment_amounts_by_asset: + type: array + items: + $ref: '#/definitions/PaymentAmountsByAsset' + receiver_wallets_counters: + $ref: '#/definitions/ReceiverWalletsCounters' + total_receivers: + type: integer + description: Total number of receivers + format: int64 + MessageResponse: + type: object + properties: + message: + type: string + required: + - message + Organization: + type: object + properties: + name: + type: string + logo_url: + type: string + distribution_account_public_key: + type: string + timezone_utc_offset: + type: string + example: + name: My Organization Name + logo_url: https://localhost:8000/organization/logo?token=mytoken + distribution_account_public_key: G... + timezone_utc_offset: '-03:00' + Pagination: + type: object + properties: + next: + type: string + prev: + type: string + pages: + type: integer + total: + type: integer + Payment: + type: object + properties: + id: + type: string + amount: + type: string + stellar_transaction_id: + type: string + stellar_operation_id: + type: string + status: + $ref: '#/definitions/PaymentStatus' + status_history: + $ref: '#/definitions/PaymentStatusHistory' + disbursement: + $ref: '#/definitions/Disbursement' + asset: + $ref: '#/definitions/Asset' + receiver_wallet: + $ref: '#/definitions/ReceiverWallet' + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + PaymentPagination: + type: object + properties: + pagination: + $ref: '#/definitions/Pagination' + data: + type: array + items: + $ref: '#/definitions/Payment' + PaymentStatus: + type: string + enum: + - DRAFT + - READY + - PENDING + - PAUSED + - SUCCESS + - FAILED + PaymentStatusHistory: + type: array + items: + $ref: '#/definitions/PaymentStatusHistoryEntry' + PaymentStatusHistoryEntry: + type: object + properties: + status: + $ref: '#/definitions/PaymentStatus' + status_message: + type: string + timestamp: + type: string + format: date-time + PaymentCounters: + type: object + properties: + draft: + type: integer + format: int64 + ready: + type: integer + format: int64 + pending: + type: integer + format: int64 + paused: + type: integer + format: int64 + success: + type: integer + format: int64 + failed: + type: integer + format: int64 + total: + type: integer + format: int64 + PaymentAmountsByAsset: + type: object + properties: + asset_code: + type: string + payment_amounts: + $ref: '#/definitions/PaymentAmounts' + PaymentAmounts: + type: object + properties: + draft: + type: string + ready: + type: string + pending: + type: string + paused: + type: string + success: + type: string + failed: + type: string + average: + type: string + total: + type: string + Profile: + type: object + properties: + first_name: + type: string + last_name: + type: string + email: + type: string + roles: + type: array + items: + type: string + organization_name: + type: string + example: + first_name: FirstName + last_name: LastName + email: email@email.com + roles: + - developer + organization_name: My Organization Name + Receiver: + type: object + properties: + id: + type: string + phone_number: + type: string + external_id: + type: string + email: + type: string + created_at: + type: string + total_payments: + type: string + successful_payments: + type: string + failed_payments: + type: string + remaining_payments: + type: string + registered_wallets: + type: string + received_amounts: + type: array + items: + $ref: '#/definitions/Amount' + wallets: + type: array + items: + $ref: '#/definitions/ReceiverWallet' + ReceiverLite: + type: object + properties: + id: + type: string + ReceiverPagination: + type: object + properties: + pagination: + $ref: '#/definitions/Pagination' + data: + type: array + items: + $ref: '#/definitions/Receiver' + ReceiverWallet: + type: object + properties: + id: + type: string + receiver: + $ref: '#/definitions/ReceiverLite' + wallet: + $ref: '#/definitions/WalletLite' + stellar_address: + type: string + stellar_memo: + type: string + stellar_memo_type: + type: string + created_at: + type: string + updated_at: + type: string + invited_at: + type: string + last_sms_sent: + type: string + total_payments: + type: string + payments_received: + type: string + failed_payments: + type: string + remaining_payments: + type: string + received_amounts: + type: array + items: + $ref: '#/definitions/Amount' + status: + $ref: '#/definitions/ReceiversWalletStatus' + status_history: + type: array + items: + $ref: '#/definitions/ReceiversWalletStatusHistoryEntry' + ReceiverWalletsCounters: + type: object + properties: + draft: + type: integer + format: int64 + ready: + type: integer + format: int64 + registered: + type: integer + format: int64 + flagged: + type: integer + format: int64 + total: + type: integer + format: int64 + ReceiversWalletStatus: + type: string + enum: + - DRAFT + - READY + - REGISTERED + - FLAGGED + ReceiversWalletStatusHistoryEntry: + type: object + properties: + status: + $ref: '#/definitions/ReceiversWalletStatus' + timestamp: + type: string + format: date-time + Users: + type: array + items: + $ref: '#/definitions/User' + User: + type: object + properties: + id: + type: string + first_name: + type: string + last_name: + type: string + email: + type: string + roles: + type: array + items: + type: string + is_active: + type: boolean + required: + - id + - first_name + - last_name + - email + - roles + - is_active + example: + - id: 7a4c6555-1f73-49b3-a211-f95bd2b8ec90 + first_name: John + last_name: Doe + email: email@email.com + roles: + - developer + is_active: true + - id: 5f4df1dd-c84f-482a-84ad-541ffd46e75a + first_name: Jane + last_name: Doe + email: email@email.com + roles: + - financial_controller + is_active: false + VerificationField: + type: string + enum: + - DATE_OF_BIRTH + - PIN + - NATIONAL_ID_NUMBER + Wallet: + type: object + properties: + id: + type: string + name: + type: string + homepage: + type: string + sep_10_client_domain: + type: string + deep_link_schema: + type: string + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + WalletLite: + type: object + properties: + id: + type: string + name: + type: string + homepage: + type: string + ReceiverRegistrationRequest: + type: object + properties: + phone_number: + type: string + description: Phone number used in registration + otp: + type: string + description: One-Time Password received for verification + verification: + type: string + description: Verification value provided by the user + verification_type: + type: string + description: Type of verification value + enum: + - DATE_OF_BIRTH + - PIN + - NATIONAL_ID_NUMBER + recaptcha_token: + type: string + description: Token received from Google reCAPTCHA + PatchReceiverRequest: + type: object + properties: + date_of_birth: + type: string + description: Date of birth of the receiver + pin: + type: string + description: Personal identification number of the receiver + national_id: + type: string + description: National ID of the receiver + email: + type: string + description: Email of the receiver + external_id: + type: string + description: External ID of the receiver + example: + date_of_birth: '1980-01-01' + pin: '1234' + national_id: '123456789' + email: john@example.com + external_id: external123 +responses: + UnauthorizedResponse: + description: Unauthorized + headers: {} + examples: + application/json: + error: Not authorized + extras: + status: 401 + message: Not authorized + 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 + ForbiddenResponse: + description: Forbidden + headers: {} + examples: + application/json: + error: Forbidden + schema: + type: object + properties: + error: + type: string + example: + error: Forbidden + BadRequestResponse: + description: Bad Request + schema: + type: object + properties: + message: + type: string + description: Details about the error + NotFoundResponse: + description: Not Found + headers: {} + examples: + application/json: + error: Not found + extras: + status: 404 + message: Resource not found + schema: + type: object + properties: + error: + type: string + extras: + type: object + properties: + status: + type: number + message: + type: string securityDefinitions: - oauth2: - type: oauth2 - flow: accessCode - authorizationUrl: '' - tokenUrl: '' - scopes: {} + BearerAuth: + type: apiKey + name: Authorization + in: header + description: JWT used for authorization tags: - name: Authentication description: Endpoints related to authentication. @@ -3359,31 +2453,11 @@ tags: - name: Receivers description: Endpoints related to receivers. The receiver is the user that is going to receive the disbursement. - name: Statistics - description: |- - Endpoints related to statistics that provide general aggregated data, as well as disbursement-specific aggregated data. - - About the aggregated values: - - - `DRAFT` are payments that are pending staff action - - - `READY` are payments that are pending user action - - - `PENDING` are payments that were already submitted to the network but are pending network response - - - `PAUSED` are payments that were previously queued but were paused due to any internal process. You could say they are pending staff action - - - `SUCCESSFUL` are payments that were successfully delivered to the receiver wallet - - - `FAILED` are payments that were submitted to the network but did not go through due to any reason - - > ATTENTION: the historical data (`successful_payments_history` field) is still pending decision. - > Please don't commit to a long-lasting implementation there before confirming it with Tori. - > It's likely not making into the MVP. - - name: Registration - description: |- - The Registration endpoints are the ones needed to register receivers with the SDP. - - Some of them need to be used by the PII confirmation webpage while the others need to be used by the wallet. + description: Endpoints related to statistics that provide general aggregated data, as well as disbursement-specific aggregated data. + - name: Anchor + description: The Registration endpoints are the ones needed to register receivers with the SDP. + - name: Wallet-Registration + description: These endpoints will be used by the PII confirmation webpage during wallet registration - name: Profile description: Endpoints related to user profiles. - name: Users