api:internet:account:uploaddocument
Table of Contents
API : Internet Access Account - Upload Document
Introduction
This request is used to upload a document and attach it to the Internet Access account.
The upload must be performed as a multipart/form-data post request.
Request
| URL | https://api.telecomx.dk/internet/account/ACCOUNT_ID/document | |
|---|---|---|
| Method | POST | |
| Access level | MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller or a sub reseller. RESELLER_ADMIN ADMIN. |
|
| Params | ACCOUNT_ID | Id of the Internet Access account to upload the document to |
| Body | file | The file to upload (PDF, PNG or JPG), as a multipart/form-data part named file. |
Request example
https://api.telecomx.dk/internet/account/1234567890ABCDEF1234578/document
Response
| Property | Type | Description |
|---|---|---|
| success | Boolean | True on success. |
| document | Object | Document data. |
| document._id | Id | Id of the document. |
| document.filename | String | Name of the document. |
| document.size | Number | Size of the document in bytes. |
Example
{ "success": true, "document": { "_id": "650000000000000000000009", "filename": "install-doc.pdf", "size": 453542 } }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 404 | not_found | Account not found |
| 404 | file | The file was missing or invalid |
| 403 | access_denied | Insufficient access level |
| 422 | file | Filetype must be PDF, PNG or JPG |
| 500 | internal_error | <unspecified> |
api/internet/account/uploaddocument.txt · Last modified: by Mikkel Meerwaldt Jørgensen