Walletguide
DevelopersAPIReferencefiles

Upload

Stores the file in the wallet and returns its row. Attach it on upload with transactionIds, cryptoTransactionIds or securityTransactionIds (a security…

POST
/wallets/{walletId}/files/upload

Authorization

bearerAuth
headerAuthorization<token>

A Walletguide API key (wg_…) or an OAuth bearer token. Paste the value only. Create a key under Wallet settings → API keys.

Path Parameters

walletId*string

Row uuid

Formatuuid

Request Body

application/json
  1. body
fileBase64*string

The document, standard padded base64. At most 10 MB once decoded.

Length1 <= length
fileName*string

The name to show, with its extension (statement.pdf). The extension decides parsing.

Length1 <= length
contentType?string

MIME type. Defaults from the extension (application/pdf for .pdf).

Length1 <= length
transactionIds?array<>

Cash transactions to attach the file to.

cryptoTransactionIds?array<>

Crypto transactions to attach the file to.

securityTransactionIds?array<>

Security (buy/sell/dividend) transactions to attach the file to.

Response Body

The stored file

application/json
  1. response
id*string
Formatuuid
walletId*string
Formatuuid
firestoreId*string|null
transactionIds*array<>
cryptoTransactionIds*array<>
securityTransactionIds*array<>
filename*string
fileExtension*string
size*integer
Range-2147483648 <= value <= 2147483647
storagePath*string
parseStatus*string
Value in"open""running""failed""succeeded"
parseData*string|number|boolean|null||array<unknown>
createdTime*|
Formatdate-time
createdUserId*string|null
lastUpdatedTime*|
Formatdate-time
lastUpdatedUserId*string|null
curl -X POST 'https://api.walletguide.com/wallets/497f6eca-6276-4993-bfeb-53cbbbba6f08/files/upload' \  -H 'Content-Type: application/json' \  -d '{  "fileBase64": "string",  "fileName": "string"}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "walletId": "0ecad4a2-3549-43fb-807e-9ff033247480",  "firestoreId": "string",  "transactionIds": [    "390bdf4e-83f8-4d97-9b70-6548dddef7ab"  ],  "cryptoTransactionIds": [    "c16ecae0-d5ad-4bad-b2d4-6d2e923da4b9"  ],  "securityTransactionIds": [    "c24f3ed0-61ed-4cb8-bf61-f9d71e009e82"  ],  "filename": "string",  "fileExtension": "string",  "size": -2147483648,  "storagePath": "string",  "parseStatus": "open",  "parseData": "string",  "createdTime": "2019-08-24T14:15:22Z",  "createdUserId": "string",  "lastUpdatedTime": "2019-08-24T14:15:22Z",  "lastUpdatedUserId": "string"}