The second method to upload a document to your port order is to have the Porting service retrieve your document from a public location. In that case, you specify the URL of your file.
Method
POST portorders/:portorder_id/filesBody Parameters
-
url
string RequiredThe full path to the file to be uploaded. with optional filename query parameter appended. Useful for when the filename cannot be derived from the URL.
Response Fields
On success, the HTTP status code in the response header is 200 OK and the response body contains information on the document request. On error, the header status code is an error code and the response body contains an array of error objects.
-
data
objectDocument request object composed of the following:
-
attributes
objectObject composed of attributes relating to the state of the request.
-
filename
stringThe original URL specified in the request.
-
file
stringThe 'shortened' name of the file if specified.
-
original_url
stringThe 'shortened' name of the file if specified.
-
status
stringThe status of the document upload. Possible status values are:
- pending
- processing
- complete
- error
-
id
stringID assigned to the document process.
-
links
objectLinks object pointing to the status for this document.
For example, https://...portorders/394822/files/99999.
-
type
stringThis will always be portorder-file.
Example Request
POST /v2/portorders/portorder_id/files HTTP/1.1
Content-Type: application/json
Accept: application/json
{
"url": "https://example.com/images/header/carrier_bill.pdf?filename=my_carrier_bill.pdf"
}
Example Request
curl -X POST https://api.flowroute.com/v2/portorders/:portorder_id/files -u accessKey:secretKey -d '{"url": "https://example.com/images/header/carrier_bill.pdf?filename=my_carrier_bill.pdf"}' -H 'Content-Type':'application/json'
Example Response
Success
200 OK
{
"data": {
"attributes": {
"filename": "https://example.com/images/header/carrier_bill.pdf",
"file": "my_carrier_bill.pdf",
"original_url": "https://example.com/images/header/carrier_bill.pdf?filename=my_carrier_bill.pdf"
"status": "processing"
},
"id": "51026",
"links": {
"self": "https://api.flowroute.com/v2/portorders/40093/files/51026"
},
"type": "portorder-file"
}
}