User Tools

Site Tools


api:internet:account:uploaddocument

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 and employee belongs to the customer.
ADMIN.
Params ACCOUNT_ID Id of the Internet Access account to upload the document to
Body file Binary image data

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: '123456789012345678901234',
    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: 2018/09/25 08:39 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki