Expedock API Reference API Reference

The Expedock API is organized around REST. Our API has resource-oriented URLs, returns JSON-encoded responses, and uses standard HTTP response codes, authentication tokens, and verbs. All requests are authenticated by using an API key that you can obtain by contacting expedock. You can authenticate by setting the HTTP Authorization header to Bearer <YOUR_API_KEY_HERE>

API Endpoint
https://api.expedock.com/api/v1
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: 1.0

Authentication

ApiKey

name
Bearer api_key
in
Authorization header

Paths

POST /document/air-waybill

Upload any air waybill document and extract fields related to the shipment. Supports two content types: application/json and multipart/form-data. If the content is multipart/form-data, accepts email, company and document file as form parameters and parses the file uploaded in the form as the air waybill.

X-Fields: string (mask)
in header

An optional fields mask

Request Example
{
  "company": "string",
  "email": "string",
  "document": "string"
}
200 OK

Success

Response Example (200 OK)
{
  "id": "integer",
  "awb_number": "string",
  "destination_airport": "string",
  "departure_airport": "string",
  "nature_and_quantity_of_goods": "string",
  "issuing_carrier_name": "string",
  "issuing_carrier_address": "string",
  "iata_code": "string",
  "master_airwaybill_number": "string",
  "shipper_name": "string",
  "shipper_address": "string",
  "consignee_name": "string",
  "consignee_address": "string",
  "gross_weight": "string",
  "user_id": "integer",
  "type": "string"
}

POST /document/bill-of-lading

Upload any bill of lading document and extract fields related to the shipment out. Supports two content types: application/json and multipart/form-data. If the content is multipart/form-data, accepts the email, company and document file as form parameters and parses the file uploaded in the form as the bill of lading.

X-Fields: string (mask)
in header

An optional fields mask

Request Example
{
  "company": "string",
  "email": "string",
  "document": "string"
}
200 OK

Success

Response Example (200 OK)
{
  "id": "integer",
  "bl_number": "string",
  "gross_weight": "string",
  "origin_port": "string",
  "destination_port": "string",
  "marks_and_numbers": "string",
  "shipper_name": "string",
  "shipper_address": "string",
  "consignee_name": "string",
  "consignee_address": "string",
  "measurement": "string",
  "notify_party_name": "string",
  "notify_party_address": "string",
  "description": "string",
  "user_id": "integer",
  "type": "string"
}

POST /document/invoice

BETA: Upload any invoice document and extract fields related to the shipment and line items out. Supports two content types: application/json and multipart/form-data. If the content is multipart/form-data, accepts the email, company and document file as form parameters and parses the file uploaded in the form as the invoice.

X-Fields: string (mask)
in header

An optional fields mask

Request Example
{
  "company": "string",
  "email": "string",
  "document": "string"
}
200 OK

Success

Response Example (200 OK)
{
  "id": "integer",
  "line_items": [
    {
      "description": "string",
      "unit_price": "string",
      "quantity": "string",
      "unit": "string",
      "amount": "string",
      "model_number": "string",
      "brand": "string",
      "discount_price": "string",
      "discount_percent": "string",
      "po_number": "string",
      "packing": "string",
      "transfer_price": "string",
      "lot": "string",
      "expiry": "string",
      "country_of_origin": "string",
      "line_number": "string",
      "customer_part_number": "string",
      "vat": "string"
    }
  ],
  "user_id": "integer",
  "type": "string"
}

GET /documents

Get all document details uploaded (both air and sea) through the expedock platform since the start time specified

company: string
in query

(optional): company account string of the user. defaults to null

email: string
in query

(required) email of the user who the document belongs to.

start: string
in query

(optional) start time in ISO8601 format (for example: 2020-05-11T06:52:53Z) Returns all shipments created after that start time. If none specified, returns all shipments ever created for a given company and email

page: string
in query

(optional): default value: 1. A positive integer indicating which page of documents to return. Each page is up to 1000 documents long.

sort_order: string
in query

(optional) default is "asc". Can be "asc" (ascending) or "desc" (descending). If "asc", documents are ordered oldest documents first. If "desc", documents are ordered newest documents first.

200 OK

Success

Response Example (200 OK)
{
  "total": "integer",
  "page": "integer",
  "data": [
    {
      "id": "integer",
      "bl_number": "string",
      "gross_weight": "string",
      "origin_port": "string",
      "destination_port": "string",
      "marks_and_numbers": "string",
      "shipper_name": "string",
      "shipper_address": "string",
      "consignee_name": "string",
      "consignee_address": "string",
      "measurement": "string",
      "notify_party_name": "string",
      "notify_party_address": "string",
      "description": "string",
      "user_id": "integer",
      "type": "string"
    }
  ]
}

Schema Definitions

DocumentCreationParams: object

company: string

Company account string of the user uploading the file

email: string

Email of the user who the document belongs to

document: string

URL of a bill of lading image

Example
{
  "company": "string",
  "email": "string",
  "document": "string"
}

AirWaybill: object

id: integer

The air waybill id number

awb_number: string

The air waybill number

destination_airport: string

The destination airport

departure_airport: string

The departure airport

nature_and_quantity_of_goods: string

The description of goods

issuing_carrier_name: string

The issuing carrier name

issuing_carrier_address: string

The issuing carrier address

iata_code: string

The agent's IATA code

master_airwaybill_number: string

The master air waybill number

shipper_name: string

The shipper name

shipper_address: string

The shipper address

consignee_name: string

The consignee name

consignee_address: string

The consignee address

gross_weight: string

The gross weight of the shipment

user_id: integer

The user id who the shipment details was created under

type: string AirWaybill

The type of the document. Always AirWaybill for this type

Example
{
  "id": "integer",
  "awb_number": "string",
  "destination_airport": "string",
  "departure_airport": "string",
  "nature_and_quantity_of_goods": "string",
  "issuing_carrier_name": "string",
  "issuing_carrier_address": "string",
  "iata_code": "string",
  "master_airwaybill_number": "string",
  "shipper_name": "string",
  "shipper_address": "string",
  "consignee_name": "string",
  "consignee_address": "string",
  "gross_weight": "string",
  "user_id": "integer",
  "type": "string"
}

BillOfLading: object

id: integer

The bill of lading id number

bl_number: string

The B/L number

gross_weight: string

The gross weight

origin_port: string

The shipment origin port

destination_port: string

The shipment destination point

marks_and_numbers: string

The shipment marks

shipper_name: string

The shipper name

shipper_address: string

The shipper address

consignee_name: string

The consignee name

consignee_address: string

The consignee address

measurement: string

Measurement of goods

notify_party_name: string

The notify party name

notify_party_address: string

The notify party address

description: string

The description of goods

user_id: integer

The user id who the shipment details was created under

type: string BillOfLading

The type of the document. Always BillOfLading for this type

Example
{
  "id": "integer",
  "bl_number": "string",
  "gross_weight": "string",
  "origin_port": "string",
  "destination_port": "string",
  "marks_and_numbers": "string",
  "shipper_name": "string",
  "shipper_address": "string",
  "consignee_name": "string",
  "consignee_address": "string",
  "measurement": "string",
  "notify_party_name": "string",
  "notify_party_address": "string",
  "description": "string",
  "user_id": "integer",
  "type": "string"
}

Invoice: object

id: integer

The ID of the invoice

line_items: LineItem
LineItem
user_id: integer

The user id who the shipment details was created under

type: string Invoice

The type of the document. Always Invoice for this type

Example
{
  "id": "integer",
  "line_items": [
    {
      "description": "string",
      "unit_price": "string",
      "quantity": "string",
      "unit": "string",
      "amount": "string",
      "model_number": "string",
      "brand": "string",
      "discount_price": "string",
      "discount_percent": "string",
      "po_number": "string",
      "packing": "string",
      "transfer_price": "string",
      "lot": "string",
      "expiry": "string",
      "country_of_origin": "string",
      "line_number": "string",
      "customer_part_number": "string",
      "vat": "string"
    }
  ],
  "user_id": "integer",
  "type": "string"
}

LineItem: object

description: string

The description of the good in the line item

unit_price: string

The unit price of the line item

quantity: string

The line item quantity

unit: string

The line item unit

amount: string

The line item amount

model_number: string

The line item model number

brand: string

The line item brand

discount_price: string

The line item discount price

discount_percent: string

The line item discount percent

po_number: string

The line item po number field

packing: string

The line item packing field

transfer_price: string

The line transfer price

lot: string

The line item lot field

expiry: string

The line item expiry field

country_of_origin: string

The line item country of origin

line_number: string

The line item line number

customer_part_number: string

The line item line customer part field

vat: string

The line item line vat field

Example
{
  "description": "string",
  "unit_price": "string",
  "quantity": "string",
  "unit": "string",
  "amount": "string",
  "model_number": "string",
  "brand": "string",
  "discount_price": "string",
  "discount_percent": "string",
  "po_number": "string",
  "packing": "string",
  "transfer_price": "string",
  "lot": "string",
  "expiry": "string",
  "country_of_origin": "string",
  "line_number": "string",
  "customer_part_number": "string",
  "vat": "string"
}

DocumentList: object

total: integer
page: integer
data: BillOfLading
BillOfLading
Example
{
  "total": "integer",
  "page": "integer",
  "data": [
    {
      "id": "integer",
      "bl_number": "string",
      "gross_weight": "string",
      "origin_port": "string",
      "destination_port": "string",
      "marks_and_numbers": "string",
      "shipper_name": "string",
      "shipper_address": "string",
      "consignee_name": "string",
      "consignee_address": "string",
      "measurement": "string",
      "notify_party_name": "string",
      "notify_party_address": "string",
      "description": "string",
      "user_id": "integer",
      "type": "string"
    }
  ]
}