From d0958cca269567ae942358070f066848b6b7e88d Mon Sep 17 00:00:00 2001 From: Gleb Date: Tue, 28 Mar 2023 14:44:11 -0700 Subject: [PATCH] Update titles and labels --- ap_api/resources/get-quote.api.mdx | 10 +++++----- ap_api/resources/get-quotes.api.mdx | 10 +++++----- ap_api/resources/get-transaction.api.mdx | 10 +++++----- ap_api/resources/get-transactions.api.mdx | 10 +++++----- ap_api/resources/patch-transactions.api.mdx | 4 ++-- ap_api/resources/quotes/index.mdx | 2 +- ap_api/resources/sidebar.js | 2 +- openapi/ap/Platform API.yml | 8 ++++---- openapi/ap/bundled.yml | 8 ++++---- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/ap_api/resources/get-quote.api.mdx b/ap_api/resources/get-quote.api.mdx index c265350ef..b54216372 100644 --- a/ap_api/resources/get-quote.api.mdx +++ b/ap_api/resources/get-quote.api.mdx @@ -1,11 +1,11 @@ --- id: get-quote -title: "Fetch a single quote provided to a client application" +title: "Retrieve a Quote" description: "Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using SEP-38's `POST /quote` endpoint." -sidebar_label: "Fetch a single quote provided to a client application" +sidebar_label: "Retrieve a Quote" hide_title: true hide_table_of_contents: true -api: {"tags":["Quotes"],"operationId":"getQuote","description":"Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using SEP-38's `POST /quote` endpoint.","parameters":[{"in":"path","name":"id","description":"The ID returned as a result of creating the quote via SEP-38's `POST /quote` endpoint.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sell_amount":{"type":"string"},"sell_asset":{"type":"string"},"buy_amount":{"type":"string"},"buy_asset":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"price":{"type":"string"},"total_price":{"type":"string"},"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"},"transaction_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"title":"Quote"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/exchange/quotes/{id}","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Fetch a single quote provided to a client application","description":{"content":"Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using SEP-38's `POST /quote` endpoint.","type":"text/plain"},"url":{"path":["exchange","quotes",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The ID returned as a result of creating the quote via SEP-38's `POST /quote` endpoint.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["Quotes"],"operationId":"getQuote","description":"Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using SEP-38's `POST /quote` endpoint.","parameters":[{"in":"path","name":"id","description":"The ID returned as a result of creating the quote via SEP-38's `POST /quote` endpoint.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sell_amount":{"type":"string"},"sell_asset":{"type":"string"},"buy_amount":{"type":"string"},"buy_asset":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"price":{"type":"string"},"total_price":{"type":"string"},"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"},"transaction_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"title":"Quote"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/exchange/quotes/{id}","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Retrieve a Quote","description":{"content":"Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using SEP-38's `POST /quote` endpoint.","type":"text/plain"},"url":{"path":["exchange","quotes",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The ID returned as a result of creating the quote via SEP-38's `POST /quote` endpoint.","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/resources/platform-api custom_edit_url: null @@ -20,7 +20,7 @@ import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem"; -## Fetch a single quote provided to a client application +## Retrieve a Quote @@ -39,7 +39,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. -
+
Not Found. diff --git a/ap_api/resources/get-quotes.api.mdx b/ap_api/resources/get-quotes.api.mdx index 556f3bd70..ef0c0cea5 100644 --- a/ap_api/resources/get-quotes.api.mdx +++ b/ap_api/resources/get-quotes.api.mdx @@ -1,11 +1,11 @@ --- id: get-quotes -title: "Fetch the quotes provided to client applications" +title: "List all Quotes" description: "Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using SEP-38's `POST /quote` endpoint." -sidebar_label: "Fetch the quotes provided to client applications" +sidebar_label: "List all Quotes" hide_title: true hide_table_of_contents: true -api: {"tags":["Quotes"],"operationId":"getQuotes","description":"Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using SEP-38's `POST /quote` endpoint.","parameters":[{"in":"query","name":"order","description":"Either ascending or descending by `order_by` value.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"order_by","description":"The data to be used for ordering transactions.","required":false,"schema":{"type":"string","enum":["created_at","expires_at","used_at"],"default":"created_at"}},{"in":"query","name":"cursor","description":"Cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","required":false,"schema":{"type":"string"}},{"in":"query","name":"after","description":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"before","description":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sell_amount":{"type":"string"},"sell_asset":{"type":"string"},"buy_amount":{"type":"string"},"buy_asset":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"price":{"type":"string"},"total_price":{"type":"string"},"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"},"transaction_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"title":"Quote"}},"cursor":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/exchange/quotes","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Fetch the quotes provided to client applications","description":{"content":"Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using SEP-38's `POST /quote` endpoint.","type":"text/plain"},"url":{"path":["exchange","quotes"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"Either ascending or descending by `order_by` value.","type":"text/plain"},"key":"order","value":""},{"disabled":false,"description":{"content":"The data to be used for ordering transactions.","type":"text/plain"},"key":"order_by","value":""},{"disabled":false,"description":{"content":"Cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","type":"text/plain"},"key":"cursor","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","type":"text/plain"},"key":"after","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","type":"text/plain"},"key":"before","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["Quotes"],"operationId":"getQuotes","description":"Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using SEP-38's `POST /quote` endpoint.","parameters":[{"in":"query","name":"order","description":"Either ascending or descending by `order_by` value.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"order_by","description":"The data to be used for ordering transactions.","required":false,"schema":{"type":"string","enum":["created_at","expires_at","used_at"],"default":"created_at"}},{"in":"query","name":"cursor","description":"Cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","required":false,"schema":{"type":"string"}},{"in":"query","name":"after","description":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"before","description":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sell_amount":{"type":"string"},"sell_asset":{"type":"string"},"buy_amount":{"type":"string"},"buy_asset":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"price":{"type":"string"},"total_price":{"type":"string"},"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"},"transaction_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"title":"Quote"}},"cursor":{"type":"string"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/exchange/quotes","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"List all Quotes","description":{"content":"Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using SEP-38's `POST /quote` endpoint.","type":"text/plain"},"url":{"path":["exchange","quotes"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"Either ascending or descending by `order_by` value.","type":"text/plain"},"key":"order","value":""},{"disabled":false,"description":{"content":"The data to be used for ordering transactions.","type":"text/plain"},"key":"order_by","value":""},{"disabled":false,"description":{"content":"Cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","type":"text/plain"},"key":"cursor","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","type":"text/plain"},"key":"after","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","type":"text/plain"},"key":"before","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/resources/platform-api custom_edit_url: null @@ -20,7 +20,7 @@ import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem"; -## Fetch the quotes provided to client applications +## List all Quotes @@ -39,7 +39,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/ap_api/resources/get-transaction.api.mdx b/ap_api/resources/get-transaction.api.mdx index 5b27bb478..58bcf4d26 100644 --- a/ap_api/resources/get-transaction.api.mdx +++ b/ap_api/resources/get-transaction.api.mdx @@ -1,11 +1,11 @@ --- id: get-transaction -title: "Fetch a single transaction" +title: "Retreive a Transaction" description: "Provides the information necessary for the business to determine the state of the transaction identified by `id`, decide if any action must be taken to continue processing the transaction, and act on the decision." -sidebar_label: "Fetch a single transaction" +sidebar_label: "Retreive a Transaction" hide_title: true hide_table_of_contents: true -api: {"tags":["Transactions"],"operationId":"getTransaction","description":"Provides the information necessary for the business to determine the state of the transaction identified by `id`, decide if any action must be taken to continue processing the transaction, and act on the decision.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction found.","content":{"application/json":{"schema":{"oneOf":[{"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","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"]},"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"},"kyc_verified":{"type":"boolean"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_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"}},"title":"TransactionSEP24"},{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"kind":{"type":"string","enum":["receive"]},"status":{"type":"string","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Transaction not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/transactions/{id}","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Fetch a single transaction","description":{"content":"Provides the information necessary for the business to determine the state of the transaction identified by `id`, decide if any action must be taken to continue processing the transaction, and act on the decision.","type":"text/plain"},"url":{"path":["transactions",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["Transactions"],"operationId":"getTransaction","description":"Provides the information necessary for the business to determine the state of the transaction identified by `id`, decide if any action must be taken to continue processing the transaction, and act on the decision.","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Transaction found.","content":{"application/json":{"schema":{"oneOf":[{"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","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"]},"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"},"kyc_verified":{"type":"boolean"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_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"}},"title":"TransactionSEP24"},{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"kind":{"type":"string","enum":["receive"]},"status":{"type":"string","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"}]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Transaction not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/transactions/{id}","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Retreive a Transaction","description":{"content":"Provides the information necessary for the business to determine the state of the transaction identified by `id`, decide if any action must be taken to continue processing the transaction, and act on the decision.","type":"text/plain"},"url":{"path":["transactions",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/resources/platform-api custom_edit_url: null @@ -20,7 +20,7 @@ import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem"; -## Fetch a single transaction +## Retreive a Transaction @@ -63,7 +63,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/ap_api/resources/get-transactions.api.mdx b/ap_api/resources/get-transactions.api.mdx index 5b2844b02..7202416b7 100644 --- a/ap_api/resources/get-transactions.api.mdx +++ b/ap_api/resources/get-transactions.api.mdx @@ -1,11 +1,11 @@ --- id: get-transactions -title: "Fetch all transactions initiated by client applications" +title: "List all Transactions" description: "Provides the information necessary for the business to determine the state of each transaction, decide if any" -sidebar_label: "Fetch all transactions initiated by client applications" +sidebar_label: "List all Transactions" hide_title: true hide_table_of_contents: true -api: {"tags":["Transactions"],"operationId":"getTransactions","description":"Provides the information necessary for the business to determine the state of each transaction, decide if any \naction must be taken to continue processing each transaction, and act on those decisions.\n","parameters":[{"in":"query","name":"sep","description":"The SEP number for the protocol used to initiate this transaction.","required":false,"schema":{"type":"integer","enum":[24,31]}},{"in":"query","name":"order","description":"Either ascending or descending by `order_by` value.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"order_by","description":"The data to be used for ordering transactions.","schema":{"type":"string","enum":["started_at","completed_at","transfer_received_at"],"default":"started_at"}},{"in":"query","name":"cursor","description":"The cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","required":false,"schema":{"type":"string"}},{"in":"query","name":"after","description":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"before","description":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"status","description":"Status of the transaction.","required":false,"schema":{"type":"string","enum":["pending_sender","pending_stellar","pending_customer_info_update","pending_receiver","pending_external","completed","expired","error"]}}],"responses":{"200":{"description":"valid request","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","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"]},"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"},"kyc_verified":{"type":"boolean"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_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"}},"title":"TransactionSEP24"}},"cursor":{"type":"string"}},"title":"AllTransactionsSEP24"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"kind":{"type":"string","enum":["receive"]},"status":{"type":"string","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"}},"cursor":{"type":"string"}},"title":"AllTransactionSEP31"}]}}}},"400":{"description":"invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"method":"get","path":"/transactions","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Fetch all transactions initiated by client applications","description":{"content":"Provides the information necessary for the business to determine the state of each transaction, decide if any \naction must be taken to continue processing each transaction, and act on those decisions.\n","type":"text/plain"},"url":{"path":["transactions"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The SEP number for the protocol used to initiate this transaction.","type":"text/plain"},"key":"sep","value":""},{"disabled":false,"description":{"content":"Either ascending or descending by `order_by` value.","type":"text/plain"},"key":"order","value":""},{"disabled":false,"description":{"content":"The data to be used for ordering transactions.","type":"text/plain"},"key":"order_by","value":""},{"disabled":false,"description":{"content":"The cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","type":"text/plain"},"key":"cursor","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","type":"text/plain"},"key":"after","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","type":"text/plain"},"key":"before","value":""},{"disabled":false,"description":{"content":"Status of the transaction.","type":"text/plain"},"key":"status","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["Transactions"],"operationId":"getTransactions","description":"Provides the information necessary for the business to determine the state of each transaction, decide if any \naction must be taken to continue processing each transaction, and act on those decisions.\n","parameters":[{"in":"query","name":"sep","description":"The SEP number for the protocol used to initiate this transaction.","required":false,"schema":{"type":"integer","enum":[24,31]}},{"in":"query","name":"order","description":"Either ascending or descending by `order_by` value.","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"in":"query","name":"order_by","description":"The data to be used for ordering transactions.","schema":{"type":"string","enum":["started_at","completed_at","transfer_received_at"],"default":"started_at"}},{"in":"query","name":"cursor","description":"The cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","required":false,"schema":{"type":"string"}},{"in":"query","name":"after","description":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"before","description":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","required":false,"schema":{"type":"string","format":"date-time"}},{"in":"query","name":"status","description":"Status of the transaction.","required":false,"schema":{"type":"string","enum":["pending_sender","pending_stellar","pending_customer_info_update","pending_receiver","pending_external","completed","expired","error"]}}],"responses":{"200":{"description":"valid request","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","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"]},"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"},"kyc_verified":{"type":"boolean"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_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"}},"title":"TransactionSEP24"}},"cursor":{"type":"string"}},"title":"AllTransactionsSEP24"},{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["31"]},"kind":{"type":"string","enum":["receive"]},"status":{"type":"string","enum":["incomplete","completed","refunded","expired","error","pending_stellar","pending_external","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"}},"cursor":{"type":"string"}},"title":"AllTransactionSEP31"}]}}}},"400":{"description":"invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}},"method":"get","path":"/transactions","info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"List all Transactions","description":{"content":"Provides the information necessary for the business to determine the state of each transaction, decide if any \naction must be taken to continue processing each transaction, and act on those decisions.\n","type":"text/plain"},"url":{"path":["transactions"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The SEP number for the protocol used to initiate this transaction.","type":"text/plain"},"key":"sep","value":""},{"disabled":false,"description":{"content":"Either ascending or descending by `order_by` value.","type":"text/plain"},"key":"order","value":""},{"disabled":false,"description":{"content":"The data to be used for ordering transactions.","type":"text/plain"},"key":"order_by","value":""},{"disabled":false,"description":{"content":"The cursor used for pagination. Each response will include a `cursor` value that can be used to view the next page, assuming all other parameters kept the same.","type":"text/plain"},"key":"cursor","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be after (exclusive), in UTC.","type":"text/plain"},"key":"after","value":""},{"disabled":false,"description":{"content":"Timestamp for which all `order_by` values will be before (exclusive), in UTC.","type":"text/plain"},"key":"before","value":""},{"disabled":false,"description":{"content":"Status of the transaction.","type":"text/plain"},"key":"status","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/resources/platform-api custom_edit_url: null @@ -20,7 +20,7 @@ import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem"; -## Fetch all transactions initiated by client applications +## List all Transactions @@ -65,7 +65,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 diff --git a/ap_api/resources/patch-transactions.api.mdx b/ap_api/resources/patch-transactions.api.mdx index bf508507e..a81ae6cc5 100644 --- a/ap_api/resources/patch-transactions.api.mdx +++ b/ap_api/resources/patch-transactions.api.mdx @@ -5,7 +5,7 @@ description: "Accepts one or more objects containing updated information on tran sidebar_label: "Accept updated information on transactions" hide_title: true hide_table_of_contents: true -api: {"tags":["Transactions"],"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. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","responses":{"200":{"description":"Transaction(s) updated.","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"},"kyc_verified":{"type":"boolean"},"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"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"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":"MutableTransaction"}}}}}}},"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":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"},"kyc_verified":{"type":"boolean"},"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"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"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":"MutableTransaction"}},"title":"PatchTransactionRequest"}}}}}}},"method":"patch","path":"/transactions","jsonRequestBodyExample":{"records":[{"transaction":{"id":"string","sep":"24","kind":"deposit","status":"incomplete","amount_expected":{"amount":"string","asset":"string"},"amount_in":{"amount":"string","asset":"string"},"amount_out":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"kyc_verified":true,"quote_id":"string","started_at":"2023-03-24T21:24:50.812Z","updated_at":"2023-03-24T21:24:50.812Z","completed_at":"2023-03-24T21:24:50.812Z","transfer_received_at":"2023-03-24T21:24:50.812Z","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-03-24T21:24:50.813Z","refunded_at":"2023-03-24T21:24:50.813Z"}]},"stellar_transactions":[{"id":"string","memo":"string","memo_type":"text","created_at":"2023-03-24T21:24:50.813Z","envelope":"string","payments":[{"id":"string","payment_type":"payment","source_account":"string","destination_account":"string","amount":{"amount":"string","asset":"string"}}]}],"source_account":"string","destination_account":"string","external_transaction_id":"string","custodial_transaction_id":"string","memo":"string","memo_type":"string","customers":{"sender":{"id":"string","account":"string"},"receiver":{"id":"string","account":"string"}},"creator":{"id":"string","account":"string"}}}]},"info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Accept updated information on transactions","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. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","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"],"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. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","responses":{"200":{"description":"Transaction(s) updated.","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"},"kyc_verified":{"type":"boolean"},"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"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"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":"MutableTransaction"}}}}}}},"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":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"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"},"kyc_verified":{"type":"boolean"},"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"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"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":"MutableTransaction"}},"title":"PatchTransactionRequest"}}}}}}},"method":"patch","path":"/transactions","jsonRequestBodyExample":{"records":[{"transaction":{"id":"string","sep":"24","kind":"deposit","status":"incomplete","amount_expected":{"amount":"string","asset":"string"},"amount_in":{"amount":"string","asset":"string"},"amount_out":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"kyc_verified":true,"quote_id":"string","started_at":"2023-03-28T21:41:33.501Z","updated_at":"2023-03-28T21:41:33.501Z","completed_at":"2023-03-28T21:41:33.501Z","transfer_received_at":"2023-03-28T21:41:33.501Z","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-03-28T21:41:33.501Z","refunded_at":"2023-03-28T21:41:33.501Z"}]},"stellar_transactions":[{"id":"string","memo":"string","memo_type":"text","created_at":"2023-03-28T21:41:33.501Z","envelope":"string","payments":[{"id":"string","payment_type":"payment","source_account":"string","destination_account":"string","amount":{"amount":"string","asset":"string"}}]}],"source_account":"string","destination_account":"string","external_transaction_id":"string","custodial_transaction_id":"string","memo":"string","memo_type":"string","customers":{"sender":{"id":"string","account":"string"},"receiver":{"id":"string","account":"string"}},"creator":{"id":"string","account":"string"}}}]},"info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Accept updated information on transactions","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. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","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/resources/platform-api custom_edit_url: null @@ -96,7 +96,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/ap_api/resources/quotes/index.mdx b/ap_api/resources/quotes/index.mdx index 58700a67d..808401140 100644 --- a/ap_api/resources/quotes/index.mdx +++ b/ap_api/resources/quotes/index.mdx @@ -5,7 +5,7 @@ order: 0 import {EndpointsTable} from "@site/src/components/EndpointsTable"; -The quote endpoint is used to provide potential trading pairs and exchange rates for a given asset pair. For example, if a user wants to trade their USDC for XLM, the quote endpoint would provide them with the current exchange rate for that trade. +The quote endpoint is used to provide potential trading pairs and exchange rates for a given asset pair. For example, if a user wants to trade their USDC for EUR (or any other Fiat currency), the quote endpoint would provide them with the current exchange rate for that trade. diff --git a/ap_api/resources/sidebar.js b/ap_api/resources/sidebar.js index db4547a49..a2ec3c7d2 100644 --- a/ap_api/resources/sidebar.js +++ b/ap_api/resources/sidebar.js @@ -1 +1 @@ -module.exports = [{"type":"doc","id":"resources/platform-api"},{"type":"category","label":"Transactions","link":{"type":"generated-index","title":"Transactions","slug":"/category/resources/transactions"},"items":[{"type":"doc","id":"resources/get-transactions","label":"Fetch all transactions initiated by client applications","className":"api-method get"},{"type":"doc","id":"resources/patch-transactions","label":"Accept updated information on transactions","className":"api-method patch"},{"type":"doc","id":"resources/get-transaction","label":"Fetch a single transaction","className":"api-method get"}]},{"type":"category","label":"Quotes","link":{"type":"generated-index","title":"Quotes","slug":"/category/resources/quotes"},"items":[{"type":"doc","id":"resources/get-quotes","label":"Fetch the quotes provided to client applications","className":"api-method get"},{"type":"doc","id":"resources/get-quote","label":"Fetch a single quote provided to a client application","className":"api-method get"}]}]; \ No newline at end of file +module.exports = [{"type":"doc","id":"resources/platform-api"},{"type":"category","label":"Transactions","link":{"type":"generated-index","title":"Transactions","slug":"/category/resources/transactions"},"items":[{"type":"doc","id":"resources/get-transactions","label":"List all Transactions","className":"api-method get"},{"type":"doc","id":"resources/patch-transactions","label":"Accept updated information on transactions","className":"api-method patch"},{"type":"doc","id":"resources/get-transaction","label":"Retreive a Transaction","className":"api-method get"}]},{"type":"category","label":"Quotes","link":{"type":"generated-index","title":"Quotes","slug":"/category/resources/quotes"},"items":[{"type":"doc","id":"resources/get-quotes","label":"List all Quotes","className":"api-method get"},{"type":"doc","id":"resources/get-quote","label":"Retrieve a Quote","className":"api-method get"}]}]; \ No newline at end of file diff --git a/openapi/ap/Platform API.yml b/openapi/ap/Platform API.yml index 3f86f4d78..0b677d55c 100644 --- a/openapi/ap/Platform API.yml +++ b/openapi/ap/Platform API.yml @@ -12,7 +12,7 @@ paths: get: tags: - "Transactions" - summary: Fetch all transactions initiated by client applications + summary: List all Transactions operationId: getTransactions description: | Provides the information necessary for the business to determine the state of each transaction, decide if any @@ -147,7 +147,7 @@ paths: get: tags: - "Transactions" - summary: Fetch a single transaction + summary: Retreive a Transaction operationId: getTransaction description: Provides the information necessary for the business to determine the state of the transaction identified by @@ -183,7 +183,7 @@ paths: get: tags: - Quotes - summary: Fetch the quotes provided to client applications + summary: List all Quotes operationId: getQuotes description: Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using @@ -251,7 +251,7 @@ paths: get: tags: - Quotes - summary: Fetch a single quote provided to a client application + summary: Retrieve a Quote operationId: getQuote description: Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using diff --git a/openapi/ap/bundled.yml b/openapi/ap/bundled.yml index 5a3264786..ad89dc0dc 100644 --- a/openapi/ap/bundled.yml +++ b/openapi/ap/bundled.yml @@ -12,7 +12,7 @@ paths: get: tags: - Transactions - summary: Fetch all transactions initiated by client applications + summary: List all Transactions operationId: getTransactions description: | Provides the information necessary for the business to determine the state of each transaction, decide if any @@ -146,7 +146,7 @@ paths: get: tags: - Transactions - summary: Fetch a single transaction + summary: Retreive a Transaction operationId: getTransaction description: Provides the information necessary for the business to determine the state of the transaction identified by `id`, decide if any action must be taken to continue processing the transaction, and act on the decision. parameters: @@ -180,7 +180,7 @@ paths: get: tags: - Quotes - summary: Fetch the quotes provided to client applications + summary: List all Quotes operationId: getQuotes description: Only relevant for SEP-38 (used by SEP-31). Fetches the quotes that were created by client applications using SEP-38's `POST /quote` endpoint. parameters: @@ -249,7 +249,7 @@ paths: get: tags: - Quotes - summary: Fetch a single quote provided to a client application + summary: Retrieve a Quote operationId: getQuote description: Only relevant for SEP-38 (used by SEP-31). Fetches the quote that was created by a client application using SEP-38's `POST /quote` endpoint. parameters: