Deposit Documents

POST
/api/v1/deposits/{transactionId}/documents

Attach an invoice or other supporting document to a payment route deposit

Authorization

headerX-Api-Key<token>

API key in format: sti_env_prefix_secret

Path Parameters

transactionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Request Body

Request schema for attaching a document to a transaction

application/json
  1. body

Request schema for attaching a document to a transaction

file_name*string

Original file name, preserved for the download

Length1 <= length <= 255
base64_url*string

The file as a base64 data URL, e.g. data:application/pdf;base64,JVBERi0…. Accepts application/pdf, image/jpeg and image/png; the declared media type must match the file's actual contents, which are checked server-side. Maximum 10MB decoded.

Length1 <= length
type?DocumentType

What the attached file is. Defaults to invoice.

Default"invoice"
Value in"invoice""contract""other"

Response Body

Default Response

application/json
  1. response

A single transfer document

document*

A file attached to a transaction

Example Request
curl -X POST 'https://api.sandbox.stables.money/api/v1/deposits/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents' \  -H 'Content-Type: application/json' \  -d '{  "file_name": "string",  "base64_url": "string"}'
Example Response
{  "document": {    "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",    "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",    "transaction_type": "transfer",    "type": "invoice",    "file_name": "string",    "content_type": "string",    "size_bytes": -9007199254740991,    "created_at": "string"  }}
GET
/api/v1/deposits/{transactionId}/documents

List the documents attached to a payment route deposit, newest first

Authorization

headerX-Api-Key<token>

API key in format: sti_env_prefix_secret

Path Parameters

transactionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Default Response

application/json
  1. response

Documents attached to a transaction, newest first

documents*array<>
Example Request
curl -X GET 'https://api.sandbox.stables.money/api/v1/deposits/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents'
Example Response
{  "documents": [    {      "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",      "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",      "transaction_type": "transfer",      "type": "invoice",      "file_name": "string",      "content_type": "string",      "size_bytes": -9007199254740991,      "created_at": "string"    }  ]}
GET
/api/v1/deposits/{transactionId}/documents/{documentId}/download-url

Get a short-lived presigned URL for downloading a payment route deposit document

Authorization

headerX-Api-Key<token>

API key in format: sti_env_prefix_secret

Path Parameters

transactionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
documentId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Default Response

application/json
  1. response

A short-lived link for downloading a transaction document

url*string

Short-lived presigned download URL (expires in 5 minutes)

file_name*string
content_type*string
expires_in*integer

URL lifetime in seconds

Range-9007199254740991 <= value <= 9007199254740991
Example Request
curl -X GET 'https://api.sandbox.stables.money/api/v1/deposits/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/download-url'
Example Response
{  "url": "string",  "file_name": "string",  "content_type": "string",  "expires_in": -9007199254740991}
DELETE
/api/v1/deposits/{transactionId}/documents/{documentId}

Remove a document from a payment route deposit

Authorization

headerX-Api-Key<token>

API key in format: sti_env_prefix_secret

Path Parameters

transactionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
documentId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

Default Response

application/json
  1. response

Confirmation the document was removed

deleted*boolean
Example Request
curl -X DELETE 'https://api.sandbox.stables.money/api/v1/deposits/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "deleted": true}

Attach an invoice or other supporting document to a payment route deposit, for example when Stables compliance asks for one.