Back to Top

Copyright © FleetRunnr, Inc.

This is the documentation for version 1.0 of the API. Last update on May 30, 2022.

Base URL
https://{workspace}.fleetrunnr.com/api/v1

Send a bearer token in the Authorization HTTP header to authenticate with the API.

To generate an access token, please go to the Settings page in the FleetRunnr portal, click on Access Tokens, and create a new one from there (https://app.fleetrunnr.com/settings/access-tokens).

All API requests return HTTP status codes that can tell you more about the response.

401 Unauthorized

The client doesn't have proper authentication headers.


402 Payment Required

The account doesn't have a valid subscription or has overdue payments.


403 Forbidden

The requested resource is not accessible.


404 Not Found

The requested resource was not found.


422 Unprocessable Entity

The request body contains semantic errors. This is typically caused by incorrect formatting, omitting required fields, or logical errors.


429 Too Many Requests

The client has exceeded the API rate limit.


5xx Errors

An internal error occurred in FleetRunnr. Contact support for more information.

// 401
{
  "message": "Unauthorized."
}

// 402
{
  "message": "Payment Required."
}

// 403
{
  "message": "Forbidden."
}

// 404
{
  "message": "Not found."
}

// 422
{
  "message": "The given data was invalid."
  "errors": {
    ...
  }
}

// 429
{
  "message": "Too many requests."
}

// 5xx
{
  "message": "Internal server error."
}

Retrieve Carriers

GET /carriers

Retrieve your carriers.

Responses
GET /carriers
curl \
 -X GET https://{workspace}.fleetrunnr.com/api/v1/carriers \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "message": "string",
  "data": {
    "id": 2,
    "name": "Nader-Lehner",
    "avatar": null,
    "workspace": "nader-lehner1646923360",
    "shipping_methods": [
      {
        "id": 1,
        "name": "Oscar Mertz V",
        "workflow": 1,
        "base_fee": 20,
        "base_fee_formatted": "$20.00",
        "currency": "USD",
        "lateness_threshold": 0,
        "lateness_threshold_formatted": null,
        "weight_threshold": 15,
        "weight_surcharge": 5,
        "weight_surcharge_formatted": "$5.00",
        "is_active": true
      }
    ]
  }
}

Calculate Rates

POST /carriers/rates

Retrieve all carriers and calculate the rates of an order for each shipping method depending on the chosen: (total weight of packages, source/destination coordinates).

Body

Post the necessary fields for the API to calculate the rate.

  • sources Required / object

    The order's source location.

    • latitude Required / number

      The order's source latitude.

      Minimum value is -90, maximum value is 90.

    • longitude Required / number

      The order's source longitude.

      Minimum value is -180, maximum value is 180.

  • destination Required / object

    The order's destination location.

    • latitude Required / number

      The order's destination latitude.

      Minimum value is -90, maximum value is 90.

    • longitude Required / number

      The order's destination longitude.

      Minimum value is -180, maximum value is 180.

  • total_weight Required / number

    The order's total weight(kg).

Responses
  • 200 object

    Rates Retrieved.

    • message string
    • data object
      • id integer

        The carrier's id used by FleetRunnr.

      • name string

        The carrier's name.

      • avatar string

        The carrier's avatar.

      • workspace string

        The carrier's workspace.

      • shipping_methods array[object]

        The carrier's shipping methods.

        • id integer

          The shipping method id.

        • name string

          The shipping method name.

        • rate number

          The shipping method calculated rate.

POST /carriers/rates
curl \
 -X POST https://{workspace}.fleetrunnr.com/api/v1/carriers/rates \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"sources":{"latitude":-90,"longitude":-180},"destination":{"latitude":-90,"longitude":-180},"total_weight":20}'
Request example
{
  "sources": {
    "latitude": -90,
    "longitude": -180
  },
  "destination": {
    "latitude": -90,
    "longitude": -180
  },
  "total_weight": 20
}
Response example (200)
{
  "message": "string",
  "data": {
    "id": 2,
    "name": "Welch-Harvey",
    "avatar": null,
    "workspace": "welch-harvey1646923662",
    "shipping_methods": [
      {
        "id": 1,
        "name": "Coralie Pagac II",
        "rate": 50
      },
      {
        "id": 2,
        "name": "Brandi Ziemann",
        "rate": 150
      }
    ]
  }
}

Get Customer

GET /customers

Retrieve customer by id, phone, email or external_id. Set the location parameter to true in order to also retrieve the customer’s location information.

Query parameters
  • id integer

    Fetch customer by id.

  • phone string

    Fetch customer by phone_number.

  • email string

    Fetch customer by email address.

  • external_id integer

    Fetch customer by external_id

  • locations boolean

    Fetch customer associated with locations.

Responses
  • 200 object

    Customer Found

    • message string
    • data object
      • id integer

        The unique customer's id used by FleetRunnr.

      • external_id integer

        The unique customer's external id.

      • first_name string

        The customer's first name.

      • last_name string

        The customer's last name

      • email string(email)

        The unique customer's email.

      • phone string

        The unique customer's phone number.

      • locations array[object]

        The locations saved by this customer.

        • id integer

          The unique location's id used by FleetRunnr.

        • name string

          The location's name.

        • line_1 string

          The location's first line.

        • line_2 string

          The location's second line.

        • city string

          The location's city.

        • region string

          The location's region.

        • country string

          The location's country.

        • coordinates object

          The location's coordinates.

          • lat number

            The locations latitude.

          • lng number

            The location's longitude.

        • zip_code number

          The location's zip code.

GET /customers
curl \
 -X GET https://{workspace}.fleetrunnr.com/api/v1/customers \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "message": "success",
  "data": {
    "id": 1,
    "external_id": 1,
    "first_name": "Shannon",
    "last_name": "Fisher",
    "email": "example@hotmail.com",
    "phone": "+12099216581"
  }
}
{
  "message": "string",
  "data": {
    "id": 1,
    "external_id": 1,
    "first_name": "Shannon",
    "last_name": "Fisher",
    "email": "example@hotmail.com",
    "phone": "+12099216581",
    "locations": [
      {
        "id": 1,
        "name": "Prof. Ethyl Jones",
        "line_1": "946 Nelda Divide Alleneville, GA 90543-7001",
        "line_2": "7570 Elaina Mill",
        "city": "Antonettaville",
        "region": "sunt",
        "country": "FRA",
        "coordinates": {
          "lat": -90,
          "lng": -180
        },
        "zip_code": 77449
      }
    ]
  }
}

Create Customer

POST /customers

Create a new customer.

Body

Post the necessary fields for the API to create a customer.

  • first_name Required / string

    The customer's first name.

  • last_name Required / string

    The customer's last name.

  • external_id integer

    The unique customer's external id.

  • email string(email)

    The unique customer's email.
    Required if phone is not provided.

  • phone string

    The phone number should be unique and in international format starting with the country code, with the leading '+'. ex. +96170123456.

    Required if email is not provided.

  • notes string

    The customer's notes.

Responses
POST /customers
curl \
 -X POST https://{workspace}.fleetrunnr.com/api/v1/customers \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"first_name":"john","last_name":"Ondricka","external_id":1,"email":"vladimir.kertzmann@barrows.info","phone":"+12163547758","notes":"Interested in your Fleet account"}'
Request example
{
  "first_name": "john",
  "last_name": "Ondricka",
  "external_id": 1,
  "email": "vladimir.kertzmann@barrows.info",
  "phone": "+12163547758",
  "notes": "Interested in your Fleet account"
}
Response example (200)
{
  "message": "success"
}

Update Customer

PUT /customers/{id}

Update the information of a customer with matching customer ID.

Body

Post the necessary fields for the API to update customer.

  • first_name Required / string

    The customer's first name.

  • last_name Required / string

    The customer's last name.

  • email string(email)

    The unique customer's email.
    Required if phone is not provided.

  • phone string

    The phone number should be unique and in international format starting with the country code, with the leading '+'. ex. +96170123456.

    Required if email is not provided.

  • notes string

    The customer's notes.

Responses
  • 200 object

    Customer Updated

    • message object
      • first_name string

        The customer's first name.

      • last_name string

        The customer's last name.

      • external_id integer

        The unique customer's external id.

      • email string(email)

        The unique customer's email.

      • phone string

        The unique customer's phone number.

      • notes string

        The customer's notes.

PUT /customers/{id}
curl \
 -X PUT https://{workspace}.fleetrunnr.com/api/v1/customers/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"first_name":"Julian","last_name":"Jacobi","phone":"+9616171513","email":"lorena.langworth@beer.info","notes":"Qui sunt hic quis consequatur officiis aut dolores. Pariatur dolorem recusandae quam voluptas quisquam iusto. Nihil sunt rerum autem sint fugiat. Laboriosam ut iusto quo voluptas."}'
Request example
{
  "first_name": "Julian",
  "last_name": "Jacobi",
  "phone": "+9616171513",
  "email": "lorena.langworth@beer.info",
  "notes": "Qui sunt hic quis consequatur officiis aut dolores. Pariatur dolorem recusandae quam voluptas quisquam iusto. Nihil sunt rerum autem sint fugiat. Laboriosam ut iusto quo voluptas."
}
Response example (200)
{
  "message": {
    "first_name": "john",
    "last_name": "Ondricka",
    "external_id": 1,
    "email": "vladimir.kertzmann@barrows.info",
    "phone": "+12163547758",
    "notes": "Interested in your Fleet account"
  }
}

Retrieve Locations

GET /locations

Retrieve your locations.

Responses
  • 200 object

    Locations Found

    • message string
    • data object
      • id integer

        The unique location's id used by FleetRunnr.

      • name string

        The location's name.

      • line_1 string

        The location's first line.

      • line_2 string

        The location's second line.

      • city string

        The location's city.

      • region string

        The location's region.

      • country string

        The location's country.

      • coordinates object

        The location's coordinates.

        • lat number

          The locations latitude.

        • lng number

          The location's longitude.

      • zip_code number

        The location's zip code.

GET /locations
curl \
 -X GET https://{workspace}.fleetrunnr.com/api/v1/locations \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "message": "success",
  "data": {
    "id": 1,
    "name": "Prof. Ethyl Jones",
    "line_1": "946 Nelda Divide Alleneville, GA 90543-7001",
    "line_2": "7570 Elaina Mill",
    "city": "Antonettaville",
    "region": "sunt",
    "country": "FRA",
    "coordinates": {
      "lat": -90,
      "lng": -180
    },
    "zip_code": 77449
  }
}

Get Order

GET /orders

Retrieve order by external id or number.

Query parameters
Responses
  • 200 object

    Order Found

    • message string
    • data object
      • order object
        • uuid string

          The order's uuid

        • order_number string

          The order number

        • external_id string

          The unique order's external id.

        • created_date string

          The order's created date.

        • requirements object

          The order's requirements

          • skills array

            The requirement skill.

          • The requirement proof of delivery.

            • image boolean

              The proof of delivery as an image.

            • signature boolean

              The proof of delivery as a signature.

        • The order's pickup time: From->To.

          • from string(date-time)

            In UTC Timezone

          • to string(date-time)

            In UTC Timezone

        • The order's delivery time: From->To.

          • from string(date-time)

            In UTC Timezone

          • to string(date-time)

            In UTC Timezone

        • The order's source contact

          • name string

            The name of the contact

          • phone string

            The phone of the contact

          • email string

            The email of the contact

        • The order's destination contact

          • name string

            The name of the contact

          • phone string

            The phone of the contact

          • email string

            The email of the contact

        • notes string

          The order's notes

        • collections array[object]

          The order's array of collections.

        • is_late boolean

          The order's flag is late.
          True if the delivery scheduled to is in the past

        • flags object

          The order flags.
          return true if this order can be assigned, unassigned or cancelled.

        • in_coverage boolean

          The order's flag in coverage.

GET /orders
curl \
 -X GET https://{workspace}.fleetrunnr.com/api/v1/orders \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "message": "success",
  "data": {
    "order": {
      "uuid": "20c48af2-cb48-40e7-9d1f-372f9ec5bfbc",
      "order_number": "364237070308212736",
      "external_id": "22322423345678",
      "status": "1",
      "created_date": "2022-05-09T10:36:12.000000Z",
      "requirements": {
        "skills": [
          null
        ],
        "proof_of_delivery": {
          "image": true,
          "signature": true
        }
      },
      "pickup_time_window": {
        "from": "2019-08-24 06:15:22",
        "to": "2019-08-24 06:15:22"
      },
      "delivery_time_window": {
        "from": "2019-08-24 06:15:22",
        "to": "2019-08-24 06:15:22"
      },
      "source_contact": {
        "name": "Jeromy Glover",
        "phone": "+19892508138",
        "email": "example@hotmail.com"
      },
      "destination_contact": {
        "name": "Afton Hermann",
        "phone": "+15042010052",
        "email": "example@hotmail.com"
      },
      "notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
      "collections": [
        {
          "uuid": "67caae46-d397-4068-a9a2-c6fc02eef93a",
          "amount": 300,
          "currency": "USD",
          "amount_formatted": "$300.00",
          "type": 1,
          "is_prepayment": true
        }
      ],
      "is_late": true,
      "flags": {
        "can_assign": true,
        "can_unassign": false,
        "can_cancel": true
      },
      "in_coverage": false
    }
  }
}

Create Order

POST /orders

Create a new order

Body

Post the necessary fields for the API to create a new order.

  • customer Required / object

    The customer of this order.
    If the customer already exists then it is only required to provide the cutomer’s id or phone or email. Alternatively, if the customer does not already exist, one can be created on the fly by providing external_id, first_name, last_name, email or phone.

    • id integer

      The existing customer’s id used by FleetRunnr.
      Required if no other customer fields are included.

    • external_id integer

      The id used to uniquely identify the customer outside of Fleetrunnr.

    • first_name string

      The customer’s first name.
      Required to create a new customer

    • last_name string

      The customer’s last name.
      Required to create a new customer

    • email string(email)

      The customer’s email,
      To create a new customer:
      Required if id and phone are not provided.

    • phone string

      The phone number should be unique and in international format starting with the country code, with the leading '+'. ex. +96170123456.

      To create a new customer:
      Required if id and email are not provided.

    • notes string

      Additional notes for this customer.

  • external_id string

    The unique order's external id.

  • is_return boolean

    The boolean order's return.

  • source object

    The source location of this order.
    If the source location already exists then it is only required to provide the source location’s id. Alternatively, if the source location does not already exist, one can be created on the fly by providing name, line_1, city, region, country and coordinates.

    • id integer

      The existing source id used by FleetRunnr.
      Required if no other source location fields are included.

    • name string

      The source name.
      Required if source id is not provided.

    • line_1 string

      The source line1.
      Required if source id is not provided.

    • city string

      The source city.
      Required if source id is not provided.

    • region string

      The source region.
      Required if source id is not provided.

    • country string

      The source country.
      Required if source id is not provided.

    • coordinates object

      The source coordinates.
      Required if source id is not provided.

      • lat number

        The source latitude.
        Required if source id is not provided.

        Minimum value is -90, maximum value is 90.

      • lng number

        The source longitude.
        Required if source id is not provided.

        Minimum value is -180, maximum value is 180.

    • contact object

      The source contact.

      • name string

        The source contact name.

      • phone string

        The source contact phone number.
        Should be in international format starting with the country code, with the leading '+'. ex. +96170123456.

      • email string(email)

        The source contact email.

  • destination Required / object

    The destination location of this order.
    If the destination location already exists then it is only required to provide the destination location’s id. Alternatively, if the destination location does not already exist, one can be created on the fly by providing name, line_1, city, region, country and coordinates.

    • id integer

      The existing destination id used by FleetRunnr.
      Required if no other destination location fields are included.

    • name string

      The destination name.
      Required if destination id is not provided.

    • line_1 string

      The destination line1.
      Required if destination id is not provided.

    • city string

      The destination city.
      Required if destination id is not provided.

    • region string

      The destination region.
      Required if destination id is not provided.

    • country string

      The destination country.
      Required if destination id is not provided.

    • coordinates object

      The destination coordinates
      Required if destination id is not provided.

      • lat number

        The destination latitude.
        Required if destination id is not provided.

        Minimum value is -90, maximum value is 90.

      • lng number

        The destination longitude.
        Required if destination id is not provided.

        Minimum value is -180, maximum value is 180.

    • contact object

      The destination contact.

      • name string

        The destination contact name.

      • phone string

        The destination contact phone number.
        Should be in international format starting with the country code, with the leading '+'. ex. +96170123456.

      • email string(email)

        The destination contact email.

  • collections array[object]

    The order's array of collections.

    • is_prepayment boolean

      The collection prepayment flag.

    • amount Required / number

      The collection amount.

      Minimum value is 0.

    • currency Required / string

      The collection currency of this amount.

    • type Required / integer

      The collection type.

      Values are CASH, CHEQUE, or CREDIT_CARD.

  • requirements object

    The order's requirements.

    • The requirement proof of delivery.

      • signature boolean

        The proof of delivery signature.
        Required with proof of delivery.

      • image boolean

        The proof of delivery image.
        Required with proof of delivery.

    • skills array

      The requirement skill.

  • packages Required / array[object]

    The order's array of packages.

    • name string

      The package name.

    • barcode string

      The package barcode.

    • type Required / integer

      The package type.

      Values are ENVELOPE, BAG, or BOX.

    • width number

      The package width.

    • length number

      The package length.

    • height number

      The package height.

    • weight number

      The package weight.

    • quantity Required / number

      The package quantity.

  • pickup_scheduled_from string(date-time)

    The order's pickup scheduled from.
    Must be in UTC timezone.

  • pickup_scheduled_to string(date-time)

    The order's pickup scheduled to.
    Must be in UTC timezone.

  • delivery_scheduled_from string(date-time)

    The order's delivery scheduled from.
    Must be in UTC timezone.

  • delivery_scheduled_to string(date-time)

    The order's delivery scheduled to.
    Must be in UTC timezone.

  • tags array

    The order's array of tags.

  • notes string

    The order's notes.

Responses
  • 200 object

    Order Created.

    • message string
    • data object
      • order object
        • uuid string

          The order's uuid

        • order_number string

          The order number

        • external_id string

          The unique order's external id.

        • created_date string

          The order's created date.

        • requirements object

          The order's requirements

          • skills array

            The requirement skill.

          • The requirement proof of delivery.

            • image boolean

              The proof of delivery as an image.

            • signature boolean

              The proof of delivery as a signature.

        • The order's pickup time: From->To.

          • from string(date-time)

            In UTC Timezone

          • to string(date-time)

            In UTC Timezone

        • The order's delivery time: From->To.

          • from string(date-time)

            In UTC Timezone

          • to string(date-time)

            In UTC Timezone

        • The order's source contact

          • name string

            The name of the contact

          • phone string

            The phone of the contact

          • email string

            The email of the contact

        • The order's destination contact

          • name string

            The name of the contact

          • phone string

            The phone of the contact

          • email string

            The email of the contact

        • notes string

          The order's notes

        • collections array[object]

          The order's array of collections.

        • is_late boolean

          The order's flag is late.
          True if the delivery scheduled to is in the past

        • flags object

          The order flags.
          return true if this order can be assigned, unassigned or cancelled.

        • in_coverage boolean

          The order's flag in coverage.

POST /orders
curl \
 -X POST https://{workspace}.fleetrunnr.com/api/v1/orders \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"customer":{"external_id":1,"first_name":"Afton","last_name":"Hermann","email":"daniel.malachi@davis.com","phone":"+9616326692","notes":"new customer"},"external_id":"223","is_return":false,"source":{"name":"Karina Franecki","line_1":"84695 Samanta Road Apt. 816","city":"Rueckerfort","region":"rem","country":"KEN","coordinates":{"lat":35.22,"lng":-13.22},"contact":{"name":"Jeromy Glover","phone":"+19892508138","email":"example@hotmail.com"}},"destination":{"name":"Dr. Marian Dare II","attach_to_customer":1,"line_1":"97073 Ryan Pine","city":"North Bobbyhaven","region":"nihil","country":"HRV","coordinates":{"lat":40.3,"lng":89.2},"contact":{"name":"Afton Hermann","phone":"+15042010052","email":"example@hotmail.com"}},"collections":[{"is_prepayment":true,"amount":300,"currency":"USD","type":1}],"requirements":{"proof_of_delivery":{"signature":true,"image":false},"skills":[null]},"packages":[{"name":"bag","type":1,"width":0.1,"length":0.1,"quantity":2}],"pickup_scheduled_from":"2021-08-24 14:15","pickup_scheduled_to":"2021-08-24 14:15","delivery_scheduled_from":"2021-08-24 14:15","delivery_scheduled_to":"2021-08-24 14:15","tags":[null],"notes":"Aliquam atque iusto est maxime nam ea incidunt qui."}'
{
  "customer": {
    "external_id": 1,
    "first_name": "Afton",
    "last_name": "Hermann",
    "email": "daniel.malachi@davis.com",
    "phone": "+9616326692",
    "notes": "new customer"
  },
  "external_id": "223",
  "is_return": false,
  "source": {
    "name": "Karina Franecki",
    "line_1": "84695 Samanta Road Apt. 816",
    "city": "Rueckerfort",
    "region": "rem",
    "country": "KEN",
    "coordinates": {
      "lat": 35.22,
      "lng": -13.22
    },
    "contact": {
      "name": "Jeromy Glover",
      "phone": "+19892508138",
      "email": "example@hotmail.com"
    }
  },
  "destination": {
    "name": "Dr. Marian Dare II",
    "attach_to_customer": 1,
    "line_1": "97073 Ryan Pine",
    "city": "North Bobbyhaven",
    "region": "nihil",
    "country": "HRV",
    "coordinates": {
      "lat": 40.3,
      "lng": 89.2
    },
    "contact": {
      "name": "Afton Hermann",
      "phone": "+15042010052",
      "email": "example@hotmail.com"
    }
  },
  "collections": [
    {
      "is_prepayment": true,
      "amount": 300,
      "currency": "USD",
      "type": 1
    }
  ],
  "requirements": {
    "proof_of_delivery": {
      "signature": true,
      "image": false
    },
    "skills": [
      null
    ]
  },
  "packages": [
    {
      "name": "bag",
      "type": 1,
      "width": 0.1,
      "length": 0.1,
      "quantity": 2
    }
  ],
  "pickup_scheduled_from": "2021-08-24 14:15",
  "pickup_scheduled_to": "2021-08-24 14:15",
  "delivery_scheduled_from": "2021-08-24 14:15",
  "delivery_scheduled_to": "2021-08-24 14:15",
  "tags": [
    null
  ],
  "notes": "Aliquam atque iusto est maxime nam ea incidunt qui."
}
{
  "customer": {
    "id": 1
  },
  "external_id": "223",
  "is_return": false,
  "source": {
    "id": 1,
    "contact": {
      "name": "Jeromy Glover",
      "phone": "+19892508138"
    }
  },
  "destination": {
    "id": 2,
    "contact": {
      "name": "Afton Hermann",
      "phone": "+15042010052"
    }
  },
  "collections": [
    {
      "is_prepayment": true,
      "amount": 300,
      "currency": "USD",
      "type": 2
    }
  ],
  "requirements": {
    "proof_of_delivery": {
      "signature": false,
      "image": true
    },
    "skills": [
      null
    ]
  },
  "packages": [
    {
      "name": "bag",
      "type": 1,
      "width": 0.1,
      "length": 0.1,
      "quantity": 2
    }
  ],
  "pickup_scheduled_from": "2021-08-24 14:15",
  "pickup_scheduled_to": "2021-08-24 14:15",
  "delivery_scheduled_from": "2021-08-24 14:15",
  "delivery_scheduled_to": "2021-08-24 14:15",
  "tags": [
    null
  ],
  "notes": "Aliquam atque iusto est maxime nam ea incidunt qui."
}
Response example (200)
{
  "message": "success",
  "data": {
    "order": {
      "uuid": "20c48af2-cb48-40e7-9d1f-372f9ec5bfbc",
      "order_number": "364237070308212736",
      "external_id": "22322423345678",
      "status": "1",
      "created_date": "2022-05-09T10:36:12.000000Z",
      "requirements": {
        "skills": [
          null
        ],
        "proof_of_delivery": {
          "image": true,
          "signature": true
        }
      },
      "pickup_time_window": {
        "from": "2019-08-24 06:15:22",
        "to": "2019-08-24 06:15:22"
      },
      "delivery_time_window": {
        "from": "2019-08-24 06:15:22",
        "to": "2019-08-24 06:15:22"
      },
      "source_contact": {
        "name": "Jeromy Glover",
        "phone": "+19892508138",
        "email": "example@hotmail.com"
      },
      "destination_contact": {
        "name": "Afton Hermann",
        "phone": "+15042010052",
        "email": "example@hotmail.com"
      },
      "notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
      "collections": [
        {
          "uuid": "67caae46-d397-4068-a9a2-c6fc02eef93a",
          "amount": 300,
          "currency": "USD",
          "amount_formatted": "$300.00",
          "type": 1,
          "is_prepayment": true
        }
      ],
      "is_late": true,
      "flags": {
        "can_assign": true,
        "can_unassign": false,
        "can_cancel": true
      },
      "in_coverage": false
    }
  }
}

Generate Labels

POST /orders/generate-labels

Generate labels for specified array of orders.

Body

Post the necessary fields for the API to generate labels.

Responses
  • 200 object

    Generated.

    • message string
    • data object
      • url string

        The url of the generated labels.

POST /orders/generate-labels
curl \
 -X POST https://{workspace}.fleetrunnr.com/api/v1/orders/generate-labels \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"orders":["8eb8168d-07e3-4bf9-a678-636689d1a876"],"shipping_label_id":1}'
Request example
{
  "orders": [
    "8eb8168d-07e3-4bf9-a678-636689d1a876"
  ],
  "shipping_label_id": 1
}
Response example (200)
{
  "message": "success",
  "data": {
    "url": "https://s3.eu-west-1.amazonaws.com/media.fleetrunnr/6e92736d-7f41-46de-9c72-6c8b74990722.pdf?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA3GLSPZCROCOCUP7S%2F20220401%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220401T094455Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=51eda1ef262f8a0e21786814735a6144e6e157b867250892182fcbf0f04ca414"
  }
}

Update Order

PATCH /orders/{id}

Update the information of an order with matching order ID.

Body

Post the necessary fields for the API to update order.

  • tags array

    The order's array of tags.

  • external_id string

    The order's unique external id.

  • pickup_scheduled_from string(date-time)

    The order's picked schedule from date.
    Must be in UTC timezone.

  • pickup_scheduled_to string(date-time)

    The order's picked schedule to date.
    Must be in UTC timezone.

  • delivery_scheduled_from string(date-time)

    The order's delivery schedule from date.
    Must be in UTC timezone.

  • delivery_scheduled_from string(date-time)

    The order's delivery schedule to date.
    Must be in UTC timezone.

  • notes string

    The order's notes.

  • The order's shipping method id.

  • requirements object

    The order's requirements.

    • The requirement proof of delivery.

      • signatue boolean

        The proof of delivery signature.
        Required with proof of delivery.

      • image boolean

        The proof of delivery image.
        Required with proof of delivery.

    • skills array

      The requirement skills.

Responses
PATCH /orders/{id}
curl \
 -X PATCH https://{workspace}.fleetrunnr.com/api/v1/orders/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"tags":[null],"external_id":"44332","pickup_scheduled_from":"2021-08-24 14:15","pickup_scheduled_to":"2021-08-24 14:15","delivery_scheduled_from":"2021-08-24 14:15","delivery_scheduled_to":"2021-08-24 14:15","notes":"Aliquam atque iusto est maxime nam ea incidunt qui.","shipping_method_id":1,"requirements":{"proof_of_delivery":{"signatue":true,"image":false},"skills":[null]}}'
Request example
{
  "tags": [
    null
  ],
  "external_id": "44332",
  "pickup_scheduled_from": "2021-08-24 14:15",
  "pickup_scheduled_to": "2021-08-24 14:15",
  "delivery_scheduled_from": "2021-08-24 14:15",
  "delivery_scheduled_to": "2021-08-24 14:15",
  "notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
  "shipping_method_id": 1,
  "requirements": {
    "proof_of_delivery": {
      "signatue": true,
      "image": false
    },
    "skills": [
      null
    ]
  }
}
Response example (200)
{
  "message": "success",
  "data": {
    "order": {
      "uuid": "0a4bbb2b-eb1c-48cb-b294-c5ebfd017449",
      "order_number": "363248405377449984",
      "external_id": "22378",
      "tags": null,
      "notes": "Aliquam atque iusto est maxime nam ea incidunt qui.",
      "shipping_method_name": null,
      "shipping_method_fee": 0,
      "requirements": {
        "skills": [
          null
        ],
        "proof_of_delivery": {
          "image": true,
          "signature": true
        }
      },
      "pickup_time_window": {
        "from": "2019-08-24 14:15:22",
        "to": "2019-08-24 14:15:22"
      },
      "delivery_time_window": {
        "from": "2019-08-24 14:15:22",
        "to": "2019-08-24 14:15:22"
      }
    }
  }
}

Assign order to carrier

POST /orders/{id}/assign

Assign order to carrier

Body

Post the necessary fields for the API to assign order.

Responses
POST /orders/{id}/assign
curl \
 -X POST https://{workspace}.fleetrunnr.com/api/v1/orders/{id}/assign \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"carrier_account_id":1,"shipping_method_id":1}'
Request example
{
  "carrier_account_id": 1,
  "shipping_method_id": 1
}
Response example (200)
{
  "message": "success",
  "data": {
    "order_uuid": "1ebfc1c4-46a1-4a10-95f9-8db9a3edcaeb"
  }
}

Cancel Order

POST /orders/{id}/cancel

Cancel the order with the matching order ID.

Responses
POST /orders/{id}/cancel
curl \
 -X POST https://{workspace}.fleetrunnr.com/api/v1/orders/{id}/cancel \
 -H "Authorization: Bearer $ACCESS_TOKEN"
Response example (200)
{
  "message": "success"
}