Request a Document Pull

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/files

Body Parameters

  • url
    string Required

    The 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
    object

    Document request object composed of the following:

    • attributes
      object

      Object composed of attributes relating to the state of the request.

      • filename
        string

        The original URL specified in the request.

      • file
        string

        The 'shortened' name of the file if specified.

      • original_url
        string

        The 'shortened' name of the file if specified.

      • status
        string

        The status of the document upload. Possible status values are:

        • pending
        • processing
        • complete
        • error
    • id
      string

      ID assigned to the document process.

    • links
      object

      Links object pointing to the status for this document.

      For example, https://...portorders/394822/files/99999.

    • type
      string

      This 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"
  }
}