User Tools

Site Tools


api:porting:upload-document

API : Porting Upload Document

Introduction

This request uploads a power of attorney (POA) document to a porting, as a multipart/form-data POST.

Documents can only be added before the porting is ordered, i.e. at stage IN_CREATED, IN_AWAITING_POA_FROM_CUSTOMER, IN_POA_RECEIVED_FROM_CUSTOMER, IN_READY or IN_POA_SENT.

On success the porting moves to stage IN_POA_RECEIVED_FROM_CUSTOMER - also when it was at IN_READY or IN_POA_SENT. The document is added to the porting's documents, and can be downloaded with get-document and removed with delete-document.

Request

URL https://api.telecomx.dk/porting/PORTING-ID/document
Method POST
Access level OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
RESELLER_ADMIN, ADMIN.
The customer must have the SIP or MVNO feature.
Param PORTING-ID Id of the porting (24 hex-char string).
Body file The file to upload, in the multipart/form-data field file. Only the first file is used.
The file type is decided by the file name alone: it must end in .pdf, .png or .jpg (upper or lower case) - .jpeg is not accepted.

Query example

curl -X POST -H "Authorization: Bearer TOKEN" -F "file=@fuldmagt.pdf" https://api.telecomx.dk/porting/1234567890ABCDEF12345678/document

Response

Property Type Description
success Boolean True on success.
document Object Metadata about the document.
document._id Id Id of the document.
document.filename String Filename.
document.size Number Size of the file in bytes.

Example

{
  success: true,
  document: {
    _id: '12345678901234567890BBBB',
    filename: 'porting.pdf',
    size: 147895
  }
}

Errors

Error code Message Description
400 bad_request Id not found in request URI
404 not_found Porting not found
403 access_denied Insufficient access level
403 access_denied Customer does not have required feature
403 stage Porting is not at the right stage to allow documents to be added
404 file The file was missing or invalid - also when the file is empty
422 file Filetype must be PDF, PNG or JPG
500 internal_error <Unspecified>
api/porting/upload-document.txt · Last modified: by Telecom X AI

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki